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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f7fa;
    color: #333;
}

/* Header */
.header {
    background: #1a1f36;
    color: white;
    padding: 0.6rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.header-brand i {
    color: #667eea;
    font-size: 1rem;
}

.header-title {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.nav-link {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.15s;
}

.nav-link:hover {
    color: white;
    background: rgba(255,255,255,0.06);
}

.nav-link.active {
    color: white;
    background: rgba(102, 126, 234, 0.25);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.logout-btn {
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    padding: 0.4rem;
    border-radius: 6px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn:hover {
    color: #fc8181;
    background: rgba(252, 129, 129, 0.1);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

.login-container h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

/* Form */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #333;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-danger {
    background: #fc8181;
    color: white;
}

.btn-warning {
    background: #ecc94b;
    color: #333;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

/* Table */
.table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.table thead {
    background: #f7fafc;
    border-bottom: 2px solid #e2e8f0;
}

.table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.table tbody tr:hover {
    background: #f7fafc;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-admin {
    background: #fc8181;
    color: white;
}

.badge-manager {
    background: #ecc94b;
    color: #333;
}

.badge-staff {
    background: #68d391;
    color: white;
}

.badge-success {
    background: #48bb78;
    color: white;
}

.badge-danger {
    background: #fc8181;
    color: white;
}

/* Alert */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.alert-danger {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #feb2b2;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideDown 0.3s;
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #a0aec0;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 1.5rem;
    color: #2c3e50;
}

/* ===== Export Actions (Minimalist) ===== */
.export-actions {
    margin-bottom: 1rem;
}

.export-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    background: #ffffff;
    border: 1px solid #e8edf2;
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
}

.export-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.export-filter i {
    color: #94a3b8;
    font-size: 0.85rem;
}

.export-filter input[type="month"] {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-size: 0.85rem;
    color: #334155;
    padding: 0.3rem 0;
    outline: none;
    font-family: inherit;
}

.btn-export-view {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #64748b;
    width: 32px;
    height: 32px;
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.15s;
}

.btn-export-view:hover {
    background: #f1f5f9;
    color: #334155;
}

.export-buttons {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.btn-export-download {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 0.4rem 0.75rem;
    border-radius: 7px;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: all 0.15s;
}

.btn-export-download:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

.btn-export-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #e2e8f0;
    color: #94a3b8;
    border-radius: 7px;
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.15s;
}

.btn-export-back:hover {
    background: #f8fafc;
    color: #64748b;
}

/* Report Form */
.report-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    max-width: 800px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: center;
}

.stat-card .number {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

.stat-card .label {
    color: #718096;
    margin-top: 0.5rem;
}

/* ===== Professional Report Form ===== */
.form-page {
    max-width: 860px;
    margin: 0 auto;
}

.form-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 1.5rem;
    border-left: 4px solid #667eea;
}

.form-header-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.form-header-text h2 {
    font-size: 1.4rem;
    color: #1a202c;
    margin: 0;
    font-weight: 700;
}

.form-date {
    color: #718096;
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
}

.form-date i {
    color: #667eea;
    margin-right: 0.3rem;
}

.form-date-input {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.form-date-input i {
    color: #667eea;
    font-size: 1rem;
}

.form-date-input input[type="date"] {
    padding: 0.5rem 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #2d3748;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s;
}

.form-date-input input[type="date"]:hover {
    border-color: #667eea;
}

.form-date-input input[type="date"]:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#dateLabel {
    color: #718096;
    font-size: 0.9rem;
}

.report-form-pro {
    background: transparent;
}

.entry-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #edf2f7;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.entry-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.entry-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: #f8fafc;
    border-bottom: 1px solid #edf2f7;
}

.entry-number {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.9rem;
}

.entry-number.num {
    color: #667eea;
    font-weight: 700;
}

.btn-remove-entry {
    background: none;
    border: none;
    color: #cbd5e0;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-remove-entry:hover {
    background: #fed7d7;
    color: #e53e3e;
}

.entry-card-body {
    padding: 1.25rem;
}

.entry-card-body .form-group {
    margin-bottom: 1rem;
}

.entry-card-body .form-group:last-child {
    margin-bottom: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-add-entry {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.9rem;
    background: #f7fafc;
    border: 2px dashed #cbd5e0;
    border-radius: 10px;
    color: #4a5568;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 1.5rem;
}

.btn-add-entry:hover {
    border-color: #667eea;
    color: #667eea;
    background: #edf2ff;
}

.form-footer {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #edf2f7;
    padding: 1.25rem;
}

.form-footer .form-group {
    margin-bottom: 1.25rem;
}

.form-footer .form-group:last-child {
    margin-bottom: 0;
}

.status-group select {
    max-width: 300px;
}

.form-footer .form-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #edf2f7;
}

.btn-lg {
    padding: 0.85rem 2rem;
    font-size: 1rem;
}

/* ===== Search & Filter Form ===== */
.search-filter-form {
    background: white;
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #edf2f7;
}

.search-box {
    position: relative;
    margin-bottom: 1rem;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 0.95rem;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #f8fafc;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-box input::placeholder {
    color: #a0aec0;
}

.filter-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: end;
}

.filter-row .form-group {
    flex: 1;
    min-width: 140px;
    margin-bottom: 0;
}

.filter-row .form-group.btn-group {
    flex: 0;
    display: flex;
    gap: 0.5rem;
}

.filter-row label {
    font-size: 0.8rem;
    color: #718096;
    margin-bottom: 0.3rem;
    display: block;
}

.filter-row input,
.filter-row select {
    padding: 0.55rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    width: 100%;
}

/* ===== History List ===== */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-card {
    background: white;
    border-radius: 10px;
    border: 1px solid #edf2f7;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.history-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.history-card.is-today {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.history-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #edf2f7;
}

.history-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-badge {
    font-weight: 600;
    font-size: 0.85rem;
    color: #2d3748;
}

.date-badge i {
    color: #667eea;
    margin-right: 0.2rem;
}

.day-name {
    font-size: 0.75rem;
    color: #a0aec0;
    text-transform: uppercase;
}

.today-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
}

