/* =========================================================
   RAYDEO PLAN ROOM — prototype styles
   Desktop only. Tokens first, then components per view.
   ========================================================= */

:root {
  /* surfaces */
  --paper: #F3F2EE;
  --paper-2: #ECEAE4;
  --surface: #FFFFFF;
  --line: #E3E0D8;
  --line-2: #D2CEC4;
  --grid: rgba(15, 16, 18, .045);

  /* ink */
  --ink: #0F1012;
  --ink-2: #3A3D44;
  --ink-3: #6D7079;
  --ink-4: #A2A4AB;

  /* accent — signal orange */
  --accent: #FF5A1F;
  --accent-ink: #C83E0B;
  --accent-soft: #FFF0E8;
  --accent-glow: rgba(255, 90, 31, .35);

  /* divisions */
  --metal: #45698C;
  --metal-soft: #E9EFF5;
  --metal-line: #C9D6E3;
  --wood: #98582A;
  --wood-soft: #F6EDE3;
  --wood-line: #E6D2BE;

  /* states */
  --ok: #148A4C;
  --ok-ink: #0E6B3A;
  --ok-soft: #E5F3EB;
  --bad: #D0392C;
  --bad-ink: #A92A1F;
  --bad-soft: #FBEAE7;
  --warn: #B87414;
  --warn-soft: #FBF1DF;

  /* dark (processing + sidebar) */
  --night: #0B0C0E;
  --night-2: #141619;
  --night-3: #1C1F23;
  --night-line: #2A2D33;
  --night-ink: #EDEBE6;
  --night-ink-2: #9EA1A8;
  --night-ink-3: #62656C;

  /* type */
  --f-display: "Archivo", "Inter", system-ui, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* shape */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-xl: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 16, 18, .05);
  --shadow: 0 1px 2px rgba(15, 16, 18, .04), 0 8px 24px -12px rgba(15, 16, 18, .12);
  --shadow-lg: 0 24px 64px -20px rgba(15, 16, 18, .35);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  min-width: 1280px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; }
img { display: block; }
[hidden] { display: none !important; }

.mono { font-family: var(--f-mono); letter-spacing: .02em; }
.accent { color: var(--accent); }
.ic {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- views ---------- */
.view { display: none; min-height: 100vh; }
.view.is-active { display: block; animation: viewIn .45s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- shared bits ---------- */
.logo-plate { height: 42px; width: auto; border-radius: 3px; align-self: flex-start; flex: none; }
.logo-plate--sm { height: 34px; }
.logo-plate--side { height: 38px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 14px;
  border-radius: 999px;
  font-size: 13px; font-weight: 500;
}
.pill .ic { width: 15px; height: 15px; }
.pill--quiet { background: var(--paper); color: var(--ink-2); border: 1px solid var(--line); }
.pill--dark { background: var(--night-3); color: var(--night-ink-2); border: 1px solid var(--night-line); }

.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; padding: 0 20px;
  border-radius: var(--r);
  font-weight: 600; font-size: 15px; letter-spacing: -.005em;
  white-space: nowrap; text-decoration: none;
  transition: background .18s, color .18s, box-shadow .18s, transform .12s, border-color .18s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--accent-glow); outline-offset: 2px; }
