:root {
    --bg: #eef3f8;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --line: #d9e2ee;
    --text: #101828;
    --muted: #667085;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #eaf1ff;
    --success: #15803d;
    --warning: #b7791f;
    --danger: #c2410c;
    --sidebar: #0f172a;
    --sidebar-soft: #17223a;
    --shadow: 0 18px 45px rgba(16, 24, 40, 0.10);
    --shadow-soft: 0 10px 26px rgba(16, 24, 40, 0.07);
    --radius: 8px;
}

@font-face {
    font-family: 'Poppins';
    src: local('Poppins Regular'), local('Poppins-Regular'), url('../fonts/poppins/Poppins-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: local('Poppins SemiBold'), local('Poppins-SemiBold'), url('../fonts/poppins/Poppins-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: local('Poppins Bold'), local('Poppins-Bold'), url('../fonts/poppins/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: local('Poppins ExtraBold'), local('Poppins-ExtraBold'), url('../fonts/poppins/Poppins-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: local('Poppins Black'), local('Poppins-Black'), url('../fonts/poppins/Poppins-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Noto Sans Devanagari';
    src: local('Noto Sans Devanagari'), url('../fonts/noto-sans-devanagari/NotoSansDevanagari.ttf') format('truetype');
    font-weight: 400 800;
    font-style: normal;
    font-display: swap;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Poppins', 'Noto Sans Devanagari', Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
    background:
        radial-gradient(circle at 15% 0%, rgba(37, 99, 235, 0.10), transparent 30%),
        linear-gradient(180deg, #f7faff 0%, var(--bg) 58%, #e9eff6 100%);
    color: var(--text);
    letter-spacing: 0;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
html[lang="ne"] body { font-family: 'Noto Sans Devanagari', 'Poppins', Arial, sans-serif; }
body.dark-mode {
    --bg: #0b1220;
    --surface: #111a2c;
    --surface-2: #162136;
    --line: #27364f;
    --text: #eef4ff;
    --muted: #9daac0;
    --primary-soft: #13264c;
    --sidebar: #070d19;
    --sidebar-soft: #111a2c;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
    --shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.20);
}
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea,
body.dark-mode .btn {
    background: #0d1525;
    color: var(--text);
}

a { color: inherit; text-decoration: none; }
input, select, button, textarea { font: inherit; }
input, select, textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 10px 12px;
    background: var(--surface);
    color: var(--text);
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
textarea {
    min-height: 112px;
    resize: vertical;
}
input:focus, select:focus, textarea:focus {
    border-color: rgba(37, 99, 235, 0.75);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
input[readonly], input:disabled, select:disabled {
    background: var(--surface-2);
    color: var(--muted);
}
label {
    display: grid;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 282px minmax(0, 1fr);
}
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background:
        linear-gradient(180deg, rgba(37, 99, 235, 0.14), transparent 32%),
        var(--sidebar);
    color: #e5edf8;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 8px 8px 12px;
}
.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: white;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.34);
}
.brand strong {
    display: block;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: 0;
}
.brand span {
    display: block;
    color: #aab7cc;
    font-size: 12px;
    margin-top: 3px;
}
.sidebar-status {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding: 9px 11px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #cbd7ea;
    font-size: 12px;
    font-weight: 600;
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 99px;
    background: #22c55e;
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.14);
}
.sidebar nav {
    display: grid;
    gap: 4px;
    overflow-y: auto;
    padding-right: 2px;
}
.sidebar nav a, .logout {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 10px 12px 10px 14px;
    border-radius: 7px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.sidebar nav a:hover, .logout:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    transform: translateX(2px);
}
.sidebar nav a.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(14, 165, 233, 0.82));
    color: white;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
}
.logout {
    margin-top: auto;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
}

.main-content {
    min-width: 0;
    padding: 28px;
}
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    min-height: 96px;
    margin-bottom: 22px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(217, 226, 238, 0.88);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
}
body.dark-mode .topbar {
    background: rgba(17, 26, 44, 0.82);
}
.topbar-title {
    min-width: 0;
}
.page-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.topbar h1 {
    margin: 9px 0 0;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0;
}
.topbar p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
}
.topbar-user {
    display: flex;
    gap: 10px;
    align-items: center;
    white-space: nowrap;
}
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 6px 10px 6px 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 8px 18px rgba(16, 24, 40, 0.06);
}
.avatar {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #111827;
    color: #fff;
    font-weight: 800;
}
.user-meta {
    display: grid;
    gap: 1px;
    text-align: left;
}
.user-meta strong {
    font-size: 13px;
    line-height: 1.2;
    font-weight: 700;
}
.user-meta small {
    color: var(--muted);
    font-size: 11px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}
