:root {
    color-scheme: light;
    --ink: #171a3a;
    --muted: #6d7087;
    --line: #e4e0da;
    --surface: #fffdf9;
    --canvas: #f6f2eb;
    --nav: #10132e;
    --primary: #484ad3;
    --primary-bright: #777bff;
    --primary-soft: #ececff;
    --warning: #c77a2c;
    --danger: #c43b4d;
    --shadow: 0 20px 60px rgba(30, 28, 70, .11);
    --display: "Baskerville", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    --body: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
    font-family: var(--body);
}
* { box-sizing: border-box; }
html { min-height: 100%; margin: 0; overflow-y: scroll; scrollbar-gutter: stable; }
body, #app { min-height: 100%; margin: 0; }
body { overflow-x: hidden; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; }
h1 { margin-bottom: .25rem; font-size: clamp(1.7rem, 3vw, 2.65rem); letter-spacing: -.045em; }
h2 { margin-bottom: 1.25rem; font-size: 1.45rem; letter-spacing: -.025em; }
h3 { margin-bottom: 1rem; }
.muted, .privacy-note { color: var(--muted); line-height: 1.55; }
.privacy-note { margin: 1.25rem 0 0; font-size: .82rem; }
.eyebrow { margin-bottom: .35rem; color: var(--primary); font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.brand, .auth-brand { display: flex; align-items: center; gap: .8rem; }
.brand strong, .auth-brand strong { display: block; letter-spacing: -.02em; }
.brand small, .auth-brand small { display: block; margin-top: .15rem; color: #91a2b6; font-size: .7rem; }
.brand-mark { display: grid; width: 2.55rem; height: 2.55rem; place-items: center; border: 1px solid rgba(72, 74, 211, .22); border-radius: .9rem; background: #f5f3ff; color: white; box-shadow: 0 9px 25px rgba(72, 74, 211, .27); overflow: hidden; }
.brand-mark img { width: 84%; height: 84%; object-fit: contain; }

.auth-page { min-height: 100vh; background: #10132e; }
.auth-page::before { position: fixed; z-index: 0; right: -8rem; bottom: -10rem; width: 34rem; height: 34rem; background: url(/build/images/logo_app.c7073ddc.png) center / contain no-repeat; content: ''; opacity: .08; transform: rotate(-12deg); }
.auth-shell, .setup-shell { position: relative; z-index: 1; min-height: 100vh; padding: 5vw; display: grid; align-content: center; grid-template-columns: minmax(230px, 1fr) minmax(320px, 450px); gap: clamp(2rem, 8vw, 8rem); max-width: 1200px; margin: auto; }
.auth-shell.compact, .setup-shell { grid-template-columns: minmax(300px, 700px); justify-content: center; }
.auth-brand { align-self: center; color: white; font-size: 1.5rem; }
.auth-brand .brand-mark { width: 4rem; height: 4rem; font-size: 1.5rem; border-radius: 1.2rem; }
.auth-mini-brand { position: fixed; z-index: 2; top: 1.5rem; left: 1.5rem; display: flex; align-items: center; gap: .6rem; color: #fff; font-family: var(--display); font-size: 1.2rem; }
.auth-mini-brand img { width: 2.2rem; height: 2.2rem; padding: .3rem; border-radius: .7rem; background: #f5f3ff; }
.auth-card, .panel { position: relative; border: 1px solid rgba(228, 224, 218, .95); background: rgba(255, 253, 249, .97); border-radius: 1.45rem; box-shadow: var(--shadow); }
.auth-card::before, .panel::before { position: absolute; top: 0; right: 1.4rem; left: 1.4rem; height: 3px; border-radius: 0 0 99px 99px; background: var(--primary); content: ''; opacity: .8; }
.auth-card { padding: clamp(1.6rem, 4vw, 2.7rem); }
.auth-card.wide { width: min(700px, 100%); }
.setup-shell-large { grid-template-columns: minmax(320px, 920px); align-content: start; padding-top: 6.5rem; padding-bottom: 3rem; }
.setup-card { width: 100%; }
.setup-form { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
.setup-form fieldset { padding: 1.15rem; border: 1px solid var(--line); border-radius: 1rem; background: #faf9f6; }
.setup-form legend { display: flex; align-items: center; gap: .55rem; padding: 0 .45rem; color: var(--ink); font-family: var(--display); font-weight: 800; }
.setup-form legend span { display: grid; width: 1.7rem; height: 1.7rem; place-items: center; border-radius: 50%; background: var(--primary); color: #fff; font-size: .75rem; }
.setup-form .form-grid { margin-top: .75rem; }
.setup-submit { justify-self: end; min-width: 260px; }
.form-hint { margin: -.25rem 0 0; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.stack { display: grid; gap: 1rem; margin-top: 1.5rem; }
label { display: grid; gap: .45rem; color: #455469; font-size: .78rem; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 2.8rem; padding: .72rem .85rem; border: 1px solid #ccd7df; border-radius: .7rem; background: #fff; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 6rem; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(72, 74, 211, .14); }
.button { display: inline-flex; min-height: 2.6rem; align-items: center; justify-content: center; gap: .4rem; padding: .62rem 1rem; border: 1px solid transparent; border-radius: .7rem; cursor: pointer; text-decoration: none; font-weight: 800; transition: transform .15s, box-shadow .15s, opacity .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--primary); color: white; box-shadow: 0 8px 20px rgba(72, 74, 211, .2); }
.button-secondary { background: var(--nav); color: white; }
.button.ghost { border-color: var(--line); background: white; color: var(--ink); box-shadow: none; }
.button.small { min-height: 2rem; padding: .35rem .6rem; font-size: .72rem; }
.link-button { padding: .25rem; border: 0; background: none; color: var(--primary); cursor: pointer; font-weight: 800; }
.secondary-action { margin-top: 1rem; text-align: center; }
.developer-credit { margin: 1.35rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); color: #8a8da0; font-size: .68rem; text-align: center; }
.developer-credit a { color: var(--primary); font-weight: 800; text-decoration: none; }
.developer-credit a:hover { text-decoration: underline; }
.alert, .toast { padding: .8rem 1rem; border-radius: .75rem; font-size: .86rem; line-height: 1.45; }
.alert-error, .toast.error { background: #fff0f2; color: #9f2438; }
.alert-success, .toast.success { background: var(--primary-soft); color: #34369c; }
  .choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .choice-card { padding: 1.2rem; border: 1px solid var(--line); border-radius: 1rem; }
  .compact-choice { margin: 1.2rem 0; }
  .choice-card p { min-height: 2.7rem; color: var(--muted); font-size: .86rem; }
  .row-actions { display: flex; align-items: center; gap: .5rem; }
  .day-picker { display: flex; flex-wrap: wrap; gap: .45rem; }
  .field-caption { width: 100%; color: #455469; font-size: .78rem; font-weight: 700; }
  .day-option { display: inline-flex; grid-template-columns: auto auto; align-items: center; gap: .35rem; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: .55rem; background: #fff; font-size: .76rem; cursor: pointer; }
  .day-option input { width: auto; min-height: auto; }
  .map-picker { position: relative; z-index: 0; width: 100%; min-height: 300px; overflow: hidden; border: 1px solid #bac7d0; border-radius: .9rem; background: #dbe8e5; }
  .map-picker .leaflet-control-attribution { font-size: .62rem; }
  .map-help { margin: .55rem 0 0; color: var(--muted); font-size: .72rem; line-height: 1.45; }
  .method-switch { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1rem 0; }
  .method-switch a { padding: .5rem .75rem; border: 1px solid var(--line); border-radius: .6rem; color: var(--primary); font-size: .82rem; font-weight: 800; text-decoration: none; }
.qr { display: block; width: min(240px, 80%); margin: 1.5rem auto; }
.manual-secret { display: block; overflow-wrap: anywhere; margin: .8rem 0; }
.backup-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin: 1.3rem 0; }
.backup-codes code { padding: .65rem; background: #eef3f5; border-radius: .5rem; text-align: center; }

.app-shell { position: relative; min-height: 100vh; background: var(--canvas); }
.app-shell::before { position: fixed; z-index: 0; top: 8rem; right: -12rem; width: 30rem; height: 30rem; background: url(/build/images/logo_app.c7073ddc.png) center / contain no-repeat; content: ''; opacity: .035; pointer-events: none; transform: rotate(10deg); }
.sidebar { position: sticky; z-index: 5; top: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1.5rem; min-height: 84px; padding: .8rem clamp(1rem, 4vw, 3.5rem); border-bottom: 1px solid rgba(255,255,255,.08); background: var(--nav); color: white; box-shadow: 0 12px 32px rgba(16, 19, 46, .18); }
.sidebar .brand { padding: 0; }
.sidebar nav { display: flex; justify-content: center; gap: .25rem; }
.sidebar nav button { display: inline-flex; align-items: center; gap: .5rem; padding: .65rem .78rem; border: 0; border-radius: .75rem; background: transparent; color: #b7b9d0; cursor: pointer; text-align: left; font-weight: 800; transition: color .15s, background .15s, transform .15s; }
.sidebar nav button:hover { background: rgba(255,255,255,.07); color: white; transform: translateY(-1px); }
.sidebar nav button.active { background: rgba(119, 123, 255, .18); color: white; box-shadow: inset 0 -2px var(--primary-bright); }
.nav-icon { width: 1.25rem; height: 1.25rem; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sidebar-foot { display: flex; align-items: center; gap: .7rem; margin: 0; padding: 0; color: #9aabba; }
.sidebar-foot .company-switcher { width: min(210px, 18vw); min-height: 2.25rem; padding: .45rem .6rem; border-color: rgba(255,255,255,.16); background: #1a1d42; color: #fff; font-size: .72rem; }
.account-link { padding: .25rem; color: #fff; font-size: .78rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.account-link:hover { color: #c9caff; }
.sidebar-foot .link-button { width: max-content; color: #c9caff; }
.workspace { position: relative; z-index: 1; min-width: 0; width: min(1440px, 100%); margin: auto; padding: clamp(1.25rem, 3vw, 3.5rem); }
.toast { position: fixed; z-index: 10; top: 1.2rem; right: 1.2rem; max-width: min(440px, calc(100vw - 2.4rem)); box-shadow: var(--shadow); }
.toast button { float: right; border: 0; background: none; cursor: pointer; color: inherit; font-size: 1.1rem; }
.page-section { width: min(1180px, 100%); }
.two-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.panel { padding: clamp(1.15rem, 2vw, 1.6rem); margin-bottom: 1.2rem; }
.compact-panel { margin-top: 2.5rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid .full, .full { grid-column: 1 / -1; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; }
.access-setup { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; padding: 0; border: 0; }
.access-setup legend { grid-column: 1 / -1; padding: 0; margin-bottom: .15rem; color: #455469; font-size: .78rem; font-weight: 800; }
.access-setup .choice-card { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: .7rem; padding: .85rem; background: #fff; cursor: pointer; }
.access-setup .choice-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.access-setup .choice-card input { width: 1rem; min-height: 1rem; margin: .12rem 0 0; accent-color: var(--primary); }
.access-setup .choice-card strong, .access-setup .choice-card small { display: block; }
.access-setup .choice-card small { margin-top: .25rem; color: var(--muted); font-weight: 500; line-height: 1.4; }
.check-row { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: .6rem; cursor: pointer; }
.check-row input { width: 1.1rem; min-height: 1.1rem; margin: 0; accent-color: var(--primary); }
.check { display: flex; align-items: center; gap: .5rem; }
.check input { width: 1.1rem; min-height: 1.1rem; accent-color: var(--primary); }
.setting-toggle { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .65rem; padding: .85rem 0; }
.setting-toggle > input { width: 1.1rem; min-height: 1.1rem; margin: 0; accent-color: var(--primary); }
.setting-toggle > span { color: #455469; font-size: .82rem; font-weight: 700; }
.help-trigger { display: grid; width: 1.55rem; height: 1.55rem; place-items: center; padding: 0; border: 1px solid #c7cce8; border-radius: 50%; background: var(--primary-soft); color: var(--primary); cursor: help; font-weight: 900; }
.help-popover { position: absolute; z-index: 3; top: calc(100% - .35rem); right: 0; width: min(360px, 90vw); padding: .8rem .9rem; border: 1px solid var(--line); border-radius: .75rem; background: #fff; box-shadow: 0 14px 35px rgba(30, 28, 70, .14); color: var(--muted); font-size: .76rem; line-height: 1.5; opacity: 0; pointer-events: none; transform: translateY(-4px); transition: opacity .15s, transform .15s; }
.help-trigger:hover + .help-popover, .help-trigger:focus + .help-popover, .help-popover.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.review-explanation { margin: -.35rem 0 0; font-size: .82rem; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.2rem; }
.section-heading h2 { margin: 0; font-size: 1.85rem; }
.export-menu { position: relative; flex: 0 0 auto; }
.export-options { position: absolute; z-index: 8; top: calc(100% + .45rem); right: 0; width: 210px; padding: .4rem; border: 1px solid var(--line); border-radius: .8rem; background: #fff; box-shadow: 0 16px 36px rgba(30, 28, 70, .14); }
.export-options a { display: block; padding: .7rem .75rem; border-radius: .55rem; color: var(--ink); font-size: .78rem; font-weight: 800; text-decoration: none; }
.export-options a:hover { background: var(--primary-soft); color: var(--primary); }
.filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; padding: 1rem; margin-bottom: 1rem; border: 1px solid var(--line); background: white; border-radius: 1rem; }
.filters label { min-width: 145px; flex: 1; }
.filters .button { margin-bottom: 1px; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: .8rem; margin-bottom: 1rem; }
.summary-grid > div { padding: .9rem 1rem; border: 1px solid var(--line); border-radius: .85rem; background: white; }
.summary-grid small, .summary-grid strong { display: block; }
.summary-grid small { color: var(--muted); }
.summary-grid strong { margin-top: .2rem; font-size: 1.2rem; }
.summary-grid .summary-warning { display: grid; place-items: center; background: #fff4e9; color: #a9550b; font-weight: 800; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid #e8edef; }
.list-row:last-child { border-bottom: 0; }
.list-row strong, .list-row small { display: block; }
.list-row small { margin-top: .25rem; color: var(--muted); line-height: 1.4; }
.status-pill { padding: .35rem .65rem; border: 0; border-radius: 99px; background: var(--primary-soft); color: var(--primary); cursor: pointer; font-size: .72rem; font-weight: 800; }
.status-pill.off { background: #edf0f2; color: #697585; }
.empty-state { padding: 2.8rem 1rem; border: 1px dashed #cbd6dc; border-radius: 1rem; color: var(--muted); text-align: center; }

.clock-view { width: min(720px, 100%); margin: 3vh auto 0; text-align: center; }
.clock-time span { display: block; color: var(--muted); text-transform: capitalize; }
.clock-time strong { display: block; margin-top: .2rem; color: var(--primary); font-family: var(--display); font-size: clamp(3.2rem, 9vw, 5.8rem); letter-spacing: -.065em; font-variant-numeric: tabular-nums; }
.status-card { display: inline-flex; align-items: center; gap: .8rem; min-width: min(400px, 100%); padding: .9rem 1.2rem; margin: 1rem auto 1.8rem; border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: 1rem; background: var(--surface); box-shadow: 0 10px 24px rgba(30, 28, 70, .06); text-align: left; }
.status-card .status-dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--primary-bright); box-shadow: 0 0 0 5px var(--primary-soft); }
.status-card small, .status-card strong, .status-card span { display: block; }
.status-card small, .status-card span { color: var(--muted); font-size: .72rem; }
.clock-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.punch-button { min-width: 210px; min-height: 118px; display: grid; place-items: center; gap: .4rem; padding: 1rem; border: 0; border-radius: 1.3rem; background: var(--primary); color: white; cursor: pointer; box-shadow: 0 18px 38px rgba(72, 74, 211, .24); font-size: 1rem; font-weight: 900; }
.punch-button span { display: grid; width: 2.4rem; height: 2.4rem; place-items: center; border-radius: 50%; background: rgba(255,255,255,.16); }
.punch-button.break_start { background: #b76b20; box-shadow: 0 18px 38px rgba(196, 108, 20, .18); }
.punch-button.clock_out { background: #a93143; box-shadow: 0 18px 38px rgba(169, 49, 67, .18); }
.punch-button:disabled { opacity: .55; cursor: wait; }
.timeline { overflow: hidden; border: 1px solid var(--line); border-radius: 1rem; background: white; }
.event-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 1rem; padding: 1rem 1.15rem; border-bottom: 1px solid #e8edef; }
.event-row:last-child { border-bottom: 0; }
.event-row strong, .event-row span, .event-row small, .event-row em { display: block; }
.event-row span, .event-row small { color: var(--muted); }
.event-row em { margin-top: .3rem; color: #8c5d18; font-size: .75rem; }
.event-icon { display: grid !important; width: 2.3rem; height: 2.3rem; place-items: center; border-radius: .7rem; background: var(--primary-soft); color: var(--primary) !important; font-weight: 900; }
.event-icon.break_start, .event-icon.clock_out { background: #fff0e2; color: #b25a09 !important; }
.segment { display: grid; grid-template-columns: 1fr .8fr .8fr auto auto; gap: .5rem; align-items: end; padding: .7rem; background: #f5f8f9; border-radius: .8rem; }
.audit-list code { max-width: 45%; overflow: hidden; color: #607080; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.section-note { max-width: 58rem; margin: .35rem 0 0; font-size: .86rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.records-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 1rem; background: #fff; box-shadow: 0 12px 28px rgba(30, 28, 70, .05); }
.records-grid { width: 100%; border-collapse: collapse; font-size: .79rem; }
.records-grid th { padding: .85rem .8rem; border-bottom: 1px solid var(--line); background: #f7f6f3; color: #52566f; font-size: .7rem; letter-spacing: .04em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.records-grid td { padding: .78rem .8rem; border-bottom: 1px solid #ebe8e3; color: var(--ink); white-space: nowrap; }
.records-grid tbody tr:last-child td { border-bottom: 0; }
.records-grid tbody tr:nth-child(even) { background: #faf9f6; }
.records-grid tbody tr:hover { background: #f3f2ff; }
.record-status { display: inline-flex; min-width: 92px; justify-content: center; padding: .3rem .55rem; border-radius: 99px; background: #edf7f0; color: #277046; font-size: .68rem; font-weight: 800; }
.record-status.open { background: #fff3e4; color: #9a5a10; }
.record-status.warning { background: #fff0f2; color: #9f2438; }
.table-action { text-align: right; }
.record-actions { display: flex; justify-content: flex-end; align-items: center; gap: .45rem; }
.correction-warning-button { position: relative; display: grid; width: 2rem; height: 2rem; flex: 0 0 auto; place-items: center; padding: 0; border: 1px solid #e9ad60; border-radius: .65rem; background: #fff4e5; color: #9b4d08; cursor: pointer; }
.correction-warning-button:hover, .correction-warning-button:focus-visible { border-color: #b75d0a; background: #ffe8c8; }
.correction-warning-button svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.correction-warning-button::after { position: absolute; z-index: 5; right: 0; bottom: calc(100% + .55rem); width: max-content; max-width: 260px; padding: .5rem .65rem; border-radius: .55rem; background: #17172d; color: #fff; content: attr(data-tooltip); font-size: .7rem; font-weight: 700; line-height: 1.35; opacity: 0; pointer-events: none; text-align: left; white-space: normal; transform: translateY(.2rem); transition: opacity .15s ease, transform .15s ease; }
.correction-warning-button:hover::after, .correction-warning-button:focus-visible::after { opacity: 1; transform: translateY(0); }
.record-alert { padding: .35rem .5rem; border-radius: .55rem; background: #fff0f2; color: #9f2438; font-size: .7rem; font-weight: 800; }
.modal-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 1rem; background: rgba(16, 19, 46, .64); }
.modal-backdrop-top { z-index: 60; }
.modal-dialog { width: min(760px, 100%); max-height: calc(100vh - 2rem); padding: clamp(1.25rem, 3vw, 2rem); margin: 0; overflow-y: auto; }
.modal-dialog-small { width: min(620px, 100%); }
.modal-dialog::before { right: 1.4rem; left: 1.4rem; }
.modal-close { position: sticky; z-index: 2; top: 0; float: right; display: grid; width: 2rem; height: 2rem; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; font-size: 1.25rem; }
.record-detail-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: .65rem; margin: 1.2rem 0; }
.record-detail-summary > div { padding: .75rem; border: 1px solid var(--line); border-radius: .75rem; background: #faf9f6; }
.record-detail-summary span, .record-detail-summary strong { display: block; }
.record-detail-summary span { margin-bottom: .25rem; color: var(--muted); font-size: .67rem; text-transform: uppercase; }
.detail-section { padding-top: 1rem; margin-top: 1rem; border-top: 1px solid var(--line); }
.detail-section h3 { margin-bottom: .65rem; }
.detail-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid #ebe8e3; }
.detail-row:last-child { border-bottom: 0; }
.detail-row strong, .detail-row span { display: block; }
.detail-row span { margin-top: .2rem; color: var(--muted); font-size: .76rem; }
.record-detail-actions { padding-top: 1rem; margin-top: 1rem; border-top: 1px solid var(--line); }
.correction-movements { display: grid; gap: .7rem; }
.correction-movement { display: grid; grid-template-columns: auto minmax(150px, .75fr) minmax(220px, 1.25fr); align-items: end; gap: .7rem; padding: .8rem; border: 1px solid var(--line); border-radius: .85rem; background: #faf9f6; }
.movement-number { display: grid; width: 2rem; height: 2rem; place-items: center; margin-bottom: .35rem; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 900; }
.correction-change { display: block; margin-top: .4rem; color: var(--muted); font-size: .72rem; line-height: 1.4; }
.correction-group { align-items: flex-start; }
.pending-corrections { display: grid; gap: .75rem; }
.pending-corrections > h3 { margin-bottom: 0; }
.correction-request-card { padding: 1rem; border: 1px solid #ecc58d; border-radius: .9rem; background: #fffaf2; }
.correction-request-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.correction-request-head > div { display: grid; gap: .4rem; }
.correction-request-head small { color: var(--muted); }
.pending-badge { width: max-content; padding: .25rem .45rem; border-radius: 99px; background: #ffe4bd; color: #8b4307; font-size: .62rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.correction-reason { margin: .8rem 0; color: #565a70; font-size: .8rem; line-height: 1.5; }
.correction-comparison { display: grid; grid-template-columns: minmax(105px, .7fr) minmax(160px, 1fr) auto minmax(160px, 1fr); align-items: center; gap: .65rem; padding: .75rem 0; border-top: 1px solid #edddc7; }
.correction-comparison small, .correction-comparison strong { display: block; }
.correction-comparison small { color: var(--muted); font-size: .65rem; }
.correction-comparison strong { margin-top: .15rem; font-size: .78rem; }
.movement-kind { color: var(--ink); font-size: .72rem; font-weight: 800; }
.comparison-arrow { color: #a4530a; font-weight: 900; }
.correction-decision-actions { justify-content: flex-end; padding-top: .8rem; border-top: 1px solid #edddc7; }
.loading-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; color: var(--muted); }
.spinner { width: 2.4rem; height: 2.4rem; border: 3px solid #dce5e7; border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1280px) {
    .sidebar { gap: .8rem; padding: .75rem 1rem; }
    .sidebar nav { gap: .05rem; }
    .sidebar nav button { gap: .38rem; padding: .58rem .62rem; font-size: .78rem; }
    .sidebar .brand small { display: none; }
    .sidebar-foot { gap: .4rem; }
}
@media (max-width: 1080px) {
    .sidebar { grid-template-columns: auto minmax(0, 1fr); gap: .55rem 1rem; }
    .sidebar nav { grid-row: 2; grid-column: 1 / -1; justify-content: flex-start; min-width: 0; overflow-x: auto; padding-bottom: .15rem; scrollbar-width: none; }
    .sidebar nav::-webkit-scrollbar { display: none; }
    .sidebar nav button { flex: 0 0 auto; }
    .sidebar-foot { justify-self: end; }
    .sidebar-foot .company-switcher { width: min(240px, 28vw); }
    .workspace { padding: 1.2rem; }
    .two-columns { grid-template-columns: 1fr; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
}
@media (max-width: 620px) {
    .sidebar { grid-template-columns: auto auto; }
    .sidebar .brand { min-width: 0; }
    .sidebar .brand strong { font-size: .9rem; }
    .sidebar .brand-mark { width: 2.2rem; height: 2.2rem; }
    .sidebar-foot { display: grid; grid-template-columns: auto auto; gap: .25rem .45rem; }
    .sidebar-foot .company-switcher { grid-column: 1 / -1; width: 100%; max-width: 175px; }
    .account-link, .sidebar-foot .link-button { font-size: .7rem; }
    .workspace { padding: 1rem .8rem 2.5rem; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid > * { grid-column: 1 !important; }
    .setup-shell-large { padding: 5.5rem .7rem 1.5rem; }
    .setup-form fieldset { padding: .85rem; }
    .setup-submit { width: 100%; min-width: 0; }
    .access-setup { grid-template-columns: 1fr; }
    .choice-grid, .backup-codes { grid-template-columns: 1fr; }
    .filters { display: grid; grid-template-columns: 1fr 1fr; }
    .summary-grid { grid-template-columns: 1fr 1fr; }
    .filters label:first-child, .filters .button { grid-column: 1 / -1; }
    .section-heading { align-items: flex-start; }
    .punch-button { width: 100%; min-height: 98px; }
    .segment { grid-template-columns: 1fr 1fr; }
    .event-row { grid-template-columns: auto 1fr; }
    .event-row > .link-button { grid-column: 2; justify-self: start; }
    .list-row { align-items: flex-start; }
    .audit-list code { display: none; }
    .records-table-wrap { overflow: visible; border: 0; background: transparent; box-shadow: none; }
    .records-grid, .records-grid tbody { display: block; }
    .records-grid thead { display: none; }
    .records-grid tr { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: .75rem; margin-bottom: .7rem; border: 1px solid var(--line); border-radius: .9rem; background: #fff !important; box-shadow: 0 8px 22px rgba(30, 28, 70, .05); }
    .records-grid td { display: flex; min-width: 0; flex-direction: column; gap: .2rem; padding: .48rem; border: 0; white-space: normal; }
    .records-grid td::before { color: var(--muted); content: attr(data-label); font-size: .62rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
    .records-grid td:first-child, .records-grid .table-action { grid-column: 1 / -1; }
    .records-grid .table-action { padding-top: .65rem; border-top: 1px solid var(--line); text-align: left; }
    .records-grid .table-action::before { display: none; }
    .records-grid .table-action .button { flex: 1; }
    .record-actions { justify-content: stretch; }
    .record-status { width: max-content; }
    .modal-backdrop { align-items: end; padding: .5rem; }
    .modal-dialog { max-height: calc(100vh - 1rem); border-radius: 1.1rem; }
    .record-detail-summary { grid-template-columns: 1fr 1fr; }
    .correction-movement { grid-template-columns: auto 1fr; }
    .correction-movement label:last-child { grid-column: 2; }
    .correction-comparison { grid-template-columns: 1fr; gap: .3rem; }
    .comparison-arrow { transform: rotate(90deg); }
    .correction-decision-actions { display: grid; grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; }
}

