/* Modern Theme - Mitra BKK "Kekinian" */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Brand Colors derived from Kemenkes Logo */
    --primary-color: #009B97;
    /* Teal Kemenkes */
    --primary-dark: #007c79;
    --primary-light: #e0f2f1;
    --secondary-color: #2D9CDB;
    /* Blue */
    --accent-color: #F2994A;
    /* Orange/Gold */
    --accent-hover: #e67e22;

    /* Semantic Colors */
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --info-color: #3B82F6;

    /* Neutrals */
    --bg-body: #f3f6f9;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;

    /* Effects */
    --shadow-sm: 0 2px 4px rgba(148, 163, 184, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(148, 163, 184, 0.1), 0 2px 4px -1px rgba(148, 163, 184, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(148, 163, 184, 0.1), 0 4px 6px -2px rgba(148, 163, 184, 0.05);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.025em;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* --- Layout --- */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    padding-top: 80px;
    /* Space for fixed header */
}

/* --- Header --- */
.header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 50px;
    /* Adjust based on logo aspect ratio */
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text h1 {
    font-size: 1.25rem;
    color: var(--primary-color);
    line-height: 1.2;
}

.logo-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
}



.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* --- Sidebar --- */
.sidebar {
    width: 260px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    height: calc(100vh - 130px);
    position: fixed;
    overflow-y: auto;
    left: 0;
    top: 80px;
    padding: 24px 16px;
    z-index: 900;
    transition: var(--transition);
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--primary-light);
    color: var(--primary-color);
    transform: translateX(4px);
}

.sidebar-menu a.active {
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

/* Mobile logout - hidden on desktop */
.mobile-logout {
    display: none;
}

.mobile-logout .logout-link {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: white !important;
    margin-top: 15px;
    border-radius: var(--radius-md);
}

.mobile-logout .logout-link:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
    transform: translateX(0) !important;
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
    padding-bottom: 80px;
    max-width: 1200px;
    /* Limit width for readability */
    width: calc(100% - 260px);
    min-height: calc(100vh - 80px);
}

/* --- Dashboard Footer --- */
.dashboard-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1e293b;
    color: #94a3b8;
    text-align: center;
    padding: 15px 20px;
    font-size: 0.85rem;
    z-index: 1000;
}

.dashboard-footer a {
    color: #60a5fa;
    text-decoration: none;
}

.dashboard-footer a:hover {
    text-decoration: underline;
}

.page-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
}

/* --- Cards --- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    padding: 24px;
    margin-bottom: 24px;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.card-title {
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 700;
}

/* --- Stats Grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.stat-icon.orange {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
}

.stat-icon.purple {
    background: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
}

.stat-info h3 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--text-main);
}

.stat-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    background-color: #f8fafc;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 155, 151, 0.1);
    /* Primary color ring */
    background-color: #fff;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    /* Pill shape */
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: 6px;
    line-height: 1.4;
    height: auto;
    min-height: 32px;
    box-sizing: border-box;
}

button.btn-sm {
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(0, 155, 151, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 155, 151, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1.5px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-body);
    border-color: var(--text-muted);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid currentColor;
}

/* --- Tables --- */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th,
td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tr:hover td {
    background-color: #f8fafc;
}

/* --- Pills / Badges --- */
.badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
}

.badge-primary {
    background: rgba(0, 155, 151, 0.1);
    color: var(--primary-color);
}

/* --- Login & Auth --- */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../assets/img/pattern.svg'), linear-gradient(135deg, var(--bg-body) 0%, #e2e8f0 100%);
    padding: 20px;
}

.auth-card {
    background: white;
    width: 100%;
    max-width: 450px;
    padding: 40px;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header .logo-container {
    margin-bottom: 20px;
}

.auth-header img {
    height: 80px;
    width: auto;
    object-fit: contain;
}

.role-tabs {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 50px;
    margin-bottom: 30px;
}

.role-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 50px;
    color: var(--text-muted);
    font-weight: 600;
    transition: var(--transition);
}

.role-tab.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* File Input Custom */
.file-input-wrapper {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    background: #f8fafc;
    cursor: pointer;
}

.file-input-wrapper:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.file-input-wrapper input[type=file] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.alert {
    padding: 15px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* === Modern Modal Styles === */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalOverlayFadeIn 0.3s ease-out;
}

.modal-overlay.active {
    display: flex;
}

@keyframes modalOverlayFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-container {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center center;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.8) 0%, rgba(255, 255, 255, 0) 100%);
}

.modal-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.modal-header-icon.danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
    color: var(--danger-color);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.modal-header-icon.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: var(--success-color);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.modal-header-icon.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
    color: var(--warning-color);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.modal-header-icon.info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.05) 100%);
    color: var(--info-color);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.modal-header-content {
    flex: 1;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.modal-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 400;
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(100, 116, 139, 0.1);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.25rem;
    transition: var(--transition);
}

.modal-close-btn:hover {
    background: rgba(100, 116, 139, 0.2);
    color: var(--text-main);
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px 28px;
}

.modal-form-group {
    margin-bottom: 20px;
}

