/* ============================================================
   FRAGTA — Product UI design system
   Editorial / technical re-skin of the Meridian Spedition workspace.
   ============================================================ */

/* ===== EXTERNAL DEMO: tour, Frida, lead capture ===== */
.try-login .lc-fine { font-size: 11px; color: var(--ink-faint); line-height: 1.5; margin-top: 4px; }
.try-login .lc-fine a { color: var(--ink-dim); text-decoration: underline; }
.inp-err { border-color: var(--danger) !important; }

/* guided tour */
.tour-wrap { position: fixed; left: 0; right: 0; bottom: 0; z-index: 200; display: flex; justify-content: center; padding: 0 16px 26px; pointer-events: none; }
.tour-card { pointer-events: auto; width: 100%; max-width: 460px; background: var(--panel); border: 1px solid var(--border-2); border-radius: var(--r-card); box-shadow: 0 30px 70px -30px rgba(0,0,0,.45); padding: 20px 22px; animation: tourUp .35s cubic-bezier(.2,.9,.3,1) both; }
@keyframes tourUp { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.tour-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.tour-step { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); }
.tour-x { background: none; border: none; cursor: pointer; color: var(--ink-faint); display: inline-flex; padding: 2px; }
.tour-x:hover { color: var(--ink); }
.tour-x svg { width: 16px; height: 16px; }
.tour-title { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 8px; }
.tt-spark { width: 26px; height: 26px; flex: none; border-radius: 50%; background: color-mix(in srgb, var(--accent) 16%, var(--panel)); color: var(--accent-deep); display: inline-flex; align-items: center; justify-content: center; }
.tt-spark svg { width: 14px; height: 14px; }
.tour-body { font-size: 13.5px; line-height: 1.6; color: var(--ink-dim); margin: 0 0 16px; }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tour-skip { background: none; border: none; cursor: pointer; font-size: 12.5px; color: var(--ink-faint); padding: 0; }
.tour-skip:hover { color: var(--ink); text-decoration: underline; }
.tour-nav { display: flex; gap: 8px; }
.tour-dots { display: flex; gap: 6px; justify-content: center; margin-top: 14px; }
.tour-dots .td { width: 6px; height: 6px; border-radius: 50%; background: var(--border-2); transition: background .2s, width .2s; }
.tour-dots .td.on { background: var(--accent-deep); width: 18px; border-radius: 3px; }
.tour-replay { position: fixed; left: 22px; bottom: 22px; z-index: 150; display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: var(--bg); border: none; cursor: pointer; padding: 11px 15px; border-radius: 999px; font-size: 13px; font-weight: 500; box-shadow: 0 12px 28px -14px rgba(0,0,0,.5); transition: transform .14s ease; }
.tour-replay:hover { transform: translateY(-2px); }
.tour-replay svg { width: 15px; height: 15px; color: var(--accent); }

/* Frida chat */
.frida-fab { position: fixed; right: 22px; bottom: 22px; z-index: 160; width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; box-shadow: 0 14px 30px -10px color-mix(in srgb, var(--accent) 60%, transparent); transition: transform .16s ease; position: fixed; }
.frida-fab:hover { transform: translateY(-2px) scale(1.04); }
.frida-fab svg { width: 22px; height: 22px; }
.frida-fab .ff-dot { position: absolute; top: 12px; right: 12px; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); border: 2px solid var(--accent); }
.frida-panel { position: fixed; right: 22px; bottom: 90px; z-index: 160; width: 360px; max-width: calc(100vw - 32px); height: 520px; max-height: calc(100vh - 130px); background: var(--panel); border: 1px solid var(--border-2); border-radius: 16px; box-shadow: 0 30px 70px -24px rgba(0,0,0,.45); display: flex; flex-direction: column; overflow: hidden; animation: tourUp .3s cubic-bezier(.2,.9,.3,1) both; }
.frida-head { display: flex; align-items: center; gap: 11px; padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--panel-2); }
.frida-av { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; }
.frida-id { flex: 1; line-height: 1.3; }
.frida-id b { font-size: 14px; }
.frida-id small { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-faint); }
.frida-on { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.frida-min { background: none; border: none; cursor: pointer; color: var(--ink-faint); display: inline-flex; padding: 4px; }
.frida-min:hover { color: var(--ink); }
.frida-min svg { width: 18px; height: 18px; }
.frida-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.fbubble { max-width: 84%; padding: 10px 13px; font-size: 13.5px; line-height: 1.5; border-radius: 14px; }
.fbubble.frida { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--border); color: var(--ink); border-bottom-left-radius: 4px; }
.fbubble.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.fbubble.typing { display: flex; gap: 4px; align-items: center; }
.fbubble.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-faint); animation: ftype 1s infinite; }
.fbubble.typing span:nth-child(2) { animation-delay: .15s; }
.fbubble.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ftype { 0%,100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }
.frida-quick { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 10px; }
.frida-quick button { font-size: 11.5px; padding: 6px 10px; border: 1px solid var(--border-2); background: var(--panel); color: var(--ink-dim); border-radius: 999px; cursor: pointer; transition: all .12s ease; }
.frida-quick button:hover { border-color: var(--accent-deep); color: var(--ink); }
.frida-input { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); }
.frida-input input { flex: 1; border: 1px solid var(--border-2); background: var(--inset); padding: 10px 12px; font: inherit; font-size: 13px; color: var(--ink); border-radius: 999px; }
.frida-input input:focus { outline: none; border-color: var(--accent-deep); }
.frida-send { width: 38px; height: 38px; flex: none; border: none; border-radius: 50%; background: var(--accent); color: var(--accent-ink); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.frida-send svg { width: 16px; height: 16px; }
@media (prefers-reduced-motion: reduce) { .tour-card, .frida-panel { animation: none; } }

:root {
  /* ---- LIGHT (paper) — default, matches fragta.dk ---- */
  --bg:        #efeae1;
  --panel:     #fbfaf6;
  --panel-2:   #f4f0e8;
  --panel-3:   #ece7dc;
  --inset:     #f7f4ee;
  --border:    #ddd6c8;
  --border-2:  #cbc3b1;
  --ink:       #14110d;
  --ink-dim:   #6b6356;
  --ink-faint: #9c9384;
  --accent:      #00ff94;
  --accent-deep: #0a8f54;   /* legible green for small text on light */
  --accent-ink:  #062012;
  --warn:   #c97f15;
  --warn-bg:#f6ead3;
  --danger: #d2422f;
  --danger-bg:#f6dcd6;
  --good:   #0a8f54;
  --shadow: 0 1px 0 rgba(20,17,13,.03), 0 14px 34px -22px rgba(20,17,13,.22);
  --shadow-lg: 0 30px 80px -40px rgba(20,17,13,.45);
}

body.theme-deep {
  --bg:        #000000;
  --panel:     #0b0b0b;
  --panel-2:   #111111;
  --panel-3:   #171717;
  --inset:     #0e0e0e;
  --border:    #1d1d1d;
  --border-2:  #2c2c2c;
  --ink:       #fafafa;
  --ink-dim:   #8c8c8c;
  --ink-faint: #565656;
  --accent:      #00ff94;
  --accent-deep: #00ff94;
  --accent-ink:  #04130a;
  --warn:   #ffb020;
  --warn-bg:#2a2110;
  --danger: #ff5a47;
  --danger-bg:#2a1411;
  --good:   #00ff94;
  --shadow: 0 1px 0 rgba(0,0,0,.4), 0 18px 40px -24px rgba(0,0,0,.8);
  --shadow-lg: 0 40px 90px -40px rgba(0,0,0,.9);
}

body.theme-warm {
  --bg:        #14110d;
  --panel:     #1c1813;
  --panel-2:   #221d17;
  --panel-3:   #2a241c;
  --inset:     #1f1a14;
  --border:    #2c261e;
  --border-2:  #3b3429;
  --ink:       #f4efe7;
  --ink-dim:   #98897a;
  --ink-faint: #635a4d;
  --accent:      #00ff94;
  --accent-deep: #00ff94;
  --accent-ink:  #06130c;
  --warn:   #e8a23c;
  --warn-bg:#2c2213;
  --danger: #ff6a52;
  --danger-bg:#2c1813;
  --good:   #00ff94;
}

:root {
  --font-sans: 'Geist', system-ui, -apple-system, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', monospace;
  --r: 0px;            /* base radius — editorial = sharp */
  --r-card: 4px;
  --nav-h: 60px;
  --gap: 18px;
}
body.font-inter { --font-sans: 'Inter', system-ui, sans-serif; }
body.density-cozy  { --gap: 24px; --pad: 28px; }
body.density-compact { --gap: 12px; --pad: 16px; }
:root { --pad: 22px; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01','cv11';
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border: 3px solid var(--bg); border-radius: 10px; }

.mono { font-family: var(--font-mono); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-dim);
  display: inline-flex; align-items: center; gap: 9px;
}
.eyebrow::before { content:''; width: 7px; height: 7px; background: var(--accent); display: inline-block; }

h1,h2,h3,h4 { margin: 0; font-weight: 600; letter-spacing: -.02em; }

/* ============ APP SHELL ============ */
#root { min-height: 100vh; }
.app { min-height: 100vh; display: flex; flex-direction: column; }

.topnav {
  position: sticky; top: 0; z-index: 60;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 22px;
  padding: 0 clamp(18px, 3vw, 34px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 20px; height: 20px; position: relative; transform: rotate(45deg);
  background: var(--accent); flex-shrink: 0;
}
.brand-mark::after { content:''; position: absolute; inset: 5px; background: var(--bg); }
.brand-name { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.workspace {
  display: inline-flex; align-items: center; gap: 8px;
  margin-left: 4px; padding: 5px 11px 5px 9px;
  border: 1px solid var(--border); background: var(--panel);
  font-size: 12.5px; color: var(--ink-dim);
}
.workspace b { color: var(--ink); font-weight: 600; }
.workspace .ws-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.workspace .ws-logo { height: 18px; max-width: 70px; object-fit: contain; display: block; }
.brand-logo { height: 26px; max-width: 150px; object-fit: contain; display: block; }
.cust-logo { max-width: 120px; object-fit: contain; display: block; }

/* Fragta-intern demo link in nav-right */
.studio-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; padding: 7px 11px; color: var(--ink-dim);
  border: 1px dashed var(--border-2); background: transparent;
  border-radius: 0; cursor: pointer; transition: all .14s ease;
}
.studio-link svg { width: 15px; height: 15px; color: var(--accent-deep); }
.studio-link:hover { color: var(--ink); border-color: var(--accent-deep); }
.studio-link.on { color: var(--ink); border-style: solid; border-color: var(--accent-deep); background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }

/* eyebrow w/ Fragta mark (intern badge) */
.eyebrow-fragta { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-deep); }
.eyebrow-fragta::before { display: none; }
.eyebrow-fragta .brand-mark { width: 14px; height: 14px; }

/* save pill */
.save-pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--good); opacity: 0; transform: translateY(-2px); transition: opacity .2s ease, transform .2s ease; pointer-events: none; }
.save-pill svg { width: 13px; height: 13px; }
.save-pill.show { opacity: 1; transform: none; }

/* ----- DEMO STUDIO ----- */
.studio-grid { display: grid; grid-template-columns: 1fr; gap: var(--gap); }
@media (min-width: 1000px) { .studio-grid { grid-template-columns: 1.35fr 1fr; align-items: start; } }
.studio-body { padding: var(--pad); display: flex; flex-direction: column; gap: 16px; }
.studio-body select {
  width: 100%; padding: 11px 12px; font: inherit; font-size: 13.5px;
  background: var(--inset); border: 1px solid var(--border-2); color: var(--ink);
  appearance: none; cursor: pointer;
}
.studio-body select:focus { outline: none; border-color: var(--accent-deep); }

.logo-upload { display: flex; gap: 16px; align-items: center; }
.logo-preview {
  width: 96px; height: 72px; flex: none; border: 1px solid var(--border-2);
  background: var(--inset); display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.logo-preview img { max-width: 86px; max-height: 60px; object-fit: contain; }
.logo-preview .lp-empty { color: var(--ink-faint); }
.logo-preview .lp-empty svg { width: 26px; height: 26px; }
.logo-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch {
  width: 34px; height: 34px; border: 1px solid var(--border-2); cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; color: #06130c; position: relative;
}
.swatch svg { width: 15px; height: 15px; }
.swatch.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); }
.swatch.custom { overflow: hidden; }
.swatch.custom input { position: absolute; inset: -4px; width: 150%; height: 150%; border: none; padding: 0; cursor: pointer; }

/* preview panel */
.preview-panel { position: sticky; top: 78px; }
.prev-cap { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); margin-top: 4px; }
.prev-topbar {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  border: 1px solid var(--border); background: var(--panel);
}
.prev-topbar .brand { display: inline-flex; align-items: center; gap: 8px; }
.prev-topbar .workspace { margin: 0; }
.prev-login {
  border: 1px solid var(--border); background: var(--panel); padding: 22px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.prev-logo { height: 40px; display: flex; align-items: center; justify-content: center; }
.prev-logo img { max-height: 40px; max-width: 150px; object-fit: contain; }
.prev-logo .brand-mark { width: 30px; height: 30px; }
.prev-q { font-size: 17px; font-weight: 600; letter-spacing: -.02em; max-width: 240px; line-height: 1.2; }
.prev-meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }
.prev-accent { display: flex; align-items: center; gap: 12px; }
.prev-chip { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-dim); }
.prev-chip i { width: 44px; height: 5px; background: var(--accent); display: inline-block; }
.prev-foot { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); margin-top: 4px; }
.prev-foot .brand-mark { width: 12px; height: 12px; }

