/* MOHHS Bid Tracking — styles (v2) */
:root {
  --navy: #0b2447;
  --ink: #1b2b3f;
  --ink-2: #3b4d63;
  --muted: #66768a;
  --blue: #1f5aa6;
  --blue-dark: #174a8a;
  --blue-soft: #e9f1fb;
  --gold: #e0a526;
  --gold-soft: #fdf3dc;
  --paper: #f4f6f9;
  --surface: #ffffff;
  --line: #e2e7ee;
  --line-2: #cfd7e2;
  --late: #c0362c; --late-bg: #fdecea;
  --due: #96620a;  --due-bg: #fdf3dc;
  --ok: #1e7a4c;   --ok-bg: #e5f4ec;
  --r-lg: 14px; --r: 10px; --r-sm: 8px;
  --header-h: 68px;
  --gutter: clamp(1rem, 2.6vw, 2.5rem);
  --font: "Public Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font: 15px/1.55 var(--font); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; transition: color .15s; }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; color: var(--navy); }
h1 { font-size: clamp(1.45rem, 1.1rem + 1vw, 1.9rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 1.08rem; font-weight: 700; letter-spacing: -.005em; }
h3 { font-size: .92rem; font-weight: 700; margin-top: 1.2rem; color: var(--ink-2); }
p { margin: 0 0 .75rem; }
code { background: var(--blue-soft); padding: .05em .35em; border-radius: 4px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.prose { max-width: 75ch; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Header (fixed while the page scrolls) ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
.topbar-inner { min-height: var(--header-h); padding: 0 var(--gutter); display: flex; align-items: center; gap: 2rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; flex-shrink: 0; }
.brand img { width: 44px; height: 44px; display: block; }
.brand-text strong { display: block; color: var(--navy); font-size: 1.08rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.brand-text small { display: block; color: var(--muted); font-size: .76rem; line-height: 1.2; }
.mainnav { display: flex; gap: .2rem; align-self: stretch; }
.mainnav a { display: flex; align-items: center; gap: .45rem; padding: 0 .85rem; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .92rem;
  border-bottom: 3px solid transparent; border-top: 3px solid transparent; transition: color .15s, border-color .15s; white-space: nowrap; }
.mainnav a:hover { color: var(--navy); }
.mainnav a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--blue); }
.mainnav .ico { opacity: .85; }
.userbox { margin-left: auto; display: flex; align-items: center; gap: .4rem; }
.userchip { display: flex; align-items: center; gap: .6rem; padding: .3rem .7rem .3rem .3rem; border-radius: 999px; text-decoration: none; color: var(--ink); transition: background .15s; }
.userchip:hover { background: var(--paper); color: var(--ink); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 700; font-size: .8rem; letter-spacing: .02em; }
.userchip-text strong { display: block; font-size: .88rem; line-height: 1.2; }
.userchip-text small { display: block; font-size: .74rem; color: var(--muted); line-height: 1.2; }
.signout { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--muted); }
.signout:hover { background: var(--late-bg); color: var(--late); }

/* ---------- Page and footer ---------- */
.page { flex: 1; width: 100%; padding: 1.75rem var(--gutter) 3rem; }
.foot { display: flex; justify-content: space-between; gap: .5rem 2rem; flex-wrap: wrap; padding: 1.1rem var(--gutter);
  background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.narrow { max-width: 480px; margin: 2rem auto; background: var(--surface); padding: 2rem; border: 1px solid var(--line); border-radius: var(--r-lg); }

.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.pagehead p { margin: .2rem 0 0; }
.pagehead-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.crumbs { margin: 0 0 .35rem !important; font-size: .85rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--blue); }
.crumbs a::before { content: "‹ "; }
.ref { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--blue); white-space: nowrap; text-decoration: none; }
h1 .ref { color: var(--muted); font-weight: 600; margin-right: .4rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font: inherit; font-weight: 650; font-size: .9rem; line-height: 1.2;
  padding: .62rem 1.05rem; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { border-color: var(--ink-2); color: var(--navy); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn-warn { color: var(--late); border-color: #efc0bb; }
.btn-warn:hover { background: var(--late-bg); color: var(--late); border-color: var(--late); }
.btn-quiet { border-style: dashed; color: var(--muted); font-weight: 500; }
.btn-block { width: 100%; padding: .8rem; font-size: .98rem; }
.link-btn { background: none; border: 0; padding: 0; color: var(--late); font: inherit; font-size: .84rem; cursor: pointer; }

/* ---------- Messages ---------- */
.flash { padding: .8rem 1rem; border-radius: var(--r); margin-bottom: 1.1rem; border: 1px solid; }
.flash ul { margin: .35rem 0 0 1.1rem; padding: 0; }
.flash-ok { background: var(--ok-bg); border-color: #b7dfc8; color: #165c39; }
.flash-err { background: var(--late-bg); border-color: #f2c4bf; color: #8e231b; }
.notice { padding: .75rem 1rem; border-left: 4px solid; margin: 0 0 .8rem; font-size: .92rem; border-radius: 0 var(--r) var(--r) 0; }
.notice-late { border-color: var(--late); background: var(--late-bg); }
.notice-due { border-color: var(--gold); background: var(--gold-soft); }
.notice-info { border-color: var(--blue); background: var(--blue-soft); }

.tag { display: inline-block; font-size: .78rem; font-weight: 650; padding: .16rem .55rem; border-radius: 999px; background: #edf1f6; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tag-ok { background: var(--ok-bg); color: var(--ok); }
.tag-due { background: var(--due-bg); color: var(--due); }
.tag-late { background: var(--late-bg); color: var(--late); }

/* ---------- Layout ---------- */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 1.4rem; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.3rem 1.4rem; margin-bottom: 1.4rem; }
.card > h2:first-child { margin-bottom: .85rem; }
.card-action { border: 1.5px solid var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.empty { color: var(--muted); margin: .25rem 0; padding: 1rem; background: var(--paper); border-radius: var(--r); text-align: center; }
@media (max-width: 1000px) { .cols { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Request status hero (status + stage rail) ---------- */
.status-band { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 2rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 1.4rem 1.5rem 0; margin-bottom: 1.2rem; position: relative; overflow: hidden; }
.status-band::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--blue); }
.status-band.tl-due::before { background: var(--gold); }
.status-band.tl-late::before { background: var(--late); }
.status-band.status-completed::before { background: var(--ok); }
.status-band.status-cancelled::before { background: var(--muted); }
.status-label { margin: 0; font-size: .85rem; font-weight: 600; color: var(--muted); }
.status-stage { margin: .1rem 0 0; font-size: clamp(1.3rem, 1rem + 1vw, 1.75rem); font-weight: 800; letter-spacing: -.02em; color: var(--navy); line-height: 1.15; }
.status-who { margin: .35rem 0 0; color: var(--ink-2); }
.tl-late .status-who { color: var(--late); font-weight: 650; }
.status-figures { display: flex; gap: 2.4rem; margin: 0; align-self: start; }
.status-figures div { text-align: right; }
.status-figures dt { font-size: .8rem; color: var(--muted); }
.status-figures dd { margin: 0; font-size: 1.4rem; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--navy); }
.status-rail { grid-column: 1 / -1; margin: .4rem -1.5rem 0; border-top: 1px solid var(--line); background: linear-gradient(var(--paper), var(--surface) 70%); }

/* ---------- The stage rail ---------- */
.rail { list-style: none; margin: 0; padding: 1.1rem .75rem .9rem; display: flex; overflow-x: auto; scrollbar-width: thin; }
.rail li { position: relative; flex: 1 0 76px; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 .2rem; }
.rail li::before { content: ""; position: absolute; top: 10px; left: -50%; width: 100%; height: 3px; background: var(--line-2); z-index: 0; }
.rail li:first-child::before { display: none; }
.rail-dot { position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line-2); display: grid; place-items: center; }
.rail-name { margin-top: .5rem; font-size: .8rem; font-weight: 650; line-height: 1.2; color: var(--ink-2); }
.rail-meta { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1.25; margin-top: .15rem; }
.rail .st-done::before, .rail .st-current::before, .rail .st-skipped::before { background: var(--blue); }
.rail .st-done .rail-dot { background: var(--blue); border-color: var(--blue); }
.rail .st-done .rail-dot::after { content: ""; width: 6px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.rail .st-done.tl-late .rail-dot { background: var(--late); border-color: var(--late); }
.rail .st-done.tl-late .rail-meta { color: var(--late); }
.rail .st-skipped .rail-dot { border-style: dashed; border-color: var(--blue); }
.rail .st-skipped .rail-name { color: var(--muted); text-decoration: line-through; }
.rail .st-current .rail-dot { width: 28px; height: 28px; margin-top: -3px; border: 4px solid var(--gold); background: var(--navy); box-shadow: 0 0 0 5px var(--gold-soft); }
.rail .st-current .rail-name { color: var(--navy); font-weight: 800; }
.rail .st-current .rail-meta { color: var(--due); font-weight: 650; }
.rail .st-current.tl-ok .rail-meta { color: var(--blue-dark); }
.rail .st-current.tl-late .rail-dot { border-color: var(--late); box-shadow: 0 0 0 5px var(--late-bg); }
.rail .st-current.tl-late .rail-meta { color: var(--late); }
.rail .st-pending .rail-name { color: var(--muted); font-weight: 500; }

.rail-compact { padding: 0; margin: .4rem 0 0; gap: 3px; overflow: visible; }
.rail-compact li { flex: 0 0 auto; width: 13px; height: 6px; border-radius: 3px; background: var(--line-2); padding: 0; }
.rail-compact li::before { display: none; }
.rail-compact .st-done, .rail-compact .st-skipped { background: var(--blue); }
.rail-compact .st-skipped { opacity: .4; }
.rail-compact .st-current { background: var(--gold); width: 24px; }
.rail-compact .st-current.tl-late { background: var(--late); }

/* ---------- Dashboard ---------- */
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.summary-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1rem 1.2rem; text-decoration: none; color: var(--ink); }
a.summary-item:hover { border-color: var(--blue); color: var(--ink); }
.summary-item dt { font-size: .84rem; color: var(--muted); font-weight: 600; }
.summary-item dd { margin: .15rem 0 0; font-size: 1.9rem; font-weight: 800; color: var(--navy); letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.summary-item.is-late dd { color: var(--late); }
.pipeline-wrap { margin-bottom: 1.4rem; }
.pipeline-wrap h2 { margin-bottom: .7rem; }
.pipeline { display: flex; gap: 0; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); scrollbar-width: thin; }
.pipe { flex: 1 0 72px; display: flex; flex-direction: column; padding: .9rem .8rem; text-decoration: none; color: var(--muted); border-right: 1px solid var(--line); position: relative; transition: background .15s; }
.pipe:last-child { border-right: 0; }
.pipe:hover { background: var(--blue-soft); color: var(--ink); }
.pipe-n { font-size: 1.65rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; color: #c3ccd8; }
.pipe.has .pipe-n { color: var(--navy); }
.pipe.has::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--blue); }
.pipe.has-late::after { background: var(--late); }
.pipe-name { font-size: .78rem; font-weight: 650; line-height: 1.2; margin-top: .2rem; }
.pipe-late { font-size: .74rem; color: var(--late); font-weight: 700; margin-top: auto; padding-top: .3rem; min-height: 1.3em; }

/* ---------- Tables ---------- */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th { text-align: left; font-size: .78rem; font-weight: 650; color: var(--muted); padding: .55rem .7rem; border-bottom: 1px solid var(--line-2); white-space: nowrap; background: var(--paper); }
.tbl th:first-child { border-top-left-radius: var(--r-sm); } .tbl th:last-child { border-top-right-radius: var(--r-sm); }
.tbl td { padding: .75rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover td { background: #f8fafc; }
.tbl-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.tbl-list th { padding: .7rem .9rem; } .tbl-list td { padding: .85rem .9rem; }
.tbl td a:not(.ref):not(.link-btn) { color: var(--navy); font-weight: 600; text-decoration: none; }
.tbl td a:not(.ref):hover { color: var(--blue); }
.row-suggested td { background: var(--ok-bg) !important; }
.row-off td { color: var(--muted); }
.tbl input, .tbl textarea { width: 100%; font: inherit; font-size: .88rem; padding: .4rem .5rem; border: 1px solid var(--line-2); border-radius: 6px; margin-bottom: .3rem; }
.tbl .num-in { width: 5.5em; text-align: right; }

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .9rem 1.4rem; margin: 0 0 .5rem; }
.facts dt { font-size: .78rem; color: var(--muted); font-weight: 600; }
.facts dd { margin: .1rem 0 0; font-weight: 600; color: var(--navy); }

/* ---------- Forms ---------- */
.form label { display: flex; flex-direction: column; gap: .35rem; font-size: .87rem; font-weight: 650; color: var(--ink-2); margin-bottom: .95rem; }
.form input:not([type=checkbox]):not([type=radio]), .form select, .form textarea, .filters input, .filters select {
  font: inherit; font-weight: 400; font-size: .95rem; color: var(--ink); padding: .62rem .75rem; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: #fff; width: 100%; transition: border-color .15s, box-shadow .15s; }
.form textarea { resize: vertical; line-height: 1.5; }
.form input[type=file] { padding: .5rem; background: var(--paper); border-style: dashed !important; cursor: pointer; }
.form input:hover, .form select:hover, .form textarea:hover { border-color: #a9b6c6; }
.form input:focus, .form select:focus, .form textarea:focus, .filters input:focus, .filters select:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 4px var(--blue-soft); }
.form .hint { font-weight: 400; color: var(--muted); font-size: .8rem; }
.form-wide { max-width: 1080px; }
.form fieldset { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-lg); padding: 1.3rem 1.4rem .4rem; margin: 0 0 1.2rem; }
.form-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: .3rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.1rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1.1rem; }
@media (max-width: 720px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.choice-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: 1.1rem; }

.form .choice:hover { border-color: #a9b6c6; }
.form .choice:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); color: var(--navy); }

@media (max-width: 720px) { .choice-row { grid-template-columns: 1fr; } }
.form .check, .filters .check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; }
.check input, .checks input { accent-color: var(--blue); width: 16px; height: 16px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .3rem 1.2rem; margin-bottom: .9rem; }
.checks label { flex-direction: row; align-items: center; gap: .5rem; font-weight: 400; margin: 0; }
.inline-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .7rem; align-items: end; margin-top: .9rem; }
.inline-form label { margin: 0; }
.bid-form { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line-2); }
.compact { display: flex; flex-direction: column; gap: .55rem; margin-bottom: 1rem; }
.compact .btn { align-self: flex-start; }
.return-group { display: inline-flex; gap: .35rem; align-items: center; margin-left: auto; }
.return-group select { width: auto !important; max-width: 240px; }
form.inline { display: inline; }