.stat-card, .panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}
.stat-card {
    position: relative;
    overflow: hidden;
    padding: 20px;
}
.stat-card::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 18px;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--primary-soft);
}
.stat-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}
.stat-card strong {
    display: block;
    margin-top: 9px;
    font-size: 34px;
    font-weight: 900;
    line-height: 1;
}
.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 16px;
}
.panel {
    padding: 18px;
    margin-bottom: 16px;
}
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.panel h2, .panel-header h2 {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0;
}
.panel-header h2 { margin: 0; }

.table-wrap {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 760px;
}
th, td {
    padding: 12px 11px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}
th {
    position: sticky;
    top: 0;
    z-index: 1;
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    background: var(--surface-2);
    font-weight: 700;
}
tbody tr {
    transition: background 0.15s ease;
}
tbody tr:hover {
    background: rgba(37, 99, 235, 0.045);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 25px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
}
.badge-success { background: #dcfce7; color: var(--success); }
.badge-warning { background: #fef3c7; color: var(--warning); }
.badge-danger { background: #ffedd5; color: var(--danger); }
.badge-muted { background: #e2e8f0; color: #475569; }
body.dark-mode .badge-muted { background: #243247; color: #cbd5e1; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 9px 15px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
    font-weight: 700;
    box-shadow: 0 7px 15px rgba(16, 24, 40, 0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(16, 24, 40, 0.10);
}
.btn.primary {
    background: linear-gradient(135deg, var(--primary), #0ea5e9);
    color: white;
    border-color: transparent;
}
.btn.primary:hover { background: linear-gradient(135deg, var(--primary-dark), #0284c7); }
.btn.ghost {
    background: var(--surface-2);
}
.btn.small {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 12px;
}
.btn.danger {
    color: var(--danger);
    border-color: #fed7aa;
    background: #fff7ed;
}
body.dark-mode .btn.danger {
    background: #2a1511;
}

.action-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
}
.table-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 16px;
}
.inline-form, .filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr)) auto;
    gap: 12px;
    align-items: end;
}
.form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.check-row input {
    width: auto;
    min-height: auto;
}
.profile-photo {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.alert {
    padding: 13px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
    border: 1px solid transparent;
    font-size: 13px;
}
.alert.success {
    background: #ecfdf3;
    color: var(--success);
    border-color: #bbf7d0;
}
.alert.danger {
    background: #fff7ed;
    color: var(--danger);
    border-color: #fed7aa;
}
body.dark-mode .alert.success { background: #102319; }
body.dark-mode .alert.danger { background: #2a1511; }
.muted {
    color: var(--muted);
    font-size: 13px;
}
.device-status {
    display: grid;
    gap: 8px;
}
.device-name {
    font-size: 20px;
    font-weight: 800;
}
.sync-time {
    color: var(--muted);
}
.quick-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 12px;
}
.quick-link {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 92px;
    padding: 15px;
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.quick-link:hover {
    border-color: rgba(37, 99, 235, 0.55);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}
.quick-link strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
}
.quick-link small {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    margin-top: 4px;
}
.ad-timestamp {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-top: 2px;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background:
        radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.16), transparent 32%),
        linear-gradient(135deg, #eef4ff, #f8fafc);
}
.login-card {
    width: min(520px, 100%);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(217, 226, 238, 0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    display: grid;
    gap: 16px;
    backdrop-filter: blur(18px);
}
.login-brand { margin-bottom: 4px; }
code {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 2px 5px;
}
.report h2 {
    margin-top: 0;
}

@media (max-width: 900px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar {
        position: static;
        height: auto;
        border-right: none;
    }
    .sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .content-grid, .stats-grid { grid-template-columns: 1fr 1fr; }
    .inline-form, .filters, .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
    .main-content { padding: 16px; }
    .topbar {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }
    .topbar-user {
        justify-content: space-between;
        white-space: normal;
    }
    .content-grid, .stats-grid, .quick-links { grid-template-columns: 1fr; }
    .sidebar nav { grid-template-columns: 1fr; }
    .user-chip { flex: 1; }
}

@media print {
    .sidebar, .topbar, .no-print, .btn { display: none !important; }
    .app-shell { display: block; }
    .main-content { padding: 0; }
    .panel { box-shadow: none; border: none; }
    body { background: white; }
}

/* Professional portal refresh */
:root {
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
}

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.10), transparent 36%),
        linear-gradient(180deg, #f8fbff 0%, #edf4fb 100%);
}
.auth-shell {
    width: min(1040px, 100%);
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(320px, 0.92fr) minmax(360px, 1fr);
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(217, 226, 238, .9);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .16);
}
.auth-visual {
    position: relative;
    overflow: hidden;
    padding: 36px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    background:
        radial-gradient(circle at 18% 22%, rgba(255,255,255,.18) 0 12%, transparent 13%),
        radial-gradient(circle at 86% 70%, rgba(255,255,255,.14) 0 18%, transparent 19%),
        linear-gradient(150deg, #1d4ed8 0%, #2563eb 48%, #0ea5e9 100%);
}
.auth-visual::before,
.auth-visual::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255,255,255,.26);
    border-radius: 999px;
}
.auth-visual::before {
    width: 230px;
    height: 230px;
    right: -62px;
    top: 76px;
}
.auth-visual::after {
    width: 150px;
    height: 150px;
    left: -45px;
    bottom: 58px;
}
.auth-brand {
    position: relative;
    z-index: 1;
    padding: 0;
}
.auth-brand span { color: rgba(255,255,255,.78); }
.auth-visual h1 {
    position: relative;
    z-index: 1;
    margin: auto 0 12px;
    font-size: 42px;
    font-weight: 900;
    line-height: 1.05;
}
.auth-visual p {
    position: relative;
    z-index: 1;
    max-width: 420px;
    margin: 0;
    color: rgba(255,255,255,.82);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.7;
}
.auth-card {
    padding: 46px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    background: #fff;
}
.auth-card h2 {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0;
}
.auth-form {
    display: grid;
    gap: 16px;
}
.compact-panel {
    max-width: 760px;
}
.full {
    width: 100%;
}
.compact {
    margin: 0;
}
.form-row,
.auth-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.remember-row {
    display: inline-flex;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--muted);
}
.remember-row input {
    width: 16px;
    min-height: 16px;
}
.text-link,
.auth-actions a,
.link-button {
    border: 0;
    background: transparent;
    color: var(--primary);
    padding: 0;
    cursor: pointer;
    font-weight: 600;
}
.password-field,
.input-icon {
    position: relative;
    display: block;
}
.password-field input {
    padding-right: 72px;
}
.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    min-height: 30px;
    border: 0;
    border-radius: 6px;
    padding: 4px 9px;
    background: var(--primary-soft);
    color: var(--primary);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}
