/* Border Glass Now — staff console and sign-in.
   Self-hosted type, neutral working surfaces and lime action accents. */
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/assets/fonts/jakarta-var.woff2') format('woff2');
  font-style: normal; font-weight: 200 800; font-display: swap;
}
.console-body {
  --ink: #edf0f2; --panel: #fff; --panel-2: #f5f7f8;
  --text: #20292f; --muted: #606d76; --line: #d6dde1; --line-soft: #e8ecef;
  --accent: #AAE633; --accent-ink: #1b260f; --glass: #365c73;
  --ok: #23704b; --warn: #895416; --alert: #b2362b;
  --radius: 15px; --radius-sm: 8px; --sidebar-width: 246px;
  --font-display: 'Plus Jakarta Sans', Arial, sans-serif;
  --font-body: 'Plus Jakarta Sans', Arial, sans-serif;
  --pad: clamp(16px, 2.4vw, 40px);
  min-width: 320px; background: var(--ink); color: var(--text);
  font-family: var(--font-body); font-size: 14px; line-height: 1.6;
  color-scheme: light;
}
.console-body::before { display: none; }
.console-body [hidden] { display: none !important; }
.console-body :is(h1, h2, h3, button, input, select) { font-family: var(--font-body); font-variation-settings: normal; }
.console-body :is(button, a, input, select):focus-visible { outline: 3px solid #547c16; outline-offset: 3px; }
.console-body :is(.sidebar, .topbar, .gate-brand) :focus-visible { outline-color: var(--accent); }
.console-body :is(p, h1, h2, h3) { overflow-wrap: anywhere; }
.console-body a { color: inherit; }
.console-body button { touch-action: manipulation; }
.console-body button:disabled { cursor: wait; opacity: .55; }
.console-body svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.console-body a[href^="tel:"] { display: inline-flex; align-items: center; min-height: 44px; color: #425c1d; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.console-skip { position: fixed; top: 12px; left: 12px; z-index: 100; transform: translateY(-160%); padding: 12px 18px; background: var(--accent); color: var(--accent-ink); border-radius: 8px; }
.console-skip:focus { transform: none; }
.console-logo { display: block; text-decoration: none; border-radius: 8px; }
.console-logo img { display: block; width: 100%; max-width: 230px; height: auto; object-fit: contain; }
.console-body .btn, .chip, .panel-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 16px; border: 1px solid transparent; border-radius: 8px;
  font: 650 12px/1.4 var(--font-body); letter-spacing: 0; text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.console-body .btn { background: var(--accent); color: var(--accent-ink); }
.console-body .btn:hover { background: #b9ed58; filter: none; }
.chip { background: var(--panel); color: var(--text); border-color: var(--line); white-space: nowrap; }
.chip:hover { background: #eef2f4; border-color: #84939d; }
.panel-link { background: transparent; color: #394b22; padding-inline: 0; text-align: left; }
.panel-link:hover { color: #1e2c11; text-decoration: underline; text-underline-offset: 4px; }
.panel-link--foot { width: 100%; justify-content: space-between; border-top: 1px solid var(--line-soft); border-radius: 0; margin-top: 12px; padding-top: 14px; }
.lbl { display: block; margin: 0 0 7px; color: #52616c; font-size: 11px; line-height: 1.5; font-weight: 650; letter-spacing: 0; text-transform: none; }
.input { display: block; width: 100%; min-width: 0; min-height: 46px; padding: 11px 13px; border: 1px solid #c6d0d7; border-radius: 8px; background: #fff; color: var(--text); font: 400 14px/1.5 var(--font-body); }
.input::placeholder { color: #7b868e; opacity: 1; }
.input:focus { outline: 2px solid #648c2b; outline-offset: 1px; border-color: #648c2b; }
.input[type="search"] { appearance: auto; }
.err, .ok-msg { margin: 14px 0 0; padding: 12px 14px; border: 1px solid #e5b9b4; border-radius: 8px; background: #fff2f0; color: #922a20; font-size: 13px; }
.ok-msg { border-color: #b7d8c6; color: #216745; background: #eef8f2; }
.quiet-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-underline-offset: 4px; }
.quiet-link:hover { color: var(--text); }

/* Desktop navigation and working canvas. */
#app { min-height: 100svh; }
.sidebar, .topbar, .gate-brand {
  --text: #eef2f4; --muted: #abb5bd; --line: #3b454d; --line-soft: #303940;
  color: var(--text); background: #171c20;
}
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: var(--sidebar-width); display: flex; flex-direction: column; padding: 20px 18px; overflow-y: auto; border-right: 1px solid #31393f; }
.sidebar .console-logo { padding-inline: 3px; }
.sidebar-caption { color: #aeb8c0; font-size: 9px; text-align: center; letter-spacing: .02em; margin: -1px 0 28px; }
.nav-label { margin: 0 13px 10px; color: #8f9aa3; font-size: 9px; font-weight: 650; letter-spacing: .16em; text-transform: uppercase; }
.tabs { display: flex; flex-direction: column; gap: 5px; }
.views-hint { display: none; }
.tab { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #bec7ce; text-align: left; font: 550 12px/1.5 var(--font-body); white-space: nowrap; cursor: pointer; }
.tab:hover { background: #242c32; color: #fff; }
.tab.is-on { background: #2b343b; color: #fff; border-color: #3c474f; box-shadow: inset 3px 0 var(--accent); }
.tab.is-on svg { color: var(--accent); }
.tab-n { min-width: 24px; margin-left: auto; padding: 1px 6px; border-radius: 5px; background: #101619; color: #c4cdd4; font-size: 10px; text-align: center; font-variant-numeric: tabular-nums; }
.tab-n:empty { display: none; }
.tab.is-on .tab-n { color: var(--accent); }
.sidebar-foot { display: grid; gap: 4px; margin-top: auto; padding: 30px 13px 0; font-size: 10px; color: #86939d; }
.sidebar-foot a { display: flex; align-items: center; justify-content: space-between; min-height: 44px; color: #c6ced4; text-decoration: none; }
.sidebar-foot a:hover { color: #fff; }
.console-workspace { margin-left: var(--sidebar-width); min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid #374149; }
.topbar-in { max-width: 1480px; min-height: 76px; margin: 0 auto; padding: 12px var(--pad); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.workspace-identity { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; letter-spacing: -.015em; }
.workspace-mark { width: 10px; height: 10px; border: 2px solid var(--accent); border-radius: 2px; transform: rotate(45deg); }
.topbar-right { display: flex; align-items: center; gap: 9px; }
.staff-identity { max-width: 180px; font-size: 11px; overflow-wrap: anywhere; padding-right: 13px; color: #c6d0d7; }
.topbar .chip { background: #2b343a; color: #ecf0f3; border-color: #49545c; }
.topbar .chip:hover { background: #3a454d; border-color: #87949e; }
.topbar .chip--quiet { background: transparent; border-color: transparent; color: #c1ccd3; }
.console-body .wrap { width: 100%; max-width: 1480px; margin: 0 auto; padding: 30px var(--pad) 44px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 28px; }
.workspace-eyebrow { color: #707e88; font-size: 9px; font-weight: 650; text-transform: uppercase; letter-spacing: .15em; margin: 0 0 10px; }
.page-heading h1 { color: #20292f; font-size: clamp(30px, 3.2vw, 42px); font-weight: 650; line-height: 1.12; letter-spacing: -.05em; margin: 0 0 9px; }
.view-description { max-width: 62ch; font-size: 13px; line-height: 1.65; margin: 0; }
.snapshot-status { display: grid; gap: 3px; flex-shrink: 0; text-align: right; padding-bottom: 2px; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.workshop-date { color: #36464f; font-size: 11px; font-weight: 650; }
.snapshot-status :empty { display: none; }
.dashboard-error { margin: 0 0 18px; }
.foot { max-width: 1480px; margin: 0 auto; padding: 20px var(--pad) 26px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: #73808a; font-size: 10px; }

/* Overview, real snapshot counts and route-to-view actions. */
.panel { min-width: 0; padding: 22px; margin: 0 0 20px; border: 1px solid #d8dfe4; border-radius: var(--radius); background: #fff; box-shadow: 0 3px 12px #23303b04; }
.panel-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 18px; margin-bottom: 16px; }
.panel-head h2 { margin: 0; font-size: 16px; line-height: 1.4; font-weight: 650; letter-spacing: -.025em; color: #26333c; }
.panel-note { font-size: 11px; line-height: 1.65; color: var(--muted); }
.section-kicker { display: block; margin-bottom: 6px; color: #73808a; font-size: 9px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; }
.empty { padding: 26px 14px; margin: 12px 0 0; border: 1px dashed #d5dde2; border-radius: 9px; background: #fafbfc; font-size: 13px; text-align: center; color: #697985; }
.split { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.15fr); gap: 20px; align-items: start; }
.overview-stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.split > .panel, .overview-stack > .panel { margin-bottom: 0; }
.panel--schedule { border-top: 3px solid #36444f; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 20px; }
.kpi { position: relative; min-width: 0; padding: 20px; border: 1px solid #d8dfe4; border-radius: 12px; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.kpi.hot { box-shadow: inset 0 3px #AAE633; border-color: #b3c795; }
.kpi-label { color: #626f78; font-size: 10px; font-weight: 650; line-height: 1.5; }
.kpi-value { color: #233039; font-weight: 650; font-size: clamp(25px, 2.5vw, 36px); line-height: 1.15; letter-spacing: -.055em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi-sub { margin-top: auto; color: #79858e; font-size: 10px; line-height: 1.6; }
.quick-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 24px; }
.quick-actions button { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 52px; padding: 11px 14px; border: 1px solid #ccd5dc; border-radius: 8px; background: #e5eaee; color: #34444f; font: 600 11px/1.5 var(--font-body); text-align: left; cursor: pointer; }
.quick-actions button:hover { background: #fff; border-color: #91a179; }
.quick-actions svg { width: 17px; height: 17px; }
.action-arrow { margin-left: auto; font-size: 18px; font-weight: 400; }
.warn-banner { margin: 0 0 18px; padding: 13px 16px; border: 1px solid #e6d5b6; border-left: 3px solid #b47b26; border-radius: 9px; background: #fff9ee; color: #795523; font-size: 12px; line-height: 1.7; }
#attention-panel { border-color: #cbd5ba; }
ul.attn { display: grid; gap: 8px; list-style: none; padding: 0; margin: 0; }
.attn li { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; min-height: 52px; padding: 8px 10px; border: 1px solid var(--line-soft); border-left: 3px solid #b8c3cc; border-radius: 7px; font-size: 11px; }
.attn li.p1 { border-left-color: #AAE633; background: #f8faf5; }
.attn li.p2 { border-left-color: #b7832e; }
.aref { color: #334650; font-weight: 650; }
.awhy { color: var(--muted); }
.aval { margin-left: auto; color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.aphone { color: #425c1d; overflow-wrap: anywhere; }
.pipeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
.stage { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; }
button.stage { width: 100%; min-height: 44px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: inherit; cursor: pointer; }
button.stage:hover .stage-bar { background: #dfe7ed; }
.stage-bar { display: flex; align-items: flex-end; width: 100%; height: 126px; background: #edf1f4; border-radius: 5px; overflow: hidden; }
.stage-fill { width: 100%; background: linear-gradient(#AAE633 0 4px, #36434d 4px 100%); border-radius: 4px 4px 0 0; }
.stage-count { color: #25353f; font-size: 19px; font-weight: 650; font-variant-numeric: tabular-nums; }
.stage-label { color: #5b6a75; font-size: 10px; font-weight: 600; }
.stage-value { color: #7a8690; font-size: 9px; min-height: 1.6em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* Search and populated job cards. */
.filters, .filter-bar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.filter-bar { padding: 16px; margin-bottom: 18px; border: 1px solid #e1e6ea; background: #f6f8f9; border-radius: 9px; }
.filter-field { min-width: 0; }
.filter-field--wide { flex: 1; max-width: 480px; }
.search { width: 280px; max-width: 100%; }
.filter-field--wide .search { width: 100%; }
.select { width: 180px; max-width: 100%; }
.job { padding: 22px 0; border-bottom: 1px solid var(--line-soft); }
.job:first-child { padding-top: 6px; }
.job:last-child { border-bottom: 0; padding-bottom: 4px; }
.job.is-declined { background: #f8f9fa; border-radius: 8px; padding-inline: 12px; }
.job-top { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; }
.job-who { display: grid; gap: 5px; min-width: 0; }
.job-who strong { color: #24343f; font-size: 14px; font-weight: 650; letter-spacing: -.02em; }
.job-meta { color: #6b7983; font-size: 11px; overflow-wrap: anywhere; }
.job-right { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; max-width: 100%; }
.money { font-size: 15px; color: #27363f; font-weight: 700; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px; border: 1px solid #d1d9df; border-radius: 5px; color: #5e6d79; background: #f4f6f8; font-size: 9px; font-weight: 650; line-height: 1.5; white-space: nowrap; }
.tag.call { color: #3e5a18; background: #f0f7e5; border-color: #ccdeb4; }
.tag.attn { color: #83541e; background: #fff6e6; border-color: #ebd2a5; }
.tag.prov { color: #3e637d; background: #edf5fa; border-color: #c6dce9; }
.tag.done { color: #266848; background: #edf6f0; border-color: #bedaca; }
.chip.act { color: #2d4317; background: #eef5e5; border-color: #bace9f; }
.chip.act:hover { background: #AAE633; border-color: #AAE633; color: #1b260f; }
.track { display: flex; gap: 6px; margin: 18px 0 12px; }
.track .seg { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.track .seg i { height: 4px; border-radius: 2px; background: #e2e8ec; }
.track .seg.done i { background: #8e9a83; }
.track .seg.now i { background: #AAE633; }
.track .seg span { color: #7d8991; font-size: 9px; font-weight: 500; line-height: 1.4; }
.track .seg.now span { color: #41582a; font-weight: 700; }
.track .seg.done span { color: #5d6b75; }
.job-sub { color: #6b7983; font-size: 11px; line-height: 1.7; margin: 5px 0 0; overflow-wrap: anywhere; }

/* Fitting schedule and customer records. */
.cal-day { margin: 24px 0 0; }
.cal-day:first-child { margin-top: 0; }
.cal-day-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 14px; padding: 12px 14px; background: #f0f3f5; border-radius: 7px; }
.cal-day-head h3 { margin: 0; color: #31434f; font-size: 13px; line-height: 1.6; font-weight: 650; letter-spacing: -.015em; }
.cal-day-meta { font-size: 10px; color: #6c7c88; font-variant-numeric: tabular-nums; }
.cal-job { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.cal-job:last-child { border-bottom: 0; }
.cal-when { padding: 9px 7px 9px 10px; border-left: 2px solid #b1bfca; background: #f5f7f8; border-radius: 0 5px 5px 0; }
.cal-when strong { color: #314652; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cal-when span { display: block; color: #7c8a94; font-size: 9px; }
.cal-who { min-width: 0; overflow-wrap: anywhere; }
.cal-who strong { color: #30424d; font-size: 12px; font-weight: 650; }
.cal-who span { display: block; margin-top: 4px; color: #6e7e89; font-size: 10px; }
.cal-right { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.panel--schedule .cal-job { grid-template-columns: 90px minmax(0, 1fr) auto; gap: 8px 12px; padding-block: 12px; }
.panel--schedule .cal-right { grid-column: auto; justify-content: flex-end; gap: 6px; }
.panel--schedule .cal-right .chip { padding-inline: 10px; font-size: 11px; }
.client { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 21px 0; border-bottom: 1px solid var(--line-soft); }
.client:last-child { border-bottom: 0; }
.client-name { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: #30434f; font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.client-meta { margin-top: 6px; color: #6a7c89; font-size: 11px; overflow-wrap: anywhere; }
.client-right { text-align: right; }
.client-right .money { display: block; }
.client-right span { font-size: 10px; color: #6a7c89; }

/* Financial values are rendered by the existing console, not sample charts. */
.months { display: flex; align-items: flex-end; gap: 15px; margin-top: 22px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: thin; }
.month { flex: 1 0 64px; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 64px; }
.month-bar { display: flex; align-items: flex-end; width: 100%; height: 150px; background: #edf1f4; border-radius: 5px; overflow: hidden; }
.month-fill { width: 100%; background: linear-gradient(#AAE633 0 4px, #36434d 4px 100%); border-radius: 4px 4px 0 0; }
.month-label { color: #687985; font-size: 10px; font-weight: 600; }
.month-value { color: #354b59; font-size: 11px; font-variant-numeric: tabular-nums; }
.table-wrap, .table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.table-wrap:focus-visible, .table-scroll:focus-visible { outline: 2px solid #547c16; outline-offset: 3px; }
.table { width: 100%; min-width: 420px; margin: 8px 0 0; border-collapse: collapse; font-size: 12px; }
.table th { padding: 12px 14px; background: #f1f4f6; color: #647581; text-align: left; font-size: 10px; font-weight: 650; border-bottom: 1px solid var(--line); }
.table td { padding: 15px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table td:last-child, .table th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.table tr:last-child td { border-bottom: 0; }

/* Existing retention controls retain their deliberate confirmation steps. */
.hk-line { margin: 12px 0 18px; font-size: 13px; }
.hk-line strong { font-weight: 650; font-variant-numeric: tabular-nums; }
.hk-line span { color: var(--muted); }
.hk-run .table { min-width: 520px; }
.hk-run .warn-banner { margin-top: 12px; }
.hk-run .job-sub { margin-top: 12px; }
.hk-act { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 14px; margin-top: 22px; padding: 20px 0 3px; border-top: 1px solid var(--line); }
.hk-field { display: flex; flex-direction: column; flex: 1 1 180px; min-width: 0; max-width: 300px; }
.hk-field .input { width: 100%; font-size: 14px; }
.hk-field-go { flex: 0 1 auto; margin-left: auto; max-width: none; }
.console-body .hk-go { margin: 0; min-height: 46px; }
.console-body .hk-go.hk-final { background: #b2362b; color: #fff; }
.console-body .hk-go.hk-final:hover { background: #922a22; }
.console-body .ui-modal__btn--danger { background: #b2362b; color: #fff; }
.console-body .ui-modal__btn { min-height: 46px; font-size: 13px; letter-spacing: 0; }
.console-body .ui-toast__close { min-width: 44px; min-height: 44px; margin: -8px -7px -8px 0; }
.console-body .ui-toast { font-size: 13px; }

/* Staff sign-in and the existing owner-account setup. */
.gate { position: relative; min-height: 100svh; display: grid; place-items: center; padding: clamp(18px, 4vw, 60px); background: linear-gradient(120deg, #e9eef1, #f5f6f6 60%, #d9e1e6); }
.gate-shell { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); width: 100%; max-width: 980px; border: 1px solid #c9d2d9; border-radius: 22px; overflow: hidden; background: #fff; box-shadow: 0 25px 90px #1a2b3b1c; }
.gate-brand { display: flex; flex-direction: column; padding: clamp(28px, 4vw, 56px); background: linear-gradient(145deg, #171d22, #29333c); }
.gate-brand .console-logo { width: 235px; max-width: 100%; margin: -15px 0 25px -8px; }
.gate-kicker { color: #abb8c2; font-size: 9px; font-weight: 650; letter-spacing: .16em; text-transform: uppercase; }
.gate-brand h2 { color: #f1f4f5; font-size: clamp(29px, 3.3vw, 42px); line-height: 1.14; font-weight: 550; letter-spacing: -.05em; margin-bottom: 20px; }
.gate-brand p:not(.gate-kicker) { color: #adbcc7; font-size: 12px; line-height: 1.9; }
.gate-back { display: inline-flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: auto; padding-top: 24px; min-height: 44px; color: #dce4e9; text-decoration: none; font-size: 11px; }
.gate-back:hover { color: #AAE633; }
.gate-inner { align-self: center; width: 100%; padding: clamp(28px, 4vw, 56px); }
.gate .topline { display: block; color: #667985; font-size: 9px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; }
.gate h1 { margin: 0 0 16px; font-size: clamp(28px, 3vw, 36px); font-weight: 650; line-height: 1.13; letter-spacing: -.045em; }
.gate .muted { margin: 0 0 28px; font-size: 13px; line-height: 1.8; }
.gate form .lbl:not(:first-child) { margin-top: 18px; }
.gate .input { min-height: 48px; }
.gate .btn { width: 100%; min-height: 48px; margin-top: 22px; font-size: 13px; }
.gate-switch { margin: 22px 0 0; padding-top: 15px; border-top: 1px solid #e5eaed; font-size: 11px; }
#gate-form { margin-top: 15px; }
#go-login { margin-top: 0; }

/* Compact navigation replaces the sidebar when the canvas needs the width. */
@media (max-width: 1240px) {
  .console-body { --sidebar-width: 222px; --pad: 24px; }
  .sidebar { padding-inline: 14px; }
  .staff-identity { max-width: 125px; padding-right: 0; }
  .kpi { padding: 17px; }
  .pipeline { max-width: 680px; margin-inline: auto; }
}
@media (max-width: 1080px) {
  .console-workspace { margin-left: 0; }
  .sidebar { position: sticky; inset: auto; top: 0; width: 100%; padding: 8px var(--pad) 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; overflow: visible; border-right: 0; border-bottom: 1px solid #414c55; }
  .sidebar .console-logo { width: 136px; padding: 0; }
  .sidebar-caption { display: block; margin: 0; padding-left: 20px; text-align: right; font-size: 10px; }
  .nav-label, .sidebar-foot { display: none; }
  .tabs { grid-column: 1 / -1; flex-direction: row; gap: 4px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #697782 #171c20; padding: 0 0 7px; margin-top: 5px; }
  .views-hint { display: block; grid-column: 1 / -1; margin: 0; padding: 0 2px 8px; color: #aebcc7; font-size: 9px; text-align: right; }
  .views-hint span { color: #AAE633; padding-left: 6px; }
  .tab { flex: 0 0 auto; width: auto; min-height: 46px; padding: 10px 13px; gap: 8px; }
  .tab svg { width: 16px; height: 16px; }
  .tab.is-on { box-shadow: inset 0 -2px var(--accent); }
  .tab-n { margin-left: 2px; min-width: 20px; }
  .topbar { position: static; }
  .topbar-in { min-height: 64px; }
  .sidebar-caption { max-width: 250px; justify-self: end; }
  .console-body :is(.view, #workspace, #page-title) { scroll-margin-top: 200px; }
  .split { gap: 18px; }
}
@media (max-width: 760px) {
  .console-body { --pad: 18px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 22px; }
  .snapshot-status { display: flex; flex-wrap: wrap; gap: 4px 14px; text-align: left; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { gap: 8px; min-height: 134px; }
  .kpi-value { font-size: 30px; }
  .split { grid-template-columns: 1fr; gap: 18px; }
  .overview-stack #attention-panel { order: -1; }
  .filters { width: 100%; }
  .filters .filter-field { flex: 1 1 180px; }
  .filters :is(.search, .select) { width: 100%; }
  .panel { padding: 20px; }
  .cal-job, .panel--schedule .cal-job { grid-template-columns: 90px minmax(0, 1fr); gap: 6px 12px; }
  .cal-right { grid-column: 2; }
  .panel--schedule .cal-right { grid-column: 2; justify-content: flex-start; }
  .hk-field { max-width: none; }
  .hk-field-go { margin-left: 0; }
  .gate { padding: 20px; }
  .gate-shell { max-width: 500px; grid-template-columns: 1fr; border-radius: 17px; }
  .gate-brand { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 12px 25px; gap: 0 18px; }
  .gate-brand .console-logo { width: 160px; margin: 0; }
  .gate-brand h2, .gate-brand > p { display: none; }
  .gate-back { margin: 0; padding: 0; font-size: 10px; }
  .gate-back span { display: none; }
  .gate-inner { padding: 30px; }
}
@media (max-width: 480px) {
  .console-body { --pad: 14px; }
  .sidebar { padding-top: 4px; }
  .sidebar .console-logo { width: 115px; }
  .sidebar-caption { max-width: 155px; font-size: 9px; padding-left: 12px; }
  .tab { min-height: 44px; padding: 9px 11px; font-size: 11px; }
  .tab svg { display: none; }
  .topbar-in { padding-block: 8px; min-height: 60px; }
  .workspace-identity { display: none; }
  .topbar-right { width: 100%; gap: 6px; }
  .staff-identity { flex: 1; max-width: none; font-size: 10px; }
  .topbar .chip { padding-inline: 10px; font-size: 11px; }
  .topbar .chip svg { display: none; }
  .console-body .wrap { padding-top: 24px; padding-bottom: 24px; }
  .page-heading h1 { font-size: 32px; }
  .view-description { font-size: 12px; }
  .kpis { gap: 10px; margin-bottom: 16px; }
  .kpi { padding: 15px 13px; min-height: 125px; }
  .kpi-value { font-size: clamp(22px, 6vw, 28px); }
  .kpi-label { font-size: 10px; }
  .kpi-sub { font-size: 9px; }
  .quick-actions { gap: 8px; margin-bottom: 18px; }
  .quick-actions button { padding: 10px; gap: 7px; font-size: 10px; }
  .quick-actions svg { width: 15px; height: 15px; }
  .quick-actions .action-arrow { display: none; }
  .panel { padding: 17px 14px; border-radius: 12px; margin-bottom: 16px; }
  .panel-head { margin-bottom: 14px; gap: 6px; }
  .panel-head h2 { font-size: 15px; }
  .panel-note { font-size: 10px; }
  .panel-head .panel-link { min-height: 44px; font-size: 11px; }
  .pipeline { gap: 7px; }
  .stage-bar { height: 90px; }
  .stage-label { font-size: 9px; }
  .stage-value { font-size: 8px; }
  .stage-count { font-size: 17px; }
  .attn li { padding: 10px; font-size: 11px; }
  .aval { margin-left: 0; }
  .filter-bar { padding: 12px; }
  .filter-bar .filter-field { flex: 1 1 100%; }
  .filter-bar .chip { width: 100%; }
  .job-right { gap: 8px; }
  .job-meta { font-size: 10px; }
  .track { gap: 4px; }
  .track .seg span { font-size: 8px; }
  .cal-who strong { font-size: 11px; }
  .cal-who span { font-size: 10px; }
  .client { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .client-right { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 10px; text-align: left; }
  .hk-act { gap: 12px; }
  .hk-field { flex-basis: 100%; width: 100%; }
  .hk-go { width: 100%; }
  .gate { padding: 12px; }
  .gate-brand { padding: 8px 18px; }
  .gate-brand .console-logo { width: 135px; }
  .gate-back { max-width: 82px; line-height: 1.6; }
  .gate-inner { padding: 26px 22px; }
  .gate .input { font-size: 16px; }
  .gate h1 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .console-body *, .console-body *::before, .console-body *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .console-logo { forced-color-adjust: none; background: #171c20; }
  .tab.is-on { border: 2px solid Highlight; }
  .stage-fill, .month-fill, .track .seg.now i, .track .seg.done i { background: Highlight; }
}
