@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg: #0f172a;
    --bg-app: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #273548;
    --bg-sidebar: #0f172a;
    --bg-input: #1e293b;
    --bg-header: rgba(15, 23, 42, 0.5);
    --border: #334155;
    --border-light: #1e293b;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: rgba(59, 130, 246, 0.15);
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.15);
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.15);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.15);
    --info: #8b5cf6;
    --info-light: rgba(139, 92, 246, 0.15);
    --glass: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(51, 65, 85, 0.5);
    --shadow: 0 15px 35px -12px rgba(0, 0, 0, 0.5);
    --shadow-sm: 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --radius: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
}

[data-theme="light"] {
    --bg: #f8fafc;
    --bg-app: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-sidebar: #ffffff;
    --bg-input: #ffffff;
    --bg-header: #f8fafc;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --text: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: rgba(37, 99, 235, 0.1);
    --glass: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(226, 232, 240, 0.8);
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

.relative {
    position: relative !important;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== LOGIN PAGE ===== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 50%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
    animation: aurora 20s ease-in-out infinite;
}

@keyframes aurora {

    0%,
    100% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(-5%, 3%);
    }

    66% {
        transform: translate(3%, -5%);
    }
}

.login-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    padding: 48px;
    background: var(--glass);
    backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.login-logo {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo .icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--info));
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 16px;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
}

.login-logo h1 {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -1px;
    color: var(--text);
}

.login-logo h1 span {
    color: var(--primary);
}

.login-logo p {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 4px;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

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

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 800;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: white;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--bg-card);
    color: var(--text);
}

.btn-dark {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 10px;
    border-radius: 10px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 14px;
    border-radius: 18px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 10px;
    aspect-ratio: 1;
    border-radius: 12px;
}

/* ===== LAYOUT ===== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    height: 82px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-header .logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--info));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 900;
    flex-shrink: 0;
}

.sidebar-header .logo-text {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.sidebar-header .logo-text span {
    color: var(--primary);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 16px 16px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.nav-item:hover {
    background: var(--bg-card);
    color: var(--text);
}

.nav-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.nav-item svg,
.nav-item i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-light);
}

.sidebar-footer .sync-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: 12px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.sidebar-footer .sync-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
}

.top-bar {
    height: 82px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-bar h1 {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    text-align: right;
}

.user-info .name {
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
}

.user-info .role {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary), var(--info));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 16px;
}

.page-content {
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 10px 40px -10px rgba(59, 130, 246, 0.2);
}

.card:hover {
    border-color: rgba(59, 130, 246, 0.3);
}

.card-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.card-header h3 {
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-body {
    padding: 24px;
}

.card-body.no-padding {
    padding: 0;
}

/* ===== STAT CARDS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    padding: 28px;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-card .stat-icon {
    font-size: 28px;
    margin-bottom: 16px;
    opacity: 0.7;
}

.stat-card .stat-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.7;
}

.stat-card .stat-value {
    font-size: 36px;
    font-weight: 900;
    margin-top: 4px;
    letter-spacing: -1px;
}

.stat-card .stat-sub {
    font-size: 16px;
    font-weight: 700;
    opacity: 0.6;
}

.stat-card .stat-note {
    font-size: 11px;
    font-weight: 700;
    margin-top: 8px;
}

.stat-card.primary {
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    color: white;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.25);
}

.stat-card.dark {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
}

.stat-card.accent {
    background: linear-gradient(135deg, #0f172a, #1e1b4b);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: white;
}

.stat-card .bg-circle {
    position: absolute;
    right: -20px;
    top: -20px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

/* ===== TABLES ===== */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

thead th {
    padding: 14px 20px;
    font-size: 10px;
    font-weight: 800;
    background: var(--bg-header);
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

tbody td {
    padding: 16px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
}

tbody tr {
    transition: background 0.2s ease;
}

tbody tr:hover {
    background: rgba(59, 130, 246, 0.03);
}

tbody td .name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

tbody td .avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
    flex-shrink: 0;
}

