:root {
                --bg: #eef2ff;
                --ink: #172554;
                --muted: #64748b;
                --card: rgba(255,255,255,0.88);
                --accent: #4338ca;
                --accent-2: #2563eb;
                --accent-soft: rgba(67,56,202,0.12);
                --line: rgba(30,41,59,0.12);
                --shadow: 0 24px 60px rgba(15,23,42,0.12);
                --present: #2f855a;
                --absent: #c53030;
                --half: #d69e2e;
                --leave: #3182ce;
                --weekoff: #8b5e3c;
                --pending: #d97706;
            }
            * { box-sizing: border-box; }
            .hidden { display: none !important; }
            body {
                margin: 0;
                font-family: "Inter", "Segoe UI", sans-serif;
                color: var(--ink);
                background:
                    radial-gradient(circle at top left, rgba(67,56,202,0.18), transparent 24%),
                    radial-gradient(circle at bottom right, rgba(37,99,235,0.14), transparent 28%),
                    linear-gradient(180deg, #f8fbff 0%, #eef2ff 100%);
                min-height: 100vh;
            }
            a { color: inherit; text-decoration: none; }
            html, body { width: 100%; height: 100%; }
            html { scroll-behavior: smooth; }
            body.app-fixed { overflow: hidden; }
            body.landing-shell { overflow-x: hidden; overflow-y: auto; }
            body > .app-shell { width: 100vw; }
            .app-shell { width: 100%; max-width: none; margin: 0; padding: 0; height: 100vh; min-height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
            .app-shell.admin-shell, .app-shell.employee-shell { width: 100%; max-width: none; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 0; align-items: start; overflow: hidden; }
            .topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 20px; background: rgba(255,255,255,0.72); backdrop-filter: blur(18px); border: 1px solid rgba(255,255,255,0.6); border-radius: 24px; box-shadow: var(--shadow); }
            .brand { display: flex; align-items: center; gap: 14px; }
            .brand-mark { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), #164e63); color: #fff; font-family: "Inter", "Segoe UI", sans-serif; font-weight: 700; letter-spacing: 0.08em; }
            .brand-copy strong { display: block; font-family: "Inter", "Segoe UI", sans-serif; font-size: 1.12rem; }
            .brand-copy small { color: var(--muted); }
            .topbar-nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
            .admin-sidebar, .employee-sidebar { position: sticky; top: 0; padding: 22px; background: rgba(16, 33, 58, 0.96); color: #f8fafc; box-shadow: var(--shadow); min-height: 100vh; display: flex; flex-direction: column; gap: 22px; }
            .employee-sidebar { background: linear-gradient(180deg, rgba(15,23,42,0.98), rgba(30,64,175,0.94)); }
            .admin-sidebar .brand-copy small, .employee-sidebar .brand-copy small { color: rgba(248,250,252,0.68); }
            .sidebar-profile { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 22px; background: rgba(255,255,255,0.08); }
            .sidebar-avatar-wrap { position: relative; width: 50px; height: 50px; flex-shrink: 0; }
            .sidebar-avatar-wrap .avatar { position: absolute; inset: 0; }
            .sidebar-avatar-image { object-fit: cover; }
            .avatar { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; font-weight: 800; background: linear-gradient(135deg, #4f46e5, #2563eb); color: #fff; }
            .sidebar-nav { display: grid; gap: 10px; }
            .sidebar-settings-wrap { display: grid; gap: 10px; }
            .sidebar-actions { margin-top: auto; display: grid; gap: 12px; }
            .admin-sidebar .button.ghost, .employee-sidebar .button.ghost { background: linear-gradient(135deg, rgba(79,70,229,0.92), rgba(37,99,235,0.9)); color: #ffffff !important; -webkit-text-fill-color: #ffffff; border: 1px solid rgba(255,255,255,0.18); opacity: 1; }
            .admin-sidebar .button.ghost:hover, .employee-sidebar .button.ghost:hover { background: linear-gradient(135deg, rgba(67,56,202,1), rgba(29,78,216,1)); box-shadow: 0 12px 24px rgba(2,6,23,0.22); }
            .admin-sidebar .button.ghost.admin-logout-button, .employee-sidebar .button.ghost.employee-logout-button { background: transparent; border: 1px solid rgba(255,255,255,0.18); box-shadow: none; }
            .admin-sidebar .button.ghost.admin-logout-button:hover, .employee-sidebar .button.ghost.employee-logout-button:hover { background: rgba(255,255,255,0.08); box-shadow: none; }
            .sidebar-link { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; color: rgba(248,250,252,0.84); transition: background .2s ease, transform .2s ease, color .2s ease; }
            .sidebar-link-button { width: 100%; border: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; }
            .sidebar-link:hover { background: rgba(255,255,255,0.08); color: #fff; transform: translateX(2px); }
            .sidebar-link.active { background: linear-gradient(135deg, rgba(79,70,229,0.95), rgba(37,99,235,0.95)); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12); }
            .nav-icon { width: 30px; height: 30px; border-radius: 10px; background: rgba(255,255,255,0.12); display: grid; place-items: center; font-size: 0.92rem; font-weight: 800; }
            .admin-main, .employee-main { min-width: 0; display: flex; flex-direction: column; gap: 18px; padding: 18px; height: 100vh; overflow: hidden; }
            .button { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 14px; padding: 12px 18px; font-family: inherit; font-weight: 700; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
            .button:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(67,56,202,0.16); }
            .button.solid { background: linear-gradient(135deg, var(--accent), #3730a3); color: #fff; }
            .button.secondary { background: linear-gradient(135deg, var(--accent-2), #1d4ed8); color: #fff; }
            .button.ghost { background: rgba(67,56,202,0.08); color: var(--ink); }
            .button.large { padding: 16px 24px; font-size: 1rem; }
            .button.small { padding: 8px 12px; border-radius: 10px; font-size: 0.92rem; }
            .button.outline { background: transparent; color: var(--ink); border: 1px solid rgba(67,56,202,0.18); }
            .content { flex: 1; width: 100%; padding: 8px 0 0; overflow: hidden; }
            .admin-main .content, .employee-main .content { padding-top: 0; }
            .employee-main .content { display: flex; flex-direction: column; min-height: 0; }
            .employee-attendance-panel { flex: 1; min-height: 0; display: flex; }
            .employee-attendance-panel .calendar-shell { flex: 1; }
            .employee-main { padding-bottom: 0; }
            .employee-main .content { padding-bottom: 0; }
            .employee-attendance-panel .calendar-shell { padding-bottom: 0; }
            .landing-shell .app-shell { min-height: auto; height: auto; overflow: visible; }
            .landing-shell .content { padding: 0; overflow: visible; }
            .landing-shell .topbar { position: fixed; top: 0; left: 0; right: 0; width: 100%; z-index: 90; background: transparent; border-color: transparent; border-radius: 0; box-shadow: none; transition: background .28s ease, border-color .28s ease, box-shadow .28s ease, backdrop-filter .28s ease; }
            .landing-shell .topbar.scrolled { background: rgba(10, 18, 44, 0.72); border-color: rgba(255,255,255,0.12); box-shadow: 0 18px 42px rgba(2,6,23,0.32); backdrop-filter: blur(18px); }
            .landing-shell .brand-copy strong,
            .landing-shell .topbar-nav a:not(.button) { color: #eef2ff; }
            .landing-shell .brand-copy small { color: rgba(226,232,240,0.72); }
            .landing-shell .button.outline { border-color: rgba(255,255,255,0.2); color: #fff; background: rgba(255,255,255,0.06); }
            .landing-shell .button.solid { background: linear-gradient(135deg, #4f46e5, #1e40af); box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 10px 30px rgba(79,70,229,0.35); }
            @media (prefers-reduced-motion: reduce) {
                html { scroll-behavior: auto; }
            }
            .hero, .panel, .metric-card, .calendar-shell, .table-wrap, .section-block, .modal-card { background: var(--card); border: 1px solid rgba(255,255,255,0.72); border-radius: 28px; box-shadow: var(--shadow); }
            .hero { min-height: 76vh; display: grid; place-items: center; text-align: center; padding: 48px 24px; position: relative; overflow: hidden; background: linear-gradient(145deg, rgba(67,56,202,0.18), rgba(255,255,255,0.9)); }
            .hero::before { content: ""; position: absolute; inset: 14px; border: 1px dashed rgba(67,56,202,0.2); border-radius: 24px; }
            .hero-copy { max-width: 760px; position: relative; z-index: 1; }
            .eyebrow { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.82rem; }
            h1, h2, h3 { margin: 0 0 10px; font-family: "Merriweather", Georgia, serif; letter-spacing: -0.02em; }
            h1 { font-size: clamp(1.45rem, 2.1vw, 2.15rem); line-height: 1.12; }
            .page-title .eyebrow { margin-bottom: 10px; }
            p { color: var(--muted); line-height: 1.6; }
            .hero-actions, .inline-actions, .toolbar { display: flex; gap: 12px; flex-wrap: wrap; }
            .centered { justify-content: center; }
            .auth-panel, .grid-2, .dashboard-grid { display: grid; gap: 24px; }
            .auth-panel { max-width: 520px; margin: 0 auto; }
            .panel, .section-block, .calendar-shell, .table-wrap, .metric-card { padding: 24px; }
            .stack-form { display: grid; gap: 14px; }
            label { display: grid; gap: 8px; font-weight: 700; }
            input, select, textarea { width: 100%; border-radius: 14px; border: 1px solid var(--line); padding: 12px 14px; font: inherit; background: rgba(255,255,255,0.94); transition: border-color .2s ease, box-shadow .2s ease; }
            input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(67,56,202,0.45); box-shadow: 0 0 0 4px rgba(67,56,202,0.1); }
            textarea { min-height: 110px; resize: vertical; }
            .flash-stack { position: fixed; top: 24px; right: 24px; z-index: 120; display: grid; gap: 12px; width: min(360px, calc(100vw - 32px)); }
            .flash { padding: 14px 18px; border-radius: 18px; font-weight: 700; line-height: 1.55; border: 1px solid transparent; box-shadow: 0 18px 40px rgba(15,23,42,0.18); animation: toastIn .28s ease; backdrop-filter: blur(10px); }
            .flash.success { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 14px; padding: 16px 18px; background: linear-gradient(135deg, rgba(236,253,245,0.98), rgba(209,250,229,0.96)); color: #166534; border-color: rgba(34,197,94,0.24); box-shadow: 0 24px 46px rgba(34,197,94,0.16); }
            .flash-sweet-icon { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; font-size: 1.2rem; box-shadow: 0 14px 28px rgba(34,197,94,0.22); }
            .flash-copy { display: grid; gap: 2px; }
            .flash-copy strong { font-size: 0.95rem; color: #14532d; }
            .flash-copy span { color: #166534; font-weight: 700; }
            .flash.error { background: rgba(197,48,48,0.12); color: #8a2424; }
            .flash.info { background: rgba(37,99,235,0.12); color: #1d4ed8; }
            .dashboard-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
            .metric-card strong { display: block; font-size: 2.2rem; margin-bottom: 6px; }
            .metric-card span { color: var(--muted); }
            .grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
            .table-wrap { overflow: auto; max-height: 620px; }
            table { width: 100%; border-collapse: collapse; min-width: 760px; }
            th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
            tbody tr:nth-child(even) { background: rgba(67,56,202,0.025); }
            tbody tr:hover { background: rgba(67,56,202,0.06); }
            th { color: var(--muted); font-size: 0.92rem; text-transform: uppercase; letter-spacing: 0.04em; }
            .badge { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: rgba(15,118,110,0.1); color: var(--accent); font-weight: 700; font-size: 0.88rem; }
            .muted { color: var(--muted); }
            .calendar-shell { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
            .calendar-legend { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
            .legend-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,0.72); border: 1px solid var(--line); color: var(--ink); font-weight: 700; }
            .legend-swatch { width: 12px; height: 12px; border-radius: 999px; display: inline-block; }
            .legend-present { background: var(--present); }
            .legend-absent { background: var(--absent); }
            .legend-pending { background: var(--pending); }
            .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; height: 280px; min-height: 280px; overflow-y: auto; overflow-x: hidden; padding-right: 6px; overscroll-behavior: contain; align-content: start; }
            .weekday { text-align: center; color: var(--muted); font-weight: 700; padding-bottom: 4px; }
            .day-card { min-height: 92px; border-radius: 16px; border: 1px solid var(--line); padding: 8px; background: rgba(255,255,255,0.84); display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 10px; cursor: pointer; text-align: left; transition: transform .18s ease, box-shadow .18s ease; }
            .day-card:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(15,23,42,0.1); }
            .day-card.static { cursor: default; }
            .day-card.static:hover { transform: none; box-shadow: none; }
            .day-card.blank { visibility: hidden; cursor: default; }
            .day-card-Absent { background: rgba(239, 68, 68, 0.18); border-color: rgba(220, 38, 38, 0.34); }
            .day-card-Absent .day-number { color: #991b1b; }
            .day-card-Absent .day-copy { color: #991b1b; }
            .day-card-Week-Off { background: rgba(146, 96, 55, 0.2); border-color: rgba(120, 72, 38, 0.34); }
            .day-card-Week-Off .day-number { color: #6f3f1d; }
            .day-card-Week-Off .day-copy { color: #7c4a26; }
            .day-card .day-number { font-size: 2rem; font-weight: 800; line-height: 1; color: var(--ink); }
            .day-card .day-copy { min-height: 0.95rem; font-size: 0.78rem; font-weight: 700; color: var(--muted); line-height: 1.2; }
            .day-dot { width: 16px; height: 16px; border-radius: 999px; }
            .dot-Present { background: var(--present); }
            .dot-Absent { background: var(--absent); }
            .dot-Half-Day { background: var(--half); }
            .dot-Leave { background: var(--leave); }
            .dot-Week-Off { background: var(--weekoff); }
            .dot-Pending { background: var(--pending); }
            .status-pill { display: inline-flex; padding: 2px 6px; border-radius: 999px; color: #fff; font-size: 0.62rem; font-weight: 700; }
            .status-Present { background: var(--present); }
            .status-Absent { background: var(--absent); }
            .status-Half-Day { background: var(--half); }
            .status-Leave { background: var(--leave); }
            .status-Week-Off { background: var(--weekoff); }
            .status-Pending { background: var(--pending); }
            .status-Unmarked { background: #64748b; }
            .calendar-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 18px; align-items: stretch; }
            .summary-card { padding: 16px; min-height: 96px; border-radius: 18px; background: rgba(19,34,56,0.04); display: flex; flex-direction: column; justify-content: center; }
            .summary-card strong { display: block; font-size: 1.5rem; }
            .rules-box { display: grid; gap: 14px; }
            .rules-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.admin-rules-footer {
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid rgba(30,41,59,0.08);
}
.admin-rules-footer label {
    min-width: min(320px, 100%);
}
.admin-rules-footer .inline-actions {
    justify-content: flex-end;
}
.admin-rules-footer .button:last-child {
    min-width: 140px;
}
            .rule-card { position: relative; display: grid; gap: 8px; padding: 18px; border-radius: 22px; border: 1px solid var(--line); background: rgba(255,255,255,0.78); transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; cursor: pointer; }
            .rule-card:hover { transform: translateY(-2px); border-color: rgba(67,56,202,0.22); box-shadow: 0 18px 40px rgba(15,23,42,0.08); }
            .rule-card input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
            .rule-card.active { border-color: rgba(67,56,202,0.45); box-shadow: 0 0 0 3px rgba(67,56,202,0.08); }
            .rule-icon { width: 38px; height: 38px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
            .hint { font-size: 0.92rem; color: var(--muted); }
            .cards-2, .cards-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
            .action-card { padding: 18px; border-radius: 20px; border: 1px solid var(--line); background: rgba(255,255,255,0.86); display: grid; gap: 10px; }
            .manual-punch-card { align-content: start; gap: 14px; position: relative; }
            .manual-punch-toggle { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid rgba(67,56,202,0.12); border-radius: 18px; background: linear-gradient(180deg, #eef4ff 0%, #ffffff 100%); color: var(--ink); cursor: pointer; text-align: left; }
            .manual-punch-toggle-copy { display: grid; gap: 4px; }
            .manual-punch-toggle-copy strong { font-size: 1rem; }
            .manual-punch-toggle-copy span { color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
            .manual-punch-toggle-state { display: inline-flex; align-items: center; justify-content: center; min-width: 72px; padding: 8px 12px; border-radius: 999px; background: #ffffff; color: var(--accent); font-weight: 700; }
            .manual-punch-panel { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 28px; background: rgba(8,18,47,0.28); backdrop-filter: blur(14px) saturate(135%); -webkit-backdrop-filter: blur(14px) saturate(135%); z-index: 220; }
            .manual-punch-popup { width: min(920px, calc(100vw - 56px)); max-height: min(84vh, 760px); overflow: auto; padding: 24px; border-radius: 28px; background: linear-gradient(180deg, #ffffff 0%, #f6f8ff 100%); border: 1px solid rgba(255,255,255,0.96); box-shadow: 0 36px 90px rgba(2,6,23,0.28); }
            .manual-punch-popup-head { margin-bottom: 18px; }
            .manual-punch-popup-close { width: 42px; height: 42px; border-radius: 999px; border: 1px solid rgba(30,41,59,0.08); background: #eef2ff; color: var(--ink); font-size: 1.3rem; cursor: pointer; }
            .manual-punch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; align-items: start; }
            .manual-punch-stack { display: grid; gap: 14px; }
            .manual-punch-pairs { display: grid; gap: 18px; }
            .manual-punch-pair { display: grid; gap: 14px; padding: 18px; border-radius: 22px; border: 1px solid rgba(67,56,202,0.08); background: rgba(238,244,255,0.68); }
            .manual-punch-pair-head { margin-bottom: 2px; }
            .manual-punch-pair-head p { margin: 4px 0 0; color: var(--muted); }
            .manual-punch-section { padding: 18px; border-radius: 18px; border: 1px solid rgba(30,41,59,0.08); background: #f8fafc; display: grid; gap: 10px; }
            .manual-punch-section.disabled { opacity: 0.72; }
            .action-card.disabled { opacity: 0.55; }            .modal { position: fixed; inset: 0; background: rgba(19,34,56,0.28); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 160; backdrop-filter: blur(12px) saturate(130%); -webkit-backdrop-filter: blur(12px) saturate(130%); }
            .modal.open { display: flex; animation: fadeIn .22s ease; }
            #attendance-modal {
                background: rgba(8,18,47,0.34);
                backdrop-filter: blur(18px) saturate(135%);
                -webkit-backdrop-filter: blur(18px) saturate(135%);
            }
            #attendance-modal .modal-card {
                background: linear-gradient(180deg, #ffffff 0%, #f6f8ff 100%);
                border: 1px solid rgba(255,255,255,0.96);
                box-shadow: 0 32px 80px rgba(2,6,23,0.24);
            }
            #landing-login-modal,
            #admin-login-modal,
            #employee-profile-settings-modal,
            #employee-password-modal,
            #edit-employee-modal,
            #employee-login-modal {
                background: rgba(8,18,47,0.22);
                backdrop-filter: blur(16px) saturate(120%);
                -webkit-backdrop-filter: blur(16px) saturate(120%);
            }
            .modal-card { width: min(920px, 100%); max-height: 90vh; overflow: auto; padding: 26px; position: relative; animation: slideUp .24s ease; }
            #edit-employee-modal {
                background: rgba(8,18,47,0.30);
                backdrop-filter: blur(24px) saturate(140%);
                -webkit-backdrop-filter: blur(24px) saturate(140%);
            }
            .modal-close { position: absolute; right: 18px; top: 18px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(19,34,56,0.08); font-size: 1.2rem; cursor: pointer; }
            .modal-grid { display: grid; gap: 18px; }
            #attendance-modal .modal-grid { gap: 16px; }
            #attendance-modal .attendance-modal-hero,
            #attendance-modal .attendance-modal-section,
            #attendance-modal .attendance-context-employee .section-block {
                background: #ffffff;
                border: 1px solid rgba(30,41,59,0.08);
                border-radius: 24px;
                box-shadow: 0 18px 40px rgba(15,23,42,0.06);
            }
            #attendance-modal .attendance-modal-hero {
                display: flex;
                justify-content: space-between;
                align-items: flex-start;
                gap: 18px;
                flex-wrap: wrap;
                padding: 22px;
                background: linear-gradient(180deg, #f6f8ff 0%, #ffffff 100%);
            }
            #attendance-modal .attendance-modal-section {
                padding: 22px;
            }
            #attendance-modal .attendance-modal-section .split {
                margin-bottom: 14px;
            }
            #attendance-modal .attendance-modal-meta {
                min-width: min(100%, 260px);
                padding: 14px 16px;
                border-radius: 18px;
                background: #eef4ff;
                border: 1px solid rgba(67,56,202,0.08);
                color: var(--ink);
                line-height: 1.7;
            }
            #attendance-modal .attendance-modal-meta strong {
                color: var(--accent);
            }
            #attendance-modal .modal-close {
                background: #eef2ff;
                color: var(--ink);
                border: 1px solid rgba(30,41,59,0.08);
            }
            .list { display: grid; gap: 10px; }
            .list-item { padding: 14px; border-radius: 16px; background: rgba(19,34,56,0.04); }
            #attendance-modal .list-item,
            #attendance-modal .action-card,
            #attendance-modal .section-block,
            #attendance-modal .file-preview-box {
                background: #ffffff;
                border: 1px solid rgba(30,41,59,0.08);
                box-shadow: 0 10px 24px rgba(15,23,42,0.04);
            }
            #attendance-modal .attendance-context-employee .action-card.disabled,
            #attendance-modal .attendance-context-employee .attendance-modal-section.disabled {
                opacity: 0.78;
                background: #f8fafc;
            }
            #attendance-modal .manual-punch-card.open .manual-punch-toggle-state {
                background: var(--accent);
                color: #ffffff;
            }
            #attendance-modal .manual-punch-toggle:hover {
                border-color: rgba(67,56,202,0.24);
                box-shadow: 0 14px 28px rgba(67,56,202,0.08);
            }
            #attendance-modal .manual-punch-popup-close:hover {
                background: #dbe7ff;
            }
            #attendance-modal .manual-punch-section {
                background: #ffffff;
            }            .split { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
            .align-end { align-items: end; }
            .spacer { height: 10px; }
            .page-title { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 10px; }
            .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
            .employee-select { min-height: 180px; }
            .hero-actions.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 28px; }
            .cta-card { text-align: left; padding: 22px; border-radius: 24px; background: rgba(255,255,255,0.72); border: 1px solid rgba(255,255,255,0.8); box-shadow: var(--shadow); transition: transform .22s ease, border-color .22s ease; }
            .cta-card:hover { transform: translateY(-4px); border-color: rgba(67,56,202,0.28); }
            .auth-page-wrap { min-height: calc(100vh - 170px); display: grid; place-items: center; position: relative; padding: 24px; overflow: auto; }
            .auth-page-wrap::before { content: ""; position: absolute; inset: 8% 8%; border-radius: 32px; background: radial-gradient(circle at top right, rgba(67,56,202,0.14), transparent 30%), linear-gradient(145deg, rgba(255,255,255,0.6), rgba(255,255,255,0.15)); filter: blur(0.5px); }
            .auth-panel { position: relative; z-index: 1; width: min(100%, 520px); }
            .landing .hero,
            .admin-main,
            .content,
            .calendar-shell,
            .table-wrap,
            .section-block,
            .banner { width: 100%; }
            .field { display: grid; gap: 8px; }
            .field-row { position: relative; }
            .password-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; }
            .field-error { display: none; color: #b91c1c; font-size: 0.82rem; align-items: center; gap: 6px; }
            .field.invalid .field-error { display: inline-flex; }
            .steps { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
            .step-pill { padding: 10px 14px; border-radius: 999px; background: rgba(67,56,202,0.08); color: var(--muted); font-weight: 700; }
            .step-pill.active { background: linear-gradient(135deg, var(--accent), #3730a3); color: #fff; }
            .action-bar { display: flex; justify-content: flex-end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
            .data-toolbar { display: flex; justify-content: space-between; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
            .data-toolbar-search { flex: 1 1 320px; max-width: 420px; }
            .data-toolbar-search input { width: 100%; }
            .table-empty-state { margin-top: 16px; }
            .scroll-panel { max-height: 620px; overflow: auto; }
            .attendance-panel { display: grid; gap: 18px; min-height: 0; }
            .upload-drop { padding: 24px; border: 2px dashed rgba(67,56,202,0.28); border-radius: 24px; background: rgba(67,56,202,0.04); text-align: center; }
            .preview-table { max-height: 220px; overflow: auto; border-radius: 18px; border: 1px solid var(--line); }
            .tag-list { display: flex; gap: 8px; flex-wrap: wrap; }
            .tag { padding: 7px 10px; border-radius: 999px; background: rgba(67,56,202,0.08); color: var(--accent); font-size: 0.84rem; font-weight: 700; }
            .employee-picker { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,0.72); }
            .employee-options { display: grid; gap: 8px; max-height: 220px; overflow: auto; }
            .employee-option { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 16px; background: rgba(67,56,202,0.03); }
            .employee-option input { width: auto; }
            .banner { padding: 22px; border-radius: 26px; background: linear-gradient(135deg, rgba(67,56,202,0.95), rgba(37,99,235,0.9)); color: #fff; box-shadow: var(--shadow); }
            .banner p, .banner .hint { color: rgba(255,255,255,0.78); }
            .employee-banner { padding: 12px 20px; }
            .employee-banner .employee-topbar { gap: 8px; }
            .employee-banner .eyebrow { padding: 5px 11px; font-size: 0.74rem; }
            .employee-banner h1 { margin: 4px 0 0; font-size: clamp(1.3rem, 1.9vw, 1.8rem); }
            .employee-banner p { margin: 4px 0 0; line-height: 1.3; font-size: 0.96rem; }
            .employee-workspace-badge { background: #ffffff; color: var(--accent); }
            .employee-banner-button { background: #ffffff; color: var(--ink); border: 1px solid rgba(255,255,255,0.92); }
            .employee-banner-button:hover { background: #eef2ff; color: var(--ink); box-shadow: 0 12px 24px rgba(15,23,42,0.16); }
            .summary-highlight strong { color: var(--accent); }
            .employee-profile-card { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(240px, 320px); gap: 18px; align-items: center; }
            .employee-profile-media { display: flex; align-items: center; justify-content: center; }
            .employee-profile-photo,
            .employee-profile-fallback { width: 112px; height: 112px; border-radius: 28px; }
            .employee-profile-photo { object-fit: cover; border: 1px solid rgba(67,56,202,0.12); box-shadow: 0 18px 40px rgba(15,23,42,0.12); }
            .employee-profile-fallback { display: grid; place-items: center; background: linear-gradient(135deg, #4338ca, #2563eb); color: #ffffff; font-size: 2rem; font-weight: 800; box-shadow: 0 18px 40px rgba(15,23,42,0.12); }
            .employee-profile-copy { min-width: 0; display: grid; gap: 10px; }
            .employee-profile-copy h2 { margin-bottom: 0; }
            .employee-profile-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
            .employee-profile-meta .list-item { display: grid; gap: 4px; }
            .employee-profile-meta .list-item strong { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
            .employee-profile-meta .list-item span { color: var(--ink); overflow-wrap: anywhere; }
            .employee-profile-form { display: grid; gap: 12px; }
            .employee-profile-form label { font-size: 0.94rem; }
            .employee-main .calendar-legend { order: 1; margin-bottom: 0; }
            .employee-main .calendar-grid { order: 2; flex: 1; height: auto; min-height: 0; }
            .employee-main .calendar-summary { order: 3; flex-shrink: 0; margin-top: 14px; margin-bottom: 0; }
            .employee-main .summary-card { min-height: 82px; padding: 14px; }
            .employee-main .summary-card strong { font-size: 1.3rem; }
            .profile-settings-modal-card { width: min(560px, 100%); }
            .profile-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 18px 0; }
            .profile-settings-grid .list-item { display: grid; gap: 4px; }
            .profile-settings-grid .list-item strong { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
            .profile-settings-field { display: grid; gap: 8px; font-weight: 700; }
            .profile-settings-field input { background: rgba(255,255,255,0.96); }
            .profile-settings-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
            .employee-sidebar .hint, .admin-sidebar .hint { color: rgba(248,250,252,0.72); }
            .skeleton { position: relative; overflow: hidden; background: linear-gradient(90deg, rgba(226,232,240,0.7) 0%, rgba(248,250,252,0.95) 45%, rgba(226,232,240,0.7) 100%); background-size: 240% 100%; animation: shimmer 1.4s linear infinite; }
            .employee-topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
            .landing-page { position: relative; background:
                radial-gradient(circle at 20% 20%, rgba(79,70,229,0.3), transparent 18%),
                radial-gradient(circle at 80% 30%, rgba(30,64,175,0.26), transparent 20%),
                linear-gradient(180deg, #08122f 0%, #0b1740 55%, #eff3ff 55%, #f8fbff 100%);
            }
            .landing-hero { min-height: 100vh; padding: 140px 24px 60px; position: relative; overflow: hidden; }
            .landing-scroll-button { position: fixed; right: 24px; bottom: 24px; z-index: 140; display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 999px; background: linear-gradient(135deg, #4f46e5, #1e40af); color: #ffffff; border: 1px solid rgba(255,255,255,0.18); box-shadow: 0 24px 54px rgba(15,23,42,0.24); font-size: 0.94rem; font-weight: 700; letter-spacing: 0.01em; transition: transform .25s ease, box-shadow .25s ease, background .25s ease; }
            .landing-scroll-button:hover { transform: translateY(-3px); box-shadow: 0 28px 62px rgba(79,70,229,0.28); background: linear-gradient(135deg, #4338ca, #1d4ed8); }
            #how-it-works { scroll-margin-top: 120px; }
            .landing-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr); gap: 40px; align-items: center; max-width: 1360px; margin: 0 auto; }
            .landing-copy { color: #f8fafc; position: relative; z-index: 1; }
            .landing-copy h1 { font-size: clamp(3rem, 7vw, 5.8rem); line-height: 0.95; margin-bottom: 18px; color: #fff; }
            .landing-copy h1 span { display: block; }
            .landing-copy h1 .nowrap { white-space: nowrap; }
            .landing-copy p { color: rgba(226,232,240,0.82); font-size: 1.08rem; max-width: 700px; }
            .trust-line { margin-top: 18px; color: rgba(191,219,254,0.9); font-size: 0.95rem; }
            .landing-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 26px; }
            .landing-button { min-width: 210px; padding: 18px 22px; border-radius: 22px; position: relative; overflow: hidden; }
            .landing-button::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, rgba(129,140,248,0.9), rgba(96,165,250,0.35)); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
            .landing-button strong,
            .landing-button span { position: relative; z-index: 1; display: block; text-align: left; }
            .landing-button span { opacity: 0.78; font-size: 0.88rem; margin-top: 4px; }
            .hero-glow { position: absolute; inset: auto -10% -18% auto; width: 380px; height: 380px; background: radial-gradient(circle, rgba(79,70,229,0.35), transparent 70%); filter: blur(12px); }
            .device-mockup { position: relative; z-index: 1; background: rgba(15,23,42,0.55); border: 1px solid rgba(255,255,255,0.12); border-radius: 28px; padding: 18px; box-shadow: 0 30px 80px rgba(2,6,23,0.38); backdrop-filter: blur(16px); }
            .mockup-screen { background: linear-gradient(180deg, #f8fbff 0%, #eef2ff 100%); border-radius: 20px; padding: 16px; color: var(--ink); }
            .mockup-top { display: flex; gap: 8px; margin-bottom: 16px; }
            .mock-dot { width: 10px; height: 10px; border-radius: 999px; background: #cbd5e1; }
            .mock-grid { display: grid; gap: 12px; grid-template-columns: 1.2fr 0.8fr; }
            .mock-card { border-radius: 18px; padding: 14px; background: #fff; box-shadow: 0 12px 30px rgba(15,23,42,0.08); }
            .mock-calendar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
            .mock-cell { height: 48px; border-radius: 12px; background: #eef2ff; }
            .mock-cell.active { background: linear-gradient(135deg, #4f46e5, #2563eb); }
            .marketing-section { padding: 86px 24px; }
            .landing-hero + .marketing-section { padding-top: 32px; background: #ffffff; }
            .marketing-wrap { max-width: 1240px; margin: 0 auto; }
            .section-heading { text-align: center; margin-bottom: 34px; }
            .section-heading h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 12px; color: #0f172a; }
            .feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; overflow: visible; }
            .feature-card { position: relative; z-index: 1; padding: 24px; border-radius: 24px; background: rgba(255,255,255,0.86); border: 1px solid rgba(255,255,255,0.9); box-shadow: var(--shadow); border-top: 4px solid #4f46e5; transition: transform .7s ease-in-out, box-shadow .7s ease-in-out, border-color .7s ease-in-out; transform: translateY(0) scale(1); transform-origin: center center; will-change: transform; }
            .feature-card:hover { z-index: 16; transform: translateY(-18px) scale(1.08); box-shadow: 0 42px 96px rgba(79,70,229,0.22); border-color: rgba(79,70,229,0.28);  }
            .feature-card:hover .feature-icon { transform: translateY(-6px) scale(1.08);  }
            .feature-icon { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; background: rgba(79,70,229,0.1); color: #4338ca; font-weight: 800; margin-bottom: 16px; transition: transform .7s ease-in-out, background .7s ease-in-out; will-change: transform; }
            .steps-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; position: relative; }
            .step-card { text-align: center; padding: 22px; border-radius: 24px; background: #fff; box-shadow: var(--shadow); position: relative; }
            .step-number { width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 999px; display: grid; place-items: center; background: linear-gradient(135deg, #4f46e5, #1e40af); color: #fff; font-weight: 800; font-size: 1.15rem; }
            .stats-band { padding: 34px 24px; background: linear-gradient(135deg, #0b1538, #182c78); color: #fff; }
            .stats-grid { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
            .stat-item { text-align: center; padding: 18px 14px; border-right: 1px solid rgba(255,255,255,0.12); }
            .stat-item:last-child { border-right: 0; }
            .stat-item strong { font-size: clamp(1.8rem, 4vw, 3rem); display: block; margin-bottom: 8px; }
            .landing-login-modal { width: min(920px, 100%); padding: 34px; display: flex; flex-direction: column; gap: 24px; align-items: stretch; background: #ffffff !important; background-color: #ffffff !important; background-image: none !important; border: 1px solid rgba(15,23,42,0.08); color: #172554; box-shadow: 0 30px 80px rgba(15,23,42,0.16); opacity: 1; }
            #landing-login-modal .modal-card.landing-login-modal { background: #ffffff !important; background-color: #ffffff !important; background-image: none !important; color: #172554; }
            .landing-login-head { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 0; padding-right: 0; }
            .landing-login-head h2 { color: #0f172a; margin-bottom: 10px; }
            .landing-login-head p { color: #475569; margin: 0; }
            .landing-login-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
            .landing-login-option { display: grid; gap: 12px; padding: 22px; border-radius: 24px; background: #f8fbff; border: 1px solid rgba(67,56,202,0.14); box-shadow: 0 14px 30px rgba(15,23,42,0.08); transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease; }
            .landing-login-option:hover { transform: translateY(-3px); border-color: rgba(79,70,229,0.45); background: #ffffff; box-shadow: 0 18px 36px rgba(79,70,229,0.12); }
            .landing-login-option strong { color: #0f172a; font-size: 1.15rem; }
            .landing-login-option span:last-child { color: #475569; line-height: 1.6; }
            .landing-login-icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(135deg, #4f46e5, #2563eb); color: #fff; font-weight: 800; font-size: 1.1rem; box-shadow: 0 14px 30px rgba(79,70,229,0.3); }
            .landing-login-icon.employee { background: linear-gradient(135deg, #0f766e, #2563eb); }
            .landing-login-modal .modal-close { background: #eef2ff; color: #172554; }
            .landing-auth-modal { width: min(560px, 100%); padding: 28px; background: #ffffff; border: 1px solid rgba(15,23,42,0.08); color: #172554; box-shadow: 0 30px 80px rgba(15,23,42,0.16); }
            .landing-auth-shell { display: flex; flex-direction: column; gap: 24px; align-items: stretch; }
            .landing-auth-copy { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
            .landing-auth-copy h2 { color: #0f172a; margin-bottom: 0; }
            .landing-auth-copy p { color: #475569; margin: 0; }
            .landing-auth-form { padding: 20px; border-radius: 24px; background: #f8fbff; border: 1px solid rgba(67,56,202,0.12); }
            .landing-auth-form label { color: #172554; }
            .landing-auth-form input { background: rgba(255,255,255,0.96); }
            .landing-auth-form .hint a { color: #4338ca; }
            .landing-login-option { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
            .landing-footer { background: #08122f; color: #dbeafe; padding: 44px 24px 18px; }
            .landing-footer-wrap { width: 100%; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
            .footer-links, .social-links { display: flex; gap: 12px; flex-wrap: wrap; }
            .footer-bottom { width: 100%; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid rgba(219,234,254,0.12); color: rgba(219,234,254,0.7); }
            .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
            .reveal.visible { opacity: 1; transform: translateY(0); }
            @keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
            @keyframes slideUp { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
            @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
            @keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
            @media (max-width: 760px) {
                .app-shell { padding: 0; height: 100dvh; min-height: 100dvh; }
                .app-shell.admin-shell, .app-shell.employee-shell { grid-template-columns: 1fr; }
                .admin-sidebar, .employee-sidebar { position: static; min-height: auto; }
                .topbar { padding: 16px; margin: 12px; }
                .calendar-grid { gap: 8px; }
                .day-card { min-height: 96px; padding: 10px; }
                h1 { font-size: 2.2rem; }
                .flash-stack { left: 16px; right: 16px; width: auto; }
                .landing-shell .topbar { top: 0; left: 0; right: 0; }
                .landing-grid, .mock-grid { grid-template-columns: 1fr; }
                .landing-hero { padding-top: 120px; }
                .landing-scroll-button { right: 16px; bottom: 16px; top: auto; transform: none; padding: 9px 14px; }
                .landing-login-modal { padding: 24px; }
                .landing-login-head { padding-right: 0; }
                .landing-login-grid { grid-template-columns: 1fr; }
                .landing-auth-shell { gap: 20px; }
                .employee-profile-card { grid-template-columns: 1fr; }
                .employee-profile-media { justify-content: flex-start; }
                .stat-item { border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.12); }
                .stat-item:last-child { border-bottom: 0; }
            }



























            @media (max-width: 760px) {
                body.app-fixed { overflow-y: auto; }
                .app-shell,
                .app-shell.admin-shell,
                .app-shell.employee-shell { height: auto; min-height: 100dvh; overflow: visible; }
                .admin-main, .employee-main { height: auto; min-height: 100dvh; padding: 12px; gap: 14px; overflow: visible; }
                .content,
                .admin-main .content,
                .employee-main .content { overflow: visible; padding-top: 0; }
                .admin-sidebar, .employee-sidebar { padding: 16px; gap: 16px; border-radius: 0 0 24px 24px; }
                .sidebar-profile { padding: 12px; border-radius: 18px; }
                .sidebar-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
                .sidebar-link, .sidebar-link-button { min-height: 56px; padding: 12px 14px; border-radius: 16px; }
                .sidebar-link { align-items: center; }
                .sidebar-actions { margin-top: 0; }
                .page-title { align-items: flex-start; }
                .page-title > div,
                .page-title form,
                .page-title .action-bar { width: 100%; }
                .split { align-items: flex-start; }
                .form-grid { grid-template-columns: 1fr; }
                .hero, .panel, .metric-card, .calendar-shell, .table-wrap, .section-block, .modal-card { border-radius: 22px; }
                .panel, .section-block, .calendar-shell, .table-wrap, .metric-card { padding: 18px; }
                .table-wrap { max-height: none; overflow-x: auto; }
                table { min-width: 680px; }
                .calendar-grid { grid-template-columns: repeat(7, minmax(44px, 1fr)); gap: 6px; height: auto; min-height: 0; max-height: none; padding-right: 0; }
                .day-card { min-height: 78px; padding: 8px; border-radius: 14px; gap: 8px; }
                .day-card .day-number { font-size: 1.55rem; }
                .day-dot { width: 12px; height: 12px; }
                .attendance-panel,
                .employee-attendance-panel { min-height: 0; display: block; }
                .modal { padding: 14px; }
                .modal-card { width: 100%; max-height: calc(100dvh - 28px); padding: 18px; }
                .modal-close { right: 12px; top: 12px; }
                .topbar { flex-direction: column; align-items: flex-start; gap: 14px; }
                .topbar-nav { width: 100%; justify-content: flex-start; }
                .landing-auth-form { padding: 16px; }
                .landing-auth-modal,
                .landing-login-modal { width: 100%; }
            }

            @media (max-width: 760px) {
                .dashboard-grid { grid-template-columns: 1fr; gap: 14px; }
                .metric-card { min-height: auto; padding: 16px; }
                .metric-card strong { font-size: 1.9rem; }
                .list-item { padding: 12px; }
                .list-item .split { flex-direction: column; align-items: flex-start; }
                .badge, .status-pill { align-self: flex-start; }
                .employee-banner { padding: 16px; }
                .employee-topbar { flex-direction: column; align-items: flex-start; gap: 10px; }
                .employee-banner h1 { font-size: 1.7rem; }
                .employee-banner p { font-size: 0.92rem; }
                .inline-actions { width: 100%; flex-direction: column; align-items: stretch; }
                .inline-actions > * { width: 100%; }
                .page-title h1, .page-title h2 { font-size: 1.8rem; }
                .calendar-summary { grid-template-columns: 1fr; gap: 12px; }
                .summary-card { min-height: auto; }
            }

            @media (max-width: 520px) {
                .sidebar-nav { grid-template-columns: 1fr; }
                .brand { gap: 10px; }
                .brand-mark { width: 46px; height: 46px; border-radius: 14px; }
                .brand-copy strong { font-size: 1rem; }
                .employee-banner { padding: 14px; }
                .employee-banner .eyebrow { font-size: 0.7rem; }
                .page-title h1, .page-title h2 { font-size: 1.55rem; }
                .calendar-grid { grid-template-columns: repeat(7, minmax(38px, 1fr)); }
                .day-card { min-height: 70px; padding: 7px; }
                .day-card .day-number { font-size: 1.35rem; }
                .modal-card { padding: 16px; border-radius: 18px; }
            }

            .admin-attendance-page { overflow-y: auto; overflow-x: hidden; padding-right: 6px; padding-bottom: 120px; }
            .admin-attendance-page .attendance-panel { overflow: visible; }
            .admin-attendance-page .calendar-shell { overflow: visible; }
            .admin-attendance-page .calendar-grid { height: 230px; min-height: 230px; }
            .admin-attendance-page .calendar-summary { margin-top: 14px; }
            .admin-rules-page { overflow-y: auto; overflow-x: hidden; padding-right: 6px; padding-bottom: 120px; }
            .admin-rules-page .scroll-panel { max-height: none; overflow: visible; }