.nav-links { display: flex; align-items: center; gap: 2px; flex: 1; justify-content: center; min-width: 0; }
.nav-link {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; font-size: 13.5px; color: var(--ink-dim);
  letter-spacing: -.005em;
  transition: color .14s ease, background .14s ease;
}
.nav-link svg { width: 16px; height: 16px; opacity: .8; }
.nav-link:hover { color: var(--ink); background: var(--panel-2); }
.nav-link.on { color: var(--ink); }
.nav-link.on::after {
  content:''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--accent);
}
.beta-pill { font-family: var(--font-mono); font-size: 9px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent); padding: 2px 6px; margin-left: 8px; vertical-align: middle; }
.beta-pill.sm { font-size: 8px; padding: 1px 5px; margin-left: 6px; }
.nav-link .nav-count { font-family: var(--font-mono); font-size: 10px; font-weight: 600; background: var(--accent); color: var(--accent-ink); padding: 1px 6px; margin-left: 7px; line-height: 1.5; }

/* ===== SCENARIO SIMULATION (beta) ===== */
.scen-reqbar { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border: 1px solid var(--border); background: var(--panel); margin-bottom: var(--gap); flex-wrap: wrap; }
.scen-reqbar-l { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.scen-reqtabs { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.scen-reqtab { display: flex; flex-direction: column; align-items: stretch; gap: 3px; padding: 8px 13px; border: 1px solid var(--border); background: var(--inset); cursor: pointer; min-width: 170px; }
.scen-reqtab .srt-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.scen-reqtab.on { border-color: var(--accent-deep); background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.scen-reqtab .srt-cust { font-size: 13px; font-weight: 600; }
.scen-reqtab .srt-lane { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-dim); }
.scen-reqtab .srt-open { font-family: var(--font-mono); font-size: 9px; color: var(--warn); white-space: nowrap; flex: none; }
.scen-reqtab .srt-ok { color: var(--good); flex: none; display: inline-flex; }
.scen-reqtab .srt-ok svg { width: 13px; height: 13px; }
.scen-link { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--accent-deep); text-decoration: none; white-space: nowrap; }
.scen-link svg { width: 14px; height: 14px; }

.scen-grid { display: grid; grid-template-columns: 1fr; gap: var(--gap); }
@media (min-width: 1100px) { .scen-grid { grid-template-columns: 270px minmax(0,1fr) 300px; align-items: start; } }
.scen-side { display: flex; flex-direction: column; gap: var(--gap); }

.scen-summary { padding: var(--pad); }
.ss-lane { display: flex; align-items: center; gap: 9px; font-size: 16px; margin-bottom: 14px; }
.ss-rows { display: grid; gap: 9px; }
.ss-row { display: grid; grid-template-columns: 90px 1fr; gap: 10px; font-size: 13px; align-items: center; }
.ss-row .k { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); }
.ss-row .v { color: var(--ink); }
.scen-detgrid { padding: var(--pad); display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); }
.sdg-cell { background: var(--panel); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.sdg-cell .k { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); }
.sdg-cell .v { font-size: 13px; font-weight: 500; }
.sdg-cell .v.miss { color: var(--warn); font-style: italic; font-weight: 400; }
.scen-constraints { padding: var(--pad); display: grid; gap: 11px; }
.sc-line { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink); }
.sc-line svg { width: 15px; height: 15px; color: var(--accent-deep); flex: none; }
.sc-line b { font-weight: 600; }
.miss-list { padding: var(--pad); margin: 0; list-style: none; display: grid; gap: 9px; }
.miss-list.compact { padding: 0; }
.miss-list li { position: relative; padding-left: 18px; font-size: 13px; color: var(--ink-dim); }
.miss-list li::before { content: ''; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; background: var(--warn); border-radius: 50%; }

.scen-main-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.scen-main-head h3 { font-size: 16px; }
.scen-cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
@media (max-width: 760px) { .scen-cards { grid-template-columns: 1fr; } }
.scen-card { border: 1px solid var(--border); background: var(--panel); padding: 16px; cursor: pointer; transition: border-color .14s, transform .12s, box-shadow .16s; display: flex; flex-direction: column; gap: 14px; }
.scen-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.scen-card.sel { border-color: var(--accent-deep); box-shadow: 0 0 0 1px var(--accent-deep) inset; }
.scen-card.rec { background: color-mix(in srgb, var(--accent) 4%, var(--panel)); }
.scen-card-h { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: start; }
.scen-key { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 600; font-size: 13px; background: var(--panel-3); color: var(--ink); }
.scen-card.rec .scen-key { background: var(--accent); color: var(--accent-ink); }
.scen-nm { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.scen-desc { font-size: 12.5px; color: var(--ink-dim); margin-top: 3px; line-height: 1.45; }
.scen-status { font-family: var(--font-mono); font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px; white-space: nowrap; height: fit-content; }
.scen-status.rec { background: var(--accent); color: var(--accent-ink); }
.scen-status.pos { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink-dim); }
.scen-status.risk { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.scen-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); }
.scen-metrics .sm { background: var(--inset); padding: 9px 11px; display: flex; flex-direction: column; gap: 4px; }
.scen-metrics .sm-l { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); }
.scen-metrics .sm-v { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.tone-good { color: var(--good); } .tone-ok { color: var(--accent-deep); } .tone-warn { color: var(--warn); } .tone-bad { color: var(--danger); }
.feas-bar { width: 44px; height: 5px; background: var(--panel-3); display: inline-block; overflow: hidden; }
.feas-bar.sm { width: 36px; }
.feas-bar i { display: block; height: 100%; background: var(--accent-deep); }
.scen-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.scen-sub { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); display: block; margin-bottom: 7px; }
.scen-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.scen-list li { position: relative; padding-left: 15px; font-size: 12.5px; color: var(--ink); line-height: 1.4; }
.scen-list.pro li::before { content: '+'; position: absolute; left: 0; color: var(--good); font-weight: 700; }
.scen-list.con li::before { content: '–'; position: absolute; left: 0; color: var(--danger); font-weight: 700; }
.scen-foot { display: grid; gap: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.scen-req, .scen-part { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sc-chip { font-family: var(--font-mono); font-size: 10px; color: var(--ink-dim); border: 1px solid var(--border-2); padding: 3px 8px; }
.scen-pchip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink); border: 1px solid var(--border-2); padding: 3px 8px; }
.scen-pchip svg { width: 12px; height: 12px; color: var(--accent-deep); }
.scen-req .scen-sub, .scen-part .scen-sub { width: 100%; margin-bottom: 2px; }

.scen-ai { background: color-mix(in srgb, var(--accent) 4%, var(--panel)); border-color: color-mix(in srgb, var(--accent) 28%, var(--border)); }
.scen-ai-body { padding: var(--pad); display: grid; gap: 16px; }
.sab-rec { display: flex; gap: 12px; align-items: flex-start; }
.sab-key { width: 30px; height: 30px; flex: none; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 600; background: var(--accent); color: var(--accent-ink); }
.sab-nm { font-size: 15px; font-weight: 600; }
.sab-why { font-size: 12.5px; color: var(--ink-dim); margin-top: 3px; line-height: 1.45; }
.scen-partners { padding: var(--pad); display: grid; gap: 12px; }
.spt { border: 1px solid var(--border); padding: 11px 13px; }
.spt-top { display: flex; align-items: center; justify-content: space-between; }
.spt-nm { font-size: 13.5px; font-weight: 600; }
.spt-fit { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 11px; color: var(--accent-deep); }
.spt-meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-faint); margin-top: 4px; }
.spt-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 9px; font-size: 11px; color: var(--ink-dim); }
.spt-row b { color: var(--ink); font-weight: 600; }
.spt-cap { font-family: var(--font-mono); font-size: 10px; }
.scen-actions { padding: var(--pad); display: grid; gap: 9px; }
.scen-actions .btn { width: 100%; justify-content: flex-start; }

/* ===== TENDER / MULTI-LANE RFQ (beta) ===== */
.tender-drop { border: 1.5px dashed var(--border-2); background: var(--panel); padding: 54px 30px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; cursor: pointer; transition: border-color .14s, background .14s; }
.tender-drop:hover { border-color: var(--accent-deep); background: color-mix(in srgb, var(--accent) 4%, var(--panel)); }
.tender-drop .td-ic { width: 52px; height: 52px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, var(--panel)); color: var(--accent-deep); display: flex; align-items: center; justify-content: center; }
.tender-drop .td-ic svg { width: 24px; height: 24px; }
.tender-drop .td-title { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.tender-drop .td-sub { font-size: 13.5px; color: var(--ink-dim); max-width: 380px; line-height: 1.5; }
.tender-drop .btn { margin-top: 6px; }
.tender-formats { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.tf-chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-dim); border: 1px solid var(--border); padding: 4px 9px; }
.tf-chip svg { width: 12px; height: 12px; }

.tender-stats { display: grid; grid-template-columns: 1fr; gap: var(--gap); margin-bottom: var(--gap); }
@media (min-width: 800px) { .tender-stats { grid-template-columns: 1.4fr 2fr; } }
.ts-progress { border: 1px solid var(--border); background: var(--panel); padding: 18px var(--pad); display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.tsp-top { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--ink-dim); }
.tsp-top b { color: var(--ink); font-size: 15px; }
.tsp-bar { height: 8px; background: var(--panel-3); overflow: hidden; }
.tsp-bar i { display: block; height: 100%; background: var(--accent-deep); transition: width .4s ease; }
.ts-cells { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); }
.ts-cell { padding: 16px 18px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 5px; background: var(--panel); }
.ts-cell:last-child { border-right: none; }
.ts-cell .n { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.ts-cell .l { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); }

.tender-seg { margin-bottom: var(--gap); }
.tender-seg .seg-n { font-family: var(--font-mono); font-size: 10px; opacity: .7; margin-left: 5px; }

.tender-table { border: 1px solid var(--border); background: var(--panel); overflow: hidden; }
.tt-head, .tt-row { display: grid; grid-template-columns: 1.5fr 1.1fr 1fr .8fr .8fr 1.1fr 1.3fr; gap: 14px; align-items: center; padding: 13px var(--pad); }
.tt-head { border-bottom: 1px solid var(--border); font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); background: var(--panel-2); }
.tt-row { border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s; font-size: 13px; }
.tt-row:last-child { border-bottom: none; }
.tt-row:hover { background: var(--panel-2); }
.tt-row.open { background: color-mix(in srgb, var(--accent) 6%, var(--panel)); box-shadow: inset 3px 0 0 var(--accent); }
.tt-lane { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tt-lane small { font-family: var(--font-mono); font-size: 10px; color: var(--ink-faint); }
.tt-cell { color: var(--ink-dim); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-cell.mono { font-family: var(--font-mono); font-size: 12px; }
.tt-quote { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--ink); }
.tt-quote.empty { color: var(--ink-faint); font-weight: 400; }
.tt-none { color: var(--ink-faint); font-style: italic; }
.tt-status { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.tt-miss { font-family: var(--font-mono); font-size: 9px; color: var(--danger); }
@media (max-width: 900px) { .tt-head { display: none; } .tt-row { grid-template-columns: 1fr 1fr; gap: 8px; } .tt-row .tt-cell { display: none; } }

.lane-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); margin-bottom: 16px; }
.lg-cell { background: var(--panel); padding: 11px 14px; display: flex; flex-direction: column; gap: 4px; }
.lg-cell .k { font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); }
.lg-cell .v { font-size: 13.5px; font-weight: 500; }
.lane-missing { margin-bottom: 18px; }
.lane-partners { margin-bottom: 18px; }
.lp-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 12px; align-items: center; padding: 9px 12px; border: 1px solid var(--border); margin-top: 7px; }
.lp-row.sel { border-color: var(--accent-deep); background: color-mix(in srgb, var(--accent) 7%, var(--panel)); }
.lp-nm { font-size: 13px; font-weight: 500; }
.lp-fit { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 11px; color: var(--accent-deep); }
.lp-pr { font-family: var(--font-mono); font-size: 12px; color: var(--ink); }
.lane-quote { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* past tenders overview */
.past-tenders { margin-top: 34px; }
.pt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pt-head h3 { font-size: 16px; }
.pt-table { border: 1px solid var(--border); background: var(--panel); }
.pt-row { display: grid; grid-template-columns: 2fr .9fr .9fr 1fr 1fr; gap: 14px; align-items: center; padding: 13px var(--pad); border-bottom: 1px solid var(--border); font-size: 13px; cursor: pointer; transition: background .12s; }
.pt-row:last-child { border-bottom: none; }
.pt-row:not(.pt-thead):hover { background: var(--panel-2); }
.pt-thead { cursor: default; font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); background: var(--panel-2); }
.pt-thead:hover { background: var(--panel-2); }
.pt-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pt-name small { font-family: var(--font-mono); font-size: 10px; color: var(--ink-faint); }
.pt-cell { color: var(--ink-dim); }
.pt-cell.mono { font-family: var(--font-mono); font-size: 12px; }
@media (max-width: 760px) { .pt-row { grid-template-columns: 1fr auto; } .pt-row .pt-cell { display: none; } }
  padding: 1px 5px; line-height: 1.4;
}
.nav-spacer { display: none; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); color: var(--ink-dim); background: var(--panel);
  transition: color .14s, border-color .14s, background .14s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--border-2); }