.modal-form-group:last-child {
    margin-bottom: 0;
}

.modal-form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.9rem;
}

.modal-form-label .required {
    color: var(--danger-color);
    margin-left: 2px;
}

.modal-form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    background-color: #f8fafc;
    resize: vertical;
}

.modal-form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 155, 151, 0.1);
    background-color: #fff;
}

.modal-form-control.error {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.modal-form-control::placeholder {
    color: #94a3b8;
}

textarea.modal-form-control {
    min-height: 120px;
    line-height: 1.6;
}

.modal-form-hint {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-form-hint svg,
.modal-form-hint span.icon {
    font-size: 0.9rem;
}

.modal-footer {
    padding: 20px 28px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: linear-gradient(0deg, rgba(248, 250, 252, 0.8) 0%, rgba(255, 255, 255, 0) 100%);
    border-top: 1px solid var(--border-color);
}

.modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    min-width: 100px;
}

.modal-btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(0, 155, 151, 0.35);
}

.modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 155, 151, 0.45);
}

.modal-btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.modal-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
}

.modal-btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.modal-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.modal-btn-cancel {
    background: white;
    color: var(--text-main);
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.modal-btn-cancel:hover {
    background: #f8fafc;
    border-color: var(--text-muted);
    transform: translateY(-1px);
}

/* File Upload Modern Style for Modal */
.modal-file-upload {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    transition: var(--transition);
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    cursor: pointer;
}

.modal-file-upload:hover {
    border-color: var(--primary-color);
    background: linear-gradient(180deg, var(--primary-light) 0%, #fff 100%);
}

.modal-file-upload.dragover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: scale(1.02);
}

.modal-file-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.modal-file-upload-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.modal-file-upload-text {
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
}

.modal-file-upload-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.modal-file-selected {
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(0, 155, 151, 0.1);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 500;
    display: none;
}

.modal-file-selected.active {
    display: block;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.badge-warning {
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    color: #92400E;
    border: 1px solid #FCD34D;
}

.badge-info {
    background: linear-gradient(135deg, #DBEAFE, #BFDBFE);
    color: #1E40AF;
    border: 1px solid #93C5FD;
}

.badge-success {
    background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
    color: #065F46;
    border: 1px solid #6EE7B7;
}

.badge-danger {
    background: linear-gradient(135deg, #FEE2E2, #FECACA);
    color: #991B1B;
    border: 1px solid #FCA5A5;
}

.badge-primary {
    background: linear-gradient(135deg, #E0F2F1, #B2DFDB);
    color: #00695C;
    border: 1px solid #80CBC4;
}

.badge-secondary {
    background: linear-gradient(135deg, #F1F5F9, #E2E8F0);
    color: #475569;
    border: 1px solid #CBD5E1;
}

/* --- Mobile Menu Toggle --- */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-main);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-menu-toggle:hover span {
    background: var(--primary-color);
}

/* --- Mobile Menu Overlay --- */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.mobile-menu-overlay.active {
    display: flex;
}

.mobile-menu-content {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 90%;
    width: 350px;
    position: relative;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f1f5f9;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.mobile-menu-close:hover {
    background: var(--danger-color);
    color: white;
    transform: rotate(90deg);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: #f8fafc;
    border-radius: 12px;
    color: var(--text-main);
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    border: 2px solid transparent;
}

.mobile-nav-link:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.mobile-nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        padding: 0 15px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header-actions {
        display: none;
    }

    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        height: calc(100vh - 60px);
        max-height: calc(100vh - 60px);
        top: 60px;
        z-index: 1000;
        transition: transform 0.3s ease;
        background: white;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        padding-bottom: 80px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-menu {
        padding-bottom: 60px;
    }

    /* Sidebar overlay */
    .sidebar-overlay {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 15px;
        padding-bottom: 80px;
    }

    .mobile-logout {
        display: block;
    }

    .logo-text h1 {
        font-size: 1rem;
    }

    .logo-text span {
        display: none;
    }

    .logo img {
        max-height: 40px;
    }
}

@media (max-width: 480px) {
    .header {
        height: auto;
        min-height: 60px;
        padding: 8px 0;
    }

    .header-content {
        flex-wrap: wrap;
        gap: 8px;
        padding: 0 10px;
    }

    .header-actions {
        gap: 6px;
        flex-wrap: nowrap;
    }

    .header-actions .btn {
        padding: 6px 10px;
        font-size: 0.75rem;
        white-space: nowrap;
    }

    .header-actions .btn-secondary {
        padding: 6px 8px;
    }

    .logo img {
        max-height: 35px;
    }

    .hero-section {
        margin-top: 70px;
        padding: 40px 15px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-stats {
        gap: 15px;
    }

    .hero-stat-number {
        font-size: 2rem;
    }

    .current-time {
        padding: 10px 15px;
        font-size: 0.85rem;
    }

    .dashboard-footer {
        padding: 12px 15px;
        font-size: 0.75rem;
    }

    .dashboard-footer p {
        margin: 0;
        line-height: 1.4;
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-container table {
        min-width: 600px;
    }
}