.stepper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.stepper span {
    min-height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}
.stepper span.active {
    background: var(--primary-soft);
    color: var(--primary);
}

.nav-toggle {
    display: none;
    width: 42px;
    min-width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}
.nav-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 99px;
    background: var(--text);
}
.nav-icon {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 7px;
    margin-right: 10px;
    background: rgba(255,255,255,.08);
    color: #eaf2ff;
    font-size: 10px;
    font-weight: 700;
}
.icon {
    width: 18px;
    height: 18px;
    display: block;
}
.nav-icon .icon {
    width: 16px;
    height: 16px;
}
.quick-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary);
}
.quick-icon .icon {
    width: 21px;
    height: 21px;
}
.sidebar nav a.active .nav-icon {
    background: rgba(255,255,255,.18);
}

.report-filters {
    grid-template-columns: repeat(3, minmax(160px, 1fr)) repeat(3, auto);
}
.sheet-scroll {
    border: 1px solid var(--line);
    border-radius: 8px;
    max-height: 72vh;
}
.attendance-sheet {
    min-width: 1180px;
    font-size: 12px;
}
.attendance-sheet th,
.attendance-sheet td {
    text-align: center;
    padding: 9px 8px;
}
.attendance-sheet .sticky-col {
    position: sticky;
    left: 0;
    z-index: 3;
    min-width: 120px;
    text-align: left;
    background: var(--surface);
    box-shadow: 1px 0 0 var(--line);
}
.attendance-sheet th.sticky-col {
    background: var(--surface-2);
    z-index: 4;
}
.attendance-sheet .sticky-col.second {
    left: 120px;
    min-width: 190px;
}
.day-cell span {
    display: block;
    line-height: 1.35;
}
.cell-present {
    background: #ecfdf3;
    color: var(--success);
}
.cell-absent {
    background: #fff7ed;
    color: var(--danger);
}
.cell-on-leave,
.cell-holiday {
    background: #eef2ff;
    color: #3730a3;
}
.cell-late,
.cell-early-left,
.cell-half-day {
    background: #fef3c7;
    color: var(--warning);
}

.calendar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
}
.calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.calendar-toolbar h2 {
    margin: 0;
    text-align: center;
}
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(105px, 1fr));
    gap: 8px;
}
.calendar-weekday {
    padding: 10px;
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--muted);
    text-align: center;
    font-size: 12px;
    font-weight: 700;
}
.calendar-day {
    min-height: 116px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}
.calendar-day.empty {
    background: transparent;
    border-color: transparent;
}
.calendar-day.today {
    border-color: rgba(37, 99, 235, .65);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}