.icon-btn svg { width: 16px; height: 16px; }
.acct {
  display: inline-flex; align-items: center; gap: 9px; padding: 5px 8px 5px 5px;
  border: 1px solid var(--border); background: var(--panel);
}
.acct:hover { border-color: var(--border-2); }
.avatar {
  width: 26px; height: 26px; flex-shrink: 0;
  background: var(--ink); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .04em;
}
.avatar.accent { background: var(--accent); color: var(--accent-ink); }
.acct .who { font-size: 12.5px; line-height: 1.1; }
.acct .who small { display: block; color: var(--ink-faint); font-size: 10.5px; font-family: var(--font-mono); }

/* ============ PAGE ============ */
.main { flex: 1; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 clamp(18px, 3vw, 34px); }
.page { padding: clamp(30px, 4vw, 52px) 0 120px; }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  flex-wrap: wrap; margin-bottom: 30px;
}
.page-head .lead-h { display: flex; flex-direction: column; gap: 13px; }
.page-title { font-size: clamp(28px, 3.4vw, 42px); line-height: 1; letter-spacing: -.035em; }
.page-sub { color: var(--ink-dim); font-size: 14.5px; max-width: 56ch; }
.head-actions { display: flex; align-items: center; gap: 10px; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 17px; font-size: 13.5px; font-weight: 500; letter-spacing: -.005em;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform .12s ease, background .14s, color .14s, border-color .14s, filter .14s;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { transform: translateY(-1px); }
.btn-ghost { background: var(--panel); color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--border-2); background: var(--panel-2); }
.btn-quiet { background: transparent; color: var(--ink-dim); }
.btn-quiet:hover { color: var(--ink); background: var(--panel-2); }
.btn-sm { padding: 8px 12px; font-size: 12.5px; }
.btn-arrow::after { content:'→'; font-family: var(--font-mono); transition: transform .15s; }
.btn-arrow:hover::after { transform: translateX(3px); }

/* ============ CARDS / PANELS ============ */
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-card); }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--pad); border-bottom: 1px solid var(--border);
}
.panel-head h3 { font-size: 16px; letter-spacing: -.02em; }
.panel-title-row { display: flex; align-items: center; gap: 12px; }

/* ============ TAGS / BADGES ============ */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid var(--border-2); color: var(--ink-dim); background: var(--panel-2);
}
.tag.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tag.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px; font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase;
}
.badge .d { width: 6px; height: 6px; border-radius: 50%; }
.badge.b-new   { background: var(--accent); color: var(--accent-ink); }
.badge.b-wait  { background: var(--warn-bg); color: var(--warn); }
.badge.b-sent  { background: var(--panel-3); color: var(--ink-dim); }
.badge.b-done  { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }
.badge.b-err   { background: var(--danger-bg); color: var(--danger); }
.badge.b-active{ background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }
.badge.b-admin { background: var(--ink); color: var(--bg); }
@keyframes pulse-d { 0%,100%{box-shadow:0 0 0 0 color-mix(in srgb,var(--accent) 60%,transparent);} 50%{box-shadow:0 0 0 5px transparent;} }
.badge.b-new .d, .live-dot { animation: pulse-d 1.7s ease-out infinite; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; font-size: 12px; color: var(--ink-dim);
  border: 1px solid var(--border); background: var(--panel);
  transition: all .13s ease; cursor: pointer;
}
.chip:hover { border-color: var(--border-2); color: var(--ink); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .x { opacity: .6; font-family: var(--font-mono); }

/* ============ STAT TILES ============ */
.stat-row { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 26px; }

/* ============ DASHBOARD ============ */
.dash-kpis { display: grid; gap: var(--gap); grid-template-columns: repeat(4, 1fr); margin-bottom: var(--gap); }
@media (max-width: 880px) { .dash-kpis { grid-template-columns: repeat(2, 1fr); } }
.dk-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-card); padding: 18px var(--pad); position: relative; overflow: hidden; }
.dk-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.dk-card.tone-warn::before { background: var(--warn); }
.dk-card.tone-sent::before { background: #2d7dd2; }
.dk-card.tone-good::before { background: var(--good); }
.dk-card.tone-err::before { background: var(--danger); }
.dk-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dk-ico { width: 32px; height: 32px; border: 1px solid var(--border); background: var(--inset); display: inline-flex; align-items: center; justify-content: center; color: var(--ink-dim); }
.dk-ico svg { width: 16px; height: 16px; }
.dk-sub { font-family: var(--font-mono); font-size: 10.5px; color: var(--accent-deep); }
.dk-n { font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.dk-l { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); margin-top: 7px; }
button.dk-card { width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer; transition: border-color .12s ease, background .12s ease, transform .12s ease; }
button.dk-card:hover { border-color: var(--border-2); background: var(--panel-2); transform: translateY(-1px); }
button.dk-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: start; }
@media (max-width: 980px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-col { display: flex; flex-direction: column; gap: var(--gap); }
.dash-body { padding: var(--pad); }
.dist-bar { display: flex; height: 12px; gap: 2px; margin-bottom: 18px; }
.dist-bar span { display: block; transition: width .5s ease; }
.dist-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 4px; }
.dl-item { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: none; background: transparent; cursor: pointer; text-align: left; transition: background .12s ease; }
.dl-item:hover { background: var(--panel-2); }
.dl-sw { width: 10px; height: 10px; flex: none; }
.dl-lab { font-size: 13px; color: var(--ink-dim); flex: 1; }
.dl-n { font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--ink); }

.dash-quick { padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.qk { display: flex; align-items: center; gap: 13px; padding: 12px 12px; border: none; background: transparent; cursor: pointer; text-align: left; transition: background .12s ease; }
.qk:hover { background: var(--panel-2); }
.qk-ico { width: 34px; height: 34px; flex: none; border: 1px solid var(--border); background: var(--inset); display: inline-flex; align-items: center; justify-content: center; color: var(--ink-dim); }
.qk-ico svg { width: 16px; height: 16px; }
.qk-l { flex: 1; font-size: 14px; font-weight: 500; color: var(--ink); display: flex; flex-direction: column; gap: 3px; }
.qk-l small { font-family: var(--font-mono); font-size: 10.5px; font-weight: 400; color: var(--ink-faint); }
.qk-l .qk-title { display: inline-flex; align-items: center; gap: 6px; }
.qk > svg { width: 16px; height: 16px; color: var(--ink-faint); }

.dash-feed { padding: 6px var(--pad) var(--pad); }
.feed-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 13px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.feed-row:last-child { border-bottom: none; }
button.feed-row { width: 100%; font: inherit; color: inherit; text-align: left; background: transparent; border-left: none; border-right: none; border-top: none; cursor: pointer; margin: 0 calc(-1 * var(--pad)); padding-left: var(--pad); padding-right: var(--pad); width: calc(100% + var(--pad) * 2); transition: background .12s ease; }
button.feed-row:hover { background: var(--panel-2); }
button.feed-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.feed-ic { width: 34px; height: 34px; border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; color: var(--ink-dim); background: var(--inset); }
.feed-ic.tone-good { color: var(--good); border-color: color-mix(in srgb, var(--good) 35%, transparent); background: color-mix(in srgb, var(--good) 8%, var(--panel)); }
.feed-ic.tone-accent { color: var(--accent-deep); border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.feed-ic.tone-sent { color: #2d7dd2; border-color: color-mix(in srgb, #2d7dd2 35%, transparent); background: color-mix(in srgb, #2d7dd2 8%, var(--panel)); }
.feed-ic svg { width: 15px; height: 15px; }
.feed-main { min-width: 0; }
.feed-t { font-size: 13.5px; color: var(--ink); }
.feed-m { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-faint); margin-top: 3px; }
.feed-when { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-faint); white-space: nowrap; }

.dash-value { padding: var(--pad); }
.dash-value .dv-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.dash-value .dv-n { font-size: 28px; font-weight: 700; letter-spacing: -.02em; color: var(--accent-deep); }
.dash-value .dv-l { font-size: 12.5px; color: var(--ink-dim); margin-top: 5px; line-height: 1.4; }
.dash-value .dv-note { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--ink-faint); }
.dash-value .dv-note svg { width: 13px; height: 13px; color: var(--accent-deep); }
.live { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--good); }
.live .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--good); animation: pulse-fade 1.4s ease-in-out infinite; }
/* dashboard catalog mini */
.cat-mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); margin-bottom: 16px; }
.cat-mini-stats .cms { padding: 12px 14px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
.cat-mini-stats .cms:last-child { border-right: none; }
.cat-mini-stats .cms-n { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.cat-mini-stats .cms-l { font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); }
.cat-top-cap { font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); margin-bottom: 6px; }
.cat-top-row { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 9px 6px; border: none; background: transparent; cursor: pointer; text-align: left; transition: background .12s ease; }
.cat-top-row:hover { background: var(--panel-2); }
.cat-top-row .ctr-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cat-top-row .ctr-nm { font-size: 13.5px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-top-row .ctr-meta { font-family: var(--font-mono); font-size: 10px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-top-row .ctr-score { display: inline-flex; align-items: center; gap: 9px; }
.cat-top-row .ctr-score i { display: block; width: 50px; height: 5px; background: var(--accent); position: relative; }
.cat-top-row .ctr-score b { font-family: var(--font-mono); font-size: 12px; color: var(--ink); min-width: 22px; text-align: right; }
/* dashboard: routes, week chart, service mix */
.route-row { display: grid; grid-template-columns: 1fr 90px 24px; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); }
.route-row:last-child { border-bottom: none; }
.route-row .rr-lane { font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route-row .rr-bar { height: 6px; background: var(--panel-3); position: relative; }
.route-row .rr-bar i { position: absolute; inset: 0 auto 0 0; background: var(--accent); }
.route-row .rr-n { font-family: var(--font-mono); font-size: 12px; color: var(--ink); text-align: right; }
.week-chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; height: 150px; }
.wc-col { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.wc-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.wc-bar { width: 100%; max-width: 30px; background: var(--accent); min-height: 4px; position: relative; display: flex; align-items: flex-start; justify-content: center; transition: height .5s ease; }
.wc-bar b { position: absolute; top: -17px; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-dim); }
.wc-day { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); }
.svc-legend { display: flex; flex-direction: column; gap: 2px; }
.svc-item { display: flex; align-items: center; gap: 9px; padding: 7px 0; }
.svc-item .svc-lab { font-size: 13px; color: var(--ink-dim); flex: 1; }
.svc-item .svc-n { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--ink); }
/* ---- dashboard liveliness: entrance + hover ---- */
.dk-card { transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; animation: dkIn .5s cubic-bezier(.2,.8,.3,1) both; }
.dash-kpis .dk-card:nth-child(1) { animation-delay: .03s; }
.dash-kpis .dk-card:nth-child(2) { animation-delay: .09s; }
.dash-kpis .dk-card:nth-child(3) { animation-delay: .15s; }
.dash-kpis .dk-card:nth-child(4) { animation-delay: .21s; }
@keyframes dkIn { from { transform: translateY(12px); } to { transform: none; } }
.dk-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(20,17,13,.3); border-color: var(--border-2); }
.dk-card:hover .dk-ico { color: var(--accent-deep); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.dk-ico { transition: color .16s ease, border-color .16s ease; }

/* growing bars on mount (resting state stays full-size; never gates visibility) */
@media (prefers-reduced-motion: no-preference) {
  .rr-bar i, .ctr-score i { transform-origin: left center; animation: growX .7s cubic-bezier(.3,.9,.3,1); }
  .dist-bar span { transform-origin: left center; animation: growX .8s cubic-bezier(.3,.9,.3,1); }
  .wc-bar { transform-origin: bottom center; animation: growY .7s cubic-bezier(.3,.9,.3,1); }
}
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes growY { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.wc-bar { transition: filter .14s ease; }
.wc-col:hover .wc-bar { filter: brightness(.85); }
.wc-col:hover .wc-bar b { color: var(--ink); font-weight: 600; }

/* row hovers */
.route-row { transition: background .12s ease; margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
.route-row:hover { background: var(--panel-2); }
.route-row:hover .rr-lane { color: var(--accent-deep); }
.feed-row { transition: background .12s ease; margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
.feed-row:hover { background: var(--panel-2); }
.feed-row:hover .feed-ic { transform: scale(1.06); }
.feed-ic { transition: transform .14s ease; }
.dash-value .dv-n { animation: dkIn .6s ease both; animation-delay: .1s; }
@media (prefers-reduced-motion: reduce) {
  .dk-card, .rr-bar i, .ctr-score i, .dist-bar span, .wc-bar, .dash-value .dv-n { animation: none; }
}
.stat {
  position: relative; padding: 20px var(--pad);
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-card);
  display: flex; flex-direction: column; gap: 18px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  animation: dkIn .5s cubic-bezier(.2,.8,.3,1) both;
}
.stat-row .stat:nth-child(1) { animation-delay: .03s; }
.stat-row .stat:nth-child(2) { animation-delay: .08s; }
.stat-row .stat:nth-child(3) { animation-delay: .13s; }
.stat-row .stat:nth-child(4) { animation-delay: .18s; }
.stat-row .stat:nth-child(5) { animation-delay: .23s; }
.stat:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(20,17,13,.3); border-color: var(--border-2); }

/* ---- system-wide hover feedback ---- */
.row, .userrow, .prospect, .co-recent, .doc-row, .offer2, .dl-item, .qk, .cat-top-row {
  transition: background .13s ease, transform .13s ease, border-color .14s ease, box-shadow .16s ease;
}
.row:hover, .userrow:hover, .prospect.is-click:hover { background: var(--panel-2); }
.offer2:hover { border-color: var(--border-2); box-shadow: 0 8px 22px -16px rgba(20,17,13,.28); }
.doc-row:hover { border-color: var(--border-2); background: var(--panel-2); }
.tag, .badge, .ptag, .cc2-tag { transition: transform .12s ease, border-color .12s ease; }
.coco:hover .co-nm { color: var(--accent-deep); }
.coco .co-nm { transition: color .14s ease; }
/* button micro-lift */
.btn { transition: transform .12s ease, background .14s ease, border-color .14s ease, box-shadow .16s ease, color .14s ease; }
.btn-dark:hover, .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -10px rgba(20,17,13,.4); }
.icon-btn { transition: transform .12s ease, color .14s ease, background .14s ease; }
.icon-btn:hover { transform: translateY(-1px); }
.nav-link { transition: color .13s ease, background .13s ease; }
.back-link { transition: gap .14s ease, color .13s ease; }
.back-link:hover { gap: 11px; color: var(--accent-deep); }
@media (prefers-reduced-motion: reduce) {
  .stat { animation: none; }
  .btn-dark:hover, .btn-primary:hover, .icon-btn:hover, .stat:hover { transform: none; }
}
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color .14s;
}
.stat.lead { box-shadow: inset 3px 0 0 var(--accent); }
.stat .stat-ico {
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); color: var(--ink-dim); background: var(--inset);
}
.stat .stat-ico svg { width: 17px; height: 17px; }
.stat .stat-ico.warn { color: var(--warn); border-color: var(--warn); background: var(--warn-bg); }
.stat .stat-ico.err  { color: var(--danger); border-color: var(--danger); background: var(--danger-bg); }
.stat .stat-ico.good { color: var(--good); border-color: color-mix(in srgb,var(--good) 50%,transparent); background: color-mix(in srgb,var(--good) 12%,transparent); }
.stat .stat-ico.accent { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.stat .stat-n { font-size: 32px; font-weight: 600; letter-spacing: -.04em; line-height: 1; margin-bottom: 8px; }
.stat .stat-l { font-family: var(--font-mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-dim); }
.stat .stat-delta { font-family: var(--font-mono); font-size: 11px; color: var(--good); }
.stat .stat-top { display: flex; align-items: center; justify-content: space-between; }

/* ============ TOOLBAR / SEARCH ============ */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.search {
  flex: 1; min-width: 220px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px; height: 44px;
  background: var(--panel); border: 1px solid var(--border);
  transition: border-color .14s;
}
.search:focus-within { border-color: var(--accent); }
.search svg { width: 17px; height: 17px; color: var(--ink-faint); flex-shrink: 0; }
.search input { flex: 1; border: none; background: none; outline: none; color: var(--ink); font-size: 14px; }
.search input::placeholder { color: var(--ink-faint); }
.seg {
  display: inline-flex; border: 1px solid var(--border); background: var(--panel);
}
.seg button {
  padding: 0 15px; height: 44px; font-size: 13px; color: var(--ink-dim);
  border-right: 1px solid var(--border); display: inline-flex; align-items: center; gap: 7px;
  transition: color .13s, background .13s;
}
.seg button:last-child { border-right: none; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--ink); color: var(--bg); }
.seg button.on .seg-n { color: var(--accent); }
.seg .seg-n { font-family: var(--font-mono); font-size: 11px; }
.selectish {
  display: inline-flex; align-items: center; gap: 9px;
  height: 44px; padding: 0 13px; background: var(--panel); border: 1px solid var(--border);
  font-size: 13px; color: var(--ink-dim);
}
.selectish svg { width: 15px; height: 15px; }
.selectish:hover { border-color: var(--border-2); color: var(--ink); }
button.selectish { font: inherit; cursor: pointer; }
button.selectish.on { border-color: var(--border-2); color: var(--ink); }
.selectish-wrap { position: relative; }
.sel-menu {
  position: absolute; top: calc(100% + 5px); right: 0; z-index: 40;
  min-width: 200px; max-height: 320px; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--border-2); border-radius: var(--r-card);
  box-shadow: 0 14px 38px rgba(0,0,0,.22); padding: 5px;
}
.sel-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  padding: 9px 11px; font: inherit; font-size: 13px; color: var(--ink-dim);
  background: transparent; border: none; border-radius: 7px; cursor: pointer; text-align: left;
  transition: background .12s ease, color .12s ease;
}
.sel-opt:hover { background: var(--panel-2); color: var(--ink); }
.sel-opt.on { color: var(--ink); font-weight: 500; }
.sel-opt svg { width: 14px; height: 14px; color: var(--accent-deep); flex: none; }