tbody td .text-bold {
    font-weight: 700;
    color: var(--text);
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-info {
    background: var(--info-light);
    color: var(--info);
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-muted {
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-muted);
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-header .close-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--bg);
    color: var(--text-muted);
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
}

.modal-header .close-btn:hover {
    background: var(--danger-light);
    color: var(--danger);
}

.modal-body {
    padding: 28px;
}

.modal-footer {
    padding: 20px 28px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-light);
    overflow-x: auto;
}

.tab-btn {
    padding: 16px 24px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ===== KIOSK ===== */
.kiosk-terminal {
    aspect-ratio: 21/9;
    background: #000;
    border-radius: var(--radius-xl);
    border: 8px solid var(--bg-card);
    position: relative;
    overflow: hidden;
}

.kiosk-terminal video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s;
    transform: scaleX(-1);
}

.kiosk-terminal video.active {
    opacity: 1;
}

.kiosk-hud {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}

.kiosk-hud .corner {
    position: absolute;
    width: 80px;
    height: 80px;
    border-color: rgba(255, 255, 255, 0.1);
    border-style: solid;
    border-width: 0;
}

.kiosk-hud .corner.tl {
    top: 30px;
    left: 30px;
    border-top-width: 3px;
    border-left-width: 3px;
    border-radius: 20px 0 0 0;
}

.kiosk-hud .corner.tr {
    top: 30px;
    right: 30px;
    border-top-width: 3px;
    border-right-width: 3px;
    border-radius: 0 20px 0 0;
}

.kiosk-hud .corner.bl {
    bottom: 30px;
    left: 30px;
    border-bottom-width: 3px;
    border-left-width: 3px;
    border-radius: 0 0 0 20px;
}

.kiosk-hud .corner.br {
    bottom: 30px;
    right: 30px;
    border-bottom-width: 3px;
    border-right-width: 3px;
    border-radius: 0 0 20px 0;
}

.kiosk-scan-area,
#kioskScanning,
.kiosk-matched {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    text-align: center;
}

.face-outline {
    width: 200px;
    height: 280px;
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    margin: 0 auto;
    position: relative;
}

.face-outline .scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    animation: scanMove 3s infinite;
}

@keyframes scanMove {
    0% {
        top: 0%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

.kiosk-matched {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 30;
    animation: fadeIn 0.5s ease;
}

.kiosk-matched .matched-avatar {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-xl);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 900;
    color: var(--primary);
    border: 4px solid var(--success);
    margin-bottom: 24px;
    position: relative;
}

.kiosk-matched .check-icon {
    position: absolute;
    bottom: -8px;
    right: -8px;
    width: 36px;
    height: 36px;
    background: var(--success);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.kiosk-matched .matched-name {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -1px;
}

/* ===== GRID LAYOUTS ===== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ===== SEARCH BAR ===== */
.search-bar {
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    outline: none;
    transition: all 0.3s;
    font-family: inherit;
}

.search-bar input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.search-bar .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
}

/* ===== PERSONNEL CARDS ===== */
.personnel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.personnel-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.3s ease;
}

.personnel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(59, 130, 246, 0.3);
}

.personnel-card .p-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.personnel-card .p-avatar {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-light), var(--info-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 900;
    font-size: 18px;
    flex-shrink: 0;
    position: relative;
}

.personnel-card .p-avatar .status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid var(--bg-card);
}

.personnel-card .p-info h4 {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.3px;
}

.personnel-card .p-info small {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.personnel-card .p-details {
    margin-bottom: 20px;
}

.personnel-card .p-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 12px;
    font-weight: 600;
}

.personnel-card .p-detail-row .label {
    color: var(--text-muted);
}

.personnel-card .p-detail-row .value {
    color: var(--text);
    font-weight: 700;
}