.filters { display: flex; flex-wrap: wrap; gap: .7rem 1rem; align-items: flex-end; margin-bottom: 1.2rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.filters label { display: flex; flex-direction: column; gap: .3rem; font-size: .78rem; font-weight: 650; color: var(--muted); }
.filters input[name=q] { min-width: 260px; }
.filters select { min-width: 160px; }

/* ---------- Lists and history ---------- */
.doclist, .plainlist { list-style: none; margin: 0 0 .9rem; padding: 0; }
.doclist li, .plainlist li { padding: .65rem .2rem; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: .1rem; }
.doclist li:last-child, .plainlist li:last-child { border-bottom: 0; }
.doclist a { font-weight: 600; word-break: break-word; text-decoration: none; }
.doclist a::before { content: ""; display: inline-block; width: 12px; height: 15px; margin-right: .45rem; vertical-align: -2px; border: 2px solid currentColor; border-radius: 2px; opacity: .6; }
.doclist a:hover { color: var(--blue-dark); }
.doclist form { align-self: flex-start; }
.plainlist a { font-weight: 600; text-decoration: none; color: var(--navy); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1rem .6rem; }
.timeline li::before { content: ""; position: absolute; left: calc(-1.1rem - 6px); top: .4rem; width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); box-shadow: 0 0 0 3px var(--surface); }
.timeline .act-advanced::before, .timeline .act-submitted::before, .timeline .act-resubmitted::before { background: var(--blue); }
.timeline .act-returned::before, .timeline .act-cancelled::before { background: var(--late); }
.timeline .act-completed::before { background: var(--ok); }
.timeline .act-comment::before { background: var(--gold); }
.timeline p { margin: 0; font-size: .9rem; }
.timeline .note { margin-top: .3rem; padding: .45rem .7rem; background: var(--paper); border-radius: var(--r-sm); color: var(--ink-2); }
.timeline .act-returned .note { background: var(--late-bg); }
.timeline .act-comment .note { background: var(--gold-soft); }
.timeline time { font-size: .74rem; color: var(--muted); }
.danger-zone summary { cursor: pointer; color: var(--late); font-weight: 650; }
.danger-zone[open] summary { margin-bottom: .8rem; }