/* ============ LIST ROWS (inbox) ============ */
.rows { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-card); }
.row {
  display: grid; grid-template-columns: 14px minmax(0,1fr) 150px 116px 184px 120px;
  gap: 18px; align-items: center;
  padding: 16px var(--pad); border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .12s;
}
.row:last-child { border-bottom: none; }
.row:hover { background: var(--panel-2); }
.row .r-mark { width: 8px; height: 8px; border-radius: 50%; background: var(--border-2); }
.row.is-new .r-mark { background: var(--accent); }
.row .r-from { font-weight: 600; font-size: 14.5px; letter-spacing: -.01em; }
/* prominent inbox status: colored left bar + strong badge */
.row.row-st { box-shadow: inset 4px 0 0 var(--border-2); }
.row.st-new { box-shadow: inset 4px 0 0 var(--accent); }
.row.st-wait { box-shadow: inset 4px 0 0 var(--warn); }
.row.st-sent { box-shadow: inset 4px 0 0 #2d7dd2; }
.row.st-done { box-shadow: inset 4px 0 0 var(--good); }
.row.st-err { box-shadow: inset 4px 0 0 var(--danger); }
.r-status { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; padding: 5px 10px; white-space: nowrap; border: 1px solid transparent; }
.r-status svg { width: 13px; height: 13px; }
.r-status.st-new { color: var(--accent-ink); background: var(--accent); }
.r-status.st-wait { color: var(--warn); background: color-mix(in srgb, var(--warn) 16%, transparent); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.r-status.st-sent { color: #2d7dd2; background: color-mix(in srgb, #2d7dd2 14%, transparent); border-color: color-mix(in srgb, #2d7dd2 38%, transparent); }
.r-status.st-done { color: var(--good); background: color-mix(in srgb, var(--good) 15%, transparent); border-color: color-mix(in srgb, var(--good) 38%, transparent); }
.r-status.st-err { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.row .r-info { min-width: 0; }
.row .r-subject { font-size: 13px; color: var(--ink-dim); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52ch; }
.row .r-meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); margin-top: 3px; }
.row .r-route { color: var(--ink-dim); font-size: 13.5px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .r-route b { color: var(--ink); font-weight: 500; }
.row .r-vol { font-family: var(--font-mono); font-size: 12px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .r-time { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); white-space: nowrap; text-align: right; }
.row .r-chev { color: var(--ink-faint); display: inline-flex; }
.co-recent { display: grid; grid-template-columns: 14px minmax(0,1fr) auto auto; gap: 14px; align-items: center; padding: 14px var(--pad); border-bottom: 1px solid var(--border); }
.co-recent:last-child { border-bottom: none; }
.co-recent .cr-main { min-width: 0; }
.co-recent .cr-route { font-size: 14px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-recent .cr-id { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); margin-top: 3px; }
.co-recent .cr-pr { font-family: var(--font-mono); font-size: 13px; color: var(--ink); white-space: nowrap; }
.row .r-chev svg { width: 16px; height: 16px; }

/* ============ EMPTY STATE ============ */
.empty { padding: 78px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.empty .em-ico {
  width: 56px; height: 56px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); color: var(--ink-faint); border-radius: 50%;
}
.empty .em-ico svg { width: 24px; height: 24px; }
.empty h4 { font-size: 16px; }
.empty p { color: var(--ink-dim); font-size: 13.5px; max-width: 40ch; }

/* ============ DETAIL (request) ============ */
.detail-grid { display: grid; grid-template-columns: 1fr; gap: var(--gap); }
@media (min-width: 980px) { .detail-grid { grid-template-columns: 1fr 1fr; } }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-dim); font-size: 13px; margin-bottom: 20px; }
.back-link:hover { color: var(--ink); }
.back-link svg { width: 15px; height: 15px; }

.mailcard { background: var(--panel); border: 1px solid var(--border); }
.mailcard .mc-head { display: flex; align-items: center; gap: 12px; padding: 18px var(--pad); border-bottom: 1px solid var(--border); }
.mailcard .mc-env { width: 38px; height: 38px; border: 1px solid var(--border); background: var(--inset); color: var(--accent-deep); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mailcard .mc-env svg { width: 18px; height: 18px; }
.mailcard .mc-from { font-weight: 600; font-size: 14.5px; }
.mailcard .mc-sub { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); margin-top: 2px; }
.mailcard .mc-body { padding: 20px var(--pad); font-size: 14px; line-height: 1.65; color: var(--ink-dim); border-bottom: 1px solid var(--border); white-space: pre-wrap; max-height: 420px; overflow-y: auto; }
.mailcard .mc-body b { color: var(--ink); font-weight: 600; }
.mailcard .mc-body .hl { background: color-mix(in srgb, var(--accent) 26%, transparent); color: var(--ink); padding: 0 3px; box-shadow: inset 0 -1px 0 var(--accent-deep); }

.parsed { padding: 8px var(--pad) 16px; }
.parsed .p-cap { display: flex; align-items: center; gap: 9px; padding: 14px 0 10px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-dim); }
.parsed .p-cap .spark { color: var(--accent-deep); display: inline-flex; }
.parsed .p-cap .spark svg { width: 14px; height: 14px; }
.prow { display: grid; grid-template-columns: 104px 1fr auto; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px dashed var(--border); }
.prow:last-child { border-bottom: none; }
.prow .p-k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-faint); }
.prow .p-v { font-size: 14px; font-weight: 500; color: var(--ink); }
.prow .p-conf { font-family: var(--font-mono); font-size: 10px; color: var(--accent-deep); }

.offers-card { background: var(--panel); border: 1px solid var(--border); display: flex; flex-direction: column; }
.offers-card .oc-head { padding: 16px var(--pad); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.offers-card .oc-cap { font-family: var(--font-mono); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-dim); }
.offers-list { padding: var(--pad); display: flex; flex-direction: column; gap: 11px; }
.offer {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 16px; border: 1.5px solid var(--border); background: var(--inset);
  cursor: pointer; transition: border-color .16s, background .16s, transform .12s;
}
.offer:hover { transform: translateY(-1px); border-color: var(--border-2); }
.offer .o-rk { width: 24px; height: 24px; flex-shrink: 0; background: var(--panel-3); color: var(--ink-dim); font-family: var(--font-mono); font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.offer .o-main { flex: 1; min-width: 0; }
.offer .o-nm { font-weight: 600; font-size: 14.5px; letter-spacing: -.01em; }
.offer .o-md { font-family: var(--font-mono); font-size: 11px; color: var(--ink-dim); margin-top: 3px; }
.offer .o-pr { font-weight: 600; font-size: 18px; letter-spacing: -.02em; white-space: nowrap; }
.offer .o-chk { width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .25s cubic-bezier(.2,1.5,.5,1); }
.offer .o-chk svg { width: 12px; height: 12px; color: var(--accent-ink); }
.offer.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--panel)); }
.offer.sel .o-rk { background: var(--accent); color: var(--accent-ink); }
.offer.sel .o-chk { opacity: 1; transform: scale(1); }
.offers-card .oc-foot { margin-top: auto; padding: var(--pad); border-top: 1px solid var(--border); }
.offers-card .oc-foot .btn { width: 100%; }
.oc-note { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-dim); margin-top: 12px; }
.oc-note svg { width: 14px; height: 14px; color: var(--accent-deep); }

