/* Totally Branded · Product stage-gate pipeline — design tokens (from the hi-fi handoff) */
:root {
  --navy: #0f2b46;            /* ink, headings, table header bg */
  --rail-bg: #0b2239;
  --rail-text: #9fb3c8;
  --rail-active: #163657;
  --amber: #f5b324;           /* primary button; text on it is navy */
  --amber-text: #b7791f;
  --amber-text-2: #d6861f;
  --amber-bg: #fdf0d5;
  --amber-dot: #f0a93b;
  --blue: #1f6fb2;            /* active nav, links */
  --blue-bg: #eaf3fb;
  --blue-pill: #dbe8f5;
  --blue-dot: #7fb3e0;
  --green: #2fa866;
  --green-2: #3fbf7f;
  --green-bg: #e7f6ee;
  --green-bg-2: #e6f4ec;
  --green-text: #1d7a46;
  --red: #e5484d;
  --red-text: #c0392b;
  --red-bg: #fde3e1;
  --red-border: #f3c2bf;
  --text-2: #5b6b7c;
  --label: #3d4f61;
  --placeholder: #8a98a8;
  --border: #e3e8ee;
  --border-input: #d6dde6;
  --border-empty: #cfd6de;
  --row-divider: #eef1f4;
  --page: #f6f8fa;
  --col-bg: #eef2f6;
  --pill: #e6ebf0;
  --white: #fff;
  --r-card: 12px; --r-btn: 10px; --r-input-sm: 8px; --r-chip: 6px; --r-pill: 999px;
  --font: 'DM Sans', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; background: var(--page); color: var(--navy); font-family: var(--font); font-size: 15px; line-height: 1.35; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--navy); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ----- Form primitives --------------------------------------------------- */
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld-row { display: flex; justify-content: space-between; align-items: center; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--label); }
.input { height: 44px; width: 100%; border: 1px solid var(--border-input); border-radius: var(--r-btn); padding: 0 14px; background: var(--white); font-size: 15px; color: var(--navy); outline: none; transition: border-color 150ms ease, box-shadow 150ms ease; }
.input::placeholder { color: var(--placeholder); }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg); }
.input[readonly], .input:disabled { background: var(--page); color: var(--text-2); border-color: var(--border); }
.input.is-invalid { border-color: var(--red); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 64px; }
.input-toggle { position: absolute; right: 14px; top: 0; height: 44px; border: 0; background: none; padding: 0; font-size: 12px; font-weight: 500; color: var(--text-2); }
.input-toggle:hover { color: var(--navy); }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--label); cursor: pointer; }
.check input { appearance: none; width: 18px; height: 18px; margin: 0; border-radius: 5px; border: 1.5px solid var(--border-empty); background: var(--white); display: inline-grid; place-content: center; flex: none; transition: background 150ms ease, border-color 150ms ease; }
.check input::before { content: "✓"; font-size: 11px; color: var(--white); opacity: 0; }
.check input:checked { background: var(--navy); border-color: var(--navy); }
.check input:checked::before { opacity: 1; }
.check input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.btn { height: 44px; padding: 0 22px; border-radius: var(--r-btn); border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 15px; white-space: nowrap; transition: background 150ms ease, color 150ms ease, border-color 150ms ease; }
.btn-primary { background: var(--amber); color: var(--navy); }
.btn-primary:hover { background: #e9a71c; }
.btn-primary:disabled { background: var(--pill); color: var(--placeholder); cursor: not-allowed; }
.btn-outline { border: 1px solid var(--border-input); background: var(--white); color: var(--navy); }
.btn-outline:hover { background: var(--page); }
.btn-ghost { background: none; color: var(--text-2); }
.btn-ghost:hover { color: var(--navy); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-block { width: 100%; }

.pill { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--r-pill); background: var(--pill); color: var(--navy); font-size: 12px; font-weight: 600; }
.pill-green { background: var(--green-bg); color: var(--green-text); }
.pill-red { background: var(--red-bg); color: var(--red-text); }
.pill-amber { background: var(--amber-bg); color: var(--amber-text); }
.pill-lg { height: 24px; padding: 0 10px; }

.alert { border-radius: var(--r-btn); padding: 12px 14px; font-size: 14px; line-height: 1.45; }
.alert-red { border: 1px solid var(--red-border); background: var(--red-bg); color: var(--red-text); }
.alert-green { border: 1px solid #cdebd9; background: var(--green-bg); color: var(--green-text); }
.field-error { font-size: 13px; color: var(--red-text); }
.hint { font-size: 12px; color: var(--text-2); }

/* ----- Auth layout (4a / 4b) ------------------------------------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: var(--white); }
.auth-brand { background: var(--rail-bg); color: var(--white); padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-brand img { width: 360px; max-width: 100%; height: auto; display: block; }
.auth-brand h1 { margin: 0; font-size: 40px; font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; }
.auth-brand .foot { font-size: 12px; color: var(--rail-text); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 56px; background: var(--page); }
.auth-card { width: 420px; max-width: 100%; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-card); padding: 40px; display: flex; flex-direction: column; gap: 18px; }
.auth-card h2 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.auth-card h2.lg { font-size: 28px; }
.auth-card .lead { font-size: 15px; color: var(--text-2); margin-top: 6px; }
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-form .btn-primary { margin-top: 6px; }
.auth-note { margin-top: 6px; padding-top: 20px; border-top: 1px solid var(--row-divider); font-size: 13px; color: var(--text-2); line-height: 1.5; }
.auth-link { font-size: 14px; color: var(--blue); font-weight: 500; text-align: center; }
.auth-link-sm { font-size: 13px; color: var(--blue); font-weight: 500; }
.strength { display: flex; gap: 4px; margin-top: 4px; }
.strength span { flex: 1; height: 4px; border-radius: 2px; background: var(--border); transition: background 150ms ease; }
.strength[data-level="1"] span:nth-child(-n+1) { background: var(--red); }
.strength[data-level="2"] span:nth-child(-n+2) { background: var(--amber-dot); }
.strength[data-level="3"] span:nth-child(-n+3) { background: var(--green); }
.strength[data-level="4"] span:nth-child(-n+4) { background: var(--green); }

@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 32px 24px; gap: 24px; }
  .auth-brand img { width: 240px; }
  .auth-brand h1 { font-size: 28px; }
  .auth-main { padding: 24px 16px; }
  .auth-card { padding: 28px 20px; }
}

/* ===== Global chrome ======================================================= */
[x-cloak] { display: none !important; }
.shell { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.page { padding: 26px 28px 28px; display: flex; flex-direction: column; gap: 22px; }

/* Left rail: 88px, navy, 72px items with 20px icon + 11px label */
.rail { z-index: 40; width: 88px; flex: none; background: var(--rail-bg); color: var(--rail-text); display: flex; flex-direction: column; align-items: center; padding: 16px 0; gap: 4px; font-size: 11px; font-weight: 500; position: sticky; top: 0; height: 100vh; }
.rail-logo { background: var(--white); color: var(--rail-bg); font-weight: 700; border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-bottom: 18px; line-height: 1; }
.rail-logo span { color: var(--amber); }
.ri { width: 72px; padding: 9px 0; border-radius: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; color: var(--rail-text); transition: background 150ms ease, color 150ms ease; }
.ri:hover { color: var(--white); }
.ri.on { background: var(--rail-active); color: var(--white); }
.ri .ic { width: 20px; height: 20px; background: currentColor; opacity: .9; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ri .bd { position: absolute; top: 4px; right: 14px; background: var(--red); color: var(--white); border-radius: var(--r-pill); font-size: 10px; padding: 0 5px; line-height: 15px; font-weight: 600; }
.rail-spacer { flex: 1; }
.rail-user { position: relative; }
.av { width: 28px; height: 28px; border-radius: 50%; background: var(--blue-pill); color: var(--blue); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; border: 0; padding: 0; flex: none; }
.av-lg { width: 40px; height: 40px; font-size: 13px; cursor: pointer; }
.menu { position: absolute; left: 52px; bottom: 0; min-width: 220px; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-card); padding: 6px; color: var(--navy); font-size: 14px; z-index: 50; box-shadow: 0 8px 24px rgba(15,43,70,.12); }
.menu-head { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--row-divider); margin-bottom: 4px; }
.menu-head span { font-size: 12px; color: var(--text-2); }
.menu-item { width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 8px; font-size: 14px; }
.menu-item:hover { background: var(--page); }
.ic[data-i="today"] { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M3 11l9-8 9 8'/><path d='M5 10v10h14V10'/><path d='M10 20v-6h4v6'/></svg>"); }
.ic[data-i="pipeline"] { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'><rect x='3' y='4' width='5' height='16' rx='1'/><rect x='9.5' y='4' width='5' height='11' rx='1'/><rect x='16' y='4' width='5' height='7' rx='1'/></svg>"); }
.ic[data-i="attention"] { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3l10 18H2L12 3z'/><path d='M12 10v5'/><path d='M12 18.5v.5'/></svg>"); }
.ic[data-i="dashboard"] { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'><path d='M4 20V10'/><path d='M10 20V4'/><path d='M16 20v-7'/><path d='M22 20V8'/></svg>"); }
.ic[data-i="archive"] { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='4' rx='1'/><path d='M5 8v11a1 1 0 001 1h12a1 1 0 001-1V8'/><path d='M10 12h4'/></svg>"); }
.ic[data-i="settings"] { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'><path d='M21.94 10.92L21.94 13.08L19.06 13.40L17.99 16.00L19.79 18.27L18.27 19.79L16.00 17.99L13.40 19.06L13.08 21.94L10.92 21.94L10.60 19.06L8.00 17.99L5.73 19.79L4.21 18.27L6.01 16.00L4.94 13.40L2.06 13.08L2.06 10.92L4.94 10.60L6.01 8.00L4.21 5.73L5.73 4.21L8.00 6.01L10.60 4.94L10.92 2.06L13.08 2.06L13.40 4.94L16.00 6.01L18.27 4.21L19.79 5.73L17.99 8.00L19.06 10.60Z'/><circle cx='12' cy='12' r='2.6'/></svg>"); }

/* Top bar: 64px, breadcrumb, ⌘K search (max 460px), save pill, bell */
.top { height: 64px; flex: none; background: var(--white); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px; padding: 0 28px; font-size: 15px; color: var(--text-2); position: sticky; top: 0; z-index: 20; }
.crumb-root, .crumb-sep { color: var(--text-2); }
.crumb { color: var(--text-2); }
.crumb:hover { color: var(--navy); }
.crumb-current { color: var(--navy); font-weight: 700; }
.srch { flex: 1; max-width: 460px; margin-left: auto; height: 40px; border: 1px solid var(--border); border-radius: var(--r-btn); display: flex; align-items: center; padding: 0 14px; color: var(--placeholder); gap: 10px; background: var(--white); font-size: 14px; }
.srch-ico { font-size: 16px; }
.kbd { margin-left: auto; border: 1px solid var(--border-input); border-radius: 5px; font-size: 11px; padding: 1px 6px; color: var(--text-2); }
.sync { background: var(--green-bg); color: var(--green-text); border-radius: var(--r-pill); padding: 7px 14px; font-size: 13px; display: flex; gap: 7px; align-items: center; white-space: nowrap; transition: background 150ms ease, color 150ms ease; }
.sync::before { content: ""; width: 7px; height: 7px; background: var(--green); border-radius: 50%; }
.sync-dirty { background: var(--amber-bg); color: var(--amber-text); }
.sync-dirty::before { background: var(--amber-dot); }
.sync-saving { background: var(--blue-bg); color: var(--blue); }
.sync-saving::before { background: var(--blue-dot); }
.bell { position: relative; width: 36px; height: 36px; border-radius: 9px; border: 0; background: none; display: inline-flex; align-items: center; justify-content: center; }
.bell:hover { background: var(--page); }
.bell-ico { width: 16px; height: 16px; border: 1.8px solid var(--navy); border-radius: 8px 8px 3px 3px; border-bottom-width: 3px; display: block; }
.bell .bd { position: absolute; top: 2px; right: 2px; background: var(--red); color: var(--white); border-radius: var(--r-pill); font-size: 10px; font-weight: 700; line-height: 16px; padding: 0 5px; }

/* Page header */
.page-head { display: flex; align-items: flex-start; gap: 16px; }
.page-head .grow { flex: 1; }
.h1 { font-size: 28px; font-weight: 700; letter-spacing: -.01em; line-height: 1.1; margin: 0; }
.sub { color: var(--text-2); font-size: 15px; margin-top: 4px; }
.sub-sm { font-size: 13px; }

/* Sections, sub-nav, chips, tables */
.sec { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.sech { display: flex; align-items: center; gap: 12px; padding: 14px 18px; font-size: 15px; font-weight: 600; }
.sech .m { margin-left: auto; font-size: 13px; color: var(--text-2); font-weight: 400; text-align: right; }
.sec-body { padding: 4px 18px 18px; }
.sn { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; font-size: 15px; color: var(--navy); transition: background 150ms ease; }
.sn:hover { background: var(--page); color: var(--navy); }
.sn.on { background: var(--blue-bg); font-weight: 600; box-shadow: inset 3px 0 0 var(--blue); }
.sn .ct { margin-left: auto; background: var(--blue-pill); border-radius: var(--r-pill); padding: 0 8px; font-size: 12px; font-weight: 600; line-height: 20px; }
.subnav { padding: 10px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 90px; }
.subnav .sn { font-size: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--r-chip); padding: 1px 7px; font-size: 11px; font-weight: 600; background: var(--col-bg); color: var(--label); white-space: nowrap; }
.chip-rs { background: var(--navy); color: var(--white); }
.chip-lg { padding: 6px 12px; font-size: 13px; }
.chip-x { border: 0; background: none; padding: 0 0 0 2px; color: var(--text-2); font-size: 13px; line-height: 1; cursor: pointer; }
.chip-x:hover { color: var(--red-text); }
.chip-add { background: var(--white); border: 1.5px dashed var(--rail-text); color: var(--label); cursor: pointer; }
.chip-add:hover { border-color: var(--blue); color: var(--blue); }
.chip-input { height: 32px; border: 1px solid var(--blue); border-radius: var(--r-chip); padding: 0 10px; font-size: 13px; outline: none; min-width: 180px; }
.tbl { background: var(--white); border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--border); }
.th { display: grid; background: var(--navy); color: var(--white); font-size: 11px; letter-spacing: .12em; font-weight: 700; padding: 14px 24px; gap: 12px; text-transform: uppercase; }
.tr { display: grid; padding: 16px 24px; gap: 12px; border-bottom: 1px solid var(--row-divider); font-size: 15px; align-items: center; transition: background 150ms ease; }
.tr:last-child { border-bottom: 0; }
.tr-hover:hover { background: var(--page); }
.inp { height: 40px; border: 1px solid var(--border-input); border-radius: var(--r-input-sm); background: var(--white); padding: 0 12px; font-size: 14px; color: var(--navy); outline: none; width: 100%; transition: border-color 150ms ease, box-shadow 150ms ease; }
.inp:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg); }
.inp::placeholder { color: var(--placeholder); }
.inp-num { font-weight: 700; }
.inp.ta { height: auto; min-height: 72px; padding: 10px 12px; resize: vertical; }
.fld-lab { font-size: 13px; font-weight: 600; color: var(--label); }
.select { height: 44px; border: 1px solid var(--border-input); border-radius: var(--r-btn); background: var(--white); padding: 0 40px 0 16px; font-size: 15px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230f2b46' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; }
.select-sm { height: 36px; font-size: 13px; padding: 0 32px 0 12px; }
.lab { font-size: 11px; letter-spacing: .14em; font-weight: 700; color: var(--text-2); text-transform: uppercase; }
.foot-actions { display: flex; justify-content: flex-end; gap: 10px; }
.hr { height: 1px; background: var(--border); }

/* Modal (hi-fi 1b): 520px, backdrop rgba(11,34,57,.55) */
.modal-bg { position: fixed; inset: 0; background: rgba(11,34,57,.55); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 24px; }
.modal { width: 520px; max-width: 100%; background: var(--white); border-radius: var(--r-card); padding: 28px; display: flex; flex-direction: column; gap: 18px; max-height: calc(100vh - 48px); overflow: auto; }
.modal h3 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.modal .eyebrow-blue { font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--blue); text-transform: uppercase; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.seg { display: flex; gap: 8px; }
.seg button { flex: 1; height: 40px; border-radius: var(--r-btn); border: 1px solid var(--border-input); background: var(--white); font-weight: 600; font-size: 14px; color: var(--navy); transition: background 150ms ease, color 150ms ease; }
.seg button.on { background: var(--navy); color: var(--white); border-color: var(--navy); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.note-box { background: var(--amber-bg); border-radius: var(--r-btn); padding: 12px 14px; font-size: 13px; color: var(--amber-text); line-height: 1.45; }
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row .inp { font-size: 12px; color: var(--text-2); }

/* ===== Settings (2e) ======================================================= */
.settings-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.settings-panels { display: flex; flex-direction: column; gap: 16px; }
.targets-grid { display: grid; grid-template-columns: 120px 160px 1fr; gap: 12px; align-items: center; font-size: 14px; }
.thresholds-grid { display: grid; grid-template-columns: 200px 120px 1fr; gap: 10px 16px; align-items: center; font-size: 14px; }
.thr-silent { padding-top: 10px; border-top: 1px solid var(--border); font-weight: 600; }
.thr-silent-inp { margin-top: 10px; }
.thr-silent-hint { padding-top: 10px; }
.sec-note { margin: 0 18px 18px; padding: 10px 12px; background: var(--page); border-radius: var(--r-input-sm); font-size: 13px; color: var(--text-2); line-height: 1.45; }
.sec-note b { color: var(--navy); font-weight: 600; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip-loc { color: var(--text-2); font-weight: 500; }
.chip-form { display: inline-flex; gap: 6px; align-items: center; }
.users-tbl { border: 0; border-radius: 0; border-top: 1px solid var(--border); }
.users-row { grid-template-columns: 40px 1.5fr 1.5fr 1fr .8fr; padding: 12px 18px; }
.users-row .btn { justify-self: end; }
.users-row.is-inactive b, .users-row.is-inactive .sub { color: var(--placeholder); }
.users-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.users-foot { padding: 12px 18px; border-top: 1px solid var(--border); }
.settings-foot { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(to top, var(--page) 70%, transparent); }
.btn-ghost:disabled, .btn-primary:disabled { cursor: not-allowed; }
.btn-ghost:disabled { color: var(--placeholder); }

/* ===== Views nav (260px, collapses to 64px) =============================== */
.snav { width: 260px; flex: none; background: var(--white); border-right: 1px solid var(--border); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; transition: width 150ms ease; }
.snav-full { display: flex; flex-direction: column; gap: 2px; padding: 22px 20px; flex: 1; min-height: 0; }
.snav-mini { display: none; flex-direction: column; align-items: center; gap: 6px; padding: 16px 12px; flex: 1; }
.nav-collapsed .snav { width: 64px; }
.nav-collapsed .snav-full { display: none; }
.nav-collapsed .snav-mini { display: flex; }
.snav-title { font-size: 24px; font-weight: 700; letter-spacing: -.01em; margin: 4px 0 2px; line-height: 1.1; }
.snav-sub { color: var(--text-2); font-size: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.sg { font-size: 11px; letter-spacing: .14em; font-weight: 600; color: var(--text-2); margin: 18px 0 6px; display: flex; align-items: center; gap: 8px; text-transform: uppercase; }
.sg::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.sn-ic { width: 16px; height: 16px; border: 1.6px solid var(--text-2); border-radius: 4px; flex: none; }
.sn.on .sn-ic { border-color: var(--navy); }
.ct-red { background: var(--red-bg) !important; color: var(--red-text) !important; }
.snav-spacer { flex: 1; }
.snav-foot { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); padding-top: 14px; border-top: 1px solid var(--border); }
.snav-foot b { color: var(--navy); }
.mi { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; position: relative; color: var(--text-2); }
.mi:hover { background: var(--page); }
.mi.on { background: var(--blue-bg); box-shadow: inset 3px 0 0 var(--blue); }
.mi .bd { position: absolute; top: -3px; right: -3px; background: var(--red); color: var(--white); border-radius: var(--r-pill); font-size: 10px; font-weight: 700; line-height: 16px; padding: 0 5px; }
.mi-hr { width: 28px; height: 1px; background: var(--border); margin: 8px 0; }
.mi-foot { font-size: 11px; color: var(--text-2); text-align: center; line-height: 1.2; }
.mi-foot b { color: var(--navy); }
.nav-toggle { width: 28px; height: 28px; border: 0; background: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; padding: 0; }
.nav-toggle span { width: 18px; height: 14px; border: 1.6px solid var(--text-2); border-radius: 3px; display: block; transition: all 150ms ease; }
.nav-toggle.on span { border-color: var(--navy); border-left-width: 6px; background: var(--blue-bg); }
.nav-toggle:hover span { border-color: var(--navy); }
.sub-blue { color: var(--blue); }

/* ===== Tabs, filters ======================================================= */
.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--border); font-size: 17px; color: var(--text-2); }
.tab { padding: 12px 4px; display: flex; align-items: center; gap: 8px; background: none; border: 0; color: inherit; font-size: 17px; transition: color 150ms ease; }
.tab:hover { color: var(--navy); }
.tab.on { color: var(--navy); font-weight: 600; box-shadow: inset 0 -2px 0 var(--navy); }
.filter-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.filter-row .grow { flex: 1; }

/* ===== Gate board (3c) ===================================================== */
.board { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; align-items: start; }
.col { background: var(--col-bg); border-radius: var(--r-card); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 160px; transition: box-shadow 150ms ease, background 150ms ease; }
.col-hot { box-shadow: inset 0 3px 0 var(--amber); }
.col-drop-ok { background: var(--blue-bg); box-shadow: inset 0 0 0 2px var(--blue); }
.col-drop-no { background: var(--red-bg); }
.col-live { background: var(--border); }
.colh { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 4px 6px; font-size: 13px; font-weight: 600; }
.colh span { color: var(--text-2); font-weight: 500; font-size: 12px; }
.colh span.am { color: var(--amber-text); font-weight: 600; }
.col-more { text-align: center; font-size: 12px; color: var(--text-2); padding: 4px; background: none; border: 0; }
.col-more:hover { color: var(--blue); }
.kc { background: var(--white); border-radius: 10px; padding: 12px; border: 1px solid var(--border); font-size: 13px; display: flex; flex-direction: column; gap: 7px; color: var(--navy); cursor: grab; transition: border-color 150ms ease, box-shadow 150ms ease; }
.kc:hover { border-color: var(--border-input); box-shadow: 0 2px 8px rgba(15,43,70,.08); color: var(--navy); }
.kc:active { cursor: grabbing; }
.kc-rs { border-color: var(--navy); }
.kc-rs:hover { border-color: var(--navy); }
.kc-live { background: var(--page); cursor: pointer; }
.kc b { font-size: 14px; line-height: 1.2; }
.kc .cat { color: var(--text-2); font-size: 12px; margin-top: -5px; }
.kc-head { display: flex; align-items: flex-start; gap: 8px; }
.pic { margin-left: auto; flex: none; width: 20px; height: 20px; border: 1.5px solid var(--border-empty); border-radius: 5px; position: relative; display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--text-2); opacity: 0; transition: opacity 150ms ease; }
.kc:hover .pic { opacity: 1; }
.pic:hover { border-color: var(--navy); }
.pic-pop { position: absolute; left: -8px; top: 22px; z-index: 5; width: 180px; height: 180px; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: 0 8px 24px rgba(15,43,70,.18); padding: 8px; }
.pic-pop img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; display: block; }
.chips-row { display: flex; gap: 5px; flex-wrap: wrap; }
.kf { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-2); }
.sd { display: flex; gap: 4px; }
.sd i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--border-empty); display: block; }
.sd i.on { background: var(--green-2); border-color: var(--green-2); }
.am { color: var(--amber-text); font-weight: 600; }
.rd { color: var(--red-text); font-weight: 600; }
.bar { height: 6px; background: var(--pill); border-radius: 3px; overflow: hidden; }
.bar div { height: 100%; background: var(--green); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 8px; vertical-align: 1px; }
.d-am { background: var(--amber-dot); } .d-bl { background: var(--blue-dot); } .d-gr { background: var(--green-2); } .d-rd { background: var(--red); } .d-gy { background: var(--border-empty); }
.legend { display: flex; gap: 24px; font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--navy); color: var(--white); padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 200; box-shadow: 0 8px 24px rgba(15,43,70,.25); }

