* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Login Page Styles */
.login-body {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.login-header p {
    color: #7f8c8d;
}

.login-form {
    margin-bottom: 20px;
}

/* Main App Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header-info h1 {
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 1.5rem;
}

.header-info p {
    color: #7f8c8d;
    margin: 0;
}

.logout-btn {
    padding: 10px 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Date Input Styles */
.date-input-container, .date-filter-container {
    position: relative;
    width: 100%;
}

.native-datepicker {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.display-datepicker {
    width: 100%;
    padding: 12px 45px 12px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background: #fff;
    cursor: pointer;
}

.calendar-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    z-index: 1;
    pointer-events: none;
}

input[type="time"],
input[type="text"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    background: #fff;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

textarea {
    height: 120px;
    resize: vertical;
    font-family: inherit;
}

.time-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* File Upload Styles */
.file-upload-btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    text-align: center;
    border: 2px solid #3498db;
    margin-bottom: 10px;
}

.file-upload-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.upload-section {
    margin-top: 10px;
}

.upload-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.preview-item {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

.preview-item img,
.preview-item video {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}

.preview-item .remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(255,0,0,0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: #3498db;
    color: white;
    padding: 14px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #27ae60;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: #219a52;
}

.btn-outline {
    background: transparent;
    color: #e74c3c;
    padding: 12px 20px;
    border: 2px solid #e74c3c;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-outline:hover {
    background: #e74c3c;
    color: white;
}

.btn-generate {
    background: #9b59b6 !important;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-generate:hover {
    background: #8e44ad !important;
    transform: translateY(-2px);
}

/* Filter Section */
.filter-section {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.date-filter-container {
    position: relative;
    min-width: 150px;
    flex: 1;
}

.reports-list {
    max-height: 500px;
    overflow-y: auto;
}

.report-item {
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.report-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
}

.report-type.harian {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.report-type.tambahan {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.report-actions {
    display: flex;
    gap: 10px;
}

.duration {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    color: #495057;
}

.no-reports {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px 20px;
}

/* Evidence Section Styles */
.evidence-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.evidence-preview {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.evidence-item {
    border: 2px solid #3498db;
    border-radius: 8px;
    padding: 4px;
    background: white;
}

.evidence-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

/* Report Meta Styles */
.report-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: #e8f4fd;
    border-radius: 6px;
    font-size: 0.85em;
}

.report-meta small {
    color: #2c3e50;
}

.time-info {
    margin-bottom: 10px;
    padding: 5px 0;
}

.time-info small {
    color: #7f8c8d;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.work-details {
    background: white;
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #3498db;
    margin: 10px 0;
}

.work-details p {
    margin: 0;
    color: #2c3e50;
    line-height: 1.5;
}

.no-evidence {
    text-align: center;
    color: #95a5a6;
    font-style: italic;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-top: 10px;
}

.evidence-section strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 8px;
}

.help-text {
    color: #6c757d;
    font-size: 0.85em;
    margin-top: 5px;
    display: block;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .header-info h1 {
        font-size: 1.3rem;
    }
    
    section {
        padding: 20px 15px;
    }
    
    h2 {
        font-size: 1.2rem;
    }
    
    .filter-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .date-filter-container,
    .filter-group select,
    .filter-group button {
        width: 100%;
    }
    
    .time-group {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .evidence-preview {
        justify-content: center;
    }
    
    .report-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .report-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .report-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .container {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .header-info h1 {
        font-size: 1.1rem;
    }
    
    h2 {
        font-size: 1.1rem;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-outline,
    .btn-generate {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .report-item {
        padding: 15px;
    }
    
    .evidence-item img {
        width: 60px;
        height: 60px;
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    .btn-primary,
    .btn-secondary,
    .btn-outline,
    .btn-generate,
    .file-upload-btn {
        min-height: 44px;
    }
    
    input,
    select,
    textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .native-datepicker {
        min-height: 44px;
    }
}