:root {
    color-scheme: dark;
    --bg: #06152f;
    --bg-soft: #0b2448;
    --card: rgba(15, 43, 82, .76);
    --card-solid: #102d54;
    --line: rgba(166, 205, 255, .16);
    --text: #f5f9ff;
    --muted: #a9bfdc;
    --blue: #398cff;
    --blue-bright: #62a7ff;
    --cyan: #75c9ff;
    --green: #22d39b;
    --red: #ff6f87;
    --amber: #ffc24b;
    --shadow: 0 24px 60px -22px rgba(0, 9, 33, .85);
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --display: 'Outfit', var(--font);
}
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, strong { font-family: var(--display); }
h1 { margin-bottom: 8px; font-size: clamp(2rem, 3vw, 2.8rem); letter-spacing: -.045em; }
h2 { margin: 0; font-size: 1.4rem; letter-spacing: -.025em; }
h3 { margin: 22px 0 12px; font-size: 1rem; }
.muted { color: var(--muted); }
.small { font-size: .83rem; }
.grad-text { color: #8fc9ff; background: linear-gradient(110deg, #fff, #89c5ff 75%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient i { position: absolute; width: 500px; height: 500px; border-radius: 50%; filter: blur(100px); opacity: .24; animation: drift 20s ease-in-out infinite; }
.ambient i:nth-child(1) { top: -230px; left: -100px; background: #145bcc; }
.ambient i:nth-child(2) { top: 28%; right: -260px; background: #297ee6; animation-delay: -7s; }
.ambient i:nth-child(3) { bottom: -340px; left: 28%; background: #39a8ff; animation-delay: -13s; opacity: .13; }
@keyframes drift { 50% { transform: translate(35px, -24px) scale(1.08); } }
.topbar { position: sticky; top: 0; z-index: 20; height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 4vw; border-bottom: 1px solid var(--line); background: rgba(6, 21, 47, .82); backdrop-filter: blur(20px) saturate(1.35); }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-logo { display: grid; width: 82px; height: 44px; place-items: center; overflow: hidden; border-radius: 8px; background: #fff; box-shadow: 0 7px 20px #0004; }
.brand-logo img { width: 100%; height: 100%; padding: 5px 7px; object-fit: contain; }
.brand > span:last-child, .profile-chip > span:last-child { display: flex; flex-direction: column; line-height: 1.16; }
.brand strong { font-size: 1.45rem; font-weight: 800; letter-spacing: -.035em; background: linear-gradient(90deg, #fff, #c6e4ff 50%, #82bdff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand small { margin-top: 3px; color: var(--muted); font-size: .68rem; }
.profile-chip { display: flex; align-items: center; gap: 10px; padding: 6px 13px 6px 6px; border: 1px solid var(--line); border-radius: 50px; background: rgba(128, 183, 255, .07); font-weight: 600; font-size: .88rem; }
.profile-chip small { padding-top: 3px; color: var(--muted); font-size: .72rem; font-weight: 500; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(140deg, #1765cc, #39a6f5); font-weight: 700; }
.shell { width: 100%; max-width: 1680px; flex: 1; display: grid; grid-template-columns: 220px minmax(0, 1fr); margin: 0 auto; }
.sidebar { position: sticky; top: 82px; height: calc(100vh - 82px); display: flex; flex-direction: column; padding: 28px 14px; border-right: 1px solid var(--line); background: rgba(5, 20, 45, .38); }
.nav-caption { padding: 12px 12px 9px; color: #7894b9; font-size: .68rem; font-weight: 700; letter-spacing: .13em; }
.nav-link { min-height: 43px; display: flex; align-items: center; gap: 12px; padding: 9px 13px; border: 1px solid transparent; border-radius: 11px; color: #afc4df; font-size: .89rem; transition: .2s ease; }
.nav-link span { width: 20px; color: #91bfff; font-size: 1.1rem; text-align: center; }
.nav-link:hover, .nav-link.active { border-color: rgba(112, 173, 255, .18); color: #fff; background: linear-gradient(110deg, rgba(38, 108, 209, .28), rgba(71, 153, 248, .08)); }
.sidebar-bottom { margin-top: auto; }
.sidebar-bottom form { margin: 0; }
.signout { width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer; }
.main-content { width: 100%; max-width: 1440px; min-width: 0; margin: 0 auto; padding: 36px clamp(20px, 3.4vw, 52px) 60px; flex: 1; }
.welcome-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; animation: rise .55s both; }
.welcome-row p { margin: 6px 0 0; }
.eyebrow { margin-bottom: 7px; color: #79b6ff; font-size: .69rem; font-weight: 700; letter-spacing: .15em; }
.welcome-mark, .date-pill, .count-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 24px; color: #c4d7ef; background: rgba(128, 183, 255, .055); font-size: .78rem; white-space: nowrap; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px #22d39b; }
.glass-card { position: relative; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, rgba(20, 53, 97, .87), rgba(10, 32, 63, .78)); box-shadow: 0 15px 35px -22px #000b, inset 0 1px 0 rgba(255,255,255,.035); backdrop-filter: blur(15px); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.glass-card:hover { transform: translateY(-3px); border-color: rgba(126, 184, 255, .28); box-shadow: 0 24px 42px -26px #000d, inset 0 1px 0 rgba(255,255,255,.05); }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { min-height: 151px; padding: 20px 22px; animation: rise .55s both; }
.stat-card:nth-child(2) { animation-delay: .08s; }.stat-card:nth-child(3) { animation-delay: .16s; }
.stat-icon { position: absolute; top: 19px; right: 20px; display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(98, 167, 255, .22); border-radius: 10px; color: #92c4ff; background: rgba(57, 140, 255, .12); font-size: 1.1rem; }
.stat-label { display: block; margin: 2px 0 8px; color: var(--muted); font-size: .82rem; }
.stat-card strong { display: block; margin-bottom: 3px; font-size: 2rem; letter-spacing: -.04em; }
.stat-card small { color: #819bbb; font-size: .74rem; }
.time-value { font-size: 1.75rem !important; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.18fr); gap: 18px; align-items: start; }
.panel-card { min-width: 0; padding: 23px; animation: rise .6s both; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 19px; }
.section-heading p { margin: 5px 0 0; font-size: .8rem; }
.section-heading .eyebrow { margin-bottom: 5px; }
.punch-card { transform-style: preserve-3d; perspective: 900px; }
.punch-state { display: flex; align-items: center; gap: 13px; min-height: 69px; margin: 5px 0 15px; padding: 12px 14px; border: 1px solid rgba(100, 169, 255, .16); border-radius: 13px; background: linear-gradient(110deg, rgba(36, 106, 202, .16), rgba(68, 153, 247, .045)); }
.punch-state > div { display: flex; flex-direction: column; }
.punch-state strong { font-size: .94rem; }
.punch-state small { margin-top: 2px; color: var(--muted); font-size: .76rem; }
.pulse-ring, .state-icon, .state-check { width: 38px; height: 38px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #a8d4ff; background: rgba(57, 140, 255, .16); }
.pulse-ring { position: relative; }
.pulse-ring::before { width: 10px; height: 10px; border-radius: 50%; background: #5da4ff; box-shadow: 0 0 0 5px rgba(93,164,255,.16); content: ''; }
.state-check { color: #8ef0c8; background: rgba(34, 211, 155, .13); }
.punch-state.complete { border-color: rgba(34, 211, 155, .17); background: rgba(34, 211, 155, .045); }
.punch-actions { display: flex; gap: 9px; margin: 15px 0; }
.punch-actions form { display: flex; flex: 1; gap: 9px; }
.punch-actions input { min-width: 0; flex: 1; }
.button { min-height: 41px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px; border: 1px solid transparent; border-radius: 11px; color: #fff; font-weight: 650; font-size: .84rem; white-space: nowrap; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.button.primary { background: linear-gradient(120deg, #1254bd, #398cff 70%, #57a3ff); box-shadow: 0 4px 0 #093477, 0 9px 20px -10px rgba(57, 140, 255, .9); }
.button.secondary { border-color: rgba(143, 191, 255, .22); background: rgba(57, 140, 255, .1); color: #d3e6ff; }
.button.danger, .button.tiny-danger { border-color: rgba(255,111,135,.22); background: rgba(255,111,135,.12); color: #ff9aac; }
.button.tiny-success { border-color: rgba(34,211,155,.25); background: rgba(34,211,155,.11); color: #8ef0c8; }
.button.tiny { min-height: 32px; padding: 5px 10px; font-size: .74rem; }
.button.wide { width: 100%; }
.divider { height: 1px; margin: 20px 0; background: var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 12px; }
label { display: flex; flex-direction: column; gap: 6px; color: #c9d9ed; font-size: .77rem; font-weight: 550; }
input, select, textarea { width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid rgba(166, 205, 255, .17); border-radius: 9px; outline: 0; color: var(--text); background: rgba(3, 17, 39, .48); transition: border-color .18s, box-shadow .18s; }
input:focus, select:focus, textarea:focus { border-color: rgba(94, 164, 255, .7); box-shadow: 0 0 0 3px rgba(57, 140, 255, .12); }
input::placeholder, textarea::placeholder { color: #7189a8; }
select option { color: var(--text); background: var(--card-solid); }
textarea { resize: vertical; }
.full { grid-column: 1 / -1; }
.correction-form .button { justify-self: start; }
.inline-form { display: flex; gap: 8px; margin: 12px 0; }
.inline-form input { flex: 1; }
.history-card { min-height: 384px; }
.count-pill { padding: 6px 10px; font-size: .72rem; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .78rem; }
th { padding: 9px 10px; color: #89a5c7; font-size: .67rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
td { padding: 11px 10px; border-top: 1px solid rgba(166, 205, 255, .1); color: #d1dff0; vertical-align: middle; }
tbody tr { transition: background .16s; } tbody tr:hover { background: rgba(128,183,255,.04); }
.table-sub { display: block; margin-top: 2px; color: #8198b7; font-size: .68rem; }
.status { display: inline-flex; padding: 4px 8px; border: 1px solid rgba(166,205,255,.14); border-radius: 20px; color: #bad1ee; background: rgba(128,183,255,.07); font-size: .68rem; font-weight: 650; text-transform: capitalize; }
.status-approved, .status-paid { border-color: rgba(34,211,155,.22); color: #8ef0c8; background: rgba(34,211,155,.09); }
.status-pending, .status-calculated { border-color: rgba(255,194,75,.22); color: #ffdb8d; background: rgba(255,194,75,.08); }
.status-rejected { border-color: rgba(255,111,135,.22); color: #ff9aac; background: rgba(255,111,135,.09); }
.empty-state { display: grid; min-height: 220px; place-content: center; color: var(--muted); text-align: center; }
.empty-state span { color: #79b6ff; font-size: 2rem; }
.empty-state p { margin: 5px 0 0; font-size: .86rem; }
.subheading { padding-top: 17px; border-top: 1px solid var(--line); }
.request-list > div { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-top: 1px solid rgba(166,205,255,.09); font-size: .79rem; }
.section-block { margin-top: 21px; scroll-margin-top: 100px; }
.decision-actions { display: flex; gap: 5px; }
.decision-actions .button { min-height: 32px; padding: 5px 9px; font-size: .72rem; }
.review-form, .adjustment-form { display: flex; align-items: center; gap: 5px; }
.review-form input { width: 130px; }
.payroll-create { display: flex; align-items: flex-end; gap: 11px; margin-bottom: 17px; }
.payroll-create label { min-width: 180px; }
.payroll-run { margin: 10px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: rgba(3,17,39,.2); }
.payroll-run summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; cursor: pointer; list-style: none; }
.payroll-run summary::-webkit-details-marker { display: none; }
.payroll-run summary > span:first-child, .run-summary { display: flex; align-items: center; gap: 12px; }
.payroll-run summary > span:first-child { align-items: flex-start; flex-direction: column; gap: 1px; }
.payroll-run summary small { color: var(--muted); font-size: .7rem; }
.run-summary strong { font-size: .9rem; }
.payroll-run .table-wrap { padding: 0 8px; }
.run-action { display: flex; justify-content: flex-end; padding: 10px 13px 13px; }
.adjustment-form input { width: 90px; padding: 7px; font-size: .72rem; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; scroll-margin-top: 100px; }
.employee-list-card { grid-column: 1 / -1; }
.notice { margin: 0 0 15px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 11px; font-size: .84rem; animation: rise .3s ease both; }
.notice.success { border-color: rgba(34,211,155,.27); color: #8ef0c8; background: rgba(34,211,155,.08); }
.notice.error { border-color: rgba(255,111,135,.27); color: #ff9aac; background: rgba(255,111,135,.08); }
.auth-wrap { width: 100%; max-width: 560px; margin: auto; padding: 58px 20px 76px; }
.auth-card { padding: clamp(26px, 5vw, 45px); animation: rise .5s both; }
.auth-card h1 { margin-bottom: 8px; }
.auth-card > p { margin-bottom: 25px; }
.auth-card form { display: grid; gap: 17px; }
.auth-card .button { margin-top: 6px; }
.auth-card .small { margin: 21px 0 0; text-align: center; }
.footer { display: flex; justify-content: space-between; gap: 20px; padding: 18px 4vw; border-top: 1px solid var(--line); color: #c3d5eb; font-size: .76rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1020px) {
    .shell { grid-template-columns: 74px minmax(0, 1fr); }
    .sidebar { align-items: center; padding-right: 8px; padding-left: 8px; }
    .nav-caption { width: 100%; padding: 12px 0 9px; overflow: hidden; font-size: .5rem; text-align: center; }
    .nav-link { width: 48px; height: 48px; justify-content: center; gap: 0; padding: 8px; overflow: hidden; font-size: 0; }
    .nav-link span { font-size: 1.2rem; }
    .signout { text-align: center; }
    .content-grid { grid-template-columns: 1fr; }
    .history-card { min-height: unset; }
}
@media (max-width: 680px) {
    .topbar { height: 70px; padding: 0 16px; }
    .brand-logo { width: 63px; height: 36px; }
    .brand strong { font-size: 1.2rem; }
    .brand small { max-width: 170px; overflow: hidden; font-size: .59rem; text-overflow: ellipsis; white-space: nowrap; }
    .profile-chip { padding-right: 8px; font-size: .75rem; }
    .profile-chip small { font-size: .64rem; }
    .avatar { width: 31px; height: 31px; }
    .shell { display: block; }
    .sidebar { position: sticky; top: 70px; z-index: 10; width: 100%; height: 56px; flex-direction: row; justify-content: space-around; padding: 4px 8px; border-right: 0; border-bottom: 1px solid var(--line); background: rgba(6,21,47,.94); backdrop-filter: blur(18px); }
    .nav-caption { display: none; }
    .nav-link { width: 45px; height: 44px; }
    .sidebar-bottom { margin: 0; }
    .main-content { padding: 25px 14px 42px; }
    .welcome-row { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 21px; }
    .welcome-mark { align-self: flex-start; }
    .stat-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
    .stat-card { min-height: 126px; padding: 14px 12px; }
    .stat-icon { top: 11px; right: 10px; width: 27px; height: 27px; font-size: .9rem; }
    .stat-label { max-width: 90px; min-height: 32px; font-size: .68rem; }
    .stat-card strong { font-size: 1.5rem; }
    .time-value { font-size: 1.25rem !important; }
    .stat-card small { font-size: .65rem; }
    .panel-card { padding: 17px 14px; }
    .admin-grid { grid-template-columns: 1fr; }
    .employee-list-card { grid-column: auto; }
    .form-grid { gap: 11px 8px; }
    .punch-actions form { flex-wrap: wrap; }
    .punch-actions input { flex-basis: 100%; }
    .review-form { min-width: 280px; }
    .review-form input { width: 96px; }
    .payroll-create { align-items: stretch; flex-direction: column; }
    .payroll-create label { min-width: 0; }
    .run-summary { gap: 6px; }
    .run-summary strong { font-size: .75rem; }
    .footer { flex-direction: column; gap: 4px; padding: 15px; font-size: .69rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