/* Gate modal extras */
.gate-q { margin-top: 10px; font-size: 14px; color: var(--label); line-height: 1.45; }
.gate-by { display: block; font-size: 12px; color: var(--text-2); margin-top: 2px; }
.note-box b { color: var(--amber-text-2); font-weight: 700; }
.note-box span { color: var(--amber-text); }
.note-box-ok { background: var(--green-bg); color: var(--green-text); }
.note-box-ok b { color: var(--green-text); }
.seg button:disabled { color: var(--placeholder); background: var(--page); cursor: not-allowed; }
.seg-left { max-width: 320px; }
.suffix-wrap { position: relative; }
.suffix-wrap .inp { padding-right: 36px; }
.suffix { position: absolute; right: 12px; top: 0; height: 40px; display: flex; align-items: center; color: var(--text-2); font-size: 14px; }
.modal-wide { width: 680px; }
.links-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.inp-file { padding: 8px 12px; height: auto; }
.select.is-invalid, .inp.is-invalid { border-color: var(--red); }

/* ===== Product card (3a / 1c) ============================================= */
.card-page { display: flex; flex-direction: column; gap: 20px; }
.hero { display: flex; align-items: flex-start; gap: 20px; }
.hero-img { width: 120px; height: 120px; flex: none; border-radius: 12px; background: var(--col-bg); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--placeholder); font-size: 12px; }
.hero-img img { width: 100%; height: 100%; object-fit: contain; }
.hero-chips { margin-bottom: 8px; }
.chip-amber { background: var(--amber-bg); color: var(--amber-text); }
.chip-red { background: var(--red-bg); color: var(--red-text); }
.chip-green { background: var(--green-bg); color: var(--green-text); }
.ink { color: var(--navy); }
.grow { flex: 1; }
.alert-amber { border: 1px solid #f3dca6; background: var(--amber-bg); color: var(--amber-text); }
.stages { display: flex; border: 1px solid var(--border-input); border-radius: var(--r-btn); overflow: hidden; background: var(--white); }
.st { flex: 1; text-align: center; padding: 12px 6px; border-right: 1px solid var(--border); font-size: 12px; color: var(--text-2); }
.st:last-child { border-right: 0; }
.st b { display: block; font-size: 24px; color: var(--navy); line-height: 1.1; }
.st.hot { box-shadow: inset 0 -3px 0 var(--amber); }
.st.hot b { color: var(--amber-text-2); }
.st.dim { background: var(--page); }
.st.dim b { color: var(--placeholder); }
.card-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.card-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card-tools { display: flex; align-items: center; gap: 8px; }
.h2 { font-size: 18px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.stage-sec.is-current { border-color: var(--navy); }
.stage-head { background: var(--page); border-bottom: 1px solid var(--border); cursor: pointer; user-select: none; }
.stage-sec.is-current .stage-head { background: #fff6e0; }
.stage-sec.is-locked-sec .stage-head { color: var(--placeholder); }
.stage-sec.is-locked-sec .stage-head .m { color: var(--placeholder); }
.caret { width: 18px; color: var(--text-2); font-size: 12px; }
.ck { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border-empty); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: var(--white); background: var(--white); flex: none; }
.ck.on { background: var(--green); border-color: var(--green); }
.ck.am { background: var(--white); border-color: var(--amber-dot); }
.stage-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.stage-body fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.stage-body.is-locked .inp, .stage-body.is-locked .select, .stage-body.is-locked .seg button, .stage-body.is-locked .seg span { background: var(--page); color: var(--text-2); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 18px; }
.span-3 { grid-column: 1 / -1; }
.inp-static { display: flex; align-items: center; background: var(--page); }
.inp-static.between { justify-content: space-between; }
.inp.ph, .inp-static.ph { color: var(--placeholder); }
.inp-sm { height: 32px; font-size: 13px; padding: 0 10px; }
.inp-xs { height: 30px; font-size: 12px; padding: 0 6px; }
.inp.center { text-align: center; }
.inp.bold { font-weight: 600; }
.select-xs { height: 30px; font-size: 12px; padding: 0 26px 0 8px; background-position: right 8px center; }
.prefix-wrap { position: relative; }
.prefix-wrap .inp { padding-left: 24px; }
.prefix { position: absolute; left: 10px; top: 0; height: 100%; display: flex; align-items: center; color: var(--text-2); font-size: 13px; pointer-events: none; }
.suffix-wrap .inp-sm + .suffix { height: 32px; }
.seg-sm button, .seg-sm span { height: 34px; font-size: 13px; padding: 0 14px; flex: none; border-radius: var(--r-btn); border: 1px solid var(--border-input); background: var(--white); display: inline-flex; align-items: center; font-weight: 600; }
.seg-sm span.on, .seg-sm button.on { background: var(--navy); color: var(--white); border-color: var(--navy); }
.seg-sm { display: flex; gap: 8px; }
.links-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.link-wrap { position: relative; }
.link-wrap .inp { padding-right: 32px; }
.link-go { position: absolute; right: 10px; top: 0; height: 40px; display: flex; align-items: center; }
.img-row { display: flex; align-items: center; gap: 14px; }
.img-slot { width: 72px; height: 72px; border-radius: 10px; background: var(--col-bg); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--placeholder); font-size: 11px; }
.img-slot img { width: 100%; height: 100%; object-fit: contain; }
.file-btn { cursor: pointer; }
.chip-toggle { cursor: pointer; border: 1px solid transparent; }
.chip-toggle.on { background: var(--navy); color: var(--white); }
.chip-toggle:hover { border-color: var(--blue); }
.tbl-sm { border-radius: 8px; }
.tbl-sm .th { padding: 10px 14px; font-size: 10px; letter-spacing: .1em; }
.tbl-sm .tr { padding: 8px 14px; font-size: 13px; }
.tbl-foot { padding: 8px 14px; border-top: 1px solid var(--row-divider); }
.routes-grid { grid-template-columns: 1.5fr 1fr 1fr .8fr 1fr 1.2fr 24px; }
.plan-wrap { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; }
.plan-grid { grid-template-columns: 1.6fr 1fr 1fr .8fr 1fr; }
.plan-target .inp-target { border-color: var(--navy); font-weight: 700; }
.plan-actions { display: flex; flex-direction: column; gap: 8px; max-width: 190px; }
.green-text { color: var(--green-text); font-weight: 600; }
.ph { color: var(--placeholder); }
.tests-grid { grid-template-columns: 1.2fr .8fr 1fr 1fr 1fr 1.6fr .8fr; }
.photo-link { color: var(--blue); font-weight: 600; }
.seg-result button { height: 48px; font-size: 15px; }
.seg-result .pass.on { background: var(--green); border-color: var(--green); color: var(--white); }
.seg-result .fail.on { background: var(--red); border-color: var(--red); color: var(--white); }
.jig-row { display: flex; gap: 10px; align-items: center; }
.jig-row .prefix-wrap { width: 140px; }
.sheets { display: flex; flex-direction: column; gap: 12px; }
.dropzone { border: 1.5px dashed #c9d2dc; border-radius: 10px; background: var(--page); padding: 22px; display: flex; align-items: center; gap: 16px; cursor: pointer; transition: border-color 150ms ease, background 150ms ease; }
.dropzone.over, .dropzone:hover { border-color: var(--blue); background: var(--blue-bg); }
.xls-ico { width: 44px; height: 44px; border-radius: 10px; background: var(--white); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--green-text); letter-spacing: .04em; flex: none; }
.dz-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.dz-text u { color: var(--blue); }
.sheets-grid { grid-template-columns: 2fr 1fr 1fr 1fr 1.6fr; }
.sheets .tr.is-old { color: var(--text-2); }
.file-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.xls-tag { width: 22px; height: 22px; border-radius: 5px; background: var(--col-bg); font-size: 9px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.xls-tag.cur { background: var(--green-bg-2); color: var(--green-text); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-cell { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 12px; }
.panel-block { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.panel-head { display: flex; align-items: baseline; gap: 12px; }
.variants-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr 1.2fr .6fr .8fr; padding: 10px 24px !important; }
.variants-grid .check { justify-content: center; }
.tr.is-old .inp { color: var(--text-2); }
.files-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.file-card { padding: 12px; display: flex; flex-direction: column; gap: 2px; color: var(--navy); min-width: 0; }
.file-card:hover { border-color: var(--blue); color: var(--navy); }
.file-thumb { height: 64px; background: var(--col-bg); border-radius: 8px; margin-bottom: 6px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--text-2); overflow: hidden; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-card b { font-size: 13px; }
.comments { position: sticky; top: 90px; display: flex; flex-direction: column; max-height: calc(100vh - 110px); }
.comments-body { padding: 0 18px 18px; display: flex; flex-direction: column; gap: 14px; font-size: 14px; overflow: auto; }
.comment { display: flex; gap: 10px; }
.comment-meta { display: flex; gap: 8px; font-size: 12px; color: var(--text-2); align-items: center; }
.comment-meta b { color: var(--navy); }
.comment-text { margin-top: 4px; white-space: pre-wrap; }
.comment-form { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.comment-actions { display: flex; justify-content: space-between; align-items: center; }

/* Benchmark grid */
.bench { font-size: 12px; }
.bench-tabs { display: flex; gap: 22px; padding: 0 14px; border-bottom: 1px solid var(--border); align-items: center; }
.btab { padding: 10px 2px; font-size: 14px; color: var(--text-2); background: none; border: 0; display: inline-flex; gap: 6px; align-items: center; }
.btab .pill { font-size: 11px; }
.btab.on { color: var(--navy); font-weight: 600; box-shadow: inset 0 -2px 0 var(--navy); }
.btab-green.on, .btab-green { color: var(--green-text); font-weight: 600; }
.bench-src { font-size: 12px; color: var(--text-2); display: inline-flex; gap: 6px; align-items: center; }
.bench-src .inp-xs { width: 190px; }
.bench-src input[type=date] { width: 130px; }
.bench-head { display: grid; grid-template-columns: 150px repeat(11, 1fr); gap: 6px; padding: 8px 14px; background: var(--navy); color: var(--white); font-size: 10px; letter-spacing: .1em; font-weight: 700; text-align: center; align-items: center; text-transform: uppercase; }
.bench-head .l { text-align: left; }
.bench-row { display: grid; grid-template-columns: 150px repeat(11, 1fr); gap: 6px; padding: 6px 14px; align-items: center; border-top: 1px solid var(--row-divider); }
.bench-row .l { display: flex; align-items: center; gap: 4px; min-width: 0; }
.bench-row .l .select { min-width: 0; flex: 1; }
.bench-row.low { background: var(--green-bg); border-top: 1px solid #d3eadb; padding: 7px 14px; }
.bench-row.low .l { display: block; color: var(--green-text); }
.low-cell { text-align: center; color: var(--green-text); }
.low-cell div { font-size: 10px; color: var(--text-2); }
.bench-row.rrp { background: #fdf6e3; }
.rrp-cell { border-color: var(--amber) !important; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.bench-lowest-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--border); background: var(--page); font-size: 13px; }
.bench-empty { padding: 14px; color: var(--text-2); }
.bench-foot { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 13px; flex-wrap: wrap; }
.switch { width: 36px; height: 20px; border-radius: 10px; background: var(--border-empty); position: relative; border: 0; padding: 0; flex: none; transition: background 150ms ease; }
.switch span { position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); transition: left 150ms ease; }
.switch.on { background: var(--green); }
.switch.on span { left: 18px; }
.undercut { display: inline-flex; align-items: center; gap: 4px; }
.undercut .inp-xs { width: 60px; }
.btab { white-space: nowrap; flex: none; }
.bench-tabs { flex-wrap: nowrap; gap: 18px; }
.bench-src { flex: none; }
.bench-src .inp-xs { width: 150px; }
.bench-src input[type=date] { width: 120px; }

/* ===== Table (2a), Needs attention (1d), Archive (2d) ===================== */
.search-box { width: 360px; height: 36px; border: 1px solid var(--border-input); border-radius: var(--r-btn); display: flex; align-items: center; padding: 0 12px; gap: 8px; background: var(--white); color: var(--placeholder); }
.search-inp { border: 0; outline: none; flex: 1; font-size: 13px; background: transparent; min-width: 0; }
.search-inp::placeholder { color: var(--placeholder); }
.th-sort { background: none; border: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; text-align: left; padding: 0; cursor: pointer; }
.th-sort:hover { color: var(--amber); }
.tr-link { color: var(--navy); }
.tr-link:hover { color: var(--navy); }
.thumb { width: 44px; height: 44px; border-radius: 8px; background: var(--col-bg); overflow: hidden; display: block; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.cols-menu { position: relative; }
.menu-cols { left: auto; right: 0; bottom: auto; top: 50px; }
.menu-check { padding: 7px 10px; }
.attention-grid { grid-template-columns: 2fr 1.1fr .8fr 2.6fr 1fr 1fr .7fr; }
.attention-grid .btn { justify-self: end; }
.flag-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.archive-grid { grid-template-columns: 56px 2fr .9fr 2fr .9fr 1fr 1fr .8fr; padding: 10px 24px !important; }
.archive-grid .btn { justify-self: end; }

/* ===== Launch readiness (1f) ============================================== */
.readiness { display: flex; flex-direction: column; gap: 22px; }
.ready-grid { grid-template-columns: 1.6fr repeat(6, 1fr) .6fr; text-align: center; justify-items: center; padding: 11px 24px !important; }
.ready-grid .l { text-align: left; justify-self: start; }
.ck-btn { cursor: pointer; transition: background 150ms ease, border-color 150ms ease; }
.ck-btn:hover:not(:disabled) { border-color: var(--green); }
.ck-btn:disabled { cursor: default; }
.tick-rep { font-size: 12px; color: var(--text-2); background: none; border: 0; padding: 0; }
.ready-held { grid-template-columns: 1.6fr 6fr .6fr; color: var(--placeholder); background: var(--page); }
.family-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; font-size: 14px; }
.family-item { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; text-align: left; color: var(--navy); font-size: 14px; }
.family-item:disabled { cursor: default; }
.family-item:hover:not(:disabled) .ck { border-color: var(--green); }
.btn-live:disabled { color: var(--placeholder); border-color: var(--border); background: var(--white); cursor: not-allowed; }
.btn-live:not(:disabled) { background: var(--amber); border-color: var(--amber); color: var(--navy); }

/* ===== Timeline (3b) ====================================================== */
.timeline { display: flex; flex-direction: column; gap: 22px; }
.range-label { pointer-events: none; }
.legend span { display: inline-flex; align-items: center; }
.gantt { overflow: visible; }
.gantt-head { grid-template-columns: 260px repeat(7, 1fr); padding: 14px 0 14px 24px; }
.gantt-head .today { color: var(--amber); }
.gantt-row { grid-template-columns: 260px 1fr; padding: 0; gap: 0; height: 62px; }
.gantt-name { padding: 12px 24px; border-right: 1px solid var(--row-divider); min-width: 0; }
.gantt-name b a { color: var(--navy); }
.track { position: relative; height: 100%; background: repeating-linear-gradient(90deg, transparent 0 calc(14.2857% - 1px), var(--row-divider) calc(14.2857% - 1px) 14.2857%); }
.today-line { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--amber); z-index: 2; }
.bar { position: absolute; top: 14px; height: 14px; border-radius: 4px; font-size: 10px; line-height: 14px; padding-left: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--navy); z-index: 1; }
.bar-done { background: var(--border-empty); }
.bar-current { background: var(--navy); color: var(--white); z-index: 3; }
.bar-planned { background: var(--blue-pill); }
.bar-over { background: var(--red); }
.bar-unplanned { background: transparent; border: 1.5px dashed var(--rail-text); line-height: 12px; color: var(--text-2); }
.bar-handle { position: absolute; right: 0; top: 0; width: 8px; height: 100%; cursor: ew-resize; }
.bar-handle:hover { background: rgba(255,255,255,.35); }
.diamond { position: absolute; top: 9px; font-size: 16px; color: var(--navy); line-height: 1; z-index: 4; transform: translateX(-50%); }
.diamond.passed { color: var(--red); }
.caption { position: absolute; left: 0; top: 36px; font-size: 11px; color: var(--text-2); white-space: nowrap; }
.set-plan { position: absolute; left: 12px; top: 14px; font-size: 12px; color: var(--blue); font-weight: 600; }

/* ===== Dashboard (1g) ===================================================== */
.dash { display: flex; flex-direction: column; gap: 22px; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-card { padding: 20px; display: flex; flex-direction: column; }
.dash-head { display: flex; align-items: baseline; gap: 10px; }
.dash-big { display: flex; align-items: baseline; gap: 10px; margin-top: 14px; font-size: 14px; }
.big { font-size: 48px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.progress { height: 14px; background: var(--pill); border-radius: 7px; overflow: hidden; display: flex; margin-top: 14px; }
.p-in { background: var(--navy); } .p-fac { background: var(--blue-dot); }
.dash-legend { display: flex; gap: 18px; font-size: 13px; color: var(--text-2); margin-top: 10px; align-items: center; }
.dash-legend span { display: inline-flex; align-items: center; }
.dist { display: grid; grid-template-columns: 130px 1fr 44px; gap: 7px 12px; font-size: 13px; margin-top: 14px; align-items: center; }
.dist-bar { height: 12px; }
.dist-bar div { height: 12px; border-radius: 6px; min-width: 2px; }
.cycle { display: flex; align-items: flex-end; gap: 14px; height: 120px; margin-top: 18px; }
.cycle-bar { flex: 1; border-radius: 6px 6px 0 0; }
.cycle-labels { display: flex; gap: 14px; margin-top: 8px; font-size: 12px; color: var(--text-2); text-align: center; }
.cycle-labels span { flex: 1; }
.cycle-labels b { color: var(--navy); font-size: 14px; }
.dash-foot { margin-top: 14px; font-size: 13px; color: var(--text-2); }
.dash-foot b { color: var(--navy); }
.funnel { display: flex; flex-direction: column; gap: 5px; margin-top: 14px; font-size: 13px; }
.funnel-row { padding: 5px 12px; border-radius: 6px; white-space: nowrap; }
.funnel-row.dark { color: var(--white); }
.funnel-row.final { font-weight: 600; }
.margin-grid { grid-template-columns: 2fr 1fr 1.2fr 1.2fr .7fr 1fr 1fr; }

/* ===== Mobile Stage 4 (1e) — 390px, hit targets ≥ 44px ==================== */
.mobile-body { background: var(--page); }
.m-page { max-width: 430px; margin: 0 auto; min-height: 100vh; background: var(--white); display: flex; flex-direction: column; }
.m-head { padding: 20px 20px 12px; border-bottom: 1px solid var(--border); }
.m-back { font-size: 13px; color: var(--text-2); background: none; border: 0; padding: 0; display: inline-block; min-height: 24px; }
.m-title { font-size: 22px; font-weight: 700; letter-spacing: -.01em; margin: 4px 0 2px; }
.m-form { padding: 16px 20px 28px; display: flex; flex-direction: column; gap: 16px; }
.m-select { height: 48px; }
.m-result { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m-result .btn { height: 64px; font-size: 18px; }
.m-result .pass.on { background: var(--green); color: var(--white); }
.m-result .fail.on { background: var(--red); color: var(--white); }
.m-num { height: 52px; border: 1px solid var(--border-input); border-radius: var(--r-btn); display: flex; align-items: center; justify-content: space-between; padding: 0 12px; gap: 8px; }
.m-num input { border: 0; outline: none; font-size: 18px; font-weight: 700; width: 70px; min-width: 0; background: none; }
.m-num span { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.m-row { display: flex; gap: 10px; align-items: center; }
.m-row .grow { flex: 1; }
.btn-navy { background: var(--navy); color: var(--white); }
.m-cost { width: 110px; height: 44px; border: 1px solid var(--border-input); border-radius: var(--r-btn); display: flex; align-items: center; padding: 0 12px; gap: 6px; flex: none; }
.m-cost input { border: 0; outline: none; width: 100%; font-weight: 700; font-size: 15px; background: none; }
.m-photos { display: flex; gap: 10px; flex-wrap: wrap; }
.m-photo-add { width: 76px; height: 76px; border: 1.5px dashed var(--rail-text); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 24px; cursor: pointer; }
.m-photo { width: 76px; height: 76px; border-radius: 10px; background: var(--blue-pill); overflow: hidden; }
.m-photo img { width: 100%; height: 100%; object-fit: cover; }
.m-save { height: 56px; font-size: 17px; }
.center { text-align: center; }
.m-toggle { padding: 14px; display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; font-size: 15px; color: var(--navy); min-height: 56px; cursor: pointer; }
.m-toggle:disabled { cursor: default; }
.ck-lg { width: 26px; height: 26px; font-size: 15px; }
.m-record { padding: 14px; }
.m-record-head { display: flex; justify-content: space-between; align-items: center; }
.m-another { height: 48px; }
@media (max-width: 480px) { .m-page { max-width: none; } }

/* ===== Notifications ===================================================== */
.bell-wrap { position: relative; }
.bell.on { background: var(--blue-bg); }
.notif-panel { position: absolute; right: 0; top: 46px; z-index: 60; width: 420px; background: var(--white); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 32px rgba(15,43,70,.18); overflow: hidden; font-size: 14px; color: var(--navy); }
.notif-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.notif-head b { font-size: 16px; }
.link-btn { background: none; border: 0; padding: 0; font-size: 13px; color: var(--blue); }
.notif-tabs { display: flex; gap: 18px; padding: 0 18px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.notif-tabs button { background: none; border: 0; padding: 10px 2px; color: inherit; font-size: 13px; }
.notif-tabs button.on { color: var(--navy); font-weight: 600; box-shadow: inset 0 -2px 0 var(--navy); }
.notif-item { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--row-divider); width: 100%; text-align: left; background: var(--white); border-left: 0; border-right: 0; border-top: 0; color: var(--navy); font-size: 14px; cursor: pointer; align-items: flex-start; }
.notif-item.unread { background: var(--page); }
.notif-item:hover { background: var(--blue-bg); }
.notif-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-title { font-weight: 500; }
.notif-text { color: var(--text-2); font-size: 13px; }
.notif-meta { color: var(--placeholder); font-size: 12px; margin-top: 2px; }
.notif-item .dot { margin-top: 6px; flex: none; }
.notif-empty { padding: 18px; color: var(--text-2); font-size: 13px; }
.notif-foot { display: block; padding: 12px 18px; text-align: center; font-size: 13px; color: var(--blue); }
.notif-list { display: flex; flex-direction: column; }
.av-red { background: var(--red-bg); color: var(--red-text); }
.av-amber { background: var(--amber-bg); color: var(--amber-text); }
.phone-link { display: flex; justify-content: flex-end; }

/* ===== By supplier / By category (2c) ===================================== */
.group-grid { grid-template-columns: 2fr .8fr .8fr .9fr .8fr 1fr 2fr; }
.group-row { width: 100%; text-align: left; background: var(--white); border: 0; border-bottom: 1px solid var(--row-divider); color: var(--navy); font-size: 15px; cursor: pointer; }
.group-row:hover, .group-row.open { background: var(--page); }
.group-name { min-width: 0; }
.group-child { grid-template-columns: 2fr 1fr 1.2fr 1fr 1fr; padding: 10px 24px 10px 48px !important; font-size: 14px; color: var(--navy); }
.group-child:hover { color: var(--navy); }
a.tab { color: inherit; }

/* ===== ⌘K search ========================================================== */
.srch-wrap { position: relative; flex: 1; max-width: 460px; margin-left: auto; }
.srch-wrap .srch { margin-left: 0; max-width: none; width: 100%; cursor: text; }
.srch-input { border: 0; outline: none; flex: 1; min-width: 0; font-size: 14px; color: var(--navy); background: transparent; }
.srch-input::placeholder { color: var(--placeholder); }
.srch-input::-webkit-search-cancel-button { display: none; }
.srch-wrap .srch:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg); }
.srch-pop { position: absolute; left: 0; right: 0; top: 46px; z-index: 70; background: var(--white); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(15,43,70,.18); padding: 6px; max-height: 420px; overflow: auto; }
.srch-group { font-size: 11px; letter-spacing: .12em; font-weight: 700; color: var(--text-2); text-transform: uppercase; padding: 8px 10px 4px; }
.srch-hit { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 8px; color: var(--navy); font-size: 14px; }
.srch-hit span { font-size: 12px; color: var(--text-2); }
.srch-hit.on, .srch-hit:hover { background: var(--blue-bg); color: var(--navy); }
.srch-empty { padding: 12px 10px; font-size: 13px; color: var(--text-2); }
.srch-foot { border-top: 1px solid var(--row-divider); margin-top: 4px; padding: 8px 10px 4px; font-size: 11px; color: var(--placeholder); }

/* Stage 5: Stage 2 snapshot alongside */
.snapshot { border: 1px solid var(--border); border-radius: 10px; background: var(--page); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.snapshot-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.snapshot-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.snapshot-grid div { display: flex; flex-direction: column; gap: 2px; }
.snapshot-grid span { font-size: 12px; color: var(--text-2); }
.snapshot-grid b { font-size: 15px; }

/* ===== Avatars with photos, account page ================================== */
.av-photo { padding: 0; overflow: hidden; background: var(--col-bg); }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.av-xl { width: 96px; height: 96px; font-size: 30px; }
.av-btn { background: none; border: 0; padding: 0; border-radius: 50%; cursor: pointer; display: inline-flex; }
.av-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.menu a.menu-item { display: block; color: var(--navy); }
.account { display: flex; flex-direction: column; gap: 16px; max-width: 820px; }
.account-photo { display: flex; align-items: center; gap: 20px; }
.account-photo-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.account-save { justify-content: flex-end; flex-direction: row; align-items: center; gap: 10px; align-self: end; }
.account-pw { display: flex; flex-direction: column; gap: 14px; }
.account .sec-body { padding: 4px 18px 18px; }