.personnel-card .p-actions {
    display: flex;
    gap: 8px;
}

.personnel-card .p-actions button {
    flex: 1;
}

/* ===== SHIFT CARDS ===== */
.shift-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.shift-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.shift-card .shift-color-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    padding: 16px 24px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    color: white;
    animation: toastIn 0.4s ease;
    box-shadow: var(--shadow);
    min-width: 300px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-success {
    background: linear-gradient(135deg, var(--success), #059669);
}

.toast-error {
    background: linear-gradient(135deg, var(--danger), #dc2626);
}

.toast-warning {
    background: linear-gradient(135deg, var(--warning), #d97706);
}

.toast-info {
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    opacity: 0.4;
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ===== CHART CONTAINER ===== */
.chart-container {
    height: 320px;
    padding: 20px;
}

/* ===== ANNOUNCEMENT CARDS ===== */
.announcement-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.3s;
}

.announcement-card.urgent {
    border-left: 4px solid var(--danger);
}

.announcement-card.high {
    border-left: 4px solid var(--warning);
}

.announcement-card.normal {
    border-left: 4px solid var(--primary);
}

.announcement-card.low {
    border-left: 4px solid var(--text-muted);
}

/* ===== LOADING ===== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-up {
    animation: slideUp 0.5s ease;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-content {
        padding: 16px;
    }

    .top-bar {
        padding: 0 16px;
        height: auto;
        min-height: 70px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .top-bar h1 {
        font-size: 16px;
    }

    .top-bar-right {
        margin-left: auto;
        gap: 8px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr !important;
    }

    /* Card Adjustments */
    .card-header {
        padding: 16px;
    }

    .card-body {
        padding: 16px;
    }

    /* Tables */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
        /* Force scroll */
    }

    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Modal */
    .modal {
        width: 95%;
        max-height: 95vh;
        margin: 10px;
    }

    /* Personnel Grid */
    .personnel-grid {
        grid-template-columns: 1fr;
    }

    .header-tools {
        gap: 8px;
    }

    .user-profile-trigger {
        padding: 4px 8px;
    }

    .user-info {
        display: none;
        /* Hide name on mobile to save space */
    }

    .user-avatar {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .stat-card {
        padding: 20px;
    }

    .stat-card .stat-value {
        font-size: 28px;
    }

    #notifDropdown {
        right: 10px !important;
        left: 10px !important;
        width: auto !important;
    }
}


/* ===== MENU TOGGLE ===== */
.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--bg-card);
    color: var(--text);
    border-radius: 10px;
    cursor: pointer;
    font-size: 20px;
}

@media (max-width: 1024px) {
    .menu-toggle {
        display: flex;
    }
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.sidebar-overlay.active {
    display: block;
}

/* ===== FLEX UTILITIES ===== */
.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.gap-4 {
    gap: 16px;
}

.gap-6 {
    gap: 24px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-6 {
    margin-bottom: 24px;
}

.mb-8 {
    margin-bottom: 32px;
}

.mt-4 {
    margin-top: 16px;
}

.mt-6 {
    margin-top: 24px;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.w-full {
    width: 100%;
}

.font-bold {
    font-weight: 700;
}

.text-sm {
    font-size: 13px;
}

.text-xs {
    font-size: 11px;
}

.text-muted {
    color: var(--text-muted);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-primary {
    color: var(--primary);
}

/* ===== GRID UTILITIES ===== */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.grid-4 .stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
}

.grid-4 .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.grid-4 .stat-info .stat-value {
    font-size: 22px;
}

.grid-4 .stat-info .stat-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0;
}

/* ===== REPORT CHART GRID ===== */
@media (max-width: 900px) {
    .report-chart-grid {
        grid-template-columns: 1fr !important;
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

.notif-item.unread {
    background: rgba(59, 130, 246, 0.05);
}

.notif-item:hover {
    background: var(--bg-card-hover);
}