/* ---- redesigned offers (top-3 + dispatch) ---- */
.dispatch-stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); margin-bottom: 16px; }
.dispatch-stats .ds { padding: 16px 18px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.dispatch-stats .ds:last-child { border-right: none; }
.dispatch-stats .ds-n { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.dispatch-stats .ds-l { font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.dispatch-list { display: flex; flex-direction: column; border: 1px solid var(--border); margin-bottom: 18px; }
.dl-row { display: grid; grid-template-columns: 22px 1fr auto auto; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.dl-row:last-child { border-bottom: none; }
.dl-row.dim { opacity: .62; }
.dl-rk { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }
.dl-nm { font-weight: 500; color: var(--ink); }
.dl-st { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; }
.dl-st svg { width: 11px; height: 11px; }
.dl-st.replied { color: var(--good); }
.dl-st.pending { color: var(--warn); }
.dl-st.nobid { color: var(--ink-faint); }
.dl-pr { font-family: var(--font-mono); font-size: 12px; color: var(--ink); text-align: right; min-width: 56px; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); animation: pulse-fade 1.4s ease-in-out infinite; }
@keyframes pulse-fade { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.offers2-list { padding: var(--pad); display: flex; flex-direction: column; gap: 16px; }
.offer2 { border: 1px solid var(--border); background: var(--panel); transition: border-color .12s ease; }
.offer2.sel { border-color: var(--accent-deep); box-shadow: 0 0 0 1px var(--accent-deep) inset; }
.offer2.top { background: color-mix(in srgb, var(--accent) 5%, var(--panel)); }
.o2-head { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 14px; align-items: start; padding: 16px 18px; cursor: pointer; }
.o2-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.o2-figs { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.o2-figs .o2-pr { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.o2-figs .o2-tt { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-dim); }
.o2-actions { display: flex; align-items: center; gap: 10px; }
.o2-rk { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 12px; font-weight: 600; background: var(--panel-3); color: var(--ink); }
.o2-rk.r1 { background: var(--accent); color: var(--accent-ink); }
.o2-rk.r2 { background: color-mix(in srgb, var(--accent) 45%, var(--panel-3)); }
.o2-main { min-width: 0; }
.o2-nm { font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.o2-titlerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.o2-why { align-self: center; }
.o2-md { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-faint); margin-top: 5px; }
.o2-why { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--accent-deep); background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 4px 8px; white-space: nowrap; }
.o2-why svg { width: 12px; height: 12px; }
.o2-fig { text-align: right; min-width: 0; }
.o2-pr { font-size: 16px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.o2-tt { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-dim); margin-top: 2px; }
.o2-radio { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border-2); display: flex; align-items: center; justify-content: center; }
.o2-radio.on { background: var(--accent); border-color: var(--accent); }
.o2-radio svg { width: 12px; height: 12px; color: var(--accent-ink); }
/* medals + info + why */
.o2-medal { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-size: 21px; line-height: 1; }
.offer2.m-gold { border-color: color-mix(in srgb, #d4af37 55%, var(--border)); background: color-mix(in srgb, #d4af37 7%, var(--panel)); }
.offer2.m-silver { border-color: color-mix(in srgb, #9aa0a6 50%, var(--border)); }
.offer2.m-bronze { border-color: color-mix(in srgb, #cd7f32 45%, var(--border)); }
.offer2.sel { box-shadow: 0 0 0 2px var(--accent-deep) inset; border-color: var(--accent-deep); }
.o2-why { display: inline-flex; align-items: center; gap: 5px; margin-left: 9px; font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-dim); background: var(--panel-3); padding: 2px 7px; vertical-align: middle; }
.o2-why svg { width: 11px; height: 11px; }
.o2-why.gold { color: #8a6d1b; background: color-mix(in srgb, #d4af37 18%, transparent); }
.o2-info { width: 26px; height: 26px; border: 1px solid var(--border-2); background: var(--panel); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink-dim); }
.o2-info:hover { color: var(--accent-deep); border-color: var(--accent-deep); }
.o2-info svg { width: 15px; height: 15px; }
.o2-whybox { margin: 0 15px 12px; padding: 13px 15px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); background: color-mix(in srgb, var(--accent) 6%, var(--inset)); }
.wb-h { display: flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--accent-deep); margin-bottom: 7px; }
.wb-h svg { width: 13px; height: 13px; }
.o2-whybox p { font-size: 13px; line-height: 1.55; color: var(--ink); margin: 0 0 10px; }
.wb-metrics { display: flex; gap: 18px; font-size: 12px; color: var(--ink-dim); }
.wb-metrics b { color: var(--ink); font-family: var(--font-mono); }
.o2-note-block { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: baseline; padding: 15px 20px; border-top: 1px solid var(--border); }
.o2-note-k { font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); }
.o2-note-v { font-size: 12.5px; color: var(--ink-dim); line-height: 1.5; }
.o2-note-block .o2-conf { font-family: var(--font-mono); font-size: 10px; color: var(--ink-faint); white-space: nowrap; }

/* winner email */
.we-mail { border: 1px solid var(--border); }
.we-row { display: grid; grid-template-columns: 60px 1fr; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
.we-row .we-k { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.we-row .we-v { color: var(--ink); }
.we-body { width: 100%; min-height: 220px; resize: vertical; border: none; padding: 16px 14px; font-family: var(--font-sans); font-size: 13.5px; line-height: 1.65; color: var(--ink); background: var(--panel); }
.we-body:focus { outline: none; }
.we-hint { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12.5px; color: var(--ink-dim); }
.we-hint svg { width: 14px; height: 14px; color: var(--accent-deep); }
.o2-sub { display: flex; align-items: center; justify-content: space-between; padding: 0 15px 11px; }
.o2-toggle { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; cursor: pointer; font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-dim); padding: 0; }
.o2-toggle svg { width: 13px; height: 13px; transition: transform .15s ease; }
.o2-toggle:hover { color: var(--ink); }
.o2-conf { font-family: var(--font-mono); font-size: 10px; color: var(--ink-faint); }
.o2-note { margin: 0 15px 14px; padding: 12px 14px; border: 1px solid var(--border); background: var(--inset); font-size: 13px; line-height: 1.55; color: var(--ink-dim); }
.more-offers { padding: 0 var(--pad) 6px; }
.mo-row { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.mo-row:last-child { border-bottom: none; }
.mo-nm { font-weight: 500; color: var(--ink); }
.mo-md, .mo-row .mo-md { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-faint); }
.mo-pr { font-family: var(--font-mono); font-size: 12px; color: var(--ink); }

/* ---- company documents ---- */
.docs-list { padding: var(--pad); display: flex; flex-direction: column; gap: 9px; }
.doc-row { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 14px; align-items: center; padding: 11px 14px; border: 1px solid var(--border); background: var(--panel); }
.doc-ic { width: 34px; height: 34px; border: 1px solid var(--border-2); background: var(--inset); display: flex; align-items: center; justify-content: center; color: var(--ink-dim); }
.doc-ic svg { width: 16px; height: 16px; }
.doc-main { min-width: 0; }
.doc-nm { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.doc-meta { font-family: var(--font-mono); font-size: 10px; color: var(--ink-faint); margin-top: 3px; }
.doc-exp { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .03em; color: var(--good); white-space: nowrap; }
.doc-exp svg { width: 12px; height: 12px; }
.doc-exp.warn { color: var(--warn); }
.doc-add { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 14px; border: 1px dashed var(--border-2); color: var(--ink-faint); font-family: var(--font-mono); font-size: 11.5px; }
.doc-add svg { width: 14px; height: 14px; }

/* ============ RFQ FLOW (stepper + analyse + match) ============ */
.stepper { display: flex; align-items: stretch; gap: 4px; margin-bottom: 26px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 11px; padding: 12px 16px; background: var(--panel); border: 1px solid var(--border); cursor: pointer; transition: border-color .14s, background .14s; flex: 1; min-width: 200px; text-align: left; }
.step:disabled { cursor: default; opacity: .55; }
.step.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--panel)); }
.step-n { width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; background: var(--panel-3); color: var(--ink-dim); font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.step.on .step-n { background: var(--accent); color: var(--accent-ink); }
.step.done .step-n { background: var(--accent-deep); color: #fff; }
.step.done .step-n svg { width: 14px; height: 14px; }
.step-tx { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.step-tx b { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.step-tx small { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); margin-top: 2px; }
.step-bar { align-self: center; width: 18px; height: 1px; background: var(--border-2); flex-shrink: 0; }
.step-bar.fill { background: var(--accent-deep); }
@media (max-width: 760px) { .step-bar { display: none; } }
.step-body { animation: stepIn .3s ease; }
@keyframes stepIn { from { transform: translateY(6px); } }

/* original mail meta */
.mailcard .mc-meta { display: flex; gap: 26px; padding: 12px var(--pad); border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--ink-dim); flex-wrap: wrap; }
.mailcard .mc-meta .k { display: block; font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); margin-bottom: 3px; }

/* AI analyse panel */
.ai-panel { background: var(--panel); border: 1px solid var(--border); display: flex; flex-direction: column; position: relative; }
.ai-foot button[disabled] { opacity: .55; }
/* re-analyse scan overlay */
.ai-scan { position: absolute; inset: 0; z-index: 5; background: color-mix(in srgb, var(--panel) 86%, transparent); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; padding: 24px; animation: scanFade .2s ease; }
@keyframes scanFade { from { opacity: 0; } }
.ai-scan-inner { width: 100%; max-width: 360px; }
.asc-head { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; margin-bottom: 20px; }
.asc-spin { display: inline-flex; color: var(--accent-deep); animation: asc-rot 1s linear infinite; }
.asc-spin svg { width: 18px; height: 18px; }
@keyframes asc-rot { to { transform: rotate(360deg); } }
.asc-timeline { display: flex; flex-direction: column; gap: 0; margin-bottom: 18px; }
.asc-step { display: grid; grid-template-columns: 16px 1fr 16px; gap: 11px; align-items: center; padding: 9px 0; position: relative; opacity: .35; animation: asc-on .5s ease forwards; }
.asc-step::before { content: ''; position: absolute; left: 7px; top: 22px; bottom: -9px; width: 1px; background: var(--border-2); }
.asc-step:last-child::before { display: none; }
.asc-step .asc-dot { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--border-2); background: var(--panel); }
.asc-step .asc-label { font-size: 13px; color: var(--ink); }
.asc-step svg { width: 15px; height: 15px; color: var(--accent-deep); opacity: 0; }
@keyframes asc-on { to { opacity: 1; } }
.asc-step[style] .asc-dot { animation: asc-fill .4s ease forwards; animation-delay: inherit; }
@keyframes asc-fill { to { background: var(--accent); border-color: var(--accent); } }
.asc-bar { height: 4px; background: var(--panel-3); overflow: hidden; }
.asc-bar i { display: block; height: 100%; width: 0; background: var(--accent-deep); animation: asc-grow 2.5s cubic-bezier(.4,0,.2,1) forwards; }
/* match loader (analyse → match) */
.match-loader { border: 1px solid var(--border); background: var(--panel); padding: 60px 30px; display: flex; align-items: center; justify-content: center; animation: scanFade .2s ease; }
.match-loader .ml-inner { width: 100%; max-width: 380px; }
.match-loader .ml-head { display: flex; align-items: center; gap: 11px; font-weight: 600; font-size: 16px; margin-bottom: 22px; }
.match-loader .ml-head .asc-spin svg { width: 19px; height: 19px; }
@keyframes asc-grow { to { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .asc-spin, .asc-bar i { animation: none; } .asc-bar i { width: 100%; } }
.ai-head { display: flex; align-items: center; justify-content: space-between; padding: 16px var(--pad); border-bottom: 1px solid var(--border); }
.ai-conf { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 11px; color: var(--accent-deep); }
.ai-conf i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.ai-body { padding: var(--pad); display: flex; flex-direction: column; }
.ai-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px 16px; align-items: stretch; }
.ai-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; height: 100%; }
.ai-field label { min-height: 12px; }
.ai-field.wide { grid-column: 1 / -1; }
.ai-field label { font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.ai-val { border: 1px solid var(--border); background: var(--inset); padding: 9px 11px; font-size: 13.5px; color: var(--ink); border-radius: var(--r-input); min-height: 40px; flex: 1; display: flex; align-items: center; }s: center; }
.ai-val.mono { font-family: var(--font-mono); font-size: 12.5px; }
.ai-val.empty { color: var(--ink-faint); }
.ai-input { width: 100%; border: 1px solid var(--accent-deep); background: var(--panel); padding: 9px 11px; font-size: 13.5px; color: var(--ink); border-radius: var(--r-input); min-height: 40px; flex: 1; font-family: var(--font-sans); outline: none; }
.ai-input.mono { font-family: var(--font-mono); font-size: 12.5px; }
.ai-input:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }

/* ----- PASTE / PARSE request modal ----- */
.paste-area { width: 100%; min-height: 180px; resize: vertical; font-family: var(--font-mono); font-size: 13px; line-height: 1.55; padding: 13px 14px; border: 1px solid var(--border-2); background: var(--inset); color: var(--ink); border-radius: var(--r-input); }
.paste-area:focus { outline: none; border-color: var(--accent-deep); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.paste-row { display: flex; align-items: center; gap: 10px; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-dim); border: 1px solid var(--border); background: var(--panel); padding: 5px 9px; }
.file-chip svg { width: 13px; height: 13px; }
.reading-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 44px 20px; gap: 8px; }
.reading-state h4 { margin: 6px 0 0; font-size: 17px; }
.reading-state p { color: var(--ink-dim); font-size: 13.5px; margin: 0; }
.reading-spark { width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, var(--panel)); color: var(--accent-deep); animation: read-pulse 1s ease-in-out infinite; }
.reading-spark svg { width: 22px; height: 22px; }
@keyframes read-pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.12); opacity: .7; } }
.parsed-banner { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--accent-deep); background: color-mix(in srgb, var(--accent) 9%, var(--panel)); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); padding: 11px 13px; }
.parsed-banner svg { width: 16px; height: 16px; flex: none; }
.parsed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); }
.parsed-cell { background: var(--panel); padding: 11px 13px; display: flex; flex-direction: column; gap: 4px; }
.parsed-cell .pk { font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.parsed-cell .pv { font-size: 13.5px; color: var(--ink); font-weight: 500; }
.parsed-cell.miss .pv { color: var(--ink-faint); font-weight: 400; font-style: italic; }
.ai-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
@media (max-width: 560px) { .ai-grid { grid-template-columns: 1fr 1fr; } }

/* match & send */
.match-panel { display: flex; flex-direction: column; }
.match-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px var(--pad); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.match-bar .mb-l { display: flex; align-items: center; gap: 22px; }
.match-bar h3 { font-size: 16px; display: flex; align-items: center; gap: 9px; }
.mb-count { font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--accent-ink); background: var(--accent); padding: 2px 8px; border-radius: 20px; }
.check-all { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-dim); }
.check-all:hover { color: var(--ink); }
.mr-check { width: 22px; height: 22px; flex-shrink: 0; border: 1.5px solid var(--border-2); background: var(--panel); border-radius: 5px; display: flex; align-items: center; justify-content: center; transition: background .12s, border-color .12s; }
.mr-check svg { width: 13px; height: 13px; color: var(--accent-ink); }
.match-row:not(.off) .mr-check, .mr-check.on { background: var(--accent); border-color: var(--accent); }
.mr-check.sm { width: 19px; height: 19px; }
.match-list { display: flex; flex-direction: column; }
.match-row { padding: 18px var(--pad); border-bottom: 1px solid var(--border); transition: opacity .14s; }
.match-row.off { opacity: .5; }
.match-row.off .mr-check { background: var(--panel); border-color: var(--border-2); }
.mr-top { display: grid; grid-template-columns: auto 1fr auto; gap: 12px 16px; align-items: center; }
.mr-id { min-width: 0; }
.mr-nm { font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.mr-sub { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); margin-top: 3px; }
.mr-score { font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--accent-deep); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.mr-meta { grid-column: 2 / -1; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-dim); margin-top: 2px; }
.mr-meta .mono { font-family: var(--font-mono); font-size: 11px; }
.mr-meta .co-flag { font-family: var(--font-mono); font-size: 11px; color: var(--ink-dim); display: inline-flex; align-items: center; gap: 5px; }
.mr-x { color: var(--danger) !important; grid-row: 1; grid-column: 3; align-self: start; }
.mr-draft-toggle { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--accent-deep); }
.mr-draft-toggle svg { width: 14px; height: 14px; transition: transform .16s; }
.mr-draft-toggle.open svg { transform: rotate(90deg); }
.draft-editor { margin-top: 14px; border: 1px solid var(--border); background: var(--inset); padding: 16px; display: flex; flex-direction: column; gap: 7px; border-radius: var(--r-input); }
.draft-editor label { font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); margin-top: 6px; }
.draft-editor label:first-child { margin-top: 0; }
.de-input, .de-area { border: 1px solid var(--border); background: var(--panel); padding: 10px 12px; font-size: 13px; color: var(--ink); font-family: inherit; border-radius: var(--r-input); width: 100%; }
.de-area { resize: vertical; line-height: 1.6; font-size: 12.5px; }
.de-input:focus, .de-area:focus { outline: none; border-color: var(--accent); }
.de-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.de-note { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-dim); }
.de-note svg { width: 13px; height: 13px; color: var(--accent-deep); }
.match-foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px var(--pad); flex-wrap: wrap; }
.match-foot .oc-note { margin-top: 0; flex: 1; min-width: 220px; }