.calendar-day.weekend {
    background: #f8fafc;
}
.calendar-date {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.calendar-date span {
    color: var(--muted);
    font-size: 11px;
}
.event-dots {
    display: flex;
    gap: 5px;
    margin: 8px 0;
}
.dot {
    width: 8px;
    height: 8px;
    border-radius: 99px;
}
.weekend-dot { background: #94a3b8; }
.event-dot { background: #0ea5e9; }
.calendar-event {
    margin-top: 5px;
    padding: 5px 7px;
    border-radius: 6px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 11px;
    font-weight: 600;
}
.upcoming-list {
    display: grid;
    gap: 10px;
}
.upcoming-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}
.upcoming-item time {
    min-width: 54px;
    color: var(--primary);
    font-weight: 800;
}
.upcoming-item strong {
    font-weight: 700;
}
.upcoming-item strong,
.upcoming-item span {
    display: block;
}
.upcoming-item span {
    color: var(--muted);
    font-size: 12px;
}

.timetable-form {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
}
.timetable-grid {
    min-width: 980px;
}
.timetable-grid th,
.timetable-grid td {
    vertical-align: top;
}
.time-col {
    width: 130px;
    color: var(--primary);
    font-weight: 800;
}
.schedule-chip {
    display: grid;
    gap: 3px;
    margin-bottom: 8px;
    padding: 9px;
    border-radius: 8px;
    border: 1px solid rgba(37, 99, 235, .18);
    background: linear-gradient(180deg, #fff, #f8fbff);
}
.schedule-chip strong {
    color: var(--text);
}
.schedule-chip span {
    color: var(--primary);
    font-weight: 600;
}
.schedule-chip small {
    color: var(--muted);
}
.time-pair {
    display: grid;
    gap: 8px;
    min-width: 140px;
}

@media (max-width: 1180px) {
    .report-filters,
    .timetable-form {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
    .calendar-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .auth-visual {
        min-height: 270px;
    }
    .auth-visual h1 {
        font-size: 34px;
    }
    .auth-card {
        padding: 30px;
    }
    .nav-toggle {
        display: inline-flex;
    }
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(320px, 86vw);
        height: 100vh;
        z-index: 40;
        transform: translateX(-105%);
        transition: transform .2s ease;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    body.nav-open::after {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 30;
        background: rgba(15, 23, 42, .42);
    }
    .sidebar nav {
        grid-template-columns: 1fr;
    }
    .calendar-grid {
        grid-template-columns: repeat(7, minmax(92px, 1fr));
        overflow-x: auto;
    }
}

@media (max-width: 560px) {
    .auth-body {
        padding: 12px;
    }
    .auth-visual {
        padding: 26px;
        min-height: 230px;
    }
    .auth-visual h1 {
        font-size: 30px;
    }
    .auth-card {
        padding: 24px;
    }
    .topbar-user,
    .form-row,
    .auth-actions,
    .calendar-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
    .report-filters,
    .timetable-form {
        grid-template-columns: 1fr;
    }
    .calendar-grid {
        grid-template-columns: repeat(7, 86px);
    }
    .calendar-day {
        min-height: 104px;
    }
}

@media print {
    .sheet-scroll {
        max-height: none;
        overflow: visible;
        border: 0;
    }
    .attendance-sheet,
    .timetable-grid {
        min-width: 0;
        font-size: 10px;
    }
    .attendance-sheet .sticky-col {
        position: static;
        box-shadow: none;
    }
    .calendar-layout {
        display: block;
    }
}

/* Purple admin-dashboard direction */
:root {
    --bg: #f4f3f8;
    --surface: #ffffff;
    --surface-2: #f6f9ff;
    --line: #dbe7f7;
    --text: #102033;
    --muted: #68788f;
    --primary: #004aad;
    --primary-dark: #003a88;
    --primary-soft: #eaf3ff;
    --accent: #0b74d1;
    --sidebar: #004aad;
    --sidebar-soft: #0b5fc4;
    --shadow: 0 20px 55px rgba(0, 74, 173, 0.14);
    --shadow-soft: 0 10px 28px rgba(0, 74, 173, 0.08);
}
body {
    background: #f4f8fd;
}
.sidebar {
    background: linear-gradient(180deg, #004aad 0%, #003a88 100%);
    border-right: 0;
    border-radius: 0 0 28px 0;
    box-shadow: 18px 0 40px rgba(0, 74, 173, .16);
}
.brand-mark,
.brand-logo {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: #ffffff;
    color: var(--primary);
    box-shadow: none;
    border-radius: 999px;
    object-fit: cover;
}
.sidebar .brand span,
.sidebar-status {
    color: rgba(255,255,255,.72);
}
.sidebar nav a,
.logout {
    border-radius: 999px;
    color: rgba(255,255,255,.82);
}
.sidebar nav a:hover,
.logout:hover {
    background: rgba(255,255,255,.13);
    transform: none;
}
.sidebar nav a.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 16px 32px rgba(0, 42, 102, .18);
}
.nav-icon {
    background: rgba(255,255,255,.14);
}
.sidebar nav a.active .nav-icon {
    background: var(--primary-soft);
    color: var(--primary);
}
.logout .nav-icon {
    background: rgba(255,255,255,.12);
}
.main-content {
    padding: 26px 30px;
}
.topbar {
    display: grid;
    grid-template-columns: auto minmax(260px, 420px) auto;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0 0 18px;
}
.topbar-search input {
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    padding-left: 18px;
}
.page-kicker {
    background: transparent;
    color: var(--primary);
    padding: 0;
}
.topbar h1 {
    font-size: 24px;
    font-weight: 800;
}
.panel,
.stat-card,
.user-chip,
.quick-link {
    border: 0;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}
.stat-card::after {
    border-radius: 999px;
    background: linear-gradient(135deg, #eaf3ff, #f8fbff);
}
.btn {
    border-radius: 999px;
}
.btn.primary {
    background: linear-gradient(135deg, #004aad, #0b74d1);
}
.btn.primary:hover {
    background: linear-gradient(135deg, #003a88, #075ca9);
}
input,
select,
textarea {
    border-radius: 10px;
}
.auth-visual {
    background:
        radial-gradient(circle at 16% 18%, rgba(255,255,255,.18) 0 13%, transparent 14%),
        radial-gradient(circle at 84% 72%, rgba(255,255,255,.14) 0 18%, transparent 19%),
        linear-gradient(150deg, #003a88 0%, #004aad 52%, #0b74d1 100%);
}
.auth-shell,
.auth-card {
    border-radius: 24px;
}
.auth-shell {
    box-shadow: 0 32px 90px rgba(0, 74, 173, .18);
}
.calendar-weekday.red-day,
.calendar-day.red-date .bs-primary-date strong,
.holiday-event,
.holiday-upcoming time {
    color: #dc2626;
}
.calendar-day.red-date {
    border-color: #fecaca;
    background: #fff7f7;
}
.holiday-dot {
    background: #dc2626;
}
.calendar-event.holiday-event {
    background: #fee2e2;
    color: #b91c1c;
}
.event-blue,
.event-dot.event-blue {
    background: #dbeafe;
    color: #1d4ed8;
}
.event-green,
.event-dot.event-green {
    background: #dcfce7;
    color: #15803d;
}
.event-purple,
.event-dot.event-purple {
    background: #eaf3ff;
    color: #004aad;
}
.dot.event-blue,
.dot.event-green,
.dot.event-purple {
    color: transparent;
}
.dot.event-blue { background: #2563eb; }
.dot.event-green { background: #16a34a; }
.dot.event-purple { background: #004aad; }
.event-badge-blue { background: #dbeafe; color: #1d4ed8; }
.event-badge-green { background: #dcfce7; color: #15803d; }
.event-badge-purple { background: #eaf3ff; color: #004aad; }
.bs-calendar-grid .calendar-date strong {
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
}
.bs-calendar-grid .calendar-date span {
    font-size: 11px;
}
.schedule-chip {
    border-color: #dbe7f7;
    background: #ffffff;
}
.schedule-chip strong {
    font-size: 14px;
    font-weight: 700;
}
.schedule-chip span {
    color: var(--primary);
}

@media (max-width: 900px) {
    .topbar {
        grid-template-columns: auto 1fr;
    }
    .topbar-search {
        grid-column: 1 / -1;
        order: 3;
    }
    .sidebar {
        border-radius: 0;
    }
}

/* Premium dark mode */
.theme-switch-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 76px;
    padding: 15px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    box-shadow: var(--shadow-soft);
    cursor: pointer;
}
.theme-switch-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.theme-switch-visual {
    position: relative;
    width: 64px;
    min-width: 64px;
    height: 36px;
    border-radius: 999px;
    background: linear-gradient(135deg, #dce8f8, #ffffff);
    border: 1px solid rgba(0, 74, 173, .14);
    box-shadow: inset 0 2px 8px rgba(16, 32, 51, .08);
    transition: background .18s ease, border-color .18s ease;
}
.theme-switch-thumb {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(16, 32, 51, .18);
    transition: transform .18s ease, background .18s ease;
}
.theme-switch-card input:checked + .theme-switch-visual {
    background: linear-gradient(135deg, #004aad, #071a36);
    border-color: rgba(108, 160, 255, .45);
}
.theme-switch-card input:checked + .theme-switch-visual .theme-switch-thumb {
    transform: translateX(28px);
    background: #d9e8ff;
}
.theme-switch-card strong {
    display: block;
    font-weight: 800;
}
.theme-switch-card small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-weight: 400;
}

body.dark-mode {
    --bg: #07111f;
    --surface: #0f1d31;
    --surface-2: #13243b;
    --line: #223a5c;
    --text: #eef6ff;
    --muted: #9fb1c8;
    --primary: #6ca0ff;
    --primary-dark: #94baff;
    --primary-soft: #102a50;
    --accent: #38bdf8;
    --sidebar: #03152e;
    --sidebar-soft: #082b5f;
    --shadow: 0 22px 60px rgba(0, 0, 0, .34);
    --shadow-soft: 0 12px 34px rgba(0, 0, 0, .24);
    background:
        radial-gradient(circle at 18% 0%, rgba(56, 189, 248, .12), transparent 32%),
        linear-gradient(180deg, #07111f 0%, #0a1628 100%);
}
body.dark-mode .sidebar {
    background:
        radial-gradient(circle at 40% 0%, rgba(108, 160, 255, .20), transparent 34%),
        linear-gradient(180deg, #062b66 0%, #03152e 100%);
    box-shadow: 18px 0 48px rgba(0, 0, 0, .34);
}
body.dark-mode .brand-logo,
body.dark-mode .brand-mark {
    background: #eaf3ff;
}
body.dark-mode .sidebar nav a,
body.dark-mode .logout {
    color: rgba(238, 246, 255, .82);
}
body.dark-mode .sidebar nav a:hover,
body.dark-mode .logout:hover {
    background: rgba(255, 255, 255, .10);
}
body.dark-mode .sidebar nav a.active {
    background: #eaf3ff;
    color: #004aad;
    box-shadow: 0 16px 36px rgba(0, 0, 0, .26);
}
body.dark-mode .main-content {
    background: transparent;
}
body.dark-mode .topbar-search input,
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: #101f35;
    color: var(--text);
    border-color: #28446a;
}
body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #7f94ae;
}
body.dark-mode .panel,
body.dark-mode .stat-card,
body.dark-mode .user-chip,
body.dark-mode .quick-link,
body.dark-mode .calendar-day,
body.dark-mode .upcoming-item,
body.dark-mode .theme-switch-card,
body.dark-mode .schedule-chip {
    background: linear-gradient(180deg, rgba(15, 29, 49, .96), rgba(12, 24, 42, .96));
    border: 1px solid rgba(86, 126, 180, .24);
    box-shadow: var(--shadow-soft);
}
body.dark-mode .quick-link:hover {
    border-color: rgba(108, 160, 255, .60);
}
body.dark-mode .quick-icon,
body.dark-mode .page-kicker,
body.dark-mode .password-toggle,
body.dark-mode .stepper span.active {
    background: #102a50;
    color: #9cc2ff;
}
body.dark-mode th {
    background: #13243b;
    color: #b9c7da;
}
body.dark-mode td,
body.dark-mode th {
    border-color: #223a5c;
}
body.dark-mode tbody tr:hover {
    background: rgba(108, 160, 255, .08);
}
body.dark-mode .btn {
    background: #13243b;
    color: var(--text);
    border-color: #28446a;
}
body.dark-mode .btn.primary {
    background: linear-gradient(135deg, #0b63ce, #38bdf8);
    color: #ffffff;
    border-color: transparent;
}
body.dark-mode .btn.ghost {
    background: #13243b;
}
body.dark-mode .btn.danger {
    background: #321716;
    border-color: #7f2a23;
    color: #ffb4a8;
}
body.dark-mode .avatar {
    background: #eaf3ff;
    color: #004aad;
}
body.dark-mode .alert.success {
    background: #0d2c1b;
    border-color: #1f7a45;
    color: #8ff0b6;
}
body.dark-mode .alert.danger {
    background: #331814;
    border-color: #8a3328;
    color: #ffb4a8;
}
body.dark-mode .cell-present {
    background: #0d2c1b;
    color: #8ff0b6;
}
body.dark-mode .cell-absent,
body.dark-mode .calendar-day.red-date {
    background: #331814;
    color: #ffb4a8;
    border-color: #8a3328;
}
body.dark-mode .cell-on-leave,
body.dark-mode .cell-holiday {
    background: #17244a;
    color: #b8c7ff;
}
body.dark-mode .cell-late,
body.dark-mode .cell-early-left,
body.dark-mode .cell-half-day {
    background: #33270d;
    color: #ffd88a;
}
body.dark-mode .calendar-weekday {
    background: #13243b;
    color: #b9c7da;
}
body.dark-mode .calendar-event {
    background: #102a50;
    color: #9cc2ff;
}
body.dark-mode .holiday-event,
body.dark-mode .calendar-event.holiday-event {
    background: #431b1b;
    color: #ffb4a8;
}
body.dark-mode .event-blue {
    background: #102a50;
    color: #9cc2ff;
}
body.dark-mode .event-green {
    background: #0d2c1b;
    color: #8ff0b6;
}
body.dark-mode .event-purple {
    background: #211b4a;
    color: #c7b8ff;
}
body.dark-mode .sheet-scroll {
    border-color: #223a5c;
}
body.dark-mode .attendance-sheet .sticky-col {
    background: #0f1d31;
    box-shadow: 1px 0 0 #223a5c;
}

/* Final login experience */
.login-shell {
    max-width: 1080px;
    min-height: 650px;
    grid-template-columns: minmax(360px, .98fr) minmax(390px, .9fr);
    border: 0;
    background: rgba(255, 255, 255, .96);
}
.login-shell .auth-visual {
    padding: 40px;
}
.auth-hero-copy {
    position: relative;
    z-index: 1;
    margin: auto 0;
}
.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    color: rgba(255, 255, 255, .92);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}
.auth-highlights {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.auth-highlights div {
    min-height: 86px;
    padding: 13px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .13);
    border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(12px);
}
.auth-highlights strong,
.auth-highlights span {
    display: block;
}
.auth-highlights strong {
    color: #fff;
    font-size: 18px;
    font-weight: 900;
}
.auth-highlights span {
    margin-top: 6px;
    color: rgba(255, 255, 255, .78);
    font-size: 12px;
    line-height: 1.45;
}
.login-shell .auth-card {
    padding: 52px;
    justify-content: center;
}
.auth-form-head {
    display: grid;
    gap: 7px;
    justify-items: start;
}
.auth-form-logo {
    width: 54px;
    height: 54px;
    margin-bottom: 8px;
    border-radius: 16px;
    box-shadow: 0 14px 28px rgba(0, 74, 173, .18);
}
.login-shell label {
    gap: 8px;
    color: #27384d;
}
.login-shell input[type="email"],
.login-shell input[type="password"] {
    min-height: 50px;
    border-radius: 14px;
    background: #f8fbff;
    border-color: #dbe7f7;
}
.login-shell input[type="email"]:focus,
.login-shell input[type="password"]:focus {
    background: #fff;
    border-color: rgba(0, 74, 173, .72);
    box-shadow: 0 0 0 5px rgba(0, 74, 173, .11);
}
.login-shell .password-toggle {
    right: 10px;
    min-height: 32px;
    border-radius: 10px;
}
.login-submit {
    min-height: 50px;
    margin-top: 2px;
    font-size: 15px;
    box-shadow: 0 16px 30px rgba(0, 74, 173, .20);
}
.auth-support {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}
body.dark-mode .login-shell {
    background: rgba(15, 29, 49, .96);
    box-shadow: 0 32px 90px rgba(0, 0, 0, .34);
}
body.dark-mode .login-shell .auth-card {
    background: #0f1d31;
}
body.dark-mode .login-shell label {
    color: #dbe9fb;
}
body.dark-mode .login-shell input[type="email"],
body.dark-mode .login-shell input[type="password"] {
    background: #101f35;
    border-color: #28446a;
}

@media (max-width: 900px) {
    .login-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .auth-highlights {
        grid-template-columns: 1fr;
    }
    .login-shell .auth-card {
        padding: 34px;
    }
}

@media (max-width: 560px) {
    .login-shell .auth-visual {
        padding: 28px;
    }
    .login-shell .auth-card {
        padding: 26px;
    }
    .auth-support {
        align-items: center;
        flex-direction: column;
    }
}

/* Liquid glass polish and shared footer */
.topbar,
.panel,
.stat-card,
.user-chip,
.quick-link,
.dashboard-clock-card,
.auth-shell,
.auth-card,
.calendar-day,
.upcoming-item,
.theme-switch-card {
    background-color: rgba(255, 255, 255, .76);
    border: 1px solid rgba(255, 255, 255, .52);
    box-shadow:
        0 18px 48px rgba(0, 74, 173, .10),
        inset 0 1px 0 rgba(255, 255, 255, .72);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
}
.topbar::before,
.panel::before,
.stat-card::before,
.quick-link::before,
.auth-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,.34), rgba(255,255,255,0) 42%);
}
.topbar,
.panel,
.stat-card,
.quick-link,
.auth-shell {
    position: relative;
    overflow: hidden;
}
.panel > *,
.stat-card > *,
.quick-link > *,
.auth-shell > * {
    position: relative;
    z-index: 1;
}
.auth-card {
    background: rgba(255,255,255,.82);
}
.login-shell {
    background:
        linear-gradient(135deg, rgba(255,255,255,.82), rgba(255,255,255,.58));
}
.site-footer,
.auth-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}
.site-footer {
    margin-top: 22px;
    padding: 18px 4px 4px;
}
.auth-footer {
    width: min(1080px, calc(100% - 32px));
    margin: 16px auto 0;
    padding: 12px 18px;
    border-radius: 999px;
    background: rgba(255,255,255,.58);
    border: 1px solid rgba(255,255,255,.46);
    box-shadow: 0 12px 32px rgba(0, 74, 173, .08);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
}
body.dark-mode .topbar,
body.dark-mode .panel,
body.dark-mode .stat-card,
body.dark-mode .user-chip,
body.dark-mode .quick-link,
body.dark-mode .dashboard-clock-card,
body.dark-mode .auth-shell,
body.dark-mode .auth-card,
body.dark-mode .calendar-day,
body.dark-mode .upcoming-item,
body.dark-mode .theme-switch-card {
    background-color: rgba(15, 29, 49, .72);
    border-color: rgba(108, 160, 255, .18);
    box-shadow:
        0 20px 54px rgba(0, 0, 0, .28),
        inset 0 1px 0 rgba(255,255,255,.08);
}
body.dark-mode .auth-footer {
    background: rgba(15, 29, 49, .64);
    border-color: rgba(108, 160, 255, .18);
    box-shadow: 0 12px 32px rgba(0,0,0,.26);
}

@media (max-width: 680px) {
    .site-footer,
    .auth-footer {
        align-items: flex-start;
        flex-direction: column;
        border-radius: 18px;
    }
}

/* Dashboard clock and premium attendance grid */
.dashboard-clock-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding: 20px 22px;
    border-radius: 20px;
    background:
        radial-gradient(circle at 92% 20%, rgba(0, 74, 173, .12), transparent 28%),
        linear-gradient(135deg, #ffffff, #f5f9ff);
    box-shadow: var(--shadow-soft);
}
.clock-kicker,
.clock-ad {
    display: block;
    color: var(--muted);
}
.clock-kicker {
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.clock-bs {
    display: block;
    color: var(--text);
    font-size: 25px;
    font-weight: 900;
    line-height: 1.15;
}
.clock-ad {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 500;
}
.clock-time {
    color: var(--primary);
    font-size: clamp(32px, 5vw, 54px);
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}
.monthly-sheet {
    overflow: hidden;
}
.sheet-scroll {
    padding: 8px;
    background: var(--surface-2);
}
.attendance-sheet {
    border-collapse: separate;
    border-spacing: 5px;
}
.attendance-sheet th,
.attendance-sheet td {
    border: 0;
    border-radius: 10px;
    box-shadow: inset 0 0 0 1px rgba(0, 74, 173, .08);
}
.attendance-sheet th {
    background: #eef5ff;
    color: #355274;
}
.attendance-sheet th:not(.sticky-col) {
    min-width: 66px;
}
.attendance-sheet .date-head {
    padding: 8px 6px;
    text-align: center;
}
.date-head span,
.date-head strong {
    display: block;
}
.date-head span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
}
.date-head strong {
    margin-top: 3px;
    color: var(--text);
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
}
.attendance-sheet .sticky-col {
    border-radius: 10px;
    box-shadow: 2px 0 0 rgba(0, 74, 173, .08), inset 0 0 0 1px rgba(0, 74, 173, .08);
}
.day-cell {
    min-width: 76px;
    height: 58px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
}
.day-cell span {
    white-space: normal;
}
.day-cell .holiday-name {
    font-size: 10px;
    line-height: 1.25;
}
.cell-present {
    background: #e8f9ef;
    color: #137a3d;
}
.cell-absent {
    background: #fff0df;
    color: #c45a0c;
}
.cell-holiday {
    background: #ffe7e7;
    color: #c81e1e;
}
.cell-half-day {
    background: #e5f2ff;
    color: #075aa8;
}
.cell-on-leave {
    background: #f0f4f8;
    color: #56687d;
}
.cell-late,
.cell-early-left {
    background: #fff6d8;
    color: #986800;
}
.cell-future {
    background: #ffffff;
    color: transparent;
}

body.dark-mode .dashboard-clock-card {
    background:
        radial-gradient(circle at 92% 20%, rgba(56, 189, 248, .14), transparent 28%),
        linear-gradient(135deg, #0f1d31, #0b1729);
    border: 1px solid rgba(86, 126, 180, .24);
    box-shadow: var(--shadow-soft);
}
body.dark-mode .clock-time {
    color: #9cc2ff;
}
body.dark-mode .sheet-scroll {
    background: #0a1728;
}
body.dark-mode .attendance-sheet th {
    background: #13243b;
    color: #b9c7da;
}
body.dark-mode .attendance-sheet th,
body.dark-mode .attendance-sheet td {
    box-shadow: inset 0 0 0 1px rgba(108, 160, 255, .14);
}
body.dark-mode .cell-present {
    background: #0d2c1b;
    color: #8ff0b6;
}
body.dark-mode .cell-absent {
    background: #3a220e;
    color: #ffb56b;
}
body.dark-mode .cell-holiday {
    background: #431b1b;
    color: #ffb4a8;
}
body.dark-mode .cell-half-day {
    background: #102a50;
    color: #9cc2ff;
}
body.dark-mode .cell-on-leave {
    background: #172233;
    color: #aebed3;
}
body.dark-mode .cell-late,
body.dark-mode .cell-early-left {
    background: #33270d;
    color: #ffd88a;
}
body.dark-mode .cell-future {
    background: #0f1d31;
    color: transparent;
}

@media (max-width: 680px) {
    .dashboard-clock-card {
        align-items: flex-start;
        flex-direction: column;
    }
    .clock-time {
        font-size: 38px;
    }
}