.history-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-card-body {
    padding: 0.5rem 1rem;
}

.history-item {
    display: flex;
    gap: 0.65rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f7fafc;
}

.history-item:last-child {
    border-bottom: none;
}

.item-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.item-content {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
    flex: 1;
}

.item-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: #718096;
}

.item-activity {
    font-size: 0.85rem;
    color: #2d3748;
    line-height: 1.4;
}

.item-desc {
    font-size: 0.75rem;
    color: #a0aec0;
    font-style: italic;
}

.item-desc i {
    margin-right: 0.2rem;
}

/* ===== Pagination ===== */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem 0;
}

.pagination-info {
    font-size: 0.8rem;
    color: #a0aec0;
}

.pagination {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.pagination .btn {
    min-width: 34px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Timeline Layout (admin) ===== */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.timeline-date-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #edf2f7;
    overflow: hidden;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-bottom: 1px solid #edf2f7;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.timeline-date-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.timeline-date-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

.timeline-day-name {
    color: #718096;
    font-size: 0.85rem;
}

.timeline-user {
    color: #4a5568;
    font-size: 0.85rem;
    font-weight: 500;
}

.timeline-user i {
    color: #667eea;
}

.dept-badge {
    background: #edf2f7;
    color: #4a5568;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-left: 0.3rem;
}

.timeline-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-body {
    padding: 0.5rem 1.25rem;
}

.timeline-item {
    display: flex;
    gap: 0.85rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-item-marker {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: #f7fafc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.timeline-item-content {
    flex: 1;
}

.activity-header {
    margin-bottom: 0.3rem;
}

.category-name {
    font-weight: 600;
    font-size: 0.85rem;
}

.activity-text {
    color: #2d3748;
    font-size: 0.9rem;
    line-height: 1.5;
}

.activity-description {
    margin-top: 0.4rem;
    color: #718096;
    font-size: 0.8rem;
    font-style: italic;
}

.activity-description i {
    color: #a0aec0;
    margin-right: 0.25rem;
}

/* Filter Form */
.filter-form {
    background: white;
    padding: 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: end;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #edf2f7;
}

.filter-form .form-group {
    flex: 1;
    min-width: 140px;
    margin-bottom: 0;
}

.filter-form label {
    font-size: 0.8rem;
    color: #718096;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    padding: 1.25rem 0;
}

.pagination .btn {
    min-width: 36px;
    text-align: center;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.empty-state i {
    font-size: 3rem;
    color: #cbd5e0;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #a0aec0;
    font-size: 1rem;
}

/* Locked Form */
.locked-notice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: #c53030;
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.locked-notice i {
    font-size: 1.1rem;
}

.form-readonly .entry-card {
    opacity: 0.85;
}

.form-readonly .entry-card-body input,
.form-readonly .entry-card-body select,
.form-readonly .entry-card-body textarea {
    background: #f7fafc;
    cursor: not-allowed;
    border-color: #e2e8f0;
}

.form-readonly .entry-card-body input:focus,
.form-readonly .entry-card-body select:focus,
.form-readonly .entry-card-body textarea:focus {
    box-shadow: none;
    border-color: #e2e8f0;
}

.form-readonly .btn-add-entry {
    display: none;
}

/* ===== PDF Report ===== */
.pdf-container {
    background: #ffffff;
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 9.5pt;
    color: #2d3748;
    overflow: hidden;
}

/* --- Top accent bar --- */
.pdf-accent-bar {
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
}

/* --- Header --- */
.pdf-header {
    padding: 1.2rem 2rem 1rem;
    border-bottom: 1px solid #e8edf2;
}

.pdf-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.pdf-company {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 10pt;
    color: #1a202c;
    letter-spacing: 0.3px;
}

.pdf-company i {
    background: #667eea;
    color: #fff;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 7px;
    font-size: 13px;
}

.pdf-date-generated {
    font-size: 8pt;
    color: #718096;
    background: #f7fafc;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.pdf-title-section {
    text-align: center;
    padding: 0.1rem 0 0;
}

.pdf-title-section h1 {
    margin: 0 0 0.2rem;
    font-size: 15pt;
    font-weight: 800;
    color: #1a202c;
    letter-spacing: 1.5px;
}

.pdf-month {
    margin: 0;
    font-size: 10pt;
    color: #667eea;
    font-weight: 600;
}

.pdf-title-underline {
    width: 50px;
    height: 2px;
    background: #667eea;
    margin: 0.4rem auto 0;
    border-radius: 2px;
}

/* --- User info --- */
.pdf-user-info {
    margin: 1rem 2rem 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #667eea;
    border-radius: 8px;
    padding: 0.7rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.pdf-user-avatar {
    width: 36px;
    height: 36px;
    background: #667eea;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9pt;
}

.info-table td {
    padding: 0.12rem 0;
    vertical-align: top;
}

.info-label {
    width: 110px;
    color: #4a5568;
}

.info-sep {
    width: 12px;
    color: #a0aec0;
}

.info-value {
    font-weight: 700;
    color: #1a202c;
}

/* --- Summary (Box Row) --- */
.pdf-summary {
    display: flex;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.pdf-stat-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.5rem 0.4rem;
    background: #f8fafc;
    border: 1px solid #e8edf2;
    border-radius: 7px;
}

.pdf-stat-number {
    font-size: 12pt;
    font-weight: 800;
    color: #1a202c;
    line-height: 1.1;
}

.pdf-stat-label {
    font-size: 7pt;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* --- Category Stats (Box Row) --- */
.pdf-category-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.pdf-cat-box {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.6rem;
    background: #f8fafc;
    border: 1px solid #e8edf2;
    border-radius: 7px;
}

.pdf-cat-icon {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8pt;
    flex-shrink: 0;
}

.pdf-cat-name {
    font-size: 8pt;
    color: #4a5568;
    white-space: nowrap;
}

.pdf-cat-count {
    font-size: 10pt;
    font-weight: 800;
    color: #1a202c;
}

/* --- Content --- */
.pdf-content-section {
    padding: 0.3rem 2rem 0;
}

/* --- Day name in table --- */
.pdf-day-name {
    display: block;
    color: #94a3b8;
    font-size: 7.5pt;
    font-style: italic;
}

/* --- Table --- */
.pdf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 8.5pt;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.pdf-table thead th {
    background: #eef0fb;
    color: #33475b;
    font-weight: 700;
    text-align: left;
    padding: 0.4rem 0.6rem;
    border: none;
    border-bottom: 2px solid #c3bffd;
    font-size: 8pt;
    letter-spacing: 0.3px;
}

.pdf-table tbody td {
    padding: 0.4rem 0.6rem;
    border: none;
    border-bottom: 1px solid #f0f3f7;
    vertical-align: top;
    color: #2d3748;
    line-height: 1.4;
}

.pdf-table tbody tr:nth-child(even) {
    background: #fafbff;
}

.pdf-table tbody tr:hover {
    background: #f1f0ff;
}

.pdf-table tbody tr:last-child td {
    border-bottom: none;
}

/* --- Category badge --- */
.pdf-cat-badge {
    display: inline-block;
    font-weight: 600;
    font-size: 7.5pt;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    white-space: nowrap;
}

.pdf-desc {
    font-size: 8pt;
    color: #4a5568;
}

/* --- Empty state --- */
.pdf-empty {
    text-align: center;
    padding: 2rem;
    color: #a0aec0;
}

.pdf-empty i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
    color: #cbd5e1;
}

/* --- Footer --- */
.pdf-footer {
    margin-top: 1rem;
    border-top: 1px solid #e8edf2;
    padding: 0.6rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafbff;
}

.pdf-footer-left {
    font-size: 7.5pt;
    color: #94a3b8;
}

.pdf-footer-right {
    font-size: 7.5pt;
    color: #94a3b8;
    font-style: italic;
}


/* ===== Report Detail ===== */
.detail-container {
    max-width: 800px;
    margin: 0 auto;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1.25rem 1.5rem;
    border-radius: 12px 12px 0 0;
    border: 1px solid #edf2f7;
    border-bottom: none;
}

.detail-header-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.detail-header-info h3 {
    font-size: 1.15rem;
    color: #1a202c;
    margin: 0 0 0.3rem;
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: #718096;
}

.detail-meta i {
    color: #667eea;
    margin-right: 0.2rem;
}

.detail-body {
    background: white;
    padding: 1.5rem;
    border-radius: 0 0 12px 12px;
    border: 1px solid #edf2f7;
    border-top: none;
}

.activity-count {
    background: #f0f4ff;
    color: #667eea;
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: inline-block;
}

.detail-activity-card {
    display: flex;
    gap: 0.85rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 0.75rem;
}

.detail-activity-card:last-of-type {
    margin-bottom: 1rem;
}

.activity-number {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.activity-number .num {
    font-size: 0.7rem;
    color: #a0aec0;
    font-weight: 600;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.activity-details {
    flex: 1;
    min-width: 0;
}

.activity-category {
    font-weight: 600;
    font-size: 0.85rem;
    color: #4a5568;
    margin-bottom: 0.3rem;
}

.activity-text {
    color: #2d3748;
    font-size: 0.9rem;
    line-height: 1.5;
}

.activity-note {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #718096;
    font-style: italic;
    border-left: 3px solid #ecc94b;
}

.activity-note i {
    color: #ecc94b;
    margin-right: 0.25rem;
}

.detail-timestamps {
    padding-top: 1rem;
    border-top: 1px solid #edf2f7;
    font-size: 0.75rem;
    color: #a0aec0;
}

.detail-timestamps p {
    margin: 0.2rem 0;
}

.detail-timestamps i {
    margin-right: 0.25rem;
}

/* Badge submitted */
.badge-submitted {
    background: #667eea;
    color: white;
}

.badge-draft {
    background: #ecc94b;
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .form-header {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-footer .form-actions {
        flex-direction: column;
    }

    .btn-lg {
        width: 100%;
        text-align: center;
    }

    .status-group select {
        max-width: 100%;
    }

    .filter-row {
        flex-direction: column;
    }

    .filter-row .form-group {
        min-width: 100%;
    }

    .history-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .header {
        flex-wrap: wrap;
        gap: 0.4rem 0.75rem;
        padding: 0.5rem 0.75rem;
    }

    .header-brand {
        width: 100%;
    }

    .header-nav {
        flex-wrap: wrap;
        justify-content: flex-start;
        flex: 1;
        gap: 0.1rem;
    }

    .nav-link {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }

    .header-user {
        gap: 0.25rem;
    }

    .user-avatar {
        width: 26px;
        height: 26px;
        font-size: 0.65rem;
    }
    
    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .page-header h2 {
        font-size: 1.1rem;
        text-align: center;
    }

    .page-header > div {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .page-header .btn {
        display: flex;
        width: 100%;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .export-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0.6rem;
    }

    .export-filter {
        width: 100%;
    }

    .export-filter input[type="month"] {
        width: 100%;
    }

    .export-buttons {
        justify-content: stretch;
    }

    .btn-export-download {
        flex: 1;
        justify-content: center;
    }

    .pdf-container {
        border-radius: 0;
        box-shadow: none;
    }

    .pdf-header {
        padding: 0.8rem 1rem 0.6rem;
    }

    .pdf-header-top {
        margin-bottom: 0.5rem;
    }

    .pdf-company {
        font-size: 9pt;
    }

    .pdf-company i {
        width: 24px;
        height: 24px;
        line-height: 24px;
        font-size: 11px;
    }

    .pdf-title-section h1 {
        font-size: 12pt;
        letter-spacing: 1px;
    }

    .pdf-user-info {
        margin: 0.8rem 1.2rem 0;
        padding: 0.6rem 0.8rem;
    }

    .pdf-summary {
        flex-wrap: wrap;
        gap: 0.35rem;
        padding: 0.5rem 1rem;
    }

    .pdf-stat-box {
        flex: 1 1 calc(50% - 0.35rem);
        padding: 0.4rem;
    }

    .pdf-stat-number {
        font-size: 10pt;
    }

    .pdf-category-stats {
        gap: 0.3rem;
        padding: 0.4rem 1rem;
    }

    .pdf-content-section {
        padding: 0.3rem 1.2rem 0;
    }

    .pdf-footer {
        padding: 0.5rem 1.2rem;
        flex-direction: column;
        gap: 0.3rem;
        text-align: center;
    }

    .pdf-table {
        font-size: 8pt;
    }

    .pdf-table thead th,
    .pdf-table tbody td {
        padding: 0.35rem 0.5rem;
    }

    .table {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
        width: 95%;
    }
    
}