/* sent / waiting panel */
.offers-grid { align-items: start; }
.sent-panel .sent-body { padding: var(--pad); }
.sent-panel .sent-body p { font-size: 14px; line-height: 1.6; color: var(--ink-dim); }
.sent-panel .sent-body b { color: var(--ink); }
.sent-track { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.st-row { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--ink); }
.st-dot { width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--border-2); display: flex; align-items: center; justify-content: center; }
.st-dot svg { width: 12px; height: 12px; }
.st-dot.done { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.st-dot.live { background: var(--accent); border-color: var(--accent); animation: stPulse 1.6s ease-in-out infinite; }
@keyframes stPulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 0%, transparent); } 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } }

/* ============ KATALOG GRID ============ */
.cat-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.coco {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: var(--pad); display: flex; flex-direction: column; gap: 15px;
  transition: border-color .14s, transform .12s, box-shadow .16s; cursor: pointer;
}
.coco:hover { border-color: var(--border-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.coco .co-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.coco .co-nm { font-size: 16.5px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.coco .co-id { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-faint); margin-top: 4px; }
.coco .co-flag { font-family: var(--font-mono); font-size: 11px; color: var(--ink-dim); display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.coco .co-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.coco .co-rule { height: 1px; background: var(--border); }
.coco .co-meta { display: grid; gap: 9px; }
.coco .co-mrow { display: grid; grid-template-columns: 78px 1fr; gap: 10px; font-size: 13px; align-items: center; }
.coco .co-mrow .mk { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); }
.coco .co-mrow .mv { color: var(--ink); }
.coco .co-route { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.route-pin { padding: 3px 8px; font-family: var(--font-mono); font-size: 10.5px; border: 1px solid var(--border-2); color: var(--ink-dim); }
.route-pin.from { background: color-mix(in srgb,var(--good) 14%,transparent); border-color: color-mix(in srgb,var(--good) 40%,transparent); color: var(--good); }
.route-arrow { color: var(--ink-faint); font-family: var(--font-mono); }
.coco .co-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.coco .co-score { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-dim); }

/* company DETAIL stamdata (not inside .coco) */
.co-meta { display: grid; gap: 13px; }
.co-mrow { display: grid; grid-template-columns: 92px 1fr; gap: 16px; font-size: 13.5px; align-items: start; }
.co-mrow .mk { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); padding-top: 2px; }
.co-mrow .mv { color: var(--ink); }
.co-route { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.score-bar { width: 54px; height: 4px; background: var(--panel-3); overflow: hidden; }
.score-bar > i { display: block; height: 100%; background: var(--accent); }

/* ============ MODAL ============ */
.scrim { position: fixed; inset: 0; z-index: 100; background: color-mix(in srgb, var(--bg) 30%, rgba(0,0,0,.5)); backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 20px; overflow-y: auto; }
.modal { width: 100%; max-width: 720px; background: var(--panel); border: 1px solid var(--border-2); box-shadow: var(--shadow-lg); animation: rise .24s cubic-bezier(.2,.8,.3,1); }
@keyframes rise { from { transform: translateY(14px); } }
.modal .m-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 22px var(--pad) 0; }
.modal .m-title { font-size: 20px; letter-spacing: -.02em; }
.modal .m-sub { color: var(--ink-dim); font-size: 13px; margin-top: 5px; }
.modal .m-x { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-dim); border: 1px solid transparent; }
.modal .m-x:hover { color: var(--ink); border-color: var(--border); }
.wizard-tabs { display: flex; gap: 0; padding: 18px var(--pad) 0; border-bottom: 1px solid var(--border); margin-top: 16px; }
.wizard-tab { display: inline-flex; align-items: center; gap: 9px; padding: 12px 16px; font-size: 13px; color: var(--ink-faint); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.wizard-tab .wt-n { width: 20px; height: 20px; border: 1px solid var(--border-2); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 10px; }
.wizard-tab.on { color: var(--ink); border-bottom-color: var(--accent); }
.wizard-tab.on .wt-n { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.wizard-tab.done .wt-n { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.m-body { padding: 24px var(--pad); }
.m-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px var(--pad); border-top: 1px solid var(--border); background: var(--panel-2); }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-dim); }
.field input, .field select, .field textarea {
  background: var(--inset); border: 1px solid var(--border); padding: 11px 13px; color: var(--ink); font-size: 14px; outline: none; transition: border-color .14s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-faint); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 84px; }
.field .hint { font-size: 11.5px; color: var(--ink-faint); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.optlist { border: 1px solid var(--border); background: var(--inset); max-height: 170px; overflow-y: auto; }
.opt { padding: 9px 13px; font-size: 13.5px; color: var(--ink-dim); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; cursor: pointer; }
.opt:last-child { border-bottom: none; }
.opt:hover { background: var(--panel-2); color: var(--ink); }
.opt .ck { width: 16px; height: 16px; border: 1px solid var(--border-2); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.opt.on .ck { background: var(--accent); border-color: var(--accent); }
.opt.on .ck svg { width: 11px; height: 11px; color: var(--accent-ink); }
.opt.on { color: var(--ink); }
.dropzone { border: 1.5px dashed var(--border-2); background: var(--inset); padding: 40px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--ink-dim); }
.dropzone:hover { border-color: var(--accent); }
.dropzone .dz-ico { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-faint); }
.dropzone .dz-ico svg { width: 22px; height: 22px; }
.dropzone b { color: var(--ink); }

/* ============ PROSPECTS / ADMIN ROWS ============ */
.prospect, .userrow {
  display: flex; align-items: center; gap: 16px;
  padding: 16px var(--pad); border-bottom: 1px solid var(--border);
}
.prospect:last-child, .userrow:last-child { border-bottom: none; }
.prospect .pr-main, .userrow .ur-main { flex: 1; min-width: 0; }
.prospect .pr-nm { font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.prospect .pr-sub { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-faint); margin-top: 4px; }
.prospect .pr-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.prospect .pr-actions { display: flex; gap: 8px; }
.prospect.is-click { cursor: pointer; transition: background .12s ease; }
.r-badges { display: flex; align-items: center; gap: 8px; justify-content: flex-start; }
.r-replies { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: .03em; color: var(--good); background: color-mix(in srgb, var(--good) 12%, var(--panel)); border: 1px solid color-mix(in srgb, var(--good) 30%, transparent); padding: 2px 7px; white-space: nowrap; }
.prospect.is-click:hover { background: var(--panel-2); }
.pd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); margin-bottom: 16px; }
.pd-cell { background: var(--panel); padding: 11px 14px; display: flex; flex-direction: column; gap: 4px; }
.pd-cell .pk, .pd-block .pk { font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.pd-cell .pv { font-size: 13px; color: var(--ink); font-weight: 500; }
.pd-block { margin-bottom: 16px; }
.pd-block .pv { font-size: 13.5px; color: var(--ink); }
.pd-msg { margin-top: 7px; padding: 13px 15px; border: 1px solid var(--border); background: var(--inset); font-size: 13.5px; line-height: 1.6; color: var(--ink); border-radius: var(--r-input); }
.userrow { display: grid; grid-template-columns: 38px minmax(0,1fr) 168px 200px 18px; align-items: center; gap: 16px; padding: 14px var(--pad); border-bottom: 1px solid var(--border); }
.userrow:last-child { border-bottom: none; }
.userrow .ur-main { min-width: 0; }
.userrow .ur-badges { display: flex; align-items: center; gap: 7px; justify-content: flex-start; }
.userrow .ur-nm { font-weight: 600; font-size: 14px; }
.userrow .ur-sub { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); margin-top: 4px; }
.userrow .ur-login { font-family: var(--font-mono); font-size: 11px; color: var(--ink-dim); white-space: nowrap; text-align: right; }
@media (max-width: 760px) { .userrow { grid-template-columns: 38px 1fr auto; } .userrow .ur-badges, .userrow .ur-login { grid-column: 2 / -1; justify-content: flex-start; text-align: left; } }

/* ============ LOGIN ============ */
.login-screen { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 900px) { .login-screen { grid-template-columns: 1.1fr .9fr; } }
.login-aside { display: none; position: relative; border-right: 1px solid var(--border); background: var(--panel); overflow: hidden; padding: 54px; flex-direction: column; justify-content: space-between; }
@media (min-width: 900px) { .login-aside { display: flex; } }
.login-aside .la-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 46px 46px; opacity: .5; mask-image: radial-gradient(circle at 30% 40%, #000, transparent 75%); }
.login-aside .la-q { position: relative; font-size: clamp(28px, 3vw, 44px); font-weight: 600; letter-spacing: -.03em; line-height: 1.02; max-width: 13ch; }
.login-aside .la-q .g { color: var(--accent-deep); }
.login-aside .la-sub { position: relative; color: var(--ink-dim); font-size: 16px; line-height: 1.55; margin-top: 18px; max-width: 40ch; }
.login-aside .la-glow { position: absolute; right: -120px; top: 42%; width: 460px; height: 460px; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 32%, transparent), transparent 62%); filter: blur(8px); pointer-events: none; }
.lc-ey { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 10px; }
.lc-row { display: flex; align-items: center; justify-content: space-between; }
.lc-remember { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-dim); cursor: pointer; white-space: nowrap; position: relative; }
.lc-remember input { position: absolute; opacity: 0; width: 18px; height: 18px; left: 0; margin: 0; }
.lc-remember .lc-check { width: 18px; height: 18px; flex: none; border: 1px solid var(--border-2); background: var(--inset); display: inline-flex; align-items: center; justify-content: center; position: relative; }
.lc-remember input:checked + .lc-check { background: var(--accent); border-color: var(--accent); }
.lc-remember input:checked + .lc-check::after { content: ''; width: 5px; height: 9px; border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: rotate(45deg); margin-top: -2px; }
.lc-remember .lc-remember-tx { flex: none; white-space: nowrap; }
.lc-forgot { font-size: 13px; color: var(--accent-deep); text-decoration: none; }
.lc-forgot:hover { text-decoration: underline; }
.login-aside .la-foot { position: relative; display: flex; gap: 36px; }
.login-aside .la-foot .lf-n { font-size: 26px; font-weight: 600; letter-spacing: -.03em; }
.login-aside .la-foot .lf-l { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-dim); margin-top: 4px; }
/* try-demo onboarding carousel */
.try-carousel { position: relative; margin: 26px 0; max-width: 400px; }
.tc-card { display: flex; align-items: flex-start; gap: 16px; padding: 20px; background: var(--panel); border: 1px solid var(--border); box-shadow: 0 16px 40px -28px rgba(0,0,0,.3); animation: tcIn .5s cubic-bezier(.2,.9,.3,1); }
@keyframes tcIn { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.tc-ico { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-deep); }
.tc-ico svg { width: 22px; height: 22px; }
.tc-tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.tc-t { font-size: 17px; font-weight: 600; letter-spacing: -.02em; margin-top: 5px; }
.tc-b { font-size: 13.5px; line-height: 1.5; color: var(--ink-dim); margin-top: 6px; }
.tc-dots { display: flex; gap: 7px; margin-top: 16px; }
.tc-dot { width: 22px; height: 4px; border: none; padding: 0; background: var(--border-2); cursor: pointer; transition: background .2s ease; }
.tc-dot.on { background: var(--accent); }
@media (prefers-reduced-motion: reduce) { .tc-card { animation: none; } }
.login-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--bg); }
.login-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 22px; }
.login-card .lc-brand { display: flex; align-items: center; gap: 11px; }
.login-card h1 { font-size: 26px; letter-spacing: -.03em; }
.login-card .lc-sub { color: var(--ink-dim); font-size: 14px; margin-top: -10px; }
.login-card .lc-foot { display: flex; align-items: center; gap: 8px; justify-content: center; font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); padding-top: 6px; }