/* ---------- Sign-in page ---------- */
.is-login .page { display: grid; place-items: center; padding-top: 2.5rem; }
.login-split { width: min(980px, 100%); display: grid; grid-template-columns: 1.1fr 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.login-brand { background: var(--navy); color: #d7e1ee; padding: 3rem 2.6rem; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.login-brand::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 320px; height: 320px; border-radius: 50%; border: 48px solid rgba(255,255,255,.04); }
.login-brand img { width: 120px; height: 120px; background: #fff; border-radius: 50%; padding: 4px; margin-bottom: 1.6rem; }
.login-brand h1 { color: #fff; font-size: 2.1rem; margin-bottom: .6rem; }
.login-brand p { font-size: 1.02rem; line-height: 1.6; max-width: 36ch; }
.login-steps { list-style: none; padding: 0; margin: auto 0 0; display: flex; flex-wrap: wrap; gap: .35rem; padding-top: 2rem; counter-reset: s; }
.login-steps li { counter-increment: s; font-size: .8rem; font-weight: 600; color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); padding: .3rem .65rem .3rem .35rem; border-radius: 999px; display: flex; align-items: center; gap: .4rem; }
.login-steps li::before { content: counter(s); width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: var(--navy); font-size: .72rem; font-weight: 800; }
.login-form { padding: 3rem 2.6rem; display: flex; flex-direction: column; justify-content: center; }
.login-form h2 { font-size: 1.5rem; font-weight: 800; }
@media (max-width: 820px) { .login-split { grid-template-columns: 1fr; } .login-brand { padding: 2rem; } .login-steps { display: none; } .login-form { padding: 2rem; } }

/* ---------- Small screens ---------- */
@media (max-width: 1100px) {
  .userchip-text { display: none; }
  .topbar-inner { gap: 1rem; }
}
@media (max-width: 860px) {
  .topbar-inner { flex-wrap: wrap; padding-top: .5rem; gap: .3rem 1rem; }
  .mainnav { order: 3; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); overflow-x: auto; border-top: 1px solid var(--line); min-height: 46px; scrollbar-width: none; }
  .brand-text small { display: none; }
  html { scroll-padding-top: 130px; }
  .status-band { grid-template-columns: minmax(0, 1fr); }
  .status-figures { flex-wrap: wrap; }
  .status-figures { gap: 1.4rem; }
  .status-figures div { text-align: left; }
  .return-group { margin-left: 0; }
}
@media print {
  .topbar, .foot, .pagehead-actions, .card-action, form, .danger-zone { display: none !important; }
  body { background: #fff; }
}
.login-form .form + p { margin-top: 1rem; }

/* ===================== v3: icons, form layout, modal ===================== */
.ico { flex-shrink: 0; }
.ico.flip { transform: rotate(180deg); }
.card h2, .aside-card h2 { display: flex; align-items: center; gap: .5rem; }
.card h2 .ico, .aside-card h2 .ico { color: var(--blue); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Extra button styles */
.btn-sm { padding: .42rem .75rem; font-size: .83rem; }
.btn-primary-soft { background: var(--blue-soft); border-color: transparent; color: var(--blue-dark); }
.btn-primary-soft:hover { background: #d8e6f7; border-color: transparent; color: var(--navy); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--paper); border-color: transparent; color: var(--ink); }
.btn-danger { background: var(--late); border-color: var(--late); color: #fff; }
.btn-danger:hover { background: #a02b22; border-color: #a02b22; color: #fff; }
.btn-primary:active, .btn-danger:active { transform: translateY(1px); }
.btn.is-busy { opacity: .7; pointer-events: none; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-sm); border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--late-bg); color: var(--late); }
.link-btn { display: inline-flex; align-items: center; gap: .25rem; text-decoration: none; font-weight: 600; }
.link-btn:hover { opacity: .8; }
.danger-zone summary { display: flex; align-items: center; gap: .45rem; list-style: none; }
.danger-zone summary::-webkit-details-marker { display: none; }

/* Inputs with leading icons */
.field { position: relative; display: block; }
.field-ico { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: #8a98aa; pointer-events: none; transition: color .15s; }
.field-top .field-ico { top: .78rem; transform: none; }
.form .field input, .form .field select, .form .field textarea, .filters .field input { padding-left: 2.55rem !important; }
.field:focus-within .field-ico { color: var(--blue); }
.form .field select { appearance: none; -webkit-appearance: none; padding-right: 2.2rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2366768a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .75rem center; }
.form input:not([type=checkbox]):not([type=radio]):not([type=file]), .form select { min-height: 44px; }

/* Section headings in forms */
.form legend { display: flex; align-items: center; gap: .8rem; width: 100%; padding: 0; margin-bottom: 1.15rem; float: left; }
.form legend + * { clear: both; }
.form legend > span:last-child { display: flex; flex-direction: column; font-weight: 800; font-size: 1.04rem; color: var(--navy); line-height: 1.25; }
.form legend small { font-weight: 500; font-size: .82rem; color: var(--muted); }
.legend-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); flex-shrink: 0; }
.legend-ico > span { display: grid; }

/* Type cards */
.form .choice { position: relative; display: flex; flex-direction: row; align-items: center; gap: .8rem; padding: 1rem 2.4rem 1rem 1rem; border: 1.5px solid var(--line); border-radius: var(--r);
  cursor: pointer; margin: 0; font-weight: 600; background: #fff; transition: border-color .15s, background .15s, box-shadow .15s; }
.form .choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--paper); color: var(--ink-2); flex-shrink: 0; transition: background .15s, color .15s; }
.choice-text { display: flex; flex-direction: column; line-height: 1.3; }
.choice-text strong { color: var(--navy); font-size: .93rem; }
.choice-text small { font-weight: 400; color: var(--muted); font-size: .8rem; }
.form .choice:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 3px rgba(31,90,166,.12); }
.form .choice:has(input:checked) .choice-ico { background: var(--blue); color: #fff; }
.form .choice:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.form .choice::after { content: ""; position: absolute; top: .7rem; right: .7rem; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); background: #fff; }
.form .choice:has(input:checked)::after { border-color: var(--blue); background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center; }

/* File drop zones */
.form .drop { position: relative; flex-direction: row; align-items: center; gap: .9rem; padding: 1rem 1.1rem; border: 1.5px dashed var(--line-2); border-radius: var(--r);
  background: var(--paper); cursor: pointer; transition: border-color .15s, background .15s; }
.form .drop:hover, .form .drop:focus-within { border-color: var(--blue); background: var(--blue-soft); }
.form .drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--blue); border: 1px solid var(--line); flex-shrink: 0; }
.drop-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.drop-text strong { color: var(--navy); font-size: .92rem; }
.drop-text small { font-weight: 400; color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form .drop.has-file { border-style: solid; border-color: var(--ok); background: var(--ok-bg); }
.form .drop.has-file .drop-ico { color: var(--ok); }
.form .drop.has-file small { color: var(--ok); font-weight: 600; }

/* Full-width form with a summary panel */
.form-split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.4rem; align-items: start; }
.form-split fieldset { margin-bottom: 1.4rem; }
.form-aside { position: sticky; top: calc(var(--header-h) + 1rem); }
.aside-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.3rem; }
.aside-card h2 { font-size: 1rem; margin-bottom: 1rem; }
.sum { display: grid; gap: .7rem; margin: 0 0 1.1rem; }
.sum div { display: grid; grid-template-columns: 92px 1fr; gap: .5rem; font-size: .88rem; }
.sum dt { color: var(--muted); }
.sum dd { margin: 0; font-weight: 650; color: var(--navy); word-break: break-word; }
.sum dd.is-empty { color: #b3bfcc; font-weight: 400; }
.sum .sum-amount:not(.is-empty) { font-size: 1.15rem; font-weight: 800; }
.sum-route { border-top: 1px solid var(--line); padding-top: .9rem; margin-bottom: .9rem; }
.sum-route-label { font-size: .78rem; font-weight: 650; color: var(--muted); margin-bottom: .5rem !important; }
.sum-route ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem; counter-reset: rt; }
.sum-route li { counter-increment: rt; font-size: .75rem; font-weight: 600; color: var(--ink-2); background: var(--paper); border-radius: 999px; padding: .2rem .55rem .2rem .25rem; display: flex; align-items: center; gap: .3rem; }
.sum-route li::before { content: counter(rt); width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: .66rem; }
.checklist { list-style: none; margin: 0 0 1.1rem; padding: .9rem 0 0; border-top: 1px solid var(--line); display: grid; gap: .45rem; }
.checklist li { display: flex; align-items: center; gap: .55rem; font-size: .86rem; color: var(--muted); }
.checklist .ck { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); flex-shrink: 0; transition: background .15s, border-color .15s; }
.checklist .is-done { color: var(--ink); }
.checklist .is-done .ck { border-color: var(--ok); background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center; }
.aside-actions { display: grid; gap: .45rem; }
@media (max-width: 1100px) { .form-split { grid-template-columns: minmax(0, 1fr); } .form-aside { position: static; } }