.btn--lg { height: 56px; padding: 0 28px; font-size: 16px; border-radius: 14px; }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: #26282d; }
.btn--accent { background: var(--accent); color: #fff; box-shadow: 0 10px 24px -10px var(--accent-glow); }
.btn--accent:hover { background: #F04A10; box-shadow: 0 14px 30px -10px var(--accent-glow); }
.btn--approve { background: var(--ok); color: #fff; box-shadow: 0 10px 22px -12px rgba(20, 138, 76, .6); }
.btn--approve:hover { background: var(--ok-ink); }
.btn--decline { background: var(--surface); color: var(--bad); border: 1.5px solid #EDB5AE; }
.btn--decline:hover { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn--danger { background: var(--bad); color: #fff; }
.btn--danger:hover { background: var(--bad-ink); }
.btn--gray { background: var(--paper-2); color: var(--ink-2); border: 1px solid var(--line-2); }
.btn--gray:hover { background: #E2DFD7; color: var(--ink); }
.btn--ghost { color: var(--ink-2); }
.btn--ghost:hover { background: var(--paper); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.is-loading { pointer-events: none; }
.btn.is-loading > * { opacity: 0; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.link-btn {
  font-size: 13px; font-weight: 600; color: var(--accent-ink);
  padding: 4px 0; border-bottom: 1px dashed rgba(200, 62, 11, .4);
}
.link-btn:hover { color: var(--accent); border-bottom-color: var(--accent); }

.icon-btn {
  width: 38px; height: 38px; border-radius: 10px;
  display: inline-grid; place-items: center;
  color: var(--ink-2); border: 1px solid var(--line);
  background: var(--surface);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--paper); color: var(--ink); }
.icon-btn[disabled] { opacity: .35; pointer-events: none; }

/* =========================================================
   VIEW 1 — INTAKE
   ========================================================= */
.topbar {
  height: 80px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.topbar__brand { display: flex; align-items: center; gap: 22px; }
.topbar__rule { width: 1px; height: 34px; background: var(--line-2); }
.topbar__title { display: flex; flex-direction: column; line-height: 1.25; }
.topbar__title strong {
  font-family: var(--f-display); font-stretch: 112%;
  font-size: 17px; font-weight: 700; letter-spacing: -.01em;
}
.topbar__title .mono { font-size: 12px; color: var(--ink-3); }
.topbar__meta { display: flex; align-items: center; gap: 18px; }
.topbar__phone {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px;
}
.topbar__phone .ic { width: 16px; height: 16px; }
.topbar__phone:hover { color: var(--ink); }

.intake {
  display: grid;
  grid-template-columns: 452px minmax(0, 1fr);
  gap: 44px;
  max-width: 1640px;
  margin: 0 auto;
  padding: 36px 56px 40px;
  min-height: calc(100vh - 80px);
}

.display {
  font-family: var(--f-display);
  font-stretch: 110%;
  font-weight: 800;
  font-size: 54px;
  line-height: .94;
  letter-spacing: -.035em;
}
.lede {
  margin-top: 16px;
  font-size: 16.5px; line-height: 1.6;
  color: var(--ink-2);
  max-width: 400px;
}

.form { margin-top: 26px; padding: 24px 24px 8px; }
.form__head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 20px;
}
.form__head h2 { font-family: var(--f-display); font-stretch: 110%; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.field input {
  width: 100%; min-width: 0; height: 48px; padding: 0 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px; font-weight: 500;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.field input::placeholder { color: var(--ink-4); font-weight: 400; }
.field input:hover { border-color: var(--line-2); }
.field input:focus { outline: none; background: var(--surface); border-color: var(--ink); box-shadow: 0 0 0 4px rgba(15,16,18,.06); }
.field__error { display: none; margin-top: 6px; font-size: 12.5px; font-weight: 500; color: var(--bad); }
.field.has-error input { border-color: var(--bad); background: var(--bad-soft); }
.field.has-error .field__error { display: block; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.date-wrap { position: relative; }
.date-wrap .ic { position: absolute; left: 13px; top: 15px; width: 17px; height: 17px; color: var(--ink-3); pointer-events: none; }
.date-wrap input { padding-left: 40px; padding-right: 8px; font-variant-numeric: tabular-nums; cursor: pointer; }
.date-wrap input::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
.date-wrap input:invalid:not(:focus) { color: var(--ink-4); }

.next-steps { margin-top: 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.next-steps li { padding-top: 12px; border-top: 2px solid var(--ink); display: flex; flex-direction: column; gap: 4px; }
.next-steps li > div { display: flex; flex-direction: column; gap: 2px; }
.next-steps .mono { font-size: 11px; color: var(--accent-ink); font-weight: 600; }
.next-steps strong { font-size: 13.5px; }
.next-steps p { font-size: 12.5px; line-height: 1.4; color: var(--ink-3); }

/* right column */
.intake__right { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.dropzone {
  position: relative;
  flex: 1 1 auto;
  min-height: 470px;
  display: grid; place-items: center;
  border-radius: var(--r-xl);
  border: 1.5px dashed var(--line-2);
  background-color: var(--surface);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(rgba(15,16,18,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,16,18,.022) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
  cursor: pointer;
  transition: border-color .2s, box-shadow .25s, background-color .2s, min-height .35s var(--ease);
  outline: none;
}
.dropzone:hover { border-color: var(--ink-3); }
.dropzone:focus-visible { box-shadow: 0 0 0 4px var(--accent-glow); }
.dropzone.has-files { min-height: 250px; }
.dropzone.has-files .dropzone__inner { padding: 30px 24px 56px; }
.dropzone.has-files .dropzone__icon { width: 64px; height: 64px; margin-bottom: 14px; }
.dropzone.has-files .dz-page { width: 40px; height: 50px; border-radius: 5px; background-size: 26px 100%; background-position: 7px 10px; }
.dropzone.has-files .dz-page--1 { left: 4px; top: 8px; }
.dropzone.has-files .dz-page--2 { left: 18px; top: 2px; }
.dropzone.has-files .dz-arrow { width: 34px; height: 34px; box-shadow: 0 0 0 4px var(--surface); }
.dropzone.has-files .dz-arrow .ic { width: 17px; height: 17px; }
.dropzone.has-files .dropzone__title { font-size: 26px; }
.dropzone.has-files .dropzone__copy { font-size: 14.5px; margin-top: 8px; }
.dropzone.has-files .dropzone__actions { margin-top: 16px; }
.dropzone.has-files .type-chips { display: none; }

.crop { position: absolute; width: 22px; height: 22px; border-color: var(--ink); border-style: solid; border-width: 0; opacity: .55; transition: all .25s var(--ease); }
.crop--tl { top: 18px; left: 18px; border-top-width: 2px; border-left-width: 2px; }
.crop--tr { top: 18px; right: 18px; border-top-width: 2px; border-right-width: 2px; }
.crop--bl { bottom: 18px; left: 18px; border-bottom-width: 2px; border-left-width: 2px; }
.crop--br { bottom: 18px; right: 18px; border-bottom-width: 2px; border-right-width: 2px; }
.dropzone:hover .crop { opacity: .9; }

.dropzone__sheet {
  position: absolute; top: 22px; left: 54px;
  font-size: 11px; color: var(--ink-3); letter-spacing: .08em;
}

.dropzone__inner {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  max-width: 640px; padding: 40px 24px 70px;
}

.dropzone__icon { position: relative; width: 112px; height: 112px; margin-bottom: 26px; }
.dz-page {
  position: absolute; width: 70px; height: 88px; border-radius: 8px;
  background: var(--surface); border: 1.5px solid var(--ink);
  background-image: repeating-linear-gradient(180deg, transparent 0 11px, rgba(15,16,18,.16) 11px 12.5px);
  background-size: 46px 100%; background-repeat: no-repeat; background-position: 11px 18px;
  transition: transform .35s var(--ease);
}
.dz-page--1 { left: 10px; top: 14px; transform: rotate(-8deg); }
.dz-page--2 { left: 32px; top: 6px; transform: rotate(5deg); }
.dz-arrow {
  position: absolute; right: -2px; bottom: 0;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 22px -8px var(--accent-glow), 0 0 0 6px var(--surface);
  transition: transform .35s var(--ease);
}
.dz-arrow .ic { width: 24px; height: 24px; stroke-width: 2.2; }
.dropzone:hover .dz-page--1 { transform: rotate(-12deg) translate(-4px, 2px); }
.dropzone:hover .dz-page--2 { transform: rotate(9deg) translate(4px, -3px); }
.dropzone:hover .dz-arrow { transform: translateY(-4px); }

.dropzone__title {
  font-family: var(--f-display); font-stretch: 116%;
  font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05;
}
.dropzone__copy { margin-top: 12px; font-size: 16px; line-height: 1.55; color: var(--ink-2); max-width: 470px; }
.dropzone__actions { margin-top: 26px; display: flex; align-items: center; gap: 16px; }
.dropzone__or { font-size: 13.5px; color: var(--ink-3); }

.type-chips { margin-top: 24px; display: flex; gap: 8px; }
.type-chip {
  font-family: var(--f-mono); font-size: 11.5px; font-weight: 600; letter-spacing: .06em;
  padding: 5px 10px; border-radius: 6px; border: 1px solid;
}
.type-chip--zip { color: #5B4BB5; background: #EFEDFA; border-color: #DAD5F3; }
.type-chip--pdf { color: var(--bad-ink); background: var(--bad-soft); border-color: #F2CBC6; }
.type-chip--dwg { color: var(--metal); background: var(--metal-soft); border-color: var(--metal-line); }

.dim-line {
  position: absolute; left: 54px; right: 54px; bottom: 26px;
  display: flex; align-items: center; gap: 14px;
  color: var(--ink-3);
}
.dim-line__rule { flex: 1; height: 1px; background: currentColor; opacity: .5; position: relative; }
.dim-line__rule:first-child::before,
.dim-line__rule:last-child::after { content: ""; position: absolute; top: -6px; width: 1px; height: 13px; background: currentColor; }
.dim-line__rule:first-child::before { left: 0; }
.dim-line__rule:last-child::after { right: 0; }
.dim-line__label { font-size: 11px; letter-spacing: .1em; }

.dropzone__overlay {
  position: absolute; inset: 10px; border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: rgba(255, 90, 31, .92); color: #fff;
  font-family: var(--f-display); font-stretch: 115%; font-size: 30px; font-weight: 800; letter-spacing: -.02em;
  opacity: 0; transform: scale(.98); pointer-events: none;
  transition: opacity .18s, transform .25s var(--ease);
}
.dropzone__overlay .ic { width: 46px; height: 46px; stroke-width: 2; animation: bob 1s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.dropzone.is-dragover { border-color: var(--accent); border-style: solid; }
.dropzone.is-dragover .dropzone__overlay { opacity: 1; transform: none; }
.dropzone.is-shake { animation: shake .45s; border-color: var(--bad); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.dz-error {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-radius: var(--r);
  background: var(--bad-soft); color: var(--bad-ink);
  border: 1px solid #F2CBC6;
  font-size: 14px; font-weight: 500;
}
.dz-error .ic { margin-top: 1px; }

/* file list */
.filelist { padding: 6px 0 4px; overflow: hidden; }
.filelist__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px 12px;
  border-bottom: 1px solid var(--line);
}
.filelist__head strong { font-size: 14.5px; }
.meter { display: flex; align-items: center; gap: 12px; }
.meter__track { width: 200px; height: 6px; border-radius: 4px; background: var(--paper-2); overflow: hidden; }
.meter__track i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--ink); transition: width .5s var(--ease); }
.meter.is-over .meter__track i { background: var(--bad); }
.meter .mono { font-size: 12px; color: var(--ink-3); min-width: 120px; text-align: right; }

.filelist__rows { max-height: 196px; overflow-y: auto; }
.frow {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 96px 110px 34px;
  align-items: center; gap: 14px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  animation: rowIn .35s var(--ease) both;
}
.frow:last-child { border-bottom: 0; }
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } }
.ftype {
  width: 40px; height: 44px; border-radius: 7px;
  display: grid; place-items: end center; padding-bottom: 6px;
  font-family: var(--f-mono); font-size: 10px; font-weight: 700; letter-spacing: .05em;
  border: 1px solid; position: relative;
}
.ftype::before { content: ""; position: absolute; top: -1px; right: -1px; width: 12px; height: 12px; background: var(--surface); border-left: 1px solid; border-bottom: 1px solid; border-color: inherit; border-bottom-left-radius: 4px; }
.ftype--pdf { color: var(--bad-ink); background: var(--bad-soft); border-color: #F2CBC6; }
.ftype--zip { color: #5B4BB5; background: #EFEDFA; border-color: #DAD5F3; }
.ftype--dwg { color: var(--metal); background: var(--metal-soft); border-color: var(--metal-line); }
.fname { min-width: 0; }
.fname strong { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fname span { font-size: 12.5px; color: var(--ink-3); }
.fsize { font-family: var(--f-mono); font-size: 12.5px; color: var(--ink-2); text-align: right; }
.fstate { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ok); }
.fstate .ic { width: 15px; height: 15px; stroke-width: 2.4; }
.fstate.is-loading { color: var(--ink-3); }
.fstate .bar { width: 64px; height: 4px; border-radius: 3px; background: var(--paper-2); overflow: hidden; }
.fstate .bar i { display: block; height: 100%; width: 0; background: var(--ink-3); animation: fill .9s var(--ease) forwards; }
@keyframes fill { to { width: 100%; } }
.fremove { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-4); }
.fremove:hover { background: var(--bad-soft); color: var(--bad); }
.fremove .ic { width: 16px; height: 16px; }

/* submit bar */
.submitbar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px 14px 14px 22px;
}
.submitbar__status { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-3); font-weight: 500; }
.submitbar__status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); }
.submitbar__status.is-ready { color: var(--ink); }
.submitbar__status.is-ready .dot { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.submitbar .btn .ic { transition: transform .2s var(--ease); }
.submitbar .btn:hover .ic { transform: translateX(3px); }

/* =========================================================
   VIEW 2 — PROCESSING
   ========================================================= */
.view--dark { background: var(--night); color: var(--night-ink); }
.proc {
  min-height: 100vh;
  display: flex; flex-direction: column;
  background:
    radial-gradient(900px 520px at 28% 58%, rgba(255, 90, 31, .13), transparent 65%),
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
}
.proc__top {
  height: 80px; padding: 0 56px;
  display: flex; align-items: center; gap: 22px;
  border-bottom: 1px solid var(--night-line);
}
.proc__job { font-size: 12px; color: var(--night-ink-2); letter-spacing: .1em; flex: 1; }
.proc__stage {
  flex: 1;
  display: grid; grid-template-columns: 440px 600px; gap: 96px;
  align-items: center; justify-content: center;
  padding: 40px 56px 60px;
}

/* scanner */
.scanner { display: flex; flex-direction: column; align-items: center; gap: 34px; }
.scanner__stack { position: relative; width: 320px; height: 410px; }
.sheet {
  position: absolute; inset: 0;
  border-radius: 10px;
  background: #E9E6E0;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.8);
  transition: transform .6s var(--ease);
}
.sheet--5 { transform: translate(40px, -40px) rotate(4deg); background: #3A3C40; }
.sheet--4 { transform: translate(30px, -30px) rotate(3deg); background: #55575B; }
.sheet--3 { transform: translate(20px, -20px) rotate(2deg); background: #7B7C7F; }
.sheet--2 { transform: translate(10px, -10px) rotate(1deg); background: #B3B1AC; }
.sheet--1 { overflow: hidden; padding: 26px 26px; background: #F1EFEA; }
.sheet__head { font-size: 10px; color: #6D7079; letter-spacing: .12em; padding-bottom: 12px; border-bottom: 1px solid #D7D3CA; }
.sheet__lines {
  position: absolute; left: 26px; right: 26px; top: 66px; bottom: 26px;
  background-image: repeating-linear-gradient(180deg, #CFCBC2 0 5px, transparent 5px 15px);
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 78%, transparent 78% 100%);
  mask-image: linear-gradient(90deg, #000 0 100%);
}
.hit {
  position: absolute; left: 22px; height: 14px; border-radius: 3px;
  background: rgba(255, 90, 31, .25); border-left: 3px solid var(--accent);
  opacity: 0; transform: scaleX(.2); transform-origin: left;
  transition: opacity .3s, transform .5s var(--ease);
}
.hit--1 { top: 112px; width: 62%; }
.hit--2 { top: 202px; width: 78%; }
.hit--3 { top: 292px; width: 48%; }
.scanner.is-extracting .hit { opacity: 1; transform: none; }
.scanner.is-extracting .hit--2 { transition-delay: .25s; }
.scanner.is-extracting .hit--3 { transition-delay: .5s; }

.scanline {
  position: absolute; left: -10px; right: -10px; top: 0; height: 2px;
  background: var(--accent);
  box-shadow: 0 0 18px 4px var(--accent-glow), 0 0 60px 10px rgba(255,90,31,.18);
  opacity: 0;
}
.scanner.is-scanning .scanline { opacity: 1; animation: scan 1.15s cubic-bezier(.45,0,.55,1) infinite alternate; }
@keyframes scan { from { top: 4%; } to { top: 96%; } }
.scanner.is-scanning .sheet--1 { animation: flick 1.15s steps(1) infinite; }
@keyframes flick { 50% { background: #ECE9E3; } }

.scanner__count { display: flex; align-items: baseline; gap: 10px; }
.scanner__num {
  font-family: var(--f-display); font-stretch: 120%; font-weight: 800;
  font-size: 56px; letter-spacing: -.03em; line-height: 1;
  font-variant-numeric: tabular-nums;
  min-width: 170px; text-align: right;
}
.scanner__count .mono { font-size: 13px; color: var(--night-ink-2); }

/* checklist panel */
.proc__title {
  font-family: var(--f-display); font-stretch: 118%; font-weight: 800;
  font-size: 48px; letter-spacing: -.035em; line-height: 1;
}
.proc__sub { margin-top: 14px; font-size: 12.5px; color: var(--night-ink-2); letter-spacing: .1em; }

.checklist { margin-top: 36px; border-top: 1px solid var(--night-line); }
.ck {
  position: relative;
  display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--night-line);
  transition: opacity .3s;
}
.ck__icon {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--night-ink-3);
  display: grid; place-items: center;
  transition: all .3s var(--ease);
}
.ck__text { font-size: 16.5px; font-weight: 500; color: var(--night-ink); transition: color .3s; }
.ck__status { font-size: 12.5px; font-weight: 600; letter-spacing: .04em; color: var(--night-ink-3); }
.ck__bar { position: absolute; left: 44px; right: 0; bottom: -1px; height: 2px; overflow: hidden; }
.ck__bar i { display: block; height: 100%; width: 0; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }

.ck[data-state="queued"] { opacity: .38; }
.ck[data-state="queued"] .ck__status::before { content: "[Queued]"; }

.ck[data-state="processing"] .ck__icon {
  border-color: rgba(255,90,31,.25); border-top-color: var(--accent);
  animation: spin .75s linear infinite;
}
.ck[data-state="processing"] .ck__status { color: var(--accent); }
.ck[data-state="processing"] .ck__status::before { content: "[Processing]"; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }
.ck[data-state="processing"] .ck__bar i { width: 100%; transition: width var(--dur, 1.2s) linear; }

.ck[data-state="done"] .ck__icon {
  background: var(--ok); border-color: var(--ok);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 9.5 17 19 7'/%3E%3C/svg%3E");
  background-size: 14px; background-repeat: no-repeat; background-position: center;
  animation: pop .35s var(--ease);
}
@keyframes pop { 0% { transform: scale(.6); } 70% { transform: scale(1.12); } }
.ck[data-state="done"] .ck__text { color: var(--night-ink-2); }
.ck[data-state="done"] .ck__status { color: #4FD08A; }
.ck[data-state="done"] .ck__status::before { content: "[Done]"; }
.ck[data-state="done"] .ck__bar { opacity: 0; transition: opacity .4s .1s; }
.ck[data-state="done"] .ck__bar i { width: 100%; }

.found { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; min-height: 70px; align-content: flex-start; }
.found__chip {
  font-family: var(--f-mono); font-size: 12px; font-weight: 500;
  padding: 6px 11px; border-radius: 7px; border: 1px solid;
  opacity: 0; transform: translateY(6px);
  transition: opacity .3s, transform .4s var(--ease);
}
.found__chip.is-in { opacity: 1; transform: none; }
.found__chip--metal { color: #A9C6E3; border-color: #2F4A63; background: rgba(69,105,140,.18); }
.found__chip--wood { color: #E3BE98; border-color: #5D3F28; background: rgba(152,88,42,.2); }

.outcome {
  margin-top: 18px;
  display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 16px;
  padding: 18px 18px 18px 20px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(20,138,76,.16), rgba(20,138,76,.08));
  border: 1px solid rgba(79,208,138,.35);
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .4s, transform .5s var(--ease);
}
.outcome.is-in { opacity: 1; transform: none; pointer-events: auto; }
.outcome__icon { width: 48px; height: 48px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; color: #fff; }
.outcome__icon .ic { width: 24px; height: 24px; stroke-width: 2.6; }
.outcome__text { display: flex; flex-direction: column; line-height: 1.35; }
.outcome__text strong { font-size: 17px; }
.outcome__text span { color: var(--night-ink-2); font-size: 14.5px; }
.btn__timer { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: rgba(255,255,255,.65); }
.outcome.is-in .btn__timer { animation: fill 2.8s linear forwards; }

/* =========================================================
   VIEW 3 — TRIAGE (internal app)
   ========================================================= */
.app { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }

.side {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 22px 16px 18px;
  background: var(--night); color: var(--night-ink-2);
}
.side__brand { display: flex; flex-direction: column; gap: 12px; padding: 4px 8px 26px; border-bottom: 1px solid var(--night-line); }
.side__brand .mono { font-size: 11px; letter-spacing: .14em; color: var(--night-ink-3); }
.side__nav { display: flex; flex-direction: column; gap: 3px; margin-top: 18px; }
.side__item {
  display: flex; align-items: center; gap: 12px;
  height: 42px; padding: 0 12px; border-radius: 10px;
  font-size: 14px; font-weight: 500; text-align: left;
  transition: background .15s, color .15s;
}
.side__item:hover { background: var(--night-2); color: var(--night-ink); }
.side__item.is-active { background: var(--night-3); color: #fff; }
.side__item.is-active .ic { color: var(--accent); }
.side__badge, .side__count { margin-left: auto; font-family: var(--f-mono); font-size: 11.5px; font-weight: 600; }
.side__badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center; background: var(--accent); color: #fff; }
.side__badge.is-zero { background: var(--night-3); color: var(--night-ink-3); }
.side__count { color: var(--night-ink-3); }
.side__count.is-bump { color: #fff; animation: pop .4s var(--ease); }

.side__erp {
  margin-top: auto;
  display: grid; grid-template-columns: 20px 1fr 10px; align-items: center; gap: 12px;
  padding: 14px; border-radius: 12px;
  background: var(--night-2); border: 1px solid var(--night-line);
}
.side__erp div { display: flex; flex-direction: column; line-height: 1.3; }
.side__erp strong { color: var(--night-ink); font-size: 13.5px; }
.side__erp span { font-size: 12px; color: var(--night-ink-3); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #4FD08A; box-shadow: 0 0 0 4px rgba(79,208,138,.15); }
.side__restart {
  margin-top: 12px; display: flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 12px; border-radius: 10px;
  font-size: 13px; color: var(--night-ink-3);
}
.side__restart:hover { color: var(--night-ink); background: var(--night-2); }
.side__restart .ic { width: 16px; height: 16px; }

.main { position: relative; min-width: 0; display: flex; flex-direction: column; }
.main__inner { width: 100%; max-width: 1240px; margin: 0 auto; padding: 26px 40px 40px; flex: 1; }

.crumbs { font-size: 11.5px; letter-spacing: .1em; color: var(--ink-3); }
.crumbs span:not(#crumb-name) { margin: 0 8px; color: var(--ink-4); }
#crumb-name { color: var(--ink); }

.bid-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; margin-top: 14px; }
.bid-head__title {
  font-family: var(--f-display); font-stretch: 112%; font-weight: 800;
  font-size: 40px; letter-spacing: -.035em; line-height: 1.08;
}
.bid-head__title span { color: var(--accent); }
.bid-head__sub { margin-top: 8px; color: var(--ink-3); font-size: 14.5px; }

.status {
  flex: none; margin-top: 6px;
  display: inline-flex; align-items: center; gap: 9px;
  height: 36px; padding: 0 16px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600;
  border: 1px solid;
}
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status--pending { color: var(--accent-ink); background: var(--accent-soft); border-color: #FBD3BF; }
.status--pending .dot { animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,90,31,.5); } 100% { box-shadow: 0 0 0 9px rgba(255,90,31,0); } }
.status--approved { color: var(--ok-ink); background: var(--ok-soft); border-color: #BFE3CE; }
.status--declined { color: var(--bad-ink); background: var(--bad-soft); border-color: #F2CBC6; }

/* title block — like a drawing sheet title block */
.titleblock {
  margin-top: 26px;
  display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.05fr .85fr 1.05fr;
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: 4px;
}
.tb { padding: 12px 16px 13px; border-left: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tb:first-child { border-left: 0; }
.tb__k { font-size: 10.5px; letter-spacing: .1em; color: var(--ink-3); }
.tb__v { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb__flag {
  display: inline-flex; margin-left: 6px; padding: 1px 6px; border-radius: 4px;
  font-family: var(--f-mono); font-size: 10.5px; font-weight: 600;
  color: var(--warn); background: var(--warn-soft); vertical-align: 1px;
}

.block { margin-top: 34px; }
.block__head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 14px; }
.block__head h2 { font-family: var(--f-display); font-stretch: 110%; font-size: 21px; font-weight: 750; letter-spacing: -.02em; }
.block__head p { color: var(--ink-3); font-size: 14px; }

/* routing */
.routes { display: grid; grid-template-columns: 1fr 34px 1fr; align-items: stretch; }
.routes__join {
  align-self: center; justify-self: center;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: #fff; font-size: 16px; font-weight: 600;
  z-index: 1;
}
.route {
  position: relative;
  padding: 20px 22px 20px 26px;
  border-radius: var(--r-lg);
  border: 1px solid;
  overflow: hidden;
}
.route::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; }
.route--metal { background: var(--metal-soft); border-color: var(--metal-line); }
.route--metal::before { background: var(--metal); }
.route--wood { background: var(--wood-soft); border-color: var(--wood-line); }
.route--wood::before { background: var(--wood); }

.route__tag {
  display: inline-block;
  font-family: var(--f-display); font-stretch: 118%;
  font-size: 15px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 7px; color: #fff;
}
.route--metal .route__tag { background: var(--metal); }
.route--wood .route__tag { background: var(--wood); }
.route__scope { margin-top: 14px; font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.route__scope span { font-weight: 500; color: var(--ink-3); }
.route__assign {
  margin-top: 16px; padding-top: 16px;
  border-top: 1px dashed rgba(15,16,18,.18);
  display: flex; align-items: center; gap: 12px;
}
.route__arrow { color: var(--ink-3); }
.route__assign div { display: flex; flex-direction: column; line-height: 1.25; }
.route__k { font-size: 12.5px; color: var(--ink-3); }
.route__assign strong { font-size: 16px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: #fff;
  border: 2px solid var(--surface);
}
.route--metal .avatar { background: var(--metal); }
.route--wood .avatar { background: var(--wood); }
.avatar-pair { display: flex; }
.avatar-pair .avatar + .avatar { margin-left: -10px; background: #6E4220; }
.route__csi { position: absolute; top: 22px; right: 22px; font-size: 11.5px; color: var(--ink-3); letter-spacing: .06em; }

/* extraction */
.extract {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.extract__head {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 20px 26px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #FBFAF8, var(--surface));
}
.extract__title { display: flex; align-items: center; gap: 14px; }
.extract__badge {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--ink); color: var(--accent);
}
.extract__badge .ic { width: 22px; height: 22px; }
.extract__title h2 { font-family: var(--f-display); font-stretch: 110%; font-size: 21px; font-weight: 750; letter-spacing: -.02em; }
.extract__title p { font-size: 13.5px; color: var(--ink-3); }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.flag-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.flag-dot--warn { background: var(--warn); }
.flag-dot--risk { background: var(--bad); }

.extract__cols { display: grid; grid-template-columns: 1fr 1fr; }
.extract__col { padding: 8px 0 12px; }
.extract__col + .extract__col { border-left: 1px solid var(--line); }
.extract__col h3 {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 26px 10px;
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-2);
}
.extract__col h3 .ic { width: 17px; height: 17px; color: var(--ink-3); }

.finding {
  position: relative;
  display: grid; grid-template-columns: 158px 1fr 14px; gap: 14px; align-items: start;
  padding: 14px 26px;
  transition: background .15s;
}
.finding + .finding { border-top: 1px solid var(--line); }
.finding:hover { background: #FBFAF7; }
.finding.is-active { background: var(--accent-soft); }
.finding.is-active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.finding__k { font-size: 13.5px; font-weight: 700; color: var(--ink); padding-top: 1px; }
.finding__v { font-size: 15px; font-weight: 500; color: var(--ink-2); line-height: 1.45; }
.finding__v b { font-weight: 650; color: var(--ink); }
.cite {
  display: inline-flex; align-items: center; gap: 5px;
  margin-left: 6px; padding: 2px 8px 2px 6px;
  border-radius: 6px;
  font-family: var(--f-mono); font-size: 11.5px; font-weight: 500; font-style: italic;
  color: var(--ink-3);
  background: var(--paper);
  border: 1px solid var(--line);
  vertical-align: 1px;
  white-space: nowrap;
  transition: all .15s;
}
.cite .ic { width: 12px; height: 12px; font-style: normal; }
.cite:hover { color: var(--accent-ink); border-color: #F7B998; background: var(--accent-soft); }
.finding.is-active .cite { color: var(--accent-ink); border-color: #F7B998; background: var(--surface); }
.finding__flag { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; }
.finding__flag--warn { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.finding__flag--risk { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-soft); }

/* action bar */
.actionbar {
  position: sticky; bottom: 0; z-index: 10;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 30px -18px rgba(15,16,18,.2);
}
.actionbar__inner {
  max-width: 1240px; margin: 0 auto; padding: 16px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.actionbar__note { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-3); white-space: nowrap; }
.actionbar__note .ic { color: var(--ink-2); width: 20px; height: 20px; }
.actionbar__note strong { color: var(--ink); }
.actionbar__btns, .actionbar__done { display: flex; align-items: center; gap: 12px; }
.actionbar__btns .btn--gray { margin-right: 4px; }
.actionbar__done-txt { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14.5px; margin-right: 8px; white-space: nowrap; }
.actionbar__done .link-btn { white-space: nowrap; }
.actionbar__done-txt .ic { width: 20px; height: 20px; }
.actionbar__done-txt.is-approved { color: var(--ok-ink); }
.actionbar__done-txt.is-declined { color: var(--bad-ink); }

/* drawer */
.scrim {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(15,16,18,.32);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.scrim.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 41;
  width: 520px;
  display: flex; flex-direction: column;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: translateX(104%);
  transition: transform .38s var(--ease);
}
.drawer.is-open { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: flex-start; padding: 22px 24px 18px; border-bottom: 1px solid var(--line); }
.drawer__k { font-size: 10.5px; letter-spacing: .12em; color: var(--ink-3); }
.drawer__head h3 { margin-top: 6px; font-family: var(--f-mono); font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.drawer__page { display: inline-block; margin-top: 6px; font-size: 12px; color: var(--accent-ink); background: var(--accent-soft); padding: 2px 8px; border-radius: 5px; }
.drawer__body { flex: 1; overflow-y: auto; padding: 24px; background: var(--paper); }

.paper {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 12px 30px -16px rgba(0,0,0,.25);
  padding: 28px 30px 22px;
  aspect-ratio: 8.5 / 11;
  display: flex; flex-direction: column;
}
.paper__top { display: flex; justify-content: space-between; font-size: 9.5px; color: var(--ink-4); letter-spacing: .1em; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.paper__section { margin-top: 18px; font-family: var(--f-display); font-stretch: 105%; font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.paper__lines { margin-top: 14px; display: flex; flex-direction: column; gap: 9px; }
.paper__lines i { display: block; height: 6px; border-radius: 3px; background: #ECEAE5; }
.paper__lines i.m { width: 72%; }
.paper__lines i.s { width: 44%; }
.paper__hit {
  margin: 16px -10px 0;
  padding: 12px 14px;
  border-radius: 6px;
  background: rgba(255,90,31,.1);
  border-left: 3px solid var(--accent);
  animation: hitIn .5s var(--ease);
}
@keyframes hitIn { from { background: rgba(255,90,31,.35); } }
.paper__hit-k { display: inline-flex; align-items: center; gap: 5px; font-size: 9.5px; letter-spacing: .12em; color: var(--accent-ink); font-weight: 600; }
.paper__hit-k .ic { width: 11px; height: 11px; }
.paper__hit p { margin-top: 4px; font-family: Georgia, "Times New Roman", serif; font-size: 15px; line-height: 1.45; color: var(--ink); }
.paper__foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 9.5px; color: var(--ink-4); letter-spacing: .1em; }
.drawer__finding { margin-top: 20px; display: flex; flex-direction: column; gap: 4px; }
.drawer__finding strong { font-size: 16px; }
.drawer__foot { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-top: 1px solid var(--line); }
.drawer__nav { display: flex; align-items: center; gap: 12px; }
.drawer__nav .mono { font-size: 12.5px; color: var(--ink-3); min-width: 40px; text-align: center; }

/* modal */
.modal-wrap {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  background: rgba(15,16,18,.45);
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal-wrap.is-open { opacity: 1; pointer-events: auto; }
.modal {
  width: 560px; max-height: calc(100vh - 80px); overflow-y: auto;
  background: var(--surface); border-radius: 20px;
  box-shadow: var(--shadow-lg);
  transform: translateY(14px) scale(.98);
  transition: transform .3s var(--ease);
}
.modal-wrap.is-open .modal { transform: none; }
.modal__head { display: flex; align-items: flex-start; gap: 16px; padding: 26px 28px 8px; }
.modal__icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; flex: none; }
.modal__icon .ic { width: 22px; height: 22px; stroke-width: 2.1; }
.modal__icon--ok { background: var(--ok-soft); color: var(--ok); }
.modal__icon--bad { background: var(--bad-soft); color: var(--bad); }
.modal__icon--ink { background: var(--paper-2); color: var(--ink); }
.modal__head h3 { font-family: var(--f-display); font-stretch: 110%; font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.modal__head p { margin-top: 4px; color: var(--ink-3); font-size: 14.5px; }
.modal__body { padding: 16px 28px 8px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 28px 24px; }

.summary { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.summary li { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 11px 16px; font-size: 14px; }
.summary li + li { border-top: 1px solid var(--line); }
.summary .k { color: var(--ink-3); }
.summary .v { font-weight: 600; }
.summary .v small { display: block; font-weight: 500; color: var(--ink-3); font-size: 13px; }

.reasons { display: flex; flex-wrap: wrap; gap: 8px; }
.reason {
  height: 38px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface);
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  transition: all .15s;
}
.reason:hover { border-color: var(--ink-3); color: var(--ink); }
.reason.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.modal textarea {
  margin-top: 14px; width: 100%; min-height: 84px; resize: vertical;
  padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--paper);
  font-size: 14.5px;
}
.modal textarea:focus { outline: none; border-color: var(--ink); background: var(--surface); }
.modal__label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 10px; }

.success { text-align: center; padding: 38px 32px 10px; }
.success__icon {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto;
  display: grid; place-items: center;
  background: var(--ok); color: #fff;
  box-shadow: 0 0 0 10px var(--ok-soft);
  animation: pop .45s var(--ease);
}
.success__icon .ic { width: 34px; height: 34px; stroke-width: 2.6; }
.success h3 { margin-top: 26px; font-family: var(--f-display); font-stretch: 112%; font-size: 26px; font-weight: 800; letter-spacing: -.025em; }
.success p { margin-top: 8px; color: var(--ink-3); font-size: 15px; line-height: 1.55; }
.success .ref { display: inline-block; margin-top: 16px; font-family: var(--f-mono); font-size: 13px; padding: 6px 12px; border-radius: 8px; background: var(--paper); border: 1px solid var(--line); }

.dl-list li {
  display: grid; grid-template-columns: 40px 1fr auto 36px; align-items: center; gap: 14px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.dl-list li:last-child { border-bottom: 0; }
.dl-list .ftype { width: 34px; height: 38px; font-size: 9px; }
.dl-list strong { font-size: 14px; display: block; }
.dl-list span { font-size: 12.5px; color: var(--ink-3); }
.dl-list .fsize { text-align: right; }
.dl-path {
  margin-top: 14px; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; background: var(--paper);
  font-family: var(--f-mono); font-size: 12px; color: var(--ink-3);
}
.dl-path .ic { width: 16px; height: 16px; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 100px; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 12px;
  background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  transition: all .3s var(--ease);
}
.toast.is-in { transform: translate(-50%, 0); opacity: 1; }
.toast .ic { width: 18px; height: 18px; color: #4FD08A; }

/* =========================================================
   LOGIN
   ========================================================= */
.login { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.login__art {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 44px 56px 40px;
  color: var(--night-ink);
  background:
    radial-gradient(700px 480px at 85% 95%, rgba(255, 90, 31, .22), transparent 65%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    var(--night);
  background-size: auto, 56px 56px, 56px 56px, auto;
}
.login__art::after {
  content: ""; position: absolute; right: -120px; bottom: -120px; width: 520px; height: 520px;
  border: 1.5px solid rgba(255,255,255,.08); border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255,255,255,.02), 0 0 0 140px rgba(255,255,255,.015);
}
.login__pitch { margin-top: auto; position: relative; z-index: 1; }
.login__pitch h1 {
  font-family: var(--f-display); font-stretch: 120%; font-weight: 800;
  font-size: 92px; line-height: .88; letter-spacing: -.045em;
}
.login__pitch p { margin-top: 22px; font-size: 18px; line-height: 1.55; color: var(--night-ink-2); max-width: 440px; }
.login__steps { margin-top: 44px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; position: relative; z-index: 1; }
.login__steps li { padding-top: 14px; border-top: 1.5px solid var(--night-line); font-size: 14px; font-weight: 500; color: var(--night-ink); line-height: 1.4; }
.login__steps li:last-child { border-top-color: var(--accent); }
.login__steps .mono { display: block; font-size: 11px; color: var(--accent); margin-bottom: 6px; }
.login__foot { margin-top: 44px; font-size: 11px; letter-spacing: .14em; color: var(--night-ink-3); position: relative; z-index: 1; }

.login__panel { display: grid; place-items: center; padding: 48px; background: var(--paper); }
.login__form { width: 100%; max-width: 420px; }
.login__form h2 { font-family: var(--f-display); font-stretch: 115%; font-size: 40px; font-weight: 800; letter-spacing: -.035em; line-height: 1; }
.login__sub { margin: 10px 0 30px; color: var(--ink-3); font-size: 15px; }
.login__form .field input { background: var(--surface); height: 52px; }
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 48px; }
.pass-toggle { position: absolute; right: 6px; top: 6px; width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-3); }
.pass-toggle:hover { background: var(--paper); color: var(--ink); }
.pass-toggle.is-on { color: var(--accent-ink); }
.login__row { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 24px; }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); cursor: pointer; user-select: none; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check span { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line-2); background: var(--surface); display: grid; place-items: center; transition: all .15s; }
.check input:checked + span { background: var(--ink); border-color: var(--ink); }
.check input:checked + span::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.btn--block { width: 100%; }
.login__or { display: flex; align-items: center; gap: 14px; margin: 18px 0; color: var(--ink-4); font-size: 13px; }
.login__or::before, .login__or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.ms-logo { display: grid; grid-template-columns: 8px 8px; gap: 2px; }
.ms-logo i { width: 8px; height: 8px; display: block; }
.ms-logo i:nth-child(1) { background: #F25022; } .ms-logo i:nth-child(2) { background: #7FBA00; }
.ms-logo i:nth-child(3) { background: #00A4EF; } .ms-logo i:nth-child(4) { background: #FFB900; }
.login__public {
  margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 14px; color: var(--ink-3); text-decoration: none;
}
.login__public strong { color: var(--ink); }
.login__public .ic { width: 15px; height: 15px; color: var(--accent); transition: transform .2s var(--ease); }
.login__public:hover .ic { transform: translateX(3px); }
.login__form .btn.is-loading > * { opacity: 0; }

/* =========================================================
   APP SHELL
   ========================================================= */
.side { overflow-y: auto; }
.side__item { text-decoration: none; color: inherit; }
.side__label { display: block; margin: 18px 12px 6px; font-size: 10.5px; letter-spacing: .14em; color: var(--night-ink-3); }
.side__user {
  margin-top: 10px;
  display: grid; grid-template-columns: 36px 1fr 32px; align-items: center; gap: 10px;
  padding: 10px 8px 10px 10px;
  border-top: 1px solid var(--night-line);
}
.side__user div { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.side__user strong { color: var(--night-ink); font-size: 13.5px; }
.side__user span:not(.avatar) { font-size: 12px; color: var(--night-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side__icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--night-ink-3); }
.side__icon:hover { background: var(--night-2); color: var(--night-ink); }
.side__icon .ic { width: 17px; height: 17px; }
.side__restart { margin-top: 4px; }
.avatar--ink { background: var(--night-3); color: var(--night-ink); border-color: transparent; width: 36px; height: 36px; font-size: 12.5px; }
.apptop .avatar--ink { background: var(--ink); color: #fff; }

.apptop {
  position: sticky; top: 0; z-index: 30;
  height: 68px; padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: rgba(243, 242, 238, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.search { position: relative; width: 420px; }
.search > .ic { position: absolute; left: 14px; top: 12px; width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; }
.search input {
  width: 100%; height: 42px; padding: 0 44px 0 42px;
  border-radius: 11px; border: 1px solid var(--line); background: var(--surface);
  font-size: 14.5px;
  transition: border-color .15s, box-shadow .15s;
}
.search input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(15,16,18,.06); }
.search kbd { position: absolute; right: 10px; top: 10px; font-size: 11px; padding: 2px 7px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--ink-3); background: var(--paper); }
.search__results {
  position: absolute; left: 0; right: 0; top: 50px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 6px; max-height: 380px; overflow-y: auto;
}
.sr { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 9px; cursor: pointer; }
.sr:hover, .sr.is-on { background: var(--paper); }
.sr__ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-2); }
.sr__ic .ic { width: 16px; height: 16px; }
.sr strong { display: block; font-size: 14px; }
.sr span { font-size: 12.5px; color: var(--ink-3); }
.sr__empty { padding: 16px; font-size: 14px; color: var(--ink-3); text-align: center; }

.apptop__right { display: flex; align-items: center; gap: 14px; }
.apptop__link { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: 9px; }
.apptop__link:hover { background: var(--surface); color: var(--ink); }
.apptop__link .ic { width: 15px; height: 15px; }
.bell { position: relative; }
.bell .icon-btn { width: 40px; height: 40px; position: relative; }
.bell__dot { position: absolute; top: 8px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }
.bell__menu {
  position: absolute; right: 0; top: 50px; width: 380px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.bell__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.bell__head strong { font-size: 14.5px; }
.bell__item { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 13px 16px; cursor: pointer; border-bottom: 1px solid var(--line); }
.bell__item:last-child { border-bottom: 0; }
.bell__item:hover { background: var(--paper); }
.bell__item .sr__ic { background: var(--accent-soft); color: var(--accent-ink); }
.bell__item.is-read .sr__ic { background: var(--paper-2); color: var(--ink-3); }
.bell__item strong { font-size: 14px; display: block; line-height: 1.35; }
.bell__item span { font-size: 12.5px; color: var(--ink-3); }

.page { flex: 1; display: flex; flex-direction: column; }
.page.is-enter { animation: viewIn .4s var(--ease); }
.pg { width: 100%; max-width: 1280px; margin: 0 auto; padding: 32px 40px 56px; }
.pg-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.pg-head h1 { font-family: var(--f-display); font-stretch: 112%; font-weight: 800; font-size: 36px; letter-spacing: -.035em; line-height: 1.05; }
.pg-head p { margin-top: 6px; color: var(--ink-3); font-size: 15px; }

/* division tags (small) */
.dtag {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 9px; border-radius: 6px;
  font-family: var(--f-display); font-stretch: 115%; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  white-space: nowrap;
}
.dtag--metal { color: var(--metal); background: var(--metal-soft); border: 1px solid var(--metal-line); }
.dtag--wood { color: var(--wood); background: var(--wood-soft); border: 1px solid var(--wood-line); }
.dtags { display: flex; gap: 6px; flex-wrap: wrap; }

.av-stack { display: flex; }
.av-stack .avatar { width: 30px; height: 30px; font-size: 11px; border-width: 2px; }
.av-stack .avatar + .avatar { margin-left: -8px; }
.avatar--metal { background: var(--metal); }
.avatar--wood { background: var(--wood); }
.avatar--wood2 { background: #6E4220; }

/* chips / filters */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  height: 36px; padding: 0 14px; border-radius: 10px;
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-2); background: var(--surface);
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  transition: all .15s;
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .n { font-family: var(--f-mono); font-size: 11.5px; opacity: .65; }

/* tables */
.tbl { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.tbl__row {
  display: grid; grid-template-columns: var(--cols); align-items: center; gap: 18px;
  padding: 15px 22px;
  border-top: 1px solid var(--line);
}
.tbl__row--head { border-top: 0; padding-top: 12px; padding-bottom: 12px; background: #FBFAF8; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .1em; color: var(--ink-3); text-transform: uppercase; }
.tbl__row[data-go] { cursor: pointer; transition: background .12s; }
.tbl__row[data-go]:hover { background: #FBFAF7; }
.tbl__row[data-go]:hover .tbl__chev { color: var(--ink); transform: translateX(3px); }
.tbl__chev { color: var(--ink-4); transition: all .2s var(--ease); justify-self: end; }
.tbl__proj { display: flex; flex-direction: column; min-width: 0; }
.tbl__proj strong { font-size: 15px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl__proj span { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl__new { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 2px; box-shadow: 0 0 0 3px var(--accent-soft); }
.tbl__muted { font-size: 13.5px; color: var(--ink-3); }
.tbl__date { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tbl__date small { display: block; font-weight: 500; font-size: 12.5px; color: var(--ink-3); }
.tbl__foot { padding: 13px 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); background: #FBFAF8; }
.tbl__empty { padding: 48px 22px; text-align: center; color: var(--ink-3); border-top: 1px solid var(--line); }
.tbl__empty strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.flags { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.flags i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.flags .w { background: var(--warn); } .flags .r { background: var(--bad); }
.ref { font-family: var(--f-mono); font-size: 12.5px; font-weight: 600; padding: 4px 8px; border-radius: 6px; background: var(--ok-soft); color: var(--ok-ink); white-space: nowrap; }
.reason-pill { display: inline-flex; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 6px; background: var(--bad-soft); color: var(--bad-ink); white-space: nowrap; }

/* =========================================================
   DASHBOARD
   ========================================================= */
.spot {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 32px;
  padding: 28px 30px;
  border-radius: var(--r-xl);
  color: var(--night-ink);
  background:
    radial-gradient(520px 260px at 100% 0%, rgba(255,90,31,.32), transparent 70%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    var(--night);
  background-size: auto, 40px 40px, 40px 40px, auto;
  box-shadow: 0 24px 50px -28px rgba(15,16,18,.6);
  margin-bottom: 22px;
}
.spot__live { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 999px; background: rgba(255,90,31,.16); color: #FF9C73; font-size: 12.5px; font-weight: 600; border: 1px solid rgba(255,90,31,.35); }
.spot__live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; }
.spot h2 { margin-top: 14px; font-family: var(--f-display); font-stretch: 112%; font-weight: 800; font-size: 32px; letter-spacing: -.03em; line-height: 1.1; }
.spot h2 span { color: var(--accent); }
.spot__meta { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: var(--night-ink-2); }
.spot__meta b { color: var(--night-ink); font-weight: 600; }
.spot .dtags { margin-top: 16px; }
.spot .dtag--metal { background: rgba(69,105,140,.22); border-color: #2F4A63; color: #A9C6E3; }
.spot .dtag--wood { background: rgba(152,88,42,.22); border-color: #5D3F28; color: #E3BE98; }
.spot__side { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.spot__stat { text-align: right; }
.spot__stat strong { display: block; font-family: var(--f-display); font-stretch: 118%; font-size: 44px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.spot__stat span { font-size: 12.5px; color: var(--night-ink-2); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; position: relative; }
.kpi__top { display: flex; align-items: center; justify-content: space-between; }
.kpi__k { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.kpi__ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--paper); color: var(--ink-2); }
.kpi__ic .ic { width: 16px; height: 16px; }
.kpi__v { font-family: var(--f-display); font-stretch: 115%; font-size: 38px; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi__s { font-size: 12.5px; color: var(--ink-3); }
.kpi__s b { color: var(--ok-ink); font-weight: 600; }
.kpi--accent .kpi__ic { background: var(--accent-soft); color: var(--accent-ink); }
.kpi--accent .kpi__v { color: var(--accent-ink); }

.dash { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.dash__col { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.panel { overflow: hidden; }
.panel__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 14px; }
.panel__head h3 { font-family: var(--f-display); font-stretch: 108%; font-size: 17px; font-weight: 750; letter-spacing: -.015em; }
.panel__head a, .panel__head .link-btn { font-size: 13px; }
.panel__head a { color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.panel__head a:hover { color: var(--accent); }

.qrow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 18px; align-items: center; gap: 16px; padding: 14px 22px; border-top: 1px solid var(--line); cursor: pointer; transition: background .12s; }
.qrow:hover { background: #FBFAF7; }
.qrow:hover .tbl__chev { color: var(--ink); transform: translateX(3px); }

.chart { padding: 6px 22px 18px; }
.chart__bars { height: 180px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 14px; align-items: end; border-bottom: 1px solid var(--line-2); position: relative; }
.chart__bars::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(180deg, transparent 0 44px, var(--line) 44px 45px); pointer-events: none; }
.bar { position: relative; display: flex; flex-direction: column-reverse; z-index: 1; }
.bar i:last-child { border-radius: 6px 6px 0 0; }
.bar i { display: block; transform-origin: bottom; animation: grow .7s var(--ease) both; }
.bar .a { background: var(--ok); }
.bar .d { background: #CFCBC1; }
.bar .p { background: var(--accent); }
@keyframes grow { from { transform: scaleY(0); } }
.bar__n { position: absolute; top: -20px; left: 0; right: 0; text-align: center; font-family: var(--f-mono); font-size: 11px; color: var(--ink-3); }
.chart__x { display: grid; grid-template-columns: repeat(8, 1fr); gap: 14px; margin-top: 8px; }
.chart__x span { text-align: center; font-family: var(--f-mono); font-size: 10.5px; color: var(--ink-3); }
.legend2 { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-3); }
.legend2 span { display: inline-flex; align-items: center; gap: 6px; }
.legend2 i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.dl { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 12px 22px; border-top: 1px solid var(--line); cursor: pointer; }
.dl:hover { background: #FBFAF7; }
.dl__date { width: 52px; height: 54px; border-radius: 10px; border: 1.5px solid var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.dl__date b { font-family: var(--f-display); font-stretch: 115%; font-size: 21px; font-weight: 800; }
.dl__date span { font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; margin-top: 3px; color: var(--accent-ink); }
.dl strong { font-size: 14.5px; display: block; }
.dl small { font-size: 12.5px; color: var(--ink-3); }

.act { padding: 4px 22px 14px; }
.act li { position: relative; display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding: 10px 0; }
.act li::before { content: ""; position: absolute; left: 12px; top: 36px; bottom: -8px; width: 1px; background: var(--line-2); }
.act li:last-child::before { display: none; }
.act__dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-2); }
.act__dot .ic { width: 13px; height: 13px; stroke-width: 2.2; }
.act__dot--ai { background: var(--ink); color: var(--accent); }
.act__dot--ok { background: var(--ok-soft); color: var(--ok); }
.act__dot--bad { background: var(--bad-soft); color: var(--bad); }
.act p { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.act p b { color: var(--ink); font-weight: 600; }
.act time { display: block; font-size: 12px; color: var(--ink-4); margin-top: 2px; }

/* =========================================================
   FILES + ROUTING
   ========================================================= */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.select {
  height: 38px; padding: 0 36px 0 14px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface);
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236D7079' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
.select:focus { outline: none; border-color: var(--ink); }
.minisearch { position: relative; }
.minisearch .ic { position: absolute; left: 12px; top: 10px; width: 17px; height: 17px; color: var(--ink-3); }
.minisearch input { height: 38px; width: 260px; padding: 0 12px 0 38px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); font-size: 14px; }
.minisearch input:focus { outline: none; border-color: var(--ink); }
.tbl .ftype { width: 34px; height: 38px; font-size: 9px; }
.tbl__file { display: flex; align-items: center; gap: 14px; min-width: 0; }
.tbl__file div { min-width: 0; }

.rules { display: grid; gap: 14px; }
.rule {
  display: grid; grid-template-columns: 6px 1.2fr 1fr 1fr auto; align-items: center; gap: 22px;
  padding: 20px 24px 20px 0; overflow: hidden;
}
.rule__bar { align-self: stretch; margin: -20px 0; }
.rule--metal .rule__bar { background: var(--metal); }
.rule--wood .rule__bar { background: var(--wood); }
.rule--none .rule__bar { background: var(--line-2); }
.rule h3 { font-family: var(--f-display); font-stretch: 115%; font-size: 16px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.rule p { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.rule__k { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .1em; color: var(--ink-3); display: block; margin-bottom: 4px; }
.rule__v { font-size: 14.5px; font-weight: 600; }
.rule__v.is-muted { color: var(--ink-3); font-weight: 500; }
.rule__who { display: flex; align-items: center; gap: 10px; }
.toggle { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle span { width: 40px; height: 24px; border-radius: 12px; background: var(--line-2); position: relative; transition: background .2s; }
.toggle span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.toggle input:checked + span { background: var(--ok); }
.toggle input:checked + span::after { transform: translateX(16px); }
.toggle input:disabled + span { opacity: .55; }
.erp-card { margin-top: 28px; padding: 22px 24px; display: grid; grid-template-columns: 48px 1fr auto; gap: 18px; align-items: center; }
.erp-card__ic { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; background: var(--ink); color: #4FD08A; }
.erp-card__ic .ic { width: 22px; height: 22px; }
.erp-card strong { font-size: 16px; }
.erp-card p { font-size: 13.5px; color: var(--ink-3); margin-top: 2px; }
.section-title { font-family: var(--f-display); font-stretch: 110%; font-size: 19px; font-weight: 750; letter-spacing: -.015em; margin: 30px 0 14px; }

/* bid page inside the app */
.bid-back { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .1em; color: var(--ink-3); text-decoration: none; }
.bid-back:hover { color: var(--ink); }
.bid-back .ic { width: 15px; height: 15px; }
.decided { margin-top: 22px; display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 14px; font-size: 14.5px; font-weight: 500; }
.decided .ic { width: 22px; height: 22px; }
.decided--ok { background: var(--ok-soft); color: var(--ok-ink); border: 1px solid #BFE3CE; }
.decided--bad { background: var(--bad-soft); color: var(--bad-ink); border: 1px solid #F2CBC6; }
.decided b { font-weight: 700; }
.routes--single { grid-template-columns: minmax(0, 620px); }
.btn--gray.is-loading::after, .btn--ghost.is-loading::after { border-color: rgba(15,16,18,.15); border-top-color: var(--ink); }

/* =========================================================
   v3 — FULL FLOW: website, request form, received, statuses,
   board, team, settings, AI summary
   ========================================================= */
:root {
  --awn: #1F7A72; --awn-soft: #E3F2F0; --awn-line: #BFE0DB;
  --sign: #9A3D74; --sign-soft: #F7E8F1; --sign-line: #EBC9DD;

  /* pipeline status colours */
  --s-new: #FF5A1F;       --s-new-soft: #FFF0E8;       --s-new-ink: #C83E0B;
  --s-review: #3E63DD;    --s-review-soft: #ECF0FD;    --s-review-ink: #2C4BB8;
  --s-estimating: #C07B12;--s-estimating-soft: #FBF1DF;--s-estimating-ink: #8E5A0F;
  --s-sent: #7C4DCC;      --s-sent-soft: #F1ECFB;      --s-sent-ink: #5E36A8;
  --s-won: #148A4C;       --s-won-soft: #E5F3EB;       --s-won-ink: #0E6B3A;
  --s-lost: #D0392C;      --s-lost-soft: #FBEAE7;      --s-lost-ink: #A92A1F;
  --s-nobid: #7A7D85;     --s-nobid-soft: #ECEAE4;     --s-nobid-ink: #3A3D44;
}

/* ---------- small shared additions ---------- */
.btn--sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; gap: 8px; }
.btn--sm .ic { width: 16px; height: 16px; }
.btn--darkghost { height: 38px; padding: 0 14px; font-size: 13.5px; color: var(--night-ink-2); border: 1px solid var(--night-line); border-radius: 10px; }
.btn--darkghost:hover { color: #fff; background: var(--night-3); }
.btn--ink.is-loading::after, .btn--approve.is-loading::after, .btn--danger.is-loading::after, .btn--accent.is-loading::after { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
button[disabled] { cursor: not-allowed; }

.avatar--sm { width: 30px; height: 30px; font-size: 11px; border-width: 2px; }
.avatar--xs { width: 26px; height: 26px; font-size: 10px; border-width: 0; }
.avatar--ink { background: var(--ink); color: #fff; }
.side .avatar--ink { background: var(--night-3); color: var(--night-ink); }
.avatar--gray { background: #8A8D94; }
.avatar--awn { background: var(--awn); }
.avatar--sign { background: var(--sign); }
.avatar--empty { background: var(--surface); color: var(--ink-4); border: 1.5px dashed var(--line-2); }
.avatar--empty .ic { width: 14px; height: 14px; }
.side__user .avatar { width: 36px; height: 36px; font-size: 12.5px; border: 0; }
.apptop > .apptop__right > .avatar { width: 36px; height: 36px; font-size: 12.5px; border: 0; }

.dtag--awn { color: var(--awn); background: var(--awn-soft); border: 1px solid var(--awn-line); }
.dtag--sign { color: var(--sign); background: var(--sign-soft); border: 1px solid var(--sign-line); }
.route--awn { background: var(--awn-soft); border-color: var(--awn-line); }
.route--awn::before, .route--awn .route__tag, .route--awn .avatar { background: var(--awn); }
.route--sign { background: var(--sign-soft); border-color: var(--sign-line); }
.route--sign::before, .route--sign .route__tag, .route--sign .avatar { background: var(--sign); }
.route .avatar--empty { background: var(--surface); color: var(--ink-3); }

/* status dot / pill / bar fills */
.sdot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }
.spill { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.spill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.spill--new { color: var(--s-new-ink); background: var(--s-new-soft); }
.spill--review { color: var(--s-review-ink); background: var(--s-review-soft); }
.spill--estimating { color: var(--s-estimating-ink); background: var(--s-estimating-soft); }
.spill--sent { color: var(--s-sent-ink); background: var(--s-sent-soft); }
.spill--won { color: var(--s-won-ink); background: var(--s-won-soft); }
.spill--lost { color: var(--s-lost-ink); background: var(--s-lost-soft); }
.spill--nobid { color: var(--s-nobid-ink); background: var(--s-nobid-soft); }
.sdot--new, .sbg--new { background: var(--s-new); }
.sdot--review, .sbg--review { background: var(--s-review); }
.sdot--estimating, .sbg--estimating { background: var(--s-estimating); }
.sdot--sent, .sbg--sent { background: var(--s-sent); }
.sdot--won, .sbg--won { background: var(--s-won); }
.sdot--lost, .sbg--lost { background: var(--s-lost); }
.sdot--nobid, .sbg--nobid { background: var(--s-nobid); }

.due { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; margin-left: 6px; border-radius: 5px; font-family: var(--f-mono); font-size: 10.5px; font-weight: 600; color: var(--ink-3); background: var(--paper); border: 1px solid var(--line); white-space: nowrap; vertical-align: 1px; }
.due--soon { color: var(--s-estimating-ink); background: var(--s-estimating-soft); border-color: #F0D9AE; }
.due--late { color: var(--bad-ink); background: var(--bad-soft); border-color: #F2CBC6; }

.aichip { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px 0 8px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; }
.aichip .ic { width: 14px; height: 14px; color: var(--accent); animation: twinkle 1.4s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .4; transform: scale(.85); } }
.aichip__bar { width: 54px; height: 4px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; }
.aichip__bar i { display: block; height: 100%; background: var(--accent); transition: width .25s linear; }
.aichip b { font-family: var(--f-mono); font-size: 11px; font-weight: 600; min-width: 30px; text-align: right; }

.banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 18px; border-radius: 12px; background: var(--paper-2); border: 1px solid var(--line-2); color: var(--ink-2); font-size: 14px; }
.banner .ic { color: var(--ink-3); }
.section-title { margin-top: 34px; }
.select--block { width: 100%; height: 44px; }
.modal__text { font-size: 14.5px; color: var(--ink-2); line-height: 1.55; margin-bottom: 14px; display: flex; gap: 8px; align-items: flex-start; }
.modal__text .ic { margin-top: 2px; color: var(--ink-3); }
.empty { padding: 44px 28px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.empty h3 { font-family: var(--f-display); font-stretch: 110%; font-size: 20px; font-weight: 800; letter-spacing: -.015em; margin-top: 6px; }
.empty p { color: var(--ink-3); max-width: 440px; font-size: 14.5px; margin-bottom: 8px; }

/* ---------- popover menu ---------- */
.pop {
  position: fixed; z-index: 70; max-width: 360px; max-height: 70vh; overflow-y: auto;
  padding: 6px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  animation: popIn .16s var(--ease);
}
@keyframes popIn { from { opacity: 0; transform: translateY(-4px); } }
.pop__head { padding: 8px 10px 6px; font-size: 12px; font-weight: 600; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop__item { width: 100%; display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; text-align: left; }
.pop__item:hover { background: var(--paper); }
.pop__item.is-on { background: var(--paper); }
.pop__item > .ic { width: 17px; height: 17px; color: var(--ink-3); }
.pop__item.is-danger, .pop__item.is-danger > .ic { color: var(--bad); }
.pop__item.is-disabled { opacity: .45; cursor: not-allowed; }
.pop__item .sdot { margin: 0 3px; }
.pop__main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.pop__main strong { font-size: 14px; font-weight: 600; }
.pop__main small { font-size: 12px; color: var(--ink-3); }
.pop__tag { font-size: 10.5px; font-weight: 700; padding: 3px 7px; border-radius: 5px; background: var(--ink); color: var(--accent); white-space: nowrap; }
.pop__check { color: var(--ok) !important; }
.pop__sep { height: 1px; background: var(--line); margin: 5px 4px; }
.pop__card { padding: 10px 10px 8px; display: flex; flex-direction: column; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.pop__card strong { font-size: 15px; }
.pop__card span { font-size: 12.5px; color: var(--ink-3); }

/* =========================================================
   PUBLIC 0 — WEBSITE STAND-IN
   ========================================================= */
.proto-bar { background: var(--ink); color: var(--night-ink-2); font-size: 13px; text-align: center; padding: 9px 20px; }
.proto-bar b { color: var(--accent); }
.site-top { height: 84px; padding: 0 56px; display: flex; align-items: center; gap: 40px; background: var(--surface); border-bottom: 1px solid var(--line); }
.site-nav { display: flex; gap: 28px; margin-left: auto; }
.site-nav a { font-size: 14.5px; font-weight: 600; color: var(--ink-2); cursor: default; }
.site-hero { max-width: 1400px; margin: 0 auto; padding: 72px 56px 64px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.display--xl { font-size: 70px; line-height: .95; }
.site-hero .lede { font-size: 18px; max-width: 520px; margin-top: 22px; }
.site-hero__cta { margin-top: 32px; display: flex; align-items: center; gap: 26px; }
.site-divs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.site-div { padding: 22px; border-radius: var(--r-lg); border: 1px solid; min-height: 170px; display: flex; flex-direction: column; gap: 6px; }
.site-div .mono { font-size: 11px; letter-spacing: .1em; font-weight: 600; }
.site-div strong { font-family: var(--f-display); font-stretch: 112%; font-size: 21px; font-weight: 800; letter-spacing: -.02em; margin-top: auto; }
.site-div p { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.site-div--metal { background: var(--metal-soft); border-color: var(--metal-line); } .site-div--metal .mono { color: var(--metal); }
.site-div--wood { background: var(--wood-soft); border-color: var(--wood-line); } .site-div--wood .mono { color: var(--wood); }
.site-div--awn { background: var(--awn-soft); border-color: var(--awn-line); } .site-div--awn .mono { color: var(--awn); }
.site-div--sign { background: var(--sign-soft); border-color: var(--sign-line); } .site-div--sign .mono { color: var(--sign); }
.site-foot { max-width: 1400px; margin: 0 auto; padding: 24px 56px 40px; display: flex; gap: 28px; font-size: 13.5px; color: var(--ink-3); border-top: 1px solid var(--line); }
.site-foot span { margin-right: auto; }
.site-foot a { color: var(--ink-2); font-weight: 600; text-decoration: none; }
.site-foot a:hover { color: var(--accent-ink); }

/* =========================================================
   PUBLIC 1 — REQUEST FORM ADDITIONS
   ========================================================= */
.topbar__back { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.topbar__back .ic { width: 16px; height: 16px; }
.topbar__back:hover { color: var(--ink); }
.field label i { font-style: normal; color: var(--accent-ink); }
.field textarea {
  width: 100%; padding: 12px 14px; resize: vertical; min-height: 84px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; transition: border-color .15s, background .15s;
}
.field textarea:focus { outline: none; background: var(--surface); border-color: var(--ink); box-shadow: 0 0 0 4px rgba(15,16,18,.06); }
.form__sep { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 16px; padding-top: 22px; border-top: 1px solid var(--line); }
.form__sep h2 { font-family: var(--f-display); font-stretch: 110%; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.form__opt { font-size: 12.5px; color: var(--ink-3); }
.scope-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pick { position: relative; cursor: pointer; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13.5px; font-weight: 600; color: var(--ink-2); transition: all .15s; }
.pick span::before { content: ""; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--line-2); transition: all .15s; }
.pick:hover span { border-color: var(--ink-3); color: var(--ink); }
.pick input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.pick input:checked + span::before { border-color: var(--accent); background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 9.5 17 19 7'/%3E%3C/svg%3E") center / 10px no-repeat; }
.pick input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-glow); }
.intake { align-items: start; }
.intake__right { position: sticky; top: 104px; }
.intake__right .dropzone { min-height: 440px; }
.intake__right .dropzone.has-files { min-height: 230px; }
.intake-closed { min-height: calc(100vh - 80px); display: grid; place-items: center; padding: 40px; }
.closed-card { max-width: 560px; padding: 40px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.closed-card h1 { font-family: var(--f-display); font-stretch: 112%; font-size: 30px; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.closed-card p { color: var(--ink-2); font-size: 15.5px; line-height: 1.6; margin-bottom: 8px; }

/* =========================================================
   PUBLIC 3 — RECEIVED
   ========================================================= */
.received { max-width: 720px; margin: 0 auto; padding: 48px 24px 64px; display: flex; flex-direction: column; gap: 16px; }
.received__card { padding: 40px 44px 34px; }
.received__card .success__icon { margin: 0; }
.received__card h1 { margin-top: 24px; font-family: var(--f-display); font-stretch: 115%; font-size: 42px; font-weight: 800; letter-spacing: -.035em; line-height: 1; }
.received__lede { margin-top: 12px; font-size: 16.5px; color: var(--ink-2); line-height: 1.6; }
.received__lede b { color: var(--ink); }
.received__ref { margin: 22px 0 18px; display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 18px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.received__ref span { font-size: 13.5px; color: var(--ink-3); }
.received__ref strong { font-size: 18px; letter-spacing: .04em; margin-right: auto; }
.received__card h2 { margin-top: 28px; font-family: var(--f-display); font-stretch: 110%; font-size: 19px; font-weight: 750; letter-spacing: -.015em; }
.next-steps--v { grid-template-columns: 1fr; gap: 0; margin-top: 12px; }
.next-steps--v li { flex-direction: row; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.next-steps--v li:first-child { border-top: 2px solid var(--ink); }
.next-steps--v .mono { padding-top: 2px; }
.next-steps--v strong { font-size: 15px; }
.next-steps--v p { font-size: 14px; }
.received__btns { margin-top: 26px; display: flex; gap: 10px; justify-content: flex-end; }
.demo-jump { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-radius: 14px; border: 1.5px dashed var(--line-2); color: var(--ink-2); text-decoration: none; font-size: 14px; transition: all .15s; }
.demo-jump > .ic:first-child { color: var(--accent); }
.demo-jump span { flex: 1; }
.demo-jump:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }

/* =========================================================
   LOGIN ADDITIONS
   ========================================================= */
.login__alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 18px; border-radius: 12px; background: var(--bad-soft); border: 1px solid #F2CBC6; color: var(--bad-ink); font-size: 14px; line-height: 1.45; }
.login__alert .ic { margin-top: 1px; }
.demo-accts { margin-top: 22px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.demo-accts > span { display: block; font-size: 12.5px; color: var(--ink-3); margin-bottom: 8px; }
.demo-acct { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; font-size: 13.5px; text-align: left; }
.demo-acct:hover { background: var(--paper); }
.demo-acct span:not(.avatar) { flex: 1; font-weight: 600; }
.demo-acct em { font-style: normal; font-size: 12px; color: var(--ink-3); }

/* =========================================================
   APP — page frame
   ========================================================= */
.pg--wide { max-width: none; }
.pg--narrow { max-width: 980px; }
.pg-head__btns { display: flex; gap: 10px; flex: none; }
.side__user span:not(.avatar) { font-size: 11.5px; }

/* dashboard */
.spot { grid-template-columns: minmax(0, 1fr) auto; }
.spot h2 { margin-top: 0; }
.spot__meta { align-items: center; margin-top: 12px; }
.spot__live { height: 26px; }
.spot__live--done { background: rgba(79,208,138,.14); color: #7FE0AA; border-color: rgba(79,208,138,.35); }
.spot__live--done .ic { width: 14px; height: 14px; }
.spot__sum { margin-top: 14px; font-size: 15px; line-height: 1.6; color: var(--night-ink-2); max-width: 760px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.spot__prog { margin-top: 16px; }
.spot .aichip { background: rgba(255,255,255,.08); border: 1px solid var(--night-line); height: 30px; padding: 0 12px; }
.spot .dtag--awn { background: rgba(31,122,114,.22); border-color: #23544F; color: #8FD3CA; }
.spot .dtag--sign { background: rgba(154,61,116,.22); border-color: #5E2E4A; color: #E6A8CB; }

.pipe { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.pipe__tile { position: relative; text-align: left; padding: 14px 14px 13px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 2px; overflow: hidden; transition: transform .15s var(--ease), box-shadow .15s, border-color .15s; }
.pipe__tile::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; }
.pipe__tile--new::after { background: var(--s-new); } .pipe__tile--review::after { background: var(--s-review); } .pipe__tile--estimating::after { background: var(--s-estimating); }
.pipe__tile--sent::after { background: var(--s-sent); } .pipe__tile--won::after { background: var(--s-won); } .pipe__tile--lost::after { background: var(--s-lost); } .pipe__tile--nobid::after { background: var(--s-nobid); }
.pipe__tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.pipe__top { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); white-space: nowrap; }
.pipe__tile strong { font-family: var(--f-display); font-stretch: 115%; font-size: 32px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.pipe__tile small { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.qrow { grid-template-columns: minmax(0, 1fr) auto auto 18px; }
.dl { grid-template-columns: 52px minmax(0, 1fr) auto auto; }
.dl .due { margin-left: 0; }
.load { padding: 0 14px 14px; }
.load__row { width: 100%; display: grid; grid-template-columns: 30px 130px 1fr; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; text-align: left; }
.load__row:hover { background: #FBFAF7; }
.load__name { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.load__name strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.load__name small { font-size: 12px; color: var(--ink-3); }
.load__bar { height: 10px; border-radius: 5px; background: var(--paper-2); display: flex; overflow: hidden; gap: 2px; }
.load__bar i { display: block; height: 100%; border-radius: 3px; animation: growX .6s var(--ease) both; transform-origin: left; }
@keyframes growX { from { transform: scaleX(0); } }
.load__legend { padding: 10px 8px 0; }
.act li { cursor: pointer; border-radius: 8px; }
.act li:hover p { color: var(--ink); }
.act li .avatar { width: 26px; height: 26px; font-size: 10px; }
.act__bid { font-weight: 600; color: var(--ink); }

/* tabs + segmented */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-2); margin-bottom: 18px; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: -1px; font-size: 14px; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; }
.tab:hover { color: var(--ink); }
.tab.is-on { color: var(--ink); border-bottom-color: var(--accent); }
.tab .n { font-family: var(--f-mono); font-size: 11px; padding: 1px 7px; border-radius: 10px; background: var(--paper-2); color: var(--ink-2); }
.tab.is-on .n { background: var(--accent); color: #fff; }
.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--paper-2); border: 1px solid var(--line); flex: none; }
.seg__btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--ink-3); }
.seg__btn .ic { width: 16px; height: 16px; }
.seg__btn:hover { color: var(--ink); }
.seg__btn.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.chips--status { margin-bottom: 14px; }
.toolbar .link-btn { align-self: center; margin-left: 6px; }

/* ---------- new submissions ---------- */
.subs { display: flex; flex-direction: column; gap: 12px; }
.sub { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 24px; padding: 20px 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.sub:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.sub.is-reading { background: linear-gradient(90deg, #FFF8F4, var(--surface) 40%); border-color: #F7D3C1; }
.sub__title { display: flex; align-items: center; gap: 12px; }
.sub__title h3 { font-family: var(--f-display); font-stretch: 108%; font-size: 19px; font-weight: 800; letter-spacing: -.015em; }
.sub__meta { margin-top: 3px; font-size: 13px; color: var(--ink-3); }
.sub__meta .mono { font-size: 12px; }
.sub__sum { margin-top: 12px; display: flex; gap: 10px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.sub__sum .ic { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--accent); }
.sub__sum span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sub__reading { margin-top: 12px; display: flex; align-items: center; gap: 14px; font-size: 13.5px; }
.sub__foot { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.sub__fact { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.sub__fact .ic { width: 15px; height: 15px; color: var(--ink-3); }
.sub__side { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding-left: 22px; border-left: 1px solid var(--line); justify-content: center; }
.sub__k { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.sub__who { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-bottom: 6px; }
.sub__none { font-size: 13px; color: var(--ink-3); margin-bottom: 6px; line-height: 1.4; }
.sub__none a { color: var(--accent-ink); font-weight: 600; }

/* ---------- table extras ---------- */
.th { display: inline-flex; align-items: center; gap: 4px; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; text-align: left; }
.th:hover, .th.is-on { color: var(--ink); }
.th__dir { font-size: 12px; }
.spill-btn, .who-btn { display: inline-flex; align-items: center; gap: 4px; padding: 3px; margin: -3px; border-radius: 999px; max-width: 100%; transition: background .12s; }
.spill-btn .ic { width: 14px; height: 14px; color: var(--ink-3); opacity: 0; transition: opacity .12s; }
.tbl__row:hover .spill-btn .ic { opacity: 1; }
.spill-btn:hover:not([disabled]) { background: var(--paper-2); }
.who-btn { gap: 8px; padding: 3px 10px 3px 3px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); min-width: 0; }
.who-btn span:not(.avatar) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-btn:hover:not([disabled]) { background: var(--paper-2); color: var(--ink); }
.who-btn.is-empty { color: var(--accent-ink); font-weight: 600; }
.spill-btn[disabled], .who-btn[disabled] { cursor: default; }
.tbl__date small { display: block; margin-top: 3px; }
.tbl__date small .due { margin-left: 0; }
.tbl__row.is-dim { opacity: .55; }
.tbl__user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tbl__plink { text-decoration: none; color: inherit; }
.tbl__plink strong { font-weight: 600; font-size: 14px; }
.tbl__plink:hover strong { color: var(--accent-ink); }
.you { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 4px; background: var(--ink); color: #fff; margin-left: 6px; vertical-align: 2px; }

/* ---------- board ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: 272px; gap: 12px; overflow-x: auto; padding: 2px 2px 18px; align-items: start; scroll-snap-type: x proximity; }
.board::-webkit-scrollbar { height: 10px; }
.board::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 5px; border: 2px solid var(--paper); }
.col { background: var(--paper-2); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; min-height: 420px; scroll-snap-align: start; transition: background .15s, border-color .15s, box-shadow .15s; }
.col__head { display: flex; align-items: center; gap: 8px; padding: 13px 14px 11px; border-bottom: 1px solid var(--line); position: relative; }
.col__head::before { content: ""; position: absolute; left: 14px; right: 14px; top: -1px; height: 3px; border-radius: 0 0 3px 3px; }
.col--new .col__head::before { background: var(--s-new); } .col--review .col__head::before { background: var(--s-review); } .col--estimating .col__head::before { background: var(--s-estimating); }
.col--sent .col__head::before { background: var(--s-sent); } .col--won .col__head::before { background: var(--s-won); } .col--lost .col__head::before { background: var(--s-lost); } .col--nobid .col__head::before { background: var(--s-nobid); }
.col__head strong { font-size: 14px; }
.col__n { font-family: var(--f-mono); font-size: 11.5px; font-weight: 600; color: var(--ink-3); background: var(--surface); padding: 1px 7px; border-radius: 9px; border: 1px solid var(--line); }
.col__val { margin-left: auto; font-family: var(--f-mono); font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.col__list { padding: 10px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.col__drop { display: none; place-items: center; min-height: 70px; border: 1.5px dashed var(--line-2); border-radius: 12px; font-size: 12.5px; color: var(--ink-3); text-align: center; padding: 10px; }
.board.is-dragging .col__drop { display: grid; }
.col.is-over { background: var(--accent-soft); border-color: #F7B998; box-shadow: 0 0 0 3px var(--accent-glow); }
.col.is-over .col__drop { border-color: var(--accent); color: var(--accent-ink); background: rgba(255,255,255,.6); }
.kcard { position: relative; padding: 12px 12px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); cursor: pointer; transition: box-shadow .15s, transform .15s var(--ease), border-color .15s, opacity .15s; }
.kcard[draggable="true"] { cursor: grab; }
.kcard[draggable="true"]:active { cursor: grabbing; }
.kcard:hover { box-shadow: var(--shadow); border-color: var(--line-2); transform: translateY(-1px); }
.kcard.is-dragging { opacity: .35; transform: rotate(-1.5deg); }
.kcard.is-reading { border-color: #F7D3C1; background: linear-gradient(180deg, #FFF8F4, var(--surface)); }
.kcard__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; min-height: 26px; }
.kcard__more { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: var(--ink-4); flex: none; margin: -2px -4px 0 0; }
.kcard__more:hover { background: var(--paper); color: var(--ink); }
.kcard h4 { margin-top: 9px; font-size: 14.5px; font-weight: 700; line-height: 1.3; letter-spacing: -.005em; }
.kcard p { margin-top: 2px; font-size: 12.5px; color: var(--ink-3); }
.kcard__amt { display: inline-block; margin-top: 8px; font-family: var(--f-mono); font-size: 12.5px; font-weight: 600; color: var(--s-sent-ink); background: var(--s-sent-soft); padding: 2px 7px; border-radius: 5px; }
.kcard__amt.is-won { color: var(--s-won-ink); background: var(--s-won-soft); }
.kcard__reason { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--paper-2); padding: 2px 8px; border-radius: 5px; }
.kcard__foot { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.kcard__due { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.kcard__due .ic { width: 14px; height: 14px; color: var(--ink-3); }
.kcard__due .due { margin-left: 2px; }
.kcard .flags { font-size: 12px; gap: 7px; }
.kcard .flags .tbl__muted { display: none; }
.kcard__who { margin-left: auto; border-radius: 50%; }
.kcard__who .avatar { width: 28px; height: 28px; }
.kcard .aichip { height: 24px; font-size: 11px; }
.kcard .aichip__bar { width: 40px; }
.board__note { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.board__note .ic { width: 15px; height: 15px; }

/* ---------- bid detail ---------- */
.bid-head { align-items: flex-start; }
.bid-head__ctl { display: flex; gap: 10px; flex: none; margin-top: 4px; }
.ctl { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 12px 0 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); text-align: left; transition: border-color .15s, box-shadow .15s; }
.ctl:hover:not([disabled]) { border-color: var(--ink-3); box-shadow: var(--shadow-sm); }
.ctl > span:not(.avatar):not(.sdot) { display: flex; flex-direction: column; line-height: 1.2; }
.ctl small { font-size: 11.5px; color: var(--ink-3); font-weight: 500; }
.ctl b { font-size: 14.5px; font-weight: 650; white-space: nowrap; }
.ctl > .ic { width: 16px; height: 16px; color: var(--ink-3); margin-left: 4px; }
.ctl--status { padding-left: 14px; }
.ctl--status .sdot { width: 11px; height: 11px; box-shadow: 0 0 0 4px var(--paper-2); }
.ctl--new { background: var(--s-new-soft); border-color: #FBD3BF; } .ctl--new b { color: var(--s-new-ink); }
.ctl--review { background: var(--s-review-soft); border-color: #CBD6F7; } .ctl--review b { color: var(--s-review-ink); }
.ctl--estimating { background: var(--s-estimating-soft); border-color: #F0D9AE; } .ctl--estimating b { color: var(--s-estimating-ink); }
.ctl--sent { background: var(--s-sent-soft); border-color: #DCCFF4; } .ctl--sent b { color: var(--s-sent-ink); }
.ctl--won { background: var(--s-won-soft); border-color: #BFE3CE; } .ctl--won b { color: var(--s-won-ink); }
.ctl--lost { background: var(--s-lost-soft); border-color: #F2CBC6; } .ctl--lost b { color: var(--s-lost-ink); }
.ctl--nobid { background: var(--s-nobid-soft); border-color: var(--line-2); } .ctl--nobid b { color: var(--s-nobid-ink); }
.ctl[disabled] { cursor: default; }
.bid-head__sub .mono { font-size: 12.5px; color: var(--ink-2); }
.decided--sent { background: var(--s-sent-soft); color: var(--s-sent-ink); border: 1px solid #DCCFF4; }

/* AI summary */
.aisum { margin-top: 24px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; position: relative; animation: viewIn .5s var(--ease); }
.aisum::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--accent), #FF9C73); }
.aisum__head { display: flex; align-items: center; gap: 14px; padding: 18px 24px 16px 28px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #FBFAF8, var(--surface)); }
.aisum__head h2 { font-family: var(--f-display); font-stretch: 110%; font-size: 21px; font-weight: 750; letter-spacing: -.02em; }
.aisum__head p { font-size: 13.5px; color: var(--ink-3); }
.aisum__head .btn { margin-left: auto; }
.aisum__body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.aisum__main { padding: 22px 28px 24px; }
.aisum__lede { font-size: 17px; line-height: 1.6; color: var(--ink); }
.aisum h3 { margin: 20px 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.aisum__box h3 { margin-top: 0; }
.aisum__work { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.aisum__work li { display: flex; gap: 10px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.aisum__work .ic { flex: none; width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); stroke-width: 3; margin-top: 1px; }
.aisum__flags li { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.aisum__flags li:first-child { border-top: 0; padding-top: 2px; }
.aisum__flags .finding__flag { margin-top: 0; }
.aisum__flags b { color: var(--ink); font-weight: 650; }
.aisum__flags .cite { margin-left: 0; }
.aisum__gc { margin-top: 20px; display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.aisum__gc .ic { flex: none; color: var(--ink-3); margin-top: 2px; }
.aisum__gc b { font-size: 13.5px; }
.aisum__gc p { font-size: 14.5px; color: var(--ink-2); margin-top: 2px; }
.aisum__side { border-left: 1px solid var(--line); background: #FBFAF8; }
.aisum__box { padding: 18px 22px; border-top: 1px solid var(--line); }
.aisum__box:first-child { border-top: 0; }
.aisum__cats { display: flex; flex-direction: column; gap: 8px; }
.aisum__cat { padding: 10px 12px 10px 14px; border-radius: 10px; border: 1px solid; position: relative; overflow: hidden; display: flex; flex-direction: column; line-height: 1.35; }
.aisum__cat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.aisum__cat strong { font-size: 14.5px; }
.aisum__cat span { font-size: 12.5px; color: var(--ink-3); }
.aisum__cat--metal { background: var(--metal-soft); border-color: var(--metal-line); } .aisum__cat--metal::before { background: var(--metal); } .aisum__cat--metal strong { color: var(--metal); }
.aisum__cat--wood { background: var(--wood-soft); border-color: var(--wood-line); } .aisum__cat--wood::before { background: var(--wood); } .aisum__cat--wood strong { color: var(--wood); }
.aisum__cat--awn { background: var(--awn-soft); border-color: var(--awn-line); } .aisum__cat--awn::before { background: var(--awn); } .aisum__cat--awn strong { color: var(--awn); }
.aisum__cat--sign { background: var(--sign-soft); border-color: var(--sign-line); } .aisum__cat--sign::before { background: var(--sign); } .aisum__cat--sign strong { color: var(--sign); }
.aisum__asked { margin-top: 10px; font-size: 13px; color: var(--ink-3); line-height: 1.45; }
.aisum__asked b { color: var(--ink); }
.aisum__who { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.aisum__who div { display: flex; flex-direction: column; line-height: 1.3; }
.aisum__who strong { font-size: 15px; }
.aisum__who div span { font-size: 12.5px; color: var(--ink-3); }
.aisum__none { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; margin-bottom: 12px; }
.aisum__none a { color: var(--accent-ink); font-weight: 600; }
.aisum__dates li { display: flex; align-items: center; gap: 6px; padding: 6px 0; font-size: 13.5px; }
.aisum__dates span { color: var(--ink-3); width: 90px; flex: none; }
.aisum__dates b { font-weight: 650; }

/* live reading panel */
.reading { margin-top: 24px; display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 36px; padding: 28px 30px; border-radius: var(--r-xl); color: var(--night-ink);
  background: radial-gradient(520px 260px at 0% 100%, rgba(255,90,31,.25), transparent 70%), linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px), var(--night);
  background-size: auto, 40px 40px, 40px 40px, auto; box-shadow: 0 24px 50px -28px rgba(15,16,18,.6); }
.reading__left h2 { font-family: var(--f-display); font-stretch: 115%; font-size: 26px; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.reading__left p { margin-top: 8px; font-size: 14px; color: var(--night-ink-2); line-height: 1.55; }
.reading__count { margin-top: 26px; display: flex; align-items: baseline; gap: 10px; }
.reading__count strong { font-family: var(--f-display); font-stretch: 120%; font-size: 48px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.reading__count .mono { font-size: 12.5px; color: var(--night-ink-2); }
.reading__bar { margin-top: 14px; height: 4px; border-radius: 3px; background: var(--night-3); overflow: hidden; }
.reading__bar i { display: block; height: 100%; width: 0; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); transition: width .25s linear; }
.checklist--light { margin-top: 0; }
.checklist--light .ck { padding: 15px 0; }
.checklist--light .ck__text { font-size: 15px; }

/* title block contact */
.tb__link { display: inline-flex; align-items: center; gap: 4px; text-align: left; max-width: 100%; }
.tb__link .ic { width: 14px; height: 14px; color: var(--ink-3); flex: none; }
.tb__link:hover { color: var(--accent-ink); }

/* files + notes */
.duo { margin-top: 34px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.dl-list--panel { padding: 0 22px 10px; }
.dl-list--panel strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-list--panel li > div { min-width: 0; }
.note-new { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 0 22px 14px; border-bottom: 1px solid var(--line); }
.note-new textarea { width: 100%; min-height: 64px; resize: vertical; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); font-size: 14px; transition: border-color .15s, background .15s; }
.note-new textarea:focus { outline: none; border-color: var(--ink); background: var(--surface); }
.note-new textarea.is-error { border-color: var(--bad); animation: shake .4s; }
.note-new__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.note-new__foot .tbl__muted { font-size: 12px; }
.timeline { padding: 8px 22px 14px; max-height: 420px; overflow-y: auto; }
.tl { position: relative; display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding: 9px 0; }
.tl::before { content: ""; position: absolute; left: 12.5px; top: 38px; bottom: -6px; width: 1px; background: var(--line-2); }
.tl:last-child::before { display: none; }
.tl .avatar, .tl .act__dot { width: 26px; height: 26px; font-size: 10px; border: 0; }
.tl p { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.tl p b { color: var(--ink); font-weight: 600; }
.tl time { font-size: 12px; color: var(--ink-4); }
.tl--note p time { margin-left: 6px; }
.tl__bubble { margin-top: 5px; padding: 10px 12px; border-radius: 4px 12px 12px 12px; background: var(--paper); border: 1px solid var(--line); font-size: 14px; color: var(--ink); line-height: 1.5; white-space: pre-wrap; }
.actionbar__done-txt.is-sent { color: var(--s-sent-ink); }
.actionbar__btns .link-btn { margin-left: 6px; }
.btn--approve[disabled], .btn--decline[disabled] { opacity: .4; }

/* ---------- team ---------- */
.role { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.role--admin { background: var(--ink); color: #fff; }
.role--estimator { background: var(--s-review-soft); color: var(--s-review-ink); }
.role--viewer { background: var(--paper-2); color: var(--ink-2); }
.ustat { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.ustat::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.ustat--active { color: var(--ok-ink); } .ustat--active::before { background: var(--ok); }
.ustat--invited { color: var(--s-estimating-ink); } .ustat--invited::before { background: var(--s-estimating); }
.ustat--inactive { color: var(--ink-3); } .ustat--inactive::before { background: var(--ink-4); }
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.role-card { padding: 20px 22px; }
.role-card p { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.role-card ul { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.role-card li { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-2); }
.role-card li .ic { width: 16px; height: 16px; color: var(--ok); stroke-width: 2.4; }
.role-card li.is-no { color: var(--ink-3); }
.role-card li.is-no .ic { color: var(--ink-4); }

/* user modal */
.mform .field input { background: var(--paper); }
.role-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.role-opt { cursor: pointer; }
.role-opt input { position: absolute; opacity: 0; pointer-events: none; }
.role-opt span { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 11px 12px; border-radius: 12px; border: 1.5px solid var(--line-2); transition: all .15s; }
.role-opt b { font-size: 14px; }
.role-opt small { font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.role-opt:hover span { border-color: var(--ink-3); }
.role-opt input:checked + span { border-color: var(--ink); background: var(--paper); box-shadow: inset 0 0 0 1px var(--ink); }
.scope-picks--modal { margin-bottom: 4px; }
#u-role-err { margin-top: 6px; }

/* user picker (assign modal) */
.upick { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.upick__opt { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; border: 1.5px solid var(--line); cursor: pointer; transition: all .12s; }
.upick__opt input { position: absolute; opacity: 0; pointer-events: none; }
.upick__opt > span:not(.avatar):not(.pop__tag) { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.upick__opt b { font-size: 14px; }
.upick__opt small { font-size: 12px; color: var(--ink-3); }
.upick__opt:hover { border-color: var(--line-2); background: #FBFAF7; }
.upick__opt:has(input:checked) { border-color: var(--ink); background: var(--paper); box-shadow: inset 0 0 0 1px var(--ink); }

.money-wrap { position: relative; }
.money-wrap .ic { position: absolute; left: 13px; top: 15px; width: 17px; height: 17px; color: var(--ink-3); }
.money-wrap input { padding-left: 38px; font-family: var(--f-mono); font-size: 16px; font-weight: 600; }

/* ---------- settings ---------- */
.set { padding: 22px 24px 24px; margin-bottom: 16px; }
.set__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.set__head h2 { font-family: var(--f-display); font-stretch: 110%; font-size: 19px; font-weight: 750; letter-spacing: -.015em; }
.set__head p { margin-top: 4px; font-size: 14px; color: var(--ink-3); max-width: 620px; line-height: 1.5; }
.set__head .toggle { flex: none; margin-top: 4px; }
.linkbox { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); margin-bottom: 18px; }
.linkbox > .ic { color: var(--accent-ink); }
.linkbox .mono { flex: 1; font-size: 14px; font-weight: 600; }
.codebox { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 12px; background: var(--ink); }
.codebox code { flex: 1; font-family: var(--f-mono); font-size: 12.5px; color: #FFB08F; overflow-x: auto; white-space: nowrap; }
.codebox .btn--gray { background: var(--night-3); border-color: var(--night-line); color: var(--night-ink); }
.set__warn { margin-top: 14px; display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--s-estimating-ink); }
.rules2 { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.rules2__row { display: grid; grid-template-columns: minmax(0, 1.4fr) 240px 130px; align-items: center; gap: 18px; padding: 14px 18px; border-top: 1px solid var(--line); }
.rules2__row--head { border-top: 0; background: #FBFAF8; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding-top: 11px; padding-bottom: 11px; }
.rules2__row > div { display: grid; grid-template-columns: 4px 1fr; column-gap: 12px; }
.rules2__bar { grid-row: span 2; border-radius: 2px; }
.rule--metal .rules2__bar { background: var(--metal); } .rule--wood .rules2__bar { background: var(--wood); }
.rule--awn .rules2__bar { background: var(--awn); } .rule--sign .rules2__bar { background: var(--sign); }
.rules2__row strong { font-size: 14.5px; }
.rules2__row small { font-size: 12px; color: var(--ink-3); font-family: var(--f-mono); }
.rules2__row .select { width: 100%; }
.set__foot { margin-top: 12px; font-size: 13px; }
.set__toggles { display: flex; flex-direction: column; }
.toggle--row { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; row-gap: 0; padding: 12px 0; border-top: 1px solid var(--line); }
.toggle--row:first-child { border-top: 0; padding-top: 0; }
.toggle--row span { grid-row: span 2; align-self: center; }
.toggle--row b { font-size: 14.5px; color: var(--ink); }
.toggle--row small { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.select[disabled] { opacity: .6; cursor: not-allowed; }
.pg--narrow .erp-card { margin-top: 0; }

/* v3 polish */
.site-top .logo-plate, .proc__top .logo-plate { align-self: center; }
.kcard__top .dtags { flex: 1; min-width: 0; }
.aisum__dates b { white-space: nowrap; }
.aisum__dates span { width: 84px; }

/* =========================================================
   v3.1 — no monospace anywhere: one sans family, normal case
   ========================================================= */
:root { --f-mono: var(--f-body); }
.mono { letter-spacing: 0; font-variant-numeric: tabular-nums; }
.mono, .crumbs, .tb__k, .drawer__k, .drawer__page, .bid-back, .tbl__row--head, .rules2__row--head,
.side__brand .mono, .side__label, .dropzone__sheet, .dim-line__label, .proc__job, .proc__sub,
.sheet__head, .paper__top, .paper__foot, .paper__hit-k, .login__foot, .login__steps .mono,
.next-steps .mono, .rule__k, .route__csi, .scanner__count .mono, .ck__status, .found__chip,
.type-chip, .ftype, .fsize, .meter .mono, .search kbd, .dl__date span, .site-div .mono,
.chart__x span, .bar__n, .ref, .received__ref strong, .col__n, .col__val, .kcard__amt, .due,
.aichip b, .tab .n, .chip .n, .codebox code, .linkbox .mono, .rules2__row small, .sub__meta .mono,
.bid-head__sub .mono, .reading__count .mono, .drawer__nav .mono, .cite, .meter__label {
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.tbl__row--head, .rules2__row--head { font-size: 12.5px; font-weight: 600; }
.th { font-weight: 600; }
.tb__k { font-size: 12px; font-weight: 500; }
.drawer__k { font-size: 12px; font-weight: 600; }
.bid-back { font-size: 13.5px; font-weight: 600; }
.side__brand .mono { font-size: 12.5px; font-weight: 600; }
.side__label { font-size: 12px; font-weight: 600; }
.proc__job { font-size: 13.5px; }
.proc__sub { font-size: 14px; }
.dropzone__sheet, .dim-line__label { font-size: 12px; font-weight: 500; }
.login__foot { font-size: 12.5px; }
.cite { font-style: normal; font-size: 12px; }
.aisum h3, .extract__col h3 { letter-spacing: 0; text-transform: none; font-size: 13.5px; color: var(--ink-2); }
.ck__status { font-size: 12.5px; }
.ck[data-state="queued"] .ck__status::before { content: "Queued"; }
.ck[data-state="processing"] .ck__status::before { content: "Processing"; }
.ck[data-state="done"] .ck__status::before { content: "Done"; }
.dl__date span { font-size: 11px; font-weight: 600; }
.paper__top, .paper__foot { font-size: 10px; }
.paper__hit-k { font-size: 10.5px; }
.ftype { font-size: 9.5px; }
.received__ref strong { font-size: 19px; }
.codebox code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* v3.2 — pills use the normal body font, like the status pills */
.dtag { font-family: var(--f-body); font-stretch: normal; font-size: 12.5px; font-weight: 650; letter-spacing: 0; text-transform: none; height: 26px; padding: 0 10px; border-radius: 999px; }
.route__tag { font-family: var(--f-body); font-stretch: normal; font-size: 14px; font-weight: 650; letter-spacing: 0; text-transform: none; padding: 6px 14px; border-radius: 999px; }

/* v3.3 — headings in Inter Tight across the whole portal */
:root { --f-display: "Inter Tight", "Inter", system-ui, sans-serif; }
* { font-stretch: normal !important; }
.display, .dropzone__title, .proc__title, .login__pitch h1, .login__form h2, .bid-head__title,
.pg-head h1, .spot h2, .received__card h1, .closed-card h1, .reading__left h2 { letter-spacing: -.03em; }
.kpi__v, .pipe__tile strong, .scanner__num, .reading__count strong, .spot__stat strong { letter-spacing: -.025em; }

/* v3.4 — lighter Inter Tight headings */
.display, .dropzone__title, .proc__title, .login__pitch h1, .login__form h2, .bid-head__title,
.pg-head h1, .spot h2, .received__card h1, .closed-card h1, .reading__left h2 {
  font-weight: 700; letter-spacing: -.02em;
}
.bid-head__title { font-size: 36px; line-height: 1.12; }
.modal__head h3, .success h3, .aisum__head h2, .extract__title h2, .block__head h2, .panel__head h3,
.section-title, .set__head h2, .sub__title h3, .empty h3, .form__head h2, .form__sep h2,
.site-div strong, .rule h3, .received__card h2 {
  font-weight: 650; letter-spacing: -.01em;
}
.kpi__v, .pipe__tile strong, .scanner__num, .reading__count strong, .spot__stat strong, .dl__date b {
  font-weight: 700; letter-spacing: -.015em;
}

/* sidebar without the ERP card: keep the user block at the bottom */
.side__user { margin-top: auto; }

/* =========================================================
   v3.5 — add a bid by hand + no-documents state
   ========================================================= */
.nb { padding: 6px 28px 0; }
.nb__sec { padding: 22px 0; border-top: 1px solid var(--line); }
.nb__sec:first-child { border-top: 0; }
.nb__sec h2 { font-family: var(--f-display); font-size: 18px; font-weight: 650; letter-spacing: -.01em; margin-bottom: 14px; display: flex; align-items: baseline; gap: 10px; }
.nb__sec h2 i { font-style: normal; color: var(--accent-ink); margin-left: -6px; }
.nb__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.nb__grid--3 { grid-template-columns: repeat(3, 1fr); }
.nb__wide { grid-column: 1 / -1; }
.nb .field { margin-bottom: 14px; }
.nb .scope-picks { margin-bottom: 0; }
.nb__err { display: none; margin-top: 8px; font-size: 12.5px; font-weight: 500; color: var(--bad); }
.nb__err.is-on { display: block; }
.nb__hint { font-size: 14px; color: var(--ink-3); margin: -6px 0 14px; }
.nb-drop { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 22px; border-radius: 14px; border: 1.5px dashed var(--line-2); background: var(--paper); color: var(--ink-2); font-size: 14px; cursor: pointer; transition: all .15s; }
.nb-drop .ic { width: 22px; height: 22px; color: var(--accent); }
.nb-drop:hover, .nb-drop:focus-visible { border-color: var(--ink-3); outline: none; }
.nb-drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.nb-files { margin-top: 8px; }
.nb-files li > div { min-width: 0; }
.nb-files strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 0 22px; border-top: 1px solid var(--line); }

.nodocs { margin-top: 24px; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 24px 26px; border-radius: var(--r-xl); background: var(--surface); border: 1.5px dashed var(--line-2); }
.nodocs__ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.nodocs__ic .ic { width: 24px; height: 24px; }
.nodocs h2 { font-family: var(--f-display); font-size: 20px; font-weight: 650; letter-spacing: -.01em; }
.nodocs p { margin-top: 4px; font-size: 14.5px; color: var(--ink-2); line-height: 1.55; max-width: 640px; }
.nodocs__facts { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }

.panel__acts { display: flex; gap: 16px; }
.panel__empty { padding: 4px 22px 18px; font-size: 14px; color: var(--ink-3); }
.sub__sum--empty { color: var(--ink-3); }
.sub__sum--empty .ic { color: var(--ink-3); }

/* icons wrapped in a span inside buttons sit on the text baseline — centre them */
.btn > span { display: inline-flex; align-items: center; gap: inherit; }
.btn > span > .ic { display: block; }