/* ============ MISC ============ */
.reveal { animation: rvl .45s ease; }
@keyframes rvl { from { transform: translateY(8px); } to { transform: none; } }

/* button press feedback */
.btn:active { transform: scale(.97); }
.icon-btn:active, .nav-link:active, .chip:active, .seg button:active { transform: scale(.95); }

/* staggered list entrance */
.rows .row, .cat-grid .coco, .match-list .match-row, .rows .userrow, .rows .prospect, .offers2-list .offer2, .dispatch-list .dl-row {
  animation: itemIn .4s cubic-bezier(.2,.8,.3,1) both;
}
@keyframes itemIn { from { transform: translateY(10px); } to { transform: none; } }
.rows .row:nth-child(1), .cat-grid .coco:nth-child(1), .rows .userrow:nth-child(1), .rows .prospect:nth-child(1) { animation-delay: .02s; }
.rows .row:nth-child(2), .cat-grid .coco:nth-child(2), .rows .userrow:nth-child(2), .rows .prospect:nth-child(2) { animation-delay: .06s; }
.rows .row:nth-child(3), .cat-grid .coco:nth-child(3), .rows .userrow:nth-child(3), .rows .prospect:nth-child(3) { animation-delay: .10s; }
.rows .row:nth-child(4), .cat-grid .coco:nth-child(4), .rows .userrow:nth-child(4), .rows .prospect:nth-child(4) { animation-delay: .14s; }
.rows .row:nth-child(5), .cat-grid .coco:nth-child(5), .rows .userrow:nth-child(5), .rows .prospect:nth-child(5) { animation-delay: .18s; }
.rows .row:nth-child(6), .cat-grid .coco:nth-child(6), .rows .userrow:nth-child(6), .rows .prospect:nth-child(6) { animation-delay: .22s; }
.rows .row:nth-child(n+7), .cat-grid .coco:nth-child(n+7), .rows .userrow:nth-child(n+7) { animation-delay: .26s; }
.row:hover { transform: translateX(2px); }

/* ===== loading skeleton ===== */
.skeleton { padding: 0; }
.sk-row { display: grid; grid-template-columns: 14px 1fr 120px 120px 90px; gap: 18px; align-items: center; padding: 18px var(--pad); border-bottom: 1px solid var(--border); }
.sk-bar { height: 12px; border-radius: 4px; background: linear-gradient(90deg, var(--panel-2) 0%, var(--panel-3) 50%, var(--panel-2) 100%); background-size: 200% 100%; animation: shimmer 1.2s ease-in-out infinite; }
.sk-bar.sm { height: 9px; }
.sk-bar.w60 { width: 60%; } .sk-bar.w40 { width: 40%; } .sk-bar.w80 { width: 80%; }
.sk-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--panel-3); animation: shimmer 1.2s ease-in-out infinite; background-size: 200% 100%; background-image: linear-gradient(90deg, var(--panel-2), var(--panel-3), var(--panel-2)); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.sk-stat { padding: 18px; border: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
@media (prefers-reduced-motion: reduce) {
  .rows .row, .cat-grid .coco, .match-list .match-row, .rows .userrow, .rows .prospect, .offers2-list .offer2, .dispatch-list .dl-row { animation: none; }
  .sk-bar, .sk-dot { animation: none; }
}
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; } }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hide-sm { }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .workspace { display: none; }
  .row { grid-template-columns: 12px 1fr auto; }
  .row .r-route, .row .r-vol { display: none; }
  .acct .who { display: none; }
}

/* ============================================================
   EXTERNAL DEMO (demo.fragta.com) — lead gate, tour, Frida
   ============================================================ */
.ext-gate { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
@media (max-width: 860px) { .ext-gate { grid-template-columns: 1fr; } .eg-aside { display: none; } }
.eg-aside { position: relative; background: #0b0b0b; color: #fafafa; padding: clamp(40px, 6vw, 84px); display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.eg-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 44px 44px; opacity: .06; }
.eg-aside .brand { display: flex; align-items: center; gap: 10px; position: relative; margin-bottom: 40px; }
.eg-aside .brand-name { color: #fafafa; font-size: 20px; }
.eg-aside .brand-mark::after { background: #0b0b0b; }
.eg-q { position: relative; font-size: clamp(30px, 3.4vw, 44px); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; }
.eg-q .g { color: var(--accent); }
.eg-sub { position: relative; color: #a0a0a0; font-size: 15.5px; line-height: 1.6; margin-top: 20px; max-width: 420px; }
.eg-points { position: relative; margin-top: 34px; display: flex; flex-direction: column; gap: 13px; }
.egp { display: flex; align-items: center; gap: 11px; font-size: 14px; color: #d4d4d4; }
.egp-d { width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg); flex: none; }
.eg-main { display: flex; align-items: center; justify-content: center; padding: clamp(28px, 5vw, 60px); background: var(--bg); }
.eg-card { width: 100%; max-width: 400px; }
.eg-cap { margin-bottom: 18px; }
.eg-card h1 { font-size: 30px; font-weight: 600; letter-spacing: -.025em; margin: 0; }
.eg-csub { color: var(--ink-dim); font-size: 14.5px; margin: 8px 0 26px; }
.eg-card .field { margin-bottom: 15px; }
.eg-fine { font-size: 11.5px; color: var(--ink-faint); line-height: 1.5; margin-top: 16px; }

/* persistent external bar (top-right, below nav) */
.ext-bar { position: fixed; bottom: 20px; left: 20px; z-index: 70; display: flex; align-items: center; gap: 10px; }
.ext-badge { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: var(--ink-dim); background: var(--panel); border: 1px solid var(--border-2); padding: 7px 12px; box-shadow: var(--shadow); }
.ext-badge .brand-mark { width: 13px; height: 13px; }
.ext-tour-btn { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent); border: none; padding: 8px 13px; cursor: pointer; box-shadow: var(--shadow); transition: transform .12s ease; }
.ext-tour-btn:hover { transform: translateY(-1px); }
.ext-tour-btn svg { width: 14px; height: 14px; }

/* guided tour */
.tour-wrap { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; padding: 0 20px 26px; pointer-events: none; }
.tour-card { pointer-events: auto; width: 100%; max-width: 460px; background: var(--panel); border: 1px solid var(--border-2); box-shadow: 0 24px 60px -24px rgba(0,0,0,.45); padding: 22px 24px; animation: tourIn .3s cubic-bezier(.2,.9,.3,1); }
@keyframes tourIn { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.tour-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.tour-step { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); letter-spacing: .06em; }
.tour-skip { background: none; border: none; cursor: pointer; font-family: var(--font-mono); font-size: 11px; color: var(--ink-dim); }
.tour-skip:hover { color: var(--ink); }
.tour-title { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.tt-mark { width: 13px; height: 13px; background: var(--accent); transform: rotate(45deg); flex: none; }
.tour-body { color: var(--ink-dim); font-size: 14px; line-height: 1.6; margin: 10px 0 18px; }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.tour-foot .btn { white-space: normal; text-align: left; }
.tour-dots { display: flex; gap: 6px; }
.tour-dots .td { width: 6px; height: 6px; border-radius: 50%; background: var(--border-2); }
.tour-dots .td.on { background: var(--accent); }

/* Frida chat */
.frida-fab { position: fixed; bottom: 22px; right: 22px; z-index: 210; width: 56px; height: 56px; border-radius: 50%; border: none; background: var(--accent); color: var(--accent-ink); cursor: pointer; box-shadow: 0 14px 34px -12px rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; overflow: hidden; transition: transform .16s ease; }
.frida-fab.open { overflow: visible; }
.frida-fab:hover { transform: scale(1.06); }
.frida-fab.open { background: var(--panel); color: var(--ink); border: 1px solid var(--border-2); }
.frida-fab svg { width: 24px; height: 24px; }
.ff-avatar { position: relative; display: flex; align-items: center; justify-content: center; }
.ff-avatar .frida-ill { width: 52px; height: 52px; display: block; }
.ff-on { position: absolute; top: -4px; right: -8px; width: 11px; height: 11px; border-radius: 50%; background: var(--good); border: 2px solid var(--accent); }
.frida-fab.open .ff-on { display: none; }
.frida-panel { position: fixed; bottom: 90px; right: 22px; z-index: 210; width: 360px; max-width: calc(100vw - 44px); height: 520px; max-height: calc(100vh - 130px); background: var(--panel); border: 1px solid var(--border-2); box-shadow: 0 24px 60px -22px rgba(0,0,0,.45); display: flex; flex-direction: column; animation: tourIn .26s cubic-bezier(.2,.9,.3,1); }
.frida-head { display: flex; align-items: center; gap: 11px; padding: 15px 17px; border-bottom: 1px solid var(--border); }
.fh-av { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; flex: none; }
.fh-av .frida-ill { width: 36px; height: 36px; display: block; }
.fh-nm { font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.fh-on { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.fh-sub { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-faint); margin-top: 2px; }
.frida-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.fmsg { display: flex; }
.fmsg.me { justify-content: flex-end; }
.fbubble { max-width: 80%; padding: 10px 13px; font-size: 13.5px; line-height: 1.5; }
.fmsg.frida .fbubble { background: var(--panel-2); color: var(--ink); border: 1px solid var(--border); }
.fmsg.me .fbubble { background: var(--accent); color: var(--accent-ink); }
.fbubble.typing { display: flex; gap: 4px; align-items: center; }
.fbubble.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-faint); animation: ftype 1s infinite; }
.fbubble.typing span:nth-child(2) { animation-delay: .15s; }
.fbubble.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ftype { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
.frida-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 0; }
.frida-quick button { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-dim); background: var(--inset); border: 1px solid var(--border); padding: 6px 9px; cursor: pointer; transition: border-color .12s ease, color .12s ease; }
.frida-quick button:hover { color: var(--ink); border-color: var(--border-2); }
.frida-input { display: flex; gap: 8px; padding: 13px 14px; border-top: 1px solid var(--border); }
.frida-input input { flex: 1; border: 1px solid var(--border-2); background: var(--inset); padding: 9px 12px; font: inherit; font-size: 13.5px; color: var(--ink); }
.frida-input input:focus { outline: none; border-color: var(--accent-deep); }
.frida-input .btn { padding: 9px 12px; }
.frida-input .btn svg { width: 15px; height: 15px; }
@media (prefers-reduced-motion: reduce) { .tour-card, .frida-panel { animation: none; } .frida-fab:hover, .ext-tour-btn:hover { transform: none; } }

/* ============================================================
   SETTINGS (Indstillinger)
   ============================================================ */
.set-layout { display: grid; grid-template-columns: 256px 1fr; gap: var(--gap); align-items: start; }
@media (max-width: 880px) { .set-layout { grid-template-columns: 1fr; } }
.set-menu { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 78px; }
.set-menu-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid transparent; background: transparent; cursor: pointer; text-align: left; transition: background .12s ease, border-color .12s ease; }
.set-menu-item svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--ink-dim); }
.set-menu-item:hover { background: var(--panel-2); }
.set-menu-item.on { background: var(--panel); border-color: var(--border-2); }
.set-menu-item.on svg { color: var(--accent-deep); }
.smi-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.smi-l { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.smi-d { font-size: 11.5px; color: var(--ink-faint); line-height: 1.35; }
@media (max-width: 880px) { .set-menu { flex-direction: row; overflow-x: auto; position: static; } .set-menu-item { min-width: 150px; } .smi-d { display: none; } }

.set-pane-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: var(--gap); }
.set-pane-head h2 { font-size: 21px; font-weight: 600; letter-spacing: -.02em; margin: 0; }
.set-pane-head p { color: var(--ink-dim); font-size: 13.5px; margin: 6px 0 0; max-width: 60ch; line-height: 1.5; }
.set-pane-head code, .tpl-vars code, .set-pane-head p code { font-family: var(--font-mono); font-size: .92em; background: var(--inset); padding: 1px 5px; border: 1px solid var(--border); }
.set-body { padding: var(--pad); display: flex; flex-direction: column; gap: 18px; }
.set-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.set-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .set-grid2, .set-grid3 { grid-template-columns: 1fr; } }
.set-select { width: 100%; padding: 11px 12px; font: inherit; font-size: 13.5px; background: var(--inset); border: 1px solid var(--border-2); color: var(--ink); appearance: none; cursor: pointer; }
.set-select.sm { padding: 7px 10px; font-size: 12.5px; }
.set-select:focus { outline: none; border-color: var(--accent-deep); }
.inp-suffix { display: flex; align-items: center; border: 1px solid var(--border-2); background: var(--inset); }
.inp-suffix input { border: none; background: transparent; flex: 1; }
.inp-suffix span { padding: 0 12px; font-family: var(--font-mono); font-size: 13px; color: var(--ink-faint); }
.set-actions { display: flex; gap: 8px; }