/* Confirmation modal */
.modal { border: 0; padding: 0; border-radius: 18px; width: min(480px, calc(100vw - 2rem)); box-shadow: 0 24px 60px rgba(11,36,71,.28); color: var(--ink); }
.modal::backdrop { background: rgba(11,36,71,.45); backdrop-filter: blur(3px); }
.modal[open] { animation: modal-in .18s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-box { padding: 1.6rem 1.6rem 1.3rem; display: grid; grid-template-columns: auto 1fr; gap: 0 1rem; }
.modal-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.modal[data-tone="warn"] .modal-icon { background: var(--late-bg); color: var(--late); }
.modal-body h2 { font-size: 1.2rem; margin: .2rem 0 .4rem; }
.modal-text p { color: var(--ink-2); margin-bottom: .6rem; }
.modal-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.modal-sum { display: grid; gap: .45rem; margin: .6rem 0 0; padding: .85rem 1rem; background: var(--paper); border-radius: var(--r); }
.modal-sum div { display: grid; grid-template-columns: 90px 1fr; gap: .5rem; font-size: .88rem; }
.modal-sum dt { color: var(--muted); }
.modal-sum dd { margin: 0; font-weight: 650; color: var(--navy); }
.modal-warn { margin: .8rem 0 0 !important; padding: .6rem .8rem; border-radius: var(--r-sm); background: var(--gold-soft); color: var(--due) !important; font-size: .87rem; font-weight: 600; }
@media (max-width: 520px) { .modal-box { grid-template-columns: 1fr; } .modal-icon { margin-bottom: .6rem; } .modal-actions { flex-direction: column-reverse; } .modal-actions .btn { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .modal[open] { animation: none; } }
.filters .field { min-width: 260px; }
.form .drop-sm { padding: .7rem .85rem; margin-bottom: .9rem; }
.form .drop-sm .drop-ico { width: 36px; height: 36px; border-radius: 10px; }
.compact .drop { margin-bottom: 0; }

/* Pagination */
.pager { display: flex; align-items: center; justify-content: space-between; gap: .8rem 1.5rem; flex-wrap: wrap; margin-top: 1rem; }
.pager-info { margin: 0; color: var(--muted); font-size: .88rem; }
.pager-links { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.pg { min-width: 38px; height: 38px; padding: 0 .7rem; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 650; font-size: .88rem; text-decoration: none; font-variant-numeric: tabular-nums; }
a.pg:hover { border-color: var(--blue); color: var(--blue); }
.pg.is-current { background: var(--navy); border-color: var(--navy); color: #fff; }
.pg.is-off { color: #b3bfcc; background: transparent; }
.pg-gap { color: var(--muted); padding: 0 .2rem; }
.pager-per label { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--muted); font-weight: 600; }
.pager-per select { font: inherit; padding: .4rem .5rem; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: #fff; }
@media (max-width: 600px) { .pg span { display: none; } .pager { justify-content: center; } }

/* ===================== v5: phases, steps and step actions ===================== */
.tag-hold { background: #eef0f6; color: #4a5578; display: inline-flex; align-items: center; gap: .3rem; }
.late-text { color: var(--late); font-weight: 650; font-size: .9rem; }
.status-who { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }

/* Phase track: numbered points */
.status-rail .rail li { flex: 1 0 110px; }
.status-rail .rail-dot { width: 30px; height: 30px; font-size: .8rem; font-weight: 800; color: var(--muted); }
.status-rail .rail li::before { top: 13px; }
.status-rail .rail .st-current .rail-dot { width: 36px; height: 36px; margin-top: -3px; color: #fff; font-size: .9rem; }
.status-rail .rail-name { font-size: .86rem; }
.rail .st-current.tl-hold .rail-dot { border-color: #8b93ad; box-shadow: 0 0 0 5px #eef0f6; }
.rail .st-current.tl-hold .rail-meta { color: #4a5578; }
.rail-compact li { width: 22px; }
.rail-compact .st-current { width: 30px; }
.rail-compact .st-current.tl-hold { background: #8b93ad; }

/* Steps inside the current phase */
.status-steps { grid-column: 1 / -1; margin: 0 -1.5rem; padding: .85rem 1.5rem 1rem; border-top: 1px dashed var(--line); }
.status-steps-label { font-size: .78rem; font-weight: 650; color: var(--muted); margin: 0 0 .55rem !important; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.step { display: flex; align-items: center; gap: .55rem; padding: .5rem .8rem .5rem .6rem; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); position: relative; }
.step + .step::before { content: ""; position: absolute; left: -.5rem; top: 50%; width: .5rem; height: 2px; background: var(--line-2); }
.step-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); flex-shrink: 0; display: grid; place-items: center; }
.step-text { display: flex; flex-direction: column; line-height: 1.25; }
.step-text strong { font-size: .84rem; color: var(--ink-2); font-weight: 650; }
.step-text small { font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.step.st-done .step-dot { background: var(--blue); border-color: var(--blue); }
.step.st-done .step-dot::after { content: ""; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.step.st-done.tl-late small { color: var(--late); }
.step.st-current { border-color: var(--gold); background: var(--gold-soft); box-shadow: 0 0 0 3px rgba(224,165,38,.15); }
.step.st-current .step-dot { border-color: var(--gold); background: var(--navy); }
.step.st-current strong { color: var(--navy); font-weight: 800; }
.step.st-current small { color: var(--due); font-weight: 650; }
.step.st-current.tl-ok small { color: var(--blue-dark); }
.step.st-current.tl-late { border-color: var(--late); background: var(--late-bg); box-shadow: none; }
.step.st-current.tl-late small { color: var(--late); }
.step.st-current.tl-hold { border-color: #b7bdd0; background: #eef0f6; box-shadow: none; }
.step.st-current.tl-hold small { color: #4a5578; }
.step.st-pending strong { color: var(--muted); font-weight: 500; }

.all-steps { grid-column: 1 / -1; margin: 0 -1.5rem; border-top: 1px solid var(--line); }
.all-steps summary { display: flex; align-items: center; gap: .45rem; padding: .75rem 1.5rem; cursor: pointer; color: var(--blue); font-weight: 650; font-size: .88rem; list-style: none; }
.all-steps summary::-webkit-details-marker { display: none; }
.all-steps summary:hover { background: var(--paper); }
.all-steps[open] summary { border-bottom: 1px solid var(--line); }
.all-steps .tbl-wrap { padding: .5rem 1.5rem 1rem; }
.all-steps td:first-child { font-weight: 700; color: var(--navy); white-space: nowrap; }
.row-current td { background: var(--gold-soft) !important; font-weight: 650; }

/* Waiting and action cards */
.card-waiting { display: flex; gap: 1rem; align-items: flex-start; background: var(--paper); border-style: dashed; }
.card-waiting h2 { margin-bottom: .2rem; }
.card-waiting p { margin: 0; }
.waiting-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--muted); border: 1px solid var(--line); flex-shrink: 0; }
.action-head { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.action-head h2 { font-size: 1.25rem; margin-bottom: .25rem; }
.action-head p { margin: 0; }
.action-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--blue); color: #fff; flex-shrink: 0; }
.action-label { font-size: .8rem; font-weight: 650; color: var(--blue) !important; margin-bottom: .15rem !important; }
.decision { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; padding-top: 1rem; border-top: 1px solid var(--line); }
.btn-lg { padding: .78rem 1.35rem; font-size: .97rem; }
.more-options { margin-top: 1rem; }
.more-options summary { cursor: pointer; font-size: .82rem; color: var(--muted); font-weight: 600; }
.more-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .6rem; padding: .75rem; background: var(--paper); border-radius: var(--r); }
.more-row select { width: auto !important; max-width: 280px; min-height: 36px !important; padding: .35rem .6rem !important; }

/* Dashboard phases */
.summary-item.is-hold dd { color: #4a5578; }
.phases { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .8rem; }
.phase-tile { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  text-decoration: none; color: var(--ink); position: relative; overflow: hidden; transition: border-color .15s; }
.phase-tile:hover { border-color: var(--blue); color: var(--ink); }
.phase-tile.has::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--blue); }
.phase-tile.has-late::before { background: var(--late); }
.phase-top { display: flex; align-items: center; gap: .5rem; }
.phase-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); color: var(--muted); font-size: .75rem; font-weight: 800; flex-shrink: 0; }
.phase-tile.has .phase-n { background: var(--navy); color: #fff; }
.phase-name { font-size: .85rem; font-weight: 700; color: var(--ink-2); line-height: 1.2; }
.phase-count { font-size: 2rem; font-weight: 800; color: #c3ccd8; line-height: 1.1; font-variant-numeric: tabular-nums; }
.phase-tile.has .phase-count { color: var(--navy); }
.phase-steps { display: flex; flex-direction: column; gap: .15rem; font-size: .78rem; color: var(--muted); }
.phase-steps span { display: flex; justify-content: space-between; gap: .5rem; }
.phase-steps b { color: var(--ink); }
.phase-late { display: inline-flex; align-items: center; gap: .3rem; font-size: .76rem; font-weight: 700; color: var(--late); margin-top: auto; }
@media (max-width: 1200px) { .phases { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.timeline .act-retried::before, .timeline .act-held::before { background: var(--gold); }
.timeline .act-retried .note, .timeline .act-held .note { background: var(--gold-soft); }
.phase-n .ico { display: block; }

/* ===================== v6: requests page ===================== */
.viewtabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.viewtab { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .9rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  color: var(--ink-2); font-weight: 650; font-size: .88rem; text-decoration: none; transition: background .15s, border-color .15s, color .15s; }
.viewtab:hover { border-color: var(--blue); color: var(--navy); }
.viewtab .ico { color: var(--muted); }
.viewtab-n { min-width: 22px; height: 22px; padding: 0 .4rem; border-radius: 999px; background: var(--paper); color: var(--ink-2); font-size: .75rem; font-weight: 800;
  display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.viewtab.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }
.viewtab.is-on .ico { color: #fff; }
.viewtab.is-on .viewtab-n { background: rgba(255,255,255,.18); color: #fff; }
.viewtab.is-alert:not(.is-on) .viewtab-n { background: var(--late-bg); color: var(--late); }

.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; padding: .75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: .9rem; }
.tb-search, .tb-select { position: relative; display: flex; align-items: center; }
.tb-search { flex: 1 1 260px; }
.tb-search .ico, .tb-select .ico { position: absolute; left: .8rem; color: #8a98aa; pointer-events: none; }
.tb-search input { width: 100%; height: 44px; padding: 0 .9rem 0 2.6rem; border: 1px solid var(--line-2); border-radius: var(--r); font: inherit; font-size: .95rem; background: var(--paper); transition: border-color .15s, background .15s, box-shadow .15s; }
.tb-search input:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px var(--blue-soft); }
.tb-search:focus-within .ico { color: var(--blue); }
.tb-select select { appearance: none; -webkit-appearance: none; height: 44px; padding: 0 2.1rem 0 2.3rem; border: 1px solid var(--line-2); border-radius: var(--r); font: inherit; font-size: .88rem; font-weight: 600; color: var(--ink-2); cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%2366768a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .7rem center; max-width: 190px; }
.tb-select select:hover { border-color: #a9b6c6; }
.tb-select select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.tb-sort { margin-left: 0; }
.tb-go { height: 44px; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: -.2rem 0 .9rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .45rem .3rem .75rem; border-radius: 999px; background: var(--blue-soft); color: var(--blue-dark); font-size: .82rem; font-weight: 650; text-decoration: none; }
.chip:hover { background: #d8e6f7; color: var(--navy); }
.chip .ico { opacity: .7; }
.chip-clear { font-size: .82rem; font-weight: 650; color: var(--muted); margin-left: .3rem; }
.list-count { font-size: .84rem; color: var(--muted); margin: 0 0 .55rem; font-weight: 600; }

/* Request cards */
.rq-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.rq { display: grid; grid-template-columns: 48px minmax(0, 2.2fr) minmax(0, 1.5fr) minmax(0, 1.1fr) 150px 20px; gap: 1.2rem; align-items: center;
  padding: 1rem 1.1rem 1rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); text-decoration: none; color: var(--ink);
  position: relative; transition: border-color .15s, box-shadow .15s; }
.rq:hover { border-color: #9fb9dc; box-shadow: 0 6px 20px rgba(11,36,71,.07); color: var(--ink); }
.rq:hover .rq-go { color: var(--blue); transform: translateX(2px); }
.rq:hover .rq-title { color: var(--blue-dark); }
.rq::before { content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: transparent; }
.rq-late::before { background: var(--late); }
.rq-due::before { background: var(--gold); }
.rq-hold::before { background: #8b93ad; }
.rq-type { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; }
.rq-type-goods { background: #e9f1fb; color: var(--blue); }
.rq-type-services { background: #e8f5ef; color: var(--ok); }
.rq-type-works { background: #fdf3dc; color: #a26a05; }
.rq-main, .rq-where, .rq-who-text, .rq-end { display: flex; flex-direction: column; min-width: 0; }
.rq-top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.rq-ref { font-size: .78rem; font-weight: 800; color: var(--blue); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.rq-method { font-size: .72rem; font-weight: 650; color: var(--muted); background: var(--paper); padding: .08rem .5rem; border-radius: 999px; white-space: nowrap; }
.rq-title { font-size: 1rem; font-weight: 700; color: var(--navy); line-height: 1.3; margin: .15rem 0 .25rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; transition: color .15s; }
.rq-meta { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .8rem; color: var(--muted); }
.rq-meta span { display: inline-flex; align-items: center; gap: .3rem; }
.rq-phase { font-size: .74rem; font-weight: 650; color: var(--muted); }
.rq-step { display: flex; align-items: center; gap: .35rem; font-size: .9rem; font-weight: 700; color: var(--ink); line-height: 1.3; margin: .1rem 0 .1rem; }
.rq-completed .rq-step { color: var(--ok); }
.rq-cancelled .rq-step { color: var(--muted); }
.rq-where .rail-compact { margin-top: .35rem; }
.rq-who { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.rq-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: .78rem; font-weight: 800; flex-shrink: 0; }
.rq-avatar.is-office { background: var(--blue-soft); color: var(--blue); }
.rq-who-text small { font-size: .72rem; color: var(--muted); }
.rq-who-text b { font-size: .86rem; color: var(--ink); font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-end { align-items: flex-end; gap: .35rem; text-align: right; }
.rq-amount { font-size: 1.02rem; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rq-end .tag { display: inline-flex; align-items: center; gap: .3rem; }
.rq-go { color: #b3bfcc; transition: color .15s, transform .15s; }
@media (max-width: 1200px) {
  .rq { grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1fr) 140px; }
  .rq-who { grid-column: 3; grid-row: 2; }
  .rq-where { grid-column: 3; grid-row: 1; }
  .rq-end { grid-column: 4; grid-row: 1 / span 2; }
  .rq-go { display: none; }
  .rq-main { grid-row: 1 / span 2; }
  .rq-type { grid-row: 1 / span 2; align-self: start; }
}
@media (max-width: 760px) {
  .rq { grid-template-columns: 40px minmax(0, 1fr); gap: .7rem .9rem; }
  .rq-type { width: 40px; height: 40px; border-radius: 12px; grid-row: auto; }
  .rq-main { grid-column: 2; grid-row: auto; }
  .rq-where, .rq-who, .rq-end { grid-column: 1 / -1; grid-row: auto; }
  .rq-where { padding-top: .6rem; border-top: 1px dashed var(--line); }
  .rq-end { flex-direction: row; justify-content: space-between; align-items: center; text-align: left; }
  .tb-sort { margin-left: 0; }
  .tb-select { flex: 1 1 45%; } .tb-select select { max-width: none; width: 100%; }
  .viewtabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .2rem; scrollbar-width: none; }
  .viewtab { flex-shrink: 0; }
}

.empty-state { text-align: center; padding: 3rem 1.5rem; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r-lg); }
.empty-ico { width: 64px; height: 64px; border-radius: 18px; display: inline-grid; place-items: center; background: var(--blue-soft); color: var(--blue); margin-bottom: .9rem; }
.empty-state h2 { font-size: 1.15rem; }
.empty-state p { max-width: 46ch; margin: 0 auto 1rem; }
.tb-go { width: 44px; padding: 0; }


/* ===================== v7: no lines, softer surfaces, dashboard ===================== */
a:hover, a:focus { text-decoration: none; }
a:focus:not(:focus-visible) { outline: none; }
.btn:focus:not(:focus-visible), .rq:focus:not(:focus-visible) { outline: none; }
.rq:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Tables become soft rows: no divider lines */
.tbl { border-collapse: separate; border-spacing: 0 6px; margin-top: -6px; }
.tbl th { background: none; border: 0; padding: .3rem .8rem; font-size: .75rem; }
.tbl td { border: 0; background: var(--paper); padding: .75rem .8rem; }
.tbl tbody tr:last-child td { border: 0; }
.tbl td:first-child { border-radius: var(--r) 0 0 var(--r); }
.tbl td:last-child { border-radius: 0 var(--r) var(--r) 0; }
.tbl tbody tr:hover td { background: #edf2f8; }
.row-suggested td { background: var(--ok-bg) !important; }
.row-current td { background: var(--gold-soft) !important; }
.all-steps td:first-child { border-radius: var(--r) 0 0 var(--r); }

/* Cards and panels */
.card { border-color: #e6eaf0; box-shadow: 0 1px 2px rgba(11,36,71,.04); }
.panel { background: var(--surface); border: 1px solid #e6eaf0; border-radius: 18px; padding: 1.25rem 1.3rem 1.3rem; margin-bottom: 1.4rem; box-shadow: 0 1px 2px rgba(11,36,71,.04); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.panel-head h2 { display: flex; align-items: center; gap: .6rem; margin: 0; font-size: 1.05rem; }
.panel-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.count-pill { min-width: 26px; height: 24px; padding: 0 .5rem; border-radius: 999px; background: var(--paper); color: var(--ink-2); font-size: .78rem; font-weight: 800; display: inline-grid; place-items: center; }
.count-pill.is-late { background: var(--late-bg); color: var(--late); }
.panel-link { display: inline-flex; align-items: center; gap: .2rem; font-size: .86rem; font-weight: 700; color: var(--blue); }
.panel-link:hover { color: var(--navy); }
.panel .rq-list { gap: .5rem; }
.panel .rq { box-shadow: none; background: #fbfcfe; }
.panel .rq:hover { background: #fff; }

/* Icon colours */
.si-blue { background: var(--blue-soft); color: var(--blue); }
.si-green { background: var(--ok-bg); color: var(--ok); }
.si-navy { background: var(--navy); color: #fff; }
.si-red { background: var(--late-bg); color: var(--late); }
.si-gray { background: #eef0f6; color: #4a5578; }

/* Greeting */
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.hello h1 { margin: .2rem 0 .25rem; }
.hello p { margin: 0; }
.hello-date { display: inline-flex; align-items: center; gap: .35rem; font-size: .84rem; font-weight: 650; color: var(--muted); }

/* Summary row with icons */
.summary { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.summary-item { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .9rem; align-items: center; border-radius: 18px; border-color: #e6eaf0; padding: 1.05rem 1.15rem; transition: border-color .15s, box-shadow .15s; }
.summary-item:hover { box-shadow: 0 6px 20px rgba(11,36,71,.07); border-color: #c9d6e8; }
.sum-ico { grid-row: 1 / span 2; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; }
.summary-item dt { align-self: end; }
.summary-item dd { align-self: start; font-size: 1.7rem; }
.summary-item.is-mine { background: var(--navy); border-color: var(--navy); }
.summary-item.is-mine dt { color: #b8c6d8; }
.summary-item.is-mine dd { color: #fff; }
.summary-item.is-mine .sum-ico { background: var(--gold); color: var(--navy); }

/* Phase tiles: softer */
.phase-tile { border-radius: 18px; border-color: #e6eaf0; }
.phase-tile:hover { box-shadow: 0 6px 20px rgba(11,36,71,.07); border-color: #c9d6e8; }
.phase-tile.has::before { height: 3px; }

/* Empty and side lists */
.empty-mini { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.2rem; background: var(--paper); border-radius: 14px; }
.empty-mini .empty-ico { width: 46px; height: 46px; border-radius: 14px; margin: 0; background: var(--ok-bg); color: var(--ok); }
.empty-mini strong { display: block; color: var(--navy); }
.empty-mini p { margin: .1rem 0 0; font-size: .88rem; }
.mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.mini-list a { display: flex; align-items: center; gap: .75rem; padding: .65rem .7rem; border-radius: 12px; color: var(--ink); transition: background .15s; }
.mini-list a:hover { background: var(--paper); color: var(--ink); }
.mini-list a > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.mini-list strong { font-size: .9rem; color: var(--navy); line-height: 1.3; }
.mini-list small { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.mini-go { color: #b3bfcc; }
.how { list-style: none; margin: 0 0 .8rem; padding: 0; counter-reset: how; display: grid; gap: .7rem; }
.how li { counter-increment: how; display: grid; grid-template-columns: 26px 1fr; column-gap: .7rem; }
.how li::before { content: counter(how); grid-row: 1 / span 2; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-weight: 800; font-size: .78rem; }
.how strong { font-size: .88rem; color: var(--navy); }
.how span { font-size: .82rem; color: var(--muted); line-height: 1.4; }
.cols { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); }

/* The dashboard cards are narrower: drop the arrow and tighten */
.col-main .panel .rq { grid-template-columns: 44px minmax(0, 2fr) minmax(0, 1.5fr) minmax(0, 1.1fr) 140px; }
.col-main .panel .rq-go { display: none; }
@media (max-width: 1400px) {
  .col-main .panel .rq { grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr) 130px; }
  .col-main .panel .rq-who { grid-column: 3; grid-row: 2; }
  .col-main .panel .rq-where { grid-column: 3; grid-row: 1; }
  .col-main .panel .rq-end { grid-column: 4; grid-row: 1 / span 2; }
  .col-main .panel .rq-main { grid-row: 1 / span 2; }
  .col-main .panel .rq-type { grid-row: 1 / span 2; align-self: start; width: 44px; height: 44px; }
}
@media (max-width: 760px) {
  .col-main .panel .rq { grid-template-columns: 40px minmax(0, 1fr); }
  .col-main .panel .rq-main { grid-column: 2; grid-row: auto; }
  .col-main .panel .rq-where, .col-main .panel .rq-who, .col-main .panel .rq-end { grid-column: 1 / -1; grid-row: auto; }
  .col-main .panel .rq-type { grid-row: auto; }
}
