:root {
  --orange: #f6861f;
  --orange-dark: #a94f00;
  --orange-hover: #e97810;
  --orange-soft: #fff3e8;
  --charcoal: #1f1f1f;
  --black: #0e0e0e;
  --page: #f5f6f7;
  --line: #dedfe2;
  --line-strong: #c7c9cd;
  --muted: #64676c;
  --blue: #527f98;
  --blue-soft: #e9f2f7;
  --white: #fff;
  --green: #126343;
  --green-soft: #e7f7f0;
  --red: #a52319;
  --red-soft: #fff0ee;
  --amber: #765000;
  --amber-soft: #fff7df;
  --shadow: 0 12px 35px rgba(14, 14, 14, .08);
  --radius: 10px;
  --sidebar: 248px;
  --font: "Montserrat", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--charcoal); font-family: var(--font); line-height: 1.55; }
body.nav-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
img { display: block; max-width: 100%; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
:focus-visible { outline: 3px solid rgba(246, 134, 31, .42); outline-offset: 3px; }
.tabular, .money { font-variant-numeric: tabular-nums; }
.money { font-weight: 750; white-space: nowrap; }
.muted { color: var(--muted); }
.stack { display: grid; gap: 18px; }
.section-gap { margin-top: 18px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 1000; padding: .75rem 1rem; border-radius: 6px; background: var(--white); color: var(--black); box-shadow: var(--shadow); font-weight: 700; }
.skip-link:focus { top: 1rem; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; display: flex; width: var(--sidebar); flex-direction: column; overflow-y: auto; background: linear-gradient(165deg, #292929, #131313); color: var(--white); border-right: 1px solid #333; }
.brand { min-height: 112px; padding: 27px 25px 22px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand img { width: 145px; }
.brand small { display: block; margin-top: 10px; color: #bcbcbc; font-size: .7rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.nav { display: grid; gap: 4px; padding: 19px 12px; }
.nav a { position: relative; display: flex; min-height: 46px; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 7px; color: #d7d7d7; font-size: .875rem; font-weight: 650; transition: background .18s ease, color .18s ease; }
.nav a:hover { background: rgba(255,255,255,.07); color: var(--white); }
.nav a.active { background: linear-gradient(90deg, rgba(246,134,31,.23), rgba(246,134,31,.07)); color: var(--white); }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 4px; border-radius: 0 4px 4px 0; background: var(--orange); }
.nav svg { width: 19px; height: 19px; flex: 0 0 19px; color: var(--orange); }
.sidebar-user { margin-top: auto; padding: 19px 22px; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-user-row { display: flex; align-items: center; gap: 11px; }
.sidebar-user-row > a { min-width: 0; }
.sidebar-user strong { display: block; overflow: hidden; color: var(--white); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user small { display: block; overflow: hidden; color: #bcbcbc; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.signout { min-height: 42px; margin: 5px 0 0 46px; padding: 8px 0; border: 0; background: none; color: #cfcfcf; font-size: .76rem; font-weight: 650; }
.nav-backdrop { display: none; }
.main { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; height: 72px; align-items: center; justify-content: space-between; padding: 0 36px; border-bottom: 1px solid var(--line); background: rgba(245,246,247,.94); backdrop-filter: blur(14px); }
.topbar-start, .top-actions { display: flex; align-items: center; gap: 11px; min-width: 0; }
.crumb { overflow: hidden; color: #62656a; font-size: .72rem; font-weight: 750; letter-spacing: .1em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.icon-button { position: relative; display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--charcoal); }
.icon-button:hover { border-color: var(--line-strong); background: #fafafa; }
.icon-button svg { width: 20px; height: 20px; }
.menu-toggle { display: none; }
.notification-dot { position: absolute; right: -5px; top: -6px; display: grid; min-width: 20px; height: 20px; place-items: center; padding: 0 4px; border: 2px solid var(--page); border-radius: 20px; background: var(--orange); color: var(--black); font-size: .64rem; font-weight: 800; }
.avatar { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border-radius: 50%; background: var(--orange); color: var(--black); box-shadow: 0 0 0 3px rgba(246,134,31,.15); font-size: .78rem; font-weight: 800; }
.content { width: 100%; max-width: 1550px; margin: auto; padding: 32px 36px 64px; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 25px; }
.page-head > div:first-child { min-width: 0; }
.eyebrow { margin-bottom: 6px; color: var(--orange-dark); font-size: .71rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.page-head h1, .auth-copy h1 { margin: 0; color: var(--black); font-size: clamp(1.8rem, 3vw, 2.45rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.12; }
.page-head p { max-width: 730px; margin: 8px 0 0; color: var(--muted); font-size: .92rem; }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border: 1px solid transparent; border-radius: 7px; font-size: .8rem; font-weight: 750; line-height: 1.2; text-align: center; transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 15px rgba(14,14,14,.09); }
.btn-primary { background: var(--orange); color: var(--black); }
.btn-primary:hover { background: var(--orange-hover); }
.btn-secondary { border-color: #cfd1d5; background: var(--white); color: var(--charcoal); }
.btn-secondary:hover { border-color: #b5b8bd; background: #fafafa; }
.btn-dark { background: var(--charcoal); color: var(--white); }
.btn-danger { border-color: #ebbbb6; background: var(--red-soft); color: var(--red); }
.btn-success { background: var(--green); color: var(--white); }
.btn-sm { min-height: 38px; padding: 8px 11px; font-size: .75rem; }
.btn-block { width: 100%; }
.btn-icon svg { width: 17px; height: 17px; }

.card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 2px 5px rgba(14,14,14,.025); }
.card-head { display: flex; min-height: 60px; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 19px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { margin: 0; color: var(--black); font-size: 1rem; line-height: 1.3; }
.card-body { padding: 20px; }
.accent-card { border-top: 3px solid var(--orange); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.metric { position: relative; min-height: 126px; overflow: hidden; padding: 18px; border-left: 3px solid var(--orange); }
.metric::after { content: ""; position: absolute; right: -30px; top: -34px; width: 78px; height: 78px; border-radius: 50%; background: var(--orange-soft); }
.metric-label { color: #666a6f; font-size: .7rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.metric-value { margin: 7px 0 4px; color: var(--black); font-size: clamp(1.35rem, 2vw, 1.7rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.2; }
.metric-value.compact { font-size: 1.18rem; letter-spacing: -.02em; }
.metric-note { color: #777b80; font-size: .75rem; }
.metric-note.good { color: var(--green); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(290px,.75fr); gap: 18px; margin-bottom: 18px; }
.two-col { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.three-col { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.detail-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(300px,.65fr); gap: 18px; }

.table-wrap { width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.data-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.data-table caption { padding: 12px 18px; color: var(--muted); font-size: .76rem; text-align: left; }
.data-table th { padding: 11px 14px; border-bottom: 2px solid var(--orange); color: #65686d; font-size: .66rem; font-weight: 800; letter-spacing: .075em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 13px 14px; border-bottom: 1px solid #ededee; vertical-align: middle; }
.data-table tbody tr:hover { background: #fffaf6; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.record-title { color: var(--black); font-weight: 750; }
.record-subtitle { display: block; margin-top: 2px; color: #73777c; font-size: .73rem; line-height: 1.45; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 99px; font-size: .69rem; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: currentColor; }
.status-approved, .status-paid, .status-verified, .status-won, .status-resolved { color: var(--green); background: var(--green-soft); }
.status-rejected, .status-cancelled, .status-lost, .status-withdrawn, .status-duplicate, .status-unqualified, .status-failed { color: var(--red); background: var(--red-soft); }
.status-draft, .status-historical { color: #50545a; background: #eceef0; }
.status-team_lead_review, .status-hr_review, .status-under_review, .status-submitted, .status-resubmitted, .status-assigned, .status-negotiation, .status-contract_signed, .status-initial_payment, .status-initial_payment_confirmed, .status-open { color: var(--amber); background: var(--amber-soft); }
.empty { padding: 42px 20px; color: var(--muted); text-align: center; }
.empty-mark { display: grid; width: 56px; height: 56px; margin: 0 auto 13px; place-items: center; border-radius: 15px; background: var(--orange-soft); color: var(--orange-dark); }
.empty-mark svg { width: 26px; height: 26px; }
.empty strong { display: block; margin-bottom: 4px; color: var(--charcoal); }
.list-stack { display: grid; }
.list-row { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid #ededee; }
.list-row:last-child { border-bottom: 0; }
.list-row > span:first-child { min-width: 0; }
.amount-block { display: grid; justify-items: end; gap: 5px; text-align: right; }

.filter-panel { display: flex; align-items: end; gap: 12px; margin-bottom: 18px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.filter-panel .field { flex: 1 1 190px; }
.filter-panel .search-field { flex: 2 1 280px; }
.filter-bar { display: flex; gap: 8px; margin-bottom: 18px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.filter-chip { display: inline-flex; min-height: 40px; flex: 0 0 auto; align-items: center; padding: 8px 13px; border: 1px solid var(--line); border-radius: 99px; background: var(--white); font-size: .74rem; font-weight: 700; }
.filter-chip.active { border-color: var(--charcoal); background: var(--charcoal); color: var(--white); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-top: 1px solid var(--line); }
.pagination-info { color: var(--muted); font-size: .76rem; }

.form-card { width: 100%; max-width: 1080px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: grid; min-width: 0; gap: 7px; }
.field label, .form-card form > p label, .auth-box form > p label, .dialog-body form > p label, .card-body form > p label { color: #555a60; font-size: .72rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.field.checkbox-field, form > p:has(.check-input) { display: flex; align-items: flex-start; gap: 10px; }
.field.checkbox-field label, form > p:has(.check-input) label { order: 2; padding-top: 2px; color: var(--charcoal); font-size: .8rem; letter-spacing: 0; text-transform: none; }
.form-control { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #c8cbd0; border-radius: 7px; background: var(--white); color: var(--charcoal); transition: border .18s ease, box-shadow .18s ease; }
:where(.auth-box,.card-body,.dialog-body) input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
:where(.auth-box,.card-body,.dialog-body) select,
:where(.auth-box,.card-body,.dialog-body) textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #c8cbd0; border-radius: 7px; background: var(--white); color: var(--charcoal); }
:where(.auth-box,.card-body,.dialog-body) input:focus,
:where(.auth-box,.card-body,.dialog-body) select:focus,
:where(.auth-box,.card-body,.dialog-body) textarea:focus { border-color: var(--orange-hover); outline: 0; box-shadow: 0 0 0 3px rgba(246,134,31,.16); }
.form-control:hover { border-color: #aeb2b7; }
.form-control:focus { border-color: var(--orange-hover); outline: 0; box-shadow: 0 0 0 3px rgba(246,134,31,.16); }
.form-control[aria-invalid="true"] { border-color: var(--red); }
textarea.form-control { min-height: 86px; resize: vertical; }
select.form-control { padding-right: 36px; }
input[type="file"].form-control { padding: 7px; }
input[type="file"]::file-selector-button { min-height: 30px; margin-right: 10px; padding: 5px 10px; border: 0; border-radius: 5px; background: var(--charcoal); color: var(--white); font-weight: 700; }
.check-input { width: 20px; height: 20px; flex: 0 0 20px; margin: 1px 0 0; accent-color: var(--orange-hover); }
.helptext, .help { color: #6c7075; font-size: .73rem; }
.helptext ul, ul.helptext { margin: 5px 0 0; padding-left: 18px; }
.errorlist { margin: 2px 0 0; padding: 0; list-style: none; color: var(--red); font-size: .75rem; font-weight: 700; }
.error-summary { margin-bottom: 18px; padding: 14px 16px; border: 1px solid #e8b2ad; border-left: 4px solid var(--red); border-radius: 7px; background: var(--red-soft); color: #761811; }
.error-summary h2 { margin: 0 0 4px; font-size: .9rem; }
.error-summary p { margin: 0; font-size: .78rem; }
.form-card form > p, .auth-box form > p, .dialog-body form > p, .card-body form > p { display: grid; gap: 7px; margin: 0 0 16px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 19px; padding-top: 18px; border-top: 1px solid var(--line); }
.item-card { margin: 14px 0; padding: 20px; border: 1px solid var(--line); border-left: 3px solid var(--orange); border-radius: 8px; background: var(--white); }
.item-card:first-child { margin-top: 0; }
.item-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.item-title strong { font-size: .9rem; }
.field-group { display: grid; gap: 17px; }
.subtle-panel { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--page); }
.info-panel, .warning-panel, .security-note { padding: 13px 15px; border-radius: 7px; font-size: .78rem; }
.info-panel, .security-note { border: 1px solid #c2d9e5; background: var(--blue-soft); color: #345b70; }
.security-note summary { cursor: pointer; font-weight: 750; }
.security-note p:last-child { margin-bottom: 0; }
.warning-panel { border: 1px solid #efc89f; background: var(--orange-soft); color: #64370e; }
.upload-note { display: flex; align-items: flex-start; gap: 10px; }
.claim-total { margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line); }
.claim-total .summary-row { padding: 0; }
.claim-total strong { font-size: 1.1rem; }

.summary-list { display: grid; }
.summary-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px solid #ededee; font-size: .8rem; }
.summary-row > :last-child { max-width: 66%; text-align: right; overflow-wrap: anywhere; }
.summary-row > span:first-child { color: #6b6f74; }
.summary-row:last-child { border-bottom: 0; }
.timeline { position: relative; padding-left: 27px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: #dedfe1; }
.timeline-item { position: relative; padding: 0 0 21px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: -24px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }
.timeline-item strong { font-size: .8rem; }
.timeline-item p { margin: 3px 0; color: #666a6f; font-size: .75rem; }
.timeline-item time { color: #777b80; font-size: .69rem; }
.stepper { display: grid; grid-template-columns: repeat(4,1fr); margin-bottom: 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.step { position: relative; display: grid; justify-items: center; gap: 5px; color: #73777c; font-size: .7rem; font-weight: 700; text-align: center; }
.step::before { content: ""; z-index: 1; width: 12px; height: 12px; border: 3px solid var(--white); border-radius: 50%; background: #c8cbd0; box-shadow: 0 0 0 1px #c8cbd0; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 6px; left: 50%; width: 100%; height: 2px; background: #dfe1e4; }
.step.complete::before, .step.current::before { background: var(--orange); box-shadow: 0 0 0 1px var(--orange-hover); }
.step.complete:not(:last-child)::after { background: var(--orange); }
.step.current { color: var(--black); }

.messages { position: fixed; right: 24px; top: 84px; z-index: 80; display: grid; gap: 8px; width: min(410px,calc(100vw - 32px)); }
.message { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 7px; background: var(--white); box-shadow: var(--shadow); font-size: .8rem; animation: slide-in .25s ease; }
.message.success { border-left-color: var(--green); }
.message.error { border-left-color: var(--red); }
.message.warning { border-left-color: var(--amber); }
.message button { width: 28px; height: 28px; flex: 0 0 28px; margin: -5px -6px -5px 0; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 1.05rem; }
@keyframes slide-in { from { opacity: 0; transform: translateX(12px); } }
dialog { width: min(560px,calc(100vw - 30px)); max-height: calc(100dvh - 30px); overflow-y: auto; padding: 0; border: 0; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(14,14,14,.6); backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.dialog-head h3 { margin: 0; font-size: 1rem; }
.dialog-body { padding: 20px; }
.dialog-close { display: grid; width: 40px; height: 40px; place-items: center; border: 0; border-radius: 7px; background: transparent; font-size: 1.25rem; }
.code { display: inline-block; padding: 2px 6px; border-radius: 4px; background: #eceef0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .74rem; overflow-wrap: anywhere; }
.role-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { padding: 4px 8px; border-radius: 5px; background: var(--orange-soft); color: var(--orange-dark); font-size: .65rem; font-weight: 800; }
.progress-row { margin: 15px 0; }
.progress-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; font-size: .76rem; font-weight: 650; }
.progress { height: 8px; overflow: hidden; border-radius: 10px; background: #e9eaec; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--orange),#ffb367); }
.progress-native { width: 100%; height: 8px; border: 0; border-radius: 10px; overflow: hidden; background: #e9eaec; appearance: none; }
.progress-native::-webkit-progress-bar { background: #e9eaec; }
.progress-native::-webkit-progress-value { background: linear-gradient(90deg,var(--orange),#ffb367); }
.progress-native::-moz-progress-bar { background: var(--orange); }
.notification-item { position: relative; align-items: flex-start; padding-left: 18px; }
.notification-item.unread::before { content: ""; position: absolute; left: 0; top: 20px; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }

.auth-shell { min-height: 100dvh; display: grid; grid-template-columns: minmax(390px,1.05fr) minmax(440px,.95fr); background: var(--white); }
.auth-visual { position: relative; display: flex; min-height: 100dvh; flex-direction: column; overflow: hidden; padding: 48px clamp(35px,6vw,90px); background: linear-gradient(145deg,#fa8a25,#e9740c); color: var(--black); }
.auth-brand { position: relative; z-index: 2; width: 170px; }
.auth-copy { position: relative; z-index: 2; margin: auto 0; }
.auth-copy .kicker { font-size: .71rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; opacity: .8; }
.auth-copy h1 { max-width: 700px; margin: 14px 0 20px; color: var(--black); font-size: clamp(2.3rem,4.2vw,4.2rem); }
.auth-copy p { max-width: 570px; margin: 0; font-size: .97rem; }
.hero-art { position: absolute; right: -25px; bottom: -20px; width: min(48vw,560px); opacity: .27; }
.auth-foot { position: relative; z-index: 2; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.auth-panel { display: grid; min-width: 0; place-items: center; padding: 42px; background: linear-gradient(135deg,#fff,#fbfbfb); }
.auth-box { width: min(440px,100%); }
.secure-mark { width: 44px; height: 4px; margin-bottom: 18px; border-radius: 4px; background: var(--orange); }
.auth-box h2 { margin: 0 0 7px; color: var(--black); font-size: 2rem; font-weight: 800; letter-spacing: -.035em; line-height: 1.15; }
.auth-box > p { margin: 0 0 25px; color: var(--muted); font-size: .84rem; }
.auth-links { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 17px; font-size: .78rem; }
.auth-links a, .text-link { color: var(--orange-dark); font-weight: 750; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.auth-links a:hover, .text-link:hover { text-decoration-color: currentColor; }
.auth-inline-links { display: flex; justify-content: space-between; gap: 12px; margin: -5px 0 15px; font-size: .75rem; }
.password-meter { height: 6px; margin: -7px 0 6px; overflow: hidden; border-radius: 5px; background: #e9eaec; }
.password-meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--orange); transition: width .18s ease, background .18s ease; }
.password-strength-text { min-height: 20px; margin: 0 0 13px; color: var(--muted); font-size: .72rem; }
.mobile-only { display: none; }

@media (max-width: 1180px) {
  :root { --sidebar: 220px; }
  .content { padding: 28px 25px 58px; }
  .topbar { padding: 0 25px; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-grid, .detail-grid { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 980px) {
  :root { --sidebar: 272px; }
  .sidebar { transform: translateX(-102%); box-shadow: 20px 0 50px rgba(0,0,0,.25); transition: transform .23s ease; }
  body.nav-open .sidebar { transform: translateX(0); }
  .nav-backdrop { position: fixed; inset: 0; z-index: 35; display: block; border: 0; background: rgba(14,14,14,.52); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  body.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  .menu-toggle { display: grid; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { min-height: 255px; padding: 30px clamp(24px,7vw,60px); }
  .auth-copy { margin: 42px 0 35px; }
  .auth-copy h1 { max-width: 680px; font-size: clamp(2rem,6vw,3.1rem); }
  .auth-copy p { max-width: 650px; }
  .auth-foot { display: none; }
  .hero-art { width: 330px; }
  .auth-panel { padding: 42px 24px 60px; }
}

@media (max-width: 860px) {
  .two-col, .three-col { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  html { font-size: 15px; }
  .content { padding: 21px 15px 88px; }
  .topbar { height: 64px; padding: 0 15px; }
  .crumb { max-width: calc(100vw - 155px); letter-spacing: .055em; }
  .page-head { flex-direction: column; gap: 15px; margin-bottom: 20px; }
  .page-head h1 { font-size: 1.85rem; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1 1 auto; }
  .metric-grid, .two-col, .three-col, .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .metric-grid { gap: 10px; }
  .metric { min-height: 105px; padding: 15px; }
  .metric-value { font-size: 1.42rem; }
  .card-head { min-height: 56px; padding: 13px 15px; }
  .card-body { padding: 16px; }
  .filter-panel { align-items: stretch; flex-direction: column; }
  .filter-panel .field { flex: 0 0 auto; }
  .filter-panel .btn { width: 100%; }
  .form-actions { position: sticky; bottom: 0; z-index: 10; margin-right: -15px; margin-left: -15px; padding: 12px 15px max(12px,env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); box-shadow: 0 -8px 22px rgba(14,14,14,.07); backdrop-filter: blur(10px); }
  .form-actions .btn { flex: 1; }
  .item-card { margin: 11px 0; padding: 15px; }
  .summary-row { gap: 10px; }
  .summary-row > :last-child { max-width: 62%; }
  .progress-label { align-items: flex-start; flex-direction: column; gap: 3px; }
  .progress-label b { align-self: stretch; }
  .stepper { overflow-x: auto; grid-template-columns: repeat(4,minmax(100px,1fr)); }
  .messages { right: 16px; top: 74px; }
  .pagination { align-items: stretch; flex-direction: column; }
  .pagination .actions { justify-content: space-between; }
  .auth-visual { min-height: 190px; padding: 24px 22px; }
  .auth-brand { width: 137px; }
  .auth-copy { margin: 28px 0 0; }
  .auth-copy .kicker, .auth-copy p, .hero-art { display: none; }
  .auth-copy h1 { margin: 0; max-width: 320px; font-size: 2rem; }
  .auth-panel { place-items: start center; padding: 31px 20px 50px; }
  .auth-box h2 { font-size: 1.75rem; }
  .auth-links { align-items: flex-start; flex-direction: column; }
  .desktop-only { display: none !important; }
  .mobile-only { display: block; }

  .responsive-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100%; }
  .responsive-table tbody { padding: 6px 14px; }
  .responsive-table tr { margin: 8px 0; padding: 13px 0; border-bottom: 1px solid var(--line); }
  .responsive-table tr:last-child { border-bottom: 0; }
  .responsive-table td { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 5px 0; border: 0; text-align: right; }
  .responsive-table td::before { content: attr(data-label); flex: 0 0 auto; color: var(--muted); font-size: .69rem; font-weight: 800; letter-spacing: .05em; text-align: left; text-transform: uppercase; }
  .responsive-table td[data-primary] { display: block; padding-bottom: 9px; text-align: left; }
  .responsive-table td[data-primary]::before, .responsive-table td[data-action]::before, .responsive-table .empty-cell::before { display: none; }
  .responsive-table td[data-action] { padding-top: 10px; }
  .responsive-table td[data-action] .btn { width: 100%; }
  .responsive-table .empty-cell { display: block; text-align: center; }
}

@media (max-width: 390px) {
  .content { padding-right: 12px; padding-left: 12px; }
  .topbar { padding: 0 12px; }
  .top-actions { gap: 7px; }
  .page-head .actions { align-items: stretch; flex-direction: column; }
  .summary-row { align-items: flex-start; flex-direction: column; gap: 3px; }
  .summary-row > :last-child { max-width: 100%; text-align: left; }
  .item-title { align-items: flex-start; }
  .item-title .btn { min-height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