/* users table */
.set-userhead, .set-userrow { display: grid; grid-template-columns: minmax(0,1.6fr) 130px 110px 150px 40px; gap: 14px; align-items: center; padding: 12px var(--pad); }
.set-userhead { border-bottom: 1px solid var(--border); font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.set-userrow { border-bottom: 1px solid var(--border); }
.set-userrow:last-child { border-bottom: none; }
.su-id { display: flex; align-items: center; gap: 11px; min-width: 0; }
.su-main { min-width: 0; }
.su-nm { font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; }
.su-mail { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.su-status { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; }
.su-status .d { width: 7px; height: 7px; border-radius: 50%; }
.su-status.on { color: var(--good); } .su-status.on .d { background: var(--good); }
.su-status.off { color: var(--ink-faint); } .su-status.off .d { background: var(--ink-faint); }
.su-last { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-dim); }
.su-act { display: flex; justify-content: flex-end; }
.icon-btn.sm { width: 28px; height: 28px; }
.icon-btn.sm svg { width: 14px; height: 14px; }
@media (max-width: 720px) { .set-userhead { display: none; } .set-userrow { grid-template-columns: 1fr auto; row-gap: 8px; } }

.set-roles-note { margin-top: var(--gap); border: 1px dashed var(--border-2); padding: var(--pad); }
.srn-h { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.srn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
@media (max-width: 620px) { .srn-grid { grid-template-columns: 1fr; } }
.srn-item { display: flex; flex-direction: column; gap: 3px; }
.srn-item b { font-size: 13px; } .srn-item span { font-size: 12.5px; color: var(--ink-dim); line-height: 1.4; }

/* templates */
.set-tpl { display: grid; grid-template-columns: 260px 1fr; gap: var(--gap); align-items: start; }
@media (max-width: 760px) { .set-tpl { grid-template-columns: 1fr; } }
.set-tpl-list { display: flex; flex-direction: column; }
.tpl-row { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding: 13px 15px; border: none; border-bottom: 1px solid var(--border); background: transparent; cursor: pointer; text-align: left; }
.tpl-row:last-child { border-bottom: none; }
.tpl-row:hover { background: var(--panel-2); }
.tpl-row.on { background: color-mix(in srgb, var(--accent) 7%, var(--panel)); box-shadow: inset 3px 0 0 var(--accent); }
.tpl-nm { font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; }
.tpl-tag { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); }
.tpl-vars { font-size: 12px; color: var(--ink-dim); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* imports */
.set-import { display: grid; grid-template-columns: 38px minmax(0,1fr) auto auto; gap: 14px; align-items: center; padding: 14px var(--pad); border-bottom: 1px solid var(--border); }
.set-import:last-child { border-bottom: none; }
.si-ico { width: 38px; height: 38px; border: 1px solid var(--border-2); background: var(--inset); display: flex; align-items: center; justify-content: center; color: var(--ink-dim); }
.si-ico svg { width: 17px; height: 17px; }
.si-nm { font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; }
.si-sub { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); margin-top: 3px; }
.si-last { font-family: var(--font-mono); font-size: 11px; color: var(--ink-dim); white-space: nowrap; }
@media (max-width: 720px) { .set-import { grid-template-columns: 38px 1fr auto; } .si-last { display: none; } }
.set-import-drop { margin-top: var(--gap); display: flex; align-items: center; justify-content: center; gap: 10px; padding: 22px; border: 1px dashed var(--border-2); color: var(--ink-faint); font-family: var(--font-mono); font-size: 12px; }
.set-import-drop svg { width: 16px; height: 16px; }

/* integrations */
.set-integrations { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
@media (max-width: 720px) { .set-integrations { grid-template-columns: 1fr; } }
.set-int { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 18px; background: var(--panel); border: 1px solid var(--border); }
.set-int.soon { opacity: .72; }
.int-ico { width: 44px; height: 44px; border: 1px solid var(--border-2); background: var(--inset); display: flex; align-items: center; justify-content: center; color: var(--ink-dim); }
.int-ico svg { width: 20px; height: 20px; }
.int-nm { font-size: 14px; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.int-sub { font-size: 12.5px; color: var(--ink-dim); margin-top: 4px; line-height: 1.4; }
.int-on { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 11px; color: var(--good); white-space: nowrap; }
.int-on .d { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }

/* frida config */
.frida-can { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 620px) { .frida-can { grid-template-columns: 1fr; } }
.fc-item { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.fc-item input { position: absolute; opacity: 0; width: 0; height: 0; }
.fc-box { width: 18px; height: 18px; flex: none; border: 1px solid var(--border-2); background: var(--inset); display: inline-flex; align-items: center; justify-content: center; position: relative; }
.fc-item input:checked + .fc-box { background: var(--accent); border-color: var(--accent); }
.fc-item input:checked + .fc-box::after { content: ''; width: 5px; height: 9px; border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: rotate(45deg); margin-top: -2px; }
.set-seg { display: inline-flex; justify-self: start; align-self: start; }
/* company logo preview */
.set-logo { display: flex; align-items: center; gap: 14px; }
.set-logo-prev { width: 96px; height: 64px; flex: none; border: 1px solid var(--border-2); background: var(--inset); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.set-logo-prev img { max-width: 84px; max-height: 52px; object-fit: contain; }
.set-logo-prev span { color: var(--ink-faint); display: inline-flex; }
.set-logo-prev span svg { width: 24px; height: 24px; }

/* ============================================================
   FRIDA CHAT — 1:1 med fragta.com (.fa-*). Hjemmesidens tokens
   aliaset til demoens, så udseendet er identisk i begge temaer.
   ============================================================ */
.fa-root {
  --surface-0: var(--panel);
  --surface-1: var(--panel-2);
  --surface-2: var(--panel-3);
  --text: var(--ink);
  --text-dim: var(--ink-dim);
  --text-faint: var(--ink-faint);
  --border-bright: var(--border-2);
}
  /* ----- CHAT ASSISTANT (Frida) ----- */
  .fa-bubble {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 70;
    padding: 0;
    border-radius: 50%;
    border: none;
    display: grid;
    place-items: center;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .30));
    transition: transform .2s ease;
  }
  .fa-bubble:hover { transform: translateY(-1px); }
  .fa-bubble:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
  .fa-bubble-open { width: 56px; height: 56px; background: var(--surface-2); color: var(--text); }

  .fa-nudge {
    position: fixed;
    right: 92px;
    bottom: 28px;
    z-index: 69;
    max-width: 232px;
    background: var(--surface-1);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 15px;
    border-bottom-right-radius: 5px;
    padding: 12px 32px 12px 15px;
    font-size: 13.5px;
    line-height: 1.45;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .32);
    cursor: pointer;
    animation: fa-nudge-in .3s ease;
  }
  .fa-nudge::after {
    content: '';
    position: absolute;
    right: -6px;
    bottom: 16px;
    width: 12px;
    height: 12px;
    background: var(--surface-1);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transform: rotate(-45deg);
  }
  .fa-nudge:hover { border-color: var(--border-bright); }
  .fa-nudge-x {
    position: absolute; top: 7px; right: 8px;
    background: none; border: none; color: var(--text-faint);
    cursor: pointer; padding: 2px; display: grid; place-items: center; line-height: 1;
  }
  .fa-nudge-x:hover { color: var(--text); }
  @keyframes fa-nudge-in { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }

  .fa-gate {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    padding: 18px;
    background: color-mix(in srgb, var(--bg) 72%, transparent);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: fa-fade .2s ease;
  }
  .fa-gate-card {
    width: 100%;
    max-width: 290px;
    background: var(--surface-1);
    border: 1px solid var(--border-bright);
    border-radius: 18px;
    padding: 22px 20px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  }
  .fa-gate-title { margin: 0 0 8px; font-size: 17px; font-weight: 700; color: var(--text); }
  .fa-gate-body { margin: 0 0 16px; font-size: 13.5px; line-height: 1.5; color: var(--text-dim); }
  .fa-gate-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 14.5px;
    font-weight: 650;
    cursor: pointer;
    transition: filter .15s ease;
  }
  .fa-gate-cta:hover { filter: brightness(1.06); }
  .fa-gate-cta:disabled { opacity: .65; cursor: default; }
  .fa-gate-link {
    display: block;
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-dim);
    text-decoration: underline;
    text-underline-offset: 2px;
  }
  .fa-gate-link:hover { color: var(--text); }
  .fa-gate-later {
    margin-top: 10px;
    background: none;
    border: none;
    color: var(--text-faint);
    font-size: 12.5px;
    text-decoration: underline;
    cursor: pointer;
  }
  .fa-gate-later:hover { color: var(--text-dim); }
  .fa-lead { display: grid; gap: 9px; margin-top: 2px; }
  .fa-lead-input {
    width: 100%;
    padding: 11px 13px;
    border-radius: 11px;
    background: var(--surface-0);
    border: 1px solid var(--border-bright);
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color .15s ease;
  }
  .fa-lead-input::placeholder { color: var(--text-faint); }
  .fa-lead-input:focus { border-color: var(--accent); }
  .fa-lead-err { font-size: 12px; color: #ff6b6b; text-align: left; }
  @keyframes fa-fade { from { opacity: 0; } to { opacity: 1; } }

  .fa-ava { position: relative; display: inline-flex; flex-shrink: 0; }
  .fa-ava img { width: 40px; height: 40px; border-radius: 50%; display: block; }
  .fa-ava-lg { width: 56px; height: 56px; }
  .fa-ava-lg img { width: 56px; height: 56px; }
  .fa-online {
    position: absolute; right: 0; bottom: 0;
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--accent); border: 2.5px solid var(--surface-0);
  }
  .fa-bubble .fa-online { top: 1px; right: 1px; bottom: auto; width: 13px; height: 13px; border-width: 3px; }

  .fa-panel {
    position: fixed;
    right: 24px;
    bottom: 92px;
    z-index: 70;
    width: 370px;
    max-width: calc(100vw - 32px);
    height: 560px;
    max-height: calc(100vh - 132px);
    display: flex;
    flex-direction: column;
    background: var(--surface-0);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .38);
    animation: fa-in .18s ease;
  }
  @keyframes fa-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

  .fa-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0;
  }
  .fa-id { display: flex; align-items: center; gap: 11px; }
  .fa-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
  .fa-name { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
  .fa-role { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); margin-top: 2px; }
  .fa-x { background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 4px; display: grid; place-items: center; border-radius: 8px; }
  .fa-x:hover { color: var(--text); background: var(--surface-1); }

  .fa-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
  .fa-msg { max-width: 84%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
  .fa-bot { align-self: flex-start; background: var(--surface-1); border: 1px solid var(--border); color: var(--text); border-bottom-left-radius: 5px; }
  .fa-user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 5px; }

  .fa-typing { display: inline-flex; gap: 4px; padding: 2px 0; }
  .fa-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-faint); animation: fa-blink 1.2s infinite ease-in-out both; }
  .fa-typing i:nth-child(2) { animation-delay: .2s; }
  .fa-typing i:nth-child(3) { animation-delay: .4s; }
  @keyframes fa-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

  .fa-sugs { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; margin-top: 4px; }
  .fa-sug {
    background: var(--surface-1); border: 1px solid var(--border-bright); color: var(--text-dim);
    font-family: var(--font-mono); font-size: 12px; padding: 7px 11px; border-radius: 11px; cursor: pointer;
    text-align: left; transition: border-color .15s ease, color .15s ease;
  }
  .fa-sug:hover { color: var(--text); border-color: var(--accent); }

  .fa-foot { padding: 12px 14px; border-top: 1px solid var(--border); flex-shrink: 0; }
  .fa-inputrow { display: flex; align-items: center; gap: 8px; }
  .fa-input {
    flex: 1; background: var(--surface-1); border: 1px solid var(--border); border-radius: 11px;
    padding: 10px 13px; font-size: 14px; color: var(--text); outline: none; font-family: inherit;
  }
  .fa-input::placeholder { color: var(--text-faint); }
  .fa-input:focus { border-color: var(--accent); }
  .fa-send {
    flex-shrink: 0; width: 40px; height: 40px; border-radius: 11px; border: none;
    background: var(--accent); color: var(--accent-ink); cursor: pointer; display: grid; place-items: center;
    transition: filter .15s ease;
  }
  .fa-send:hover:not(:disabled) { filter: brightness(1.06); }
  .fa-send:disabled { opacity: .45; cursor: default; }
  .fa-disc { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-faint); text-align: center; margin-top: 9px; letter-spacing: .02em; }

  @media (max-width: 640px) {
    .fa-bubble { right: 16px; bottom: 16px; }
    .fa-panel { right: 16px; left: 16px; bottom: 84px; width: auto; max-width: none; height: auto; max-height: calc(100vh - 116px); }
    .fa-nudge { right: 84px; bottom: 22px; max-width: calc(100vw - 100px); }
  }
  @media (prefers-reduced-motion: reduce) {
    .fa-panel, .fa-nudge, .fa-gate { animation: none; }
    .fa-bubble:hover { transform: none; }
  }
