:root { font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif; color: #202124; background: #f6f7f9; font-size: 15px; }
* { box-sizing: border-box; }
body { margin: 0; }
button,input,select,textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .48; cursor: not-allowed; }
input,select,textarea { width: 100%; border: 1px solid #c9ccd3; background: #fff; color: #202124; border-radius: 6px; padding: .58rem .68rem; min-height: 38px; }
input:focus,select:focus,textarea:focus,button:focus-visible { outline: 2px solid #6757d9; outline-offset: 1px; }
label { display: grid; gap: .32rem; font-size: .9rem; font-weight: 650; color: #36535f; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(circle at 80% 10%, #bdebe0, transparent 30%), #eaf2f4; }
.auth-card { width: min(100%, 440px); background: #fff; border: 1px solid #d5e3e7; border-radius: 18px; padding: 2rem; box-shadow: 0 20px 60px #1235481b; }
.brand { display: flex; align-items: center; gap: .72rem; font-weight: 800; letter-spacing: -.025em; font-size: 1.15rem; }
.brand-mark { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: #123548; color: #79ebc9; font-weight: 900; }
h1 { margin: 1.6rem 0 .35rem; font-size: clamp(1.8rem, 3vw, 2.25rem); letter-spacing: -.04em; }
h2 { margin: 0; font-size: 1.25rem; letter-spacing: -.025em; }
h3 { font-size: 1rem; margin: 0 0 .7rem; }
p { line-height: 1.5; }
.muted { color: #66818b; }
.small { font-size: .85rem; }
.stack { display: grid; gap: 1rem; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); gap: .9rem; }
.button { border: 1px solid #5146b8; background: #6757d9; color: #fff; border-radius: 6px; min-height: 38px; padding: .55rem .9rem; font-weight: 650; }
.button:hover { background: #5146b8; }
.button.secondary { color: #30323a; background: #fff; border-color: #c9ccd3; }
.button.secondary:hover { background: #f1f2f5; }
.button.danger { background: #af3b3b; border-color: #af3b3b; }
.button.slim { min-height: 34px; padding: .35rem .65rem; font-size: .85rem; }
.layout { min-height: 100vh; display: grid; grid-template-columns: 236px minmax(0,1fr); }
.sidebar { background: #20232b; color: #fff; padding: 1.2rem; display: flex; flex-direction: column; gap: 1.4rem; align-self: start; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand-mark { background: #8b7cf6; color: #fff; }
.sidebar nav { display: grid; gap: .25rem; }
.nav-group { display: grid; gap: .25rem; margin-bottom: .9rem; }
.nav-label { padding: 0 .85rem .25rem; color: #8295a6; font-size: .68rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.nav-button { background: transparent; color: #c5dce2; border: 0; border-radius: 9px; text-align: left; padding: .72rem .85rem; font-weight: 600; }
.nav-button:hover,.nav-button.active { background: #383c48; color: #fff; }
.sidebar-foot { margin-top: auto; border-top: 1px solid #3c414e; padding-top: 1rem; display: grid; gap: .45rem; }
.sidebar-role { color: #b1cbd2; }
.account-button { display: grid; gap: .12rem; width: 100%; padding: .65rem .7rem; border: 0; border-radius: 8px; color: #fff; background: transparent; text-align: left; }
.account-button:hover { background: #303540; }
.account-button small { color: #aeb5c2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-signout { justify-self: start; border: 0; background: transparent; color: #b9c0cc; padding: .3rem .7rem; font-size: .82rem; }
.sidebar-signout:hover { color: #fff; }
.main { min-width: 0; }
.topbar { min-height: 70px; padding: 1rem 2rem; background: #fff; border-bottom: 1px solid #d9e4e8; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: #5d7b86; font-weight: 800; }
.topbar-title { font-weight: 750; font-size: 1.05rem; }
.page { max-width: 1300px; margin: 0 auto; padding: 1.8rem 2rem 3rem; display: grid; gap: 1.2rem; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-head > .row,.page-head-actions { align-items: end; }
.page-head-actions > .button { margin-bottom: 0; }
.page-head h1 { margin: .25rem 0 0; }
.card { background: #fff; border: 1px solid #dfe1e6; border-radius: 8px; box-shadow: 0 1px 2px #1018280a; padding: 1.15rem; min-width: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 1.2rem; }
.summary-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.summary-grid .card { padding: 1rem; }
.status-text { font-size: 1.2rem; font-weight: 800; line-height: 1.25; margin-top: .6rem; }
.grid.two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.metric { font-size: 1.9rem; font-weight: 800; letter-spacing: -.035em; margin: .3rem 0 0; }
.row { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.table-wrap { overflow-x: auto; }
.daily-grid { width: max-content; min-width: 100%; font-variant-numeric: tabular-nums; }
.daily-grid th,.daily-grid td { min-width: 62px; padding: .55rem .45rem; text-align: center; white-space: nowrap; }
.daily-grid th:first-child { position: sticky; left: 0; z-index: 2; min-width: 150px; text-align: left; background: #fff; box-shadow: 1px 0 #d9e4e8; }
.daily-grid thead th:first-child { z-index: 3; }
.daily-grid .weekend { background: #f1f6f7; }
.daily-grid td.missed-workday { background: #ffe0dc; color: #8f251b; font-weight: 800; }
.daily-grid td.short-workday { background: #fff1c7; color: #7a4b00; font-weight: 800; }
.missed-key { display: inline-block; padding: .1rem .35rem; border-radius: .3rem; background: #ffe0dc; color: #8f251b; font-weight: 700; }
.short-key { display: inline-block; padding: .1rem .35rem; border-radius: .3rem; background: #fff1c7; color: #7a4b00; font-weight: 700; }
.daily-grid .total,.daily-grid tfoot th,.daily-grid tfoot td { font-weight: 800; background: #e6f6f1; }
.paystub-preview { border-color: #b8d8dc; }
.paystub-preview > .between:last-child p { margin: 0; }
.preview-editor { border-top: 1px solid #dce8eb; padding-top: 1rem; }
.preview-editor h3 { margin: 0; }
.sync-details > summary { cursor: pointer; font-weight: 750; list-style: revert; }
.sync-details[open] > summary { margin-bottom: .7rem; }
.pto-filters { margin: 1rem 0; }
.pto-filters label { min-width: 180px; }
.filter-bar { background: #fff; border: 1px solid #dfe1e6; border-radius: 8px; padding: .85rem; }
.filter-bar label { min-width: 180px; }
.attendance-highlight-form { display: grid; grid-template-columns: minmax(260px,1fr) auto 160px; align-items: end; gap: 1rem; padding: .9rem 1rem; }
.attendance-highlight-form h2 { font-size: 1rem; }
.attendance-highlight-form p { margin: .2rem 0 0; }
.autosave-status { align-self: center; min-width: 4rem; text-align: right; }
.toggle-setting { display: flex; align-items: center; gap: .7rem; min-height: 38px; white-space: nowrap; }
.toggle-setting .switch { flex: 0 0 auto; }
.team-section { display: grid; gap: .85rem; }
.team-heading,.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.team-heading p,.section-heading p { margin: .25rem 0 0; }
.team-count { display: inline-flex; align-items: center; min-height: 28px; padding: .28rem .65rem; border-radius: 999px; background: #e9edf2; color: #52606d; font-size: .76rem; font-weight: 750; white-space: nowrap; }
.pto-team-grid { display: grid; gap: 1rem; }
.westbury-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.nj-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.holiday-rules { display: grid; gap: .5rem; }
.holiday-rule-form { display: grid; grid-template-columns: minmax(160px,1fr) minmax(210px,1.3fr) 120px 100px 80px; align-items: center; gap: .7rem; padding: .65rem 0; border-bottom: 1px solid #e3ecee; }
.holiday-rule-form:last-child { border-bottom: 0; }
.holiday-rule-form .checks { align-self: center; }
.holiday-settings > summary { cursor: pointer; list-style: none; }
.holiday-settings > summary::-webkit-details-marker { display: none; }
.holiday-settings > summary span { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.holiday-settings > summary strong { font-size: 1.05rem; }
.holiday-settings > summary small { color: #66818b; font-weight: 600; }
.holiday-settings[open] > summary { padding-bottom: .75rem; border-bottom: 1px solid #c9ccd3; }
.paystub-preview { scroll-margin-top: 1.5rem; }
.holiday-rules.compact .holiday-rule-form { padding: .4rem 0; grid-template-columns: minmax(145px,1fr) minmax(180px,1.25fr) 90px 95px 72px; }
.paystub-strip { display: grid; grid-template-columns: repeat(8,minmax(120px,1fr)); overflow-x: auto; border: 1px solid #b8c9d0; border-radius: 8px; font-variant-numeric: tabular-nums; }
.paystub-strip.contractor { grid-template-columns: repeat(2,minmax(180px,1fr)); }
.paystub-cell { display: grid; grid-template-rows: minmax(48px,auto) 48px; min-width: 120px; border-right: 1px solid #b8c9d0; text-align: center; }
.paystub-cell:last-child { border-right: 0; }
.paystub-cell span { display: grid; place-items: center; padding: .45rem; font-weight: 700; font-size: .83rem; }
.paystub-cell strong { display: grid; place-items: center; padding: .4rem; border-top: 1px solid #b8c9d0; font-size: 1.05rem; }
.paystub-cell.gross strong { background: #ff8a00; color: #102b39; }
.paystub-cell.withholding strong { background: #fff; }
.paystub-cell.net strong { background: #a7d68d; }
.publish-review td.difference { color: #a03527; font-weight: 800; }
table { width: 100%; border-collapse: collapse; }
th,td { padding: .78rem .65rem; text-align: left; border-bottom: 1px solid #e6eef0; vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: #5b7883; white-space: nowrap; }
td { font-size: .91rem; }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; border-radius: 100px; padding: .22rem .55rem; font-size: .75rem; font-weight: 800; background: #e6f6f1; color: #006b58; }
.badge.warn { background: #fff0d5; color: #955300; }
.badge.gray { background: #eaf0f2; color: #516a73; }
.notice { background: #e4f4f1; border: 1px solid #a8dacd; border-radius: 9px; padding: .75rem .9rem; color: #126654; }
.notice.error { background: #fff0ee; border-color: #ecc4bd; color: #a03527; }
.empty { padding: 2rem; text-align: center; color: #64808b; }
.divider { border: 0; border-top: 1px solid #e1eaed; margin: .5rem 0; }
.right { text-align: right; }
.checks { display: flex; gap: .8rem; flex-wrap: wrap; }
.checks label { display: flex; align-items: center; gap: .25rem; font-weight: 500; }
.checks input { width: auto; min-height: 0; }
.toast { position: fixed; right: 1.2rem; bottom: 1.2rem; padding: .75rem 1rem; background: #123548; color: white; border-radius: 10px; box-shadow: 0 8px 30px #1235484d; z-index: 20; max-width: 380px; }
.toast.error { background: #9b2f2f; }
.pre { white-space: pre-wrap; font-family: inherit; }
.theme-toggle { display: inline-grid; grid-template-columns: 1fr 1fr; padding: 4px; gap: 3px; border: 1px solid #c9ccd3; border-radius: 10px; background: #eef0f3; }
.theme-toggle button { border: 0; border-radius: 7px; background: transparent; color: #65707c; padding: .42rem .72rem; font-weight: 750; }
.theme-toggle button.active { background: #fff; color: #20242c; box-shadow: 0 1px 3px #1018281f; }
.pto-card { display: grid; gap: 1rem; padding: 1.25rem; overflow: hidden; }
.pto-card-head { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.pto-card-head h3 { margin: 0; font-size: 1.05rem; }
.pto-balance { display: grid; gap: .25rem; padding-bottom: 1rem; border-bottom: 1px solid #e6e9ed; }
.pto-balance span,.pto-stats span { color: #66727f; font-size: .75rem; font-weight: 700; letter-spacing: .025em; }
.pto-balance strong { font-size: 1.55rem; line-height: 1.2; letter-spacing: -.025em; }
.pto-stats { display: grid; }
.pto-stats > div { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: baseline; gap: .75rem; min-width: 0; padding: .43rem 0; border-bottom: 1px solid #eef0f3; }
.pto-stats > div:last-child { border-bottom: 0; }
.pto-stats strong { font-size: .86rem; line-height: 1.35; text-align: right; white-space: nowrap; }
.pto-note { padding: .65rem .75rem; border-radius: 7px; background: #f0efff; color: #4f46b8; font-size: .8rem; font-weight: 700; }
.pto-negative { border-color: #e4c27b; }
.employee-directory { display: grid; gap: 1rem; }
.employee-withholding { margin-top: 1rem; background: #f8f8ff; }
.site-footer { margin-top: 1rem; padding: 1.25rem 0 0; border-top: 1px solid #dfe1e6; display: grid; gap: .3rem; color: #66818b; font-size: .78rem; line-height: 1.45; }
.site-footer a { color: #5146b8; }
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1.5rem; background: #0d1320a8; backdrop-filter: blur(3px); }
.modal.hidden { display: none; }
.modal-panel { width: min(1100px,100%); max-height: calc(100vh - 3rem); overflow: auto; border: 1px solid #d7dbe3; border-radius: 14px; background: #fff; padding: 1.4rem; box-shadow: 0 24px 80px #11182759; }
.employee-modal { width: min(1160px,100%); }
.modal-heading { margin-bottom: 1.2rem; }
.icon-button { width: 38px; height: 38px; border: 0; border-radius: 8px; background: transparent; color: #65707c; font-size: 1.8rem; line-height: 1; }
.icon-button:hover { background: #eef0f3; color: #20242c; }
.account-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin-top: 1.3rem; }
.settings-tile { display: grid; align-content: start; gap: .85rem; padding: 1.1rem; border: 1px solid #dfe1e6; border-radius: 10px; background: #f8f9fb; }
.modal-actions { grid-column: 1 / -1; display: flex; gap: .7rem; justify-content: flex-end; }
.setting-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 1rem; }
.switch { display: inline-block; position: relative; width: 46px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; min-height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 100px; background: #c6cad1; transition: .18s; }
.switch span::after { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #1018284d; transition: .18s; }
.switch input:checked + span { background: #6757d9; }
.switch input:checked + span::after { transform: translateX(20px); }
.adjustment-details > summary { cursor: pointer; font-weight: 750; }

:root[data-theme="dark"] { color: #e7e9ef; background: #111318; color-scheme: dark; }
:root[data-theme="dark"] body { background: #111318; }
:root[data-theme="dark"] .main { background: #111318; }
:root[data-theme="dark"] .sidebar { background: #17191f; border-right: 1px solid #31343e; }
:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .filter-bar,
:root[data-theme="dark"] .daily-grid th:first-child,
:root[data-theme="dark"] .auth-card { background: #1d2027; border-color: #343842; color: #e7e9ef; }
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] .button.secondary { background: #252932; border-color: #454a57; color: #eef0f5; }
:root[data-theme="dark"] .button.secondary:hover { background: #303540; }
:root[data-theme="dark"] .muted,
:root[data-theme="dark"] .eyebrow,
:root[data-theme="dark"] th,
:root[data-theme="dark"] label,
:root[data-theme="dark"] .empty { color: #aab0bd; }
:root[data-theme="dark"] th,
:root[data-theme="dark"] td,
:root[data-theme="dark"] .preview-editor,
:root[data-theme="dark"] .divider { border-color: #343842; }
:root[data-theme="dark"] .daily-grid .weekend { background: #242831; }
:root[data-theme="dark"] .daily-grid td.missed-workday,
:root[data-theme="dark"] .missed-key { background: #572a27; color: #ffb4aa; }
:root[data-theme="dark"] .daily-grid td.short-workday,
:root[data-theme="dark"] .short-key { background: #55431f; color: #ffdc8a; }
:root[data-theme="dark"] .daily-grid .total,
:root[data-theme="dark"] .daily-grid tfoot th,
:root[data-theme="dark"] .daily-grid tfoot td { background: #17362f; }
:root[data-theme="dark"] .notice { background: #163630; border-color: #267361; color: #8fe1c7; }
:root[data-theme="dark"] .notice.error { background: #3a2222; border-color: #764141; color: #ffaaa0; }
:root[data-theme="dark"] .paystub-cell.withholding strong { background: #1d2027; }
:root[data-theme="dark"] .paystub-cell span,
:root[data-theme="dark"] .paystub-cell strong { border-color: #4b515e; }
:root[data-theme="dark"] .paystub-strip { border-color: #4b515e; }
:root[data-theme="dark"] .employee-withholding { background: #20222c; }
:root[data-theme="dark"] .pto-note { color: #a99cff; }
:root[data-theme="dark"] .team-count { background: #2c313b; color: #c2c8d2; }
:root[data-theme="dark"] .pto-balance { border-color: #343842; }
:root[data-theme="dark"] .pto-stats > div { border-color: #343842; }
:root[data-theme="dark"] .pto-balance span,
:root[data-theme="dark"] .pto-stats span { color: #aab0bd; }
:root[data-theme="dark"] .pto-note { background: #292640; }
:root[data-theme="dark"] .theme-toggle { border-color: #465064; background: #202c3c; }
:root[data-theme="dark"] .theme-toggle button { color: #aab6c8; }
:root[data-theme="dark"] .theme-toggle button.active { background: #405573; color: #fff; box-shadow: none; }
:root[data-theme="dark"] .modal-panel { background: #1d2027; border-color: #3c414d; }
:root[data-theme="dark"] .settings-tile { background: #17191f; border-color: #3c414d; }
:root[data-theme="dark"] .icon-button { color: #c5cbd5; }
:root[data-theme="dark"] .icon-button:hover { background: #303540; color: #fff; }
:root[data-theme="dark"] .site-footer { border-color: #343842; color: #9ea6b4; }
@media(max-width:800px) { .layout { display: block; } .sidebar { padding: .8rem 1rem; gap: .8rem; position: static; height: auto; overflow-y: visible; } .sidebar nav { display: flex; overflow-x: auto; } .nav-button { white-space: nowrap; } .sidebar-foot { display: none; } .topbar { padding: .8rem 1rem; } .page { padding: 1.2rem 1rem; } .grid.two { grid-template-columns: 1fr; } }
@media(max-width:800px) { .account-grid { grid-template-columns: 1fr; } .setting-row { grid-template-columns: 1fr auto; } .setting-row .button { grid-column: 1 / -1; } .nav-group { display: flex; margin: 0; } .nav-label { display: none; } }
@media(max-width:800px) { .holiday-rule-form { grid-template-columns: 1fr 1fr; } }
@media(max-width:1000px) { .attendance-highlight-form { grid-template-columns: 1fr 1fr; align-items: end; } }
@media(max-width:1000px) { .westbury-grid { grid-template-columns: 1fr 1fr; } }
@media(max-width:700px) { .westbury-grid,.nj-grid { grid-template-columns: 1fr; } .team-heading,.section-heading { align-items: start; } }
@media(max-width:500px) { .summary-grid { grid-template-columns: 1fr; } }

.paystub-team { display: grid; gap: 1rem; margin-bottom: 1.5rem; }
.team-heading { font-size: 1.1rem; margin: .5rem 0 0; }
.pdf-downloads { flex-shrink: 0; }

.confirmation-panel { max-width: 520px; }
