/* ============================================================
   Fratco App - design system v1.11
   Shared by every page (login, register, app, admin).
   ============================================================ */
:root {
  --bg: #F3F1ED;
  --bg-2: #ECE8E1;
  --surface: #FFFFFF;
  --surface-2: #FAF8F5;
  --ink: #15171A;
  --ink-soft: #5D6670;
  --ink-faint: #8C949C;
  --acc: #BE1E2D; --acc-2: #E03344; --acc-d: #8F1621;   /* accent (Fratco red by default; per-account in Account settings) */
  --red: var(--acc);
  --red-2: var(--acc-2);
  --red-dark: var(--acc-d);
  --red-soft: color-mix(in srgb, var(--red) 11%, var(--surface));
  --line: #E6E1D9;
  --line-2: #D9D2C6;
  --good: #23784A;
  --good-bg: #E3F2E9;
  --warn: #946400;
  --warn-bg: #FBF0D8;
  --pe: #2E6F9E;
  --pp: #C07A1E;
  --radius: 16px;
  --radius-sm: 11px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(20, 15, 15, 0.05);
  --shadow: 0 1px 2px rgba(20, 15, 15, 0.04), 0 8px 28px rgba(20, 15, 15, 0.07);
  --shadow-lg: 0 18px 50px rgba(20, 15, 15, 0.14);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}
:root[data-theme="dark"] {
  color-scheme: dark;
    --bg: #0F1012; --bg-2: #15171A; --surface: #1A1C1F; --surface-2: #202326;
    --ink: #EEECE8; --ink-soft: #A0A8B0; --ink-faint: #737B83;
    --red: color-mix(in srgb, var(--acc) 72%, white); --red-2: color-mix(in srgb, var(--acc-2) 72%, white); --red-dark: var(--acc); --red-soft: color-mix(in srgb, var(--red) 16%, var(--surface));
    --line: #2A2D31; --line-2: #34383D;
    --good: #6FC48E; --good-bg: #17291F; --warn: #E0AE4E; --warn-bg: #2D2511;
    --pe: #6FB4E8; --pp: #E8A94B;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
    --shadow-lg: 0 20px 60px rgba(0,0,0,.5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0F1012; --bg-2: #15171A; --surface: #1A1C1F; --surface-2: #202326;
    --ink: #EEECE8; --ink-soft: #A0A8B0; --ink-faint: #737B83;
    --red: color-mix(in srgb, var(--acc) 72%, white); --red-2: color-mix(in srgb, var(--acc-2) 72%, white); --red-dark: var(--acc); --red-soft: color-mix(in srgb, var(--red) 16%, var(--surface));
    --line: #2A2D31; --line-2: #34383D;
    --good: #6FC48E; --good-bg: #17291F; --warn: #E0AE4E; --warn-bg: #2D2511;
    --pe: #6FB4E8; --pp: #E8A94B;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
    --shadow-lg: 0 20px 60px rgba(0,0,0,.5);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 100% -10%, color-mix(in srgb, var(--red) 6%, transparent), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(46, 111, 158, 0.05), transparent 60%);
  background-attachment: fixed;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}
h1, h2, h3, .display { font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.015em; margin: 0; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ---------- motion primitives ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes rowIn { from { opacity: 0; transform: translateX(-10px) scale(.98); background: var(--red-soft); } 60% { background: var(--red-soft); } to { opacity: 1; transform: none; } }
@keyframes flash { 0% { background: var(--good-bg); } 100% { background: transparent; } }
@keyframes sheen { 0% { transform: translateX(-120%) skewX(-18deg); } 60%, 100% { transform: translateX(260%) skewX(-18deg); } }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(60px, 40px) scale(1.12); } }
@keyframes float2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-50px, -30px) scale(1.08); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
.bump { animation: pop .35s var(--spring); }

/* ---------- boot loader ---------- */
.boot {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: var(--bg); transition: opacity .35s ease, visibility .35s;
}
.boot img { width: 150px; height: auto; border-radius: 10px; box-shadow: var(--shadow); }
.boot-bar { width: 150px; height: 4px; border-radius: 4px; margin-top: 16px; overflow: hidden; background: var(--line); position: relative; }
.boot-bar::after { content: ''; position: absolute; inset: 0; width: 40%; background: var(--red); border-radius: 4px; animation: bootslide 1s var(--ease) infinite; }
@keyframes bootslide { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
body.ready .boot { opacity: 0; visibility: hidden; }
body.ready .boot .boot-bar::after { animation: none; }
.boot.gone { display: none; }

/* ---------- auth pages ---------- */
.auth-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(18,14,13,0.88), rgba(18,14,13,0.96)), url('../img/auth-hero.jpg') center/cover no-repeat, #14100f;
}
.auth-shell::before, .auth-shell::after { content: ''; position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; z-index: 0; }
.auth-shell::before { width: 520px; height: 520px; background: var(--red); top: -160px; left: -120px; animation: float1 16s ease-in-out infinite; }
.auth-shell::after { width: 420px; height: 420px; background: #3a5b7a; bottom: -140px; right: -100px; animation: float2 20s ease-in-out infinite; }
.auth-card {
  position: relative; z-index: 1; width: 100%; max-width: 410px;
  background: rgba(255,255,255,0.07); backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.14); border-radius: var(--radius-lg);
  padding: 34px 30px 28px; color: #fff; box-shadow: 0 30px 80px rgba(0,0,0,0.45);
  animation: cardIn 0.6s var(--ease);
}
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 24px; }
.auth-brand .fmark { width: 168px; height: auto; border-radius: 10px; box-shadow: 0 8px 26px rgba(0,0,0,0.4); }
.auth-brand .name { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 21px; letter-spacing: -0.01em; }
.auth-brand .sub { font-size: 12.5px; color: rgba(255,255,255,0.65); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(255,255,255,0.72); margin-bottom: 6px; font-weight: 600; }
.auth-shell .auth-card input, .auth-shell .auth-card select {
  width: 100%; padding: 12px 13px; border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.2); background: rgba(0,0,0,0.25); color: #fff;
  font-size: 15px; font-family: 'Inter', sans-serif; transition: border-color .15s, background .15s, box-shadow .15s;
}
.auth-shell .auth-card input::placeholder { color: rgba(255,255,255,0.4); }
.auth-shell .auth-card input:hover { border-color: rgba(255,255,255,0.35); }
.auth-shell .auth-card select option { color: #000; }
.auth-shell .auth-card input:focus, .auth-shell .auth-card select:focus { outline: none; border-color: var(--red-2); background: rgba(0,0,0,0.35); box-shadow: 0 0 0 4px rgba(224,51,68,.18); }
.auth-msg { min-height: 18px; font-size: 13px; margin-top: 10px; text-align: center; }
.auth-msg.err { color: #ff9aa2; font-weight: 600; }
.auth-msg.ok { color: #8ee6ac; font-weight: 600; }
.auth-foot { text-align: center; font-size: 13px; color: rgba(255,255,255,0.75); margin-top: 18px; }
.auth-foot a { color: #fff; font-weight: 700; text-decoration: underline; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: var(--radius-sm); padding: 12px 18px; position: relative; overflow: hidden;
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: 14.5px; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform .14s var(--ease), box-shadow .18s ease, background .18s ease, color .18s ease, opacity .18s;
}
.btn:active:not(:disabled) { transform: scale(0.96); }
.btn-primary { background: linear-gradient(135deg, var(--red-2), var(--red) 55%, var(--red-dark)); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--red) 32%, transparent); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 10px 28px color-mix(in srgb, var(--red) 45%, transparent); transform: translateY(-1px); }
.btn-primary::after { content: ''; position: absolute; top: 0; left: 0; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transform: translateX(-120%) skewX(-18deg); }
.btn-primary:hover:not(:disabled)::after { animation: sheen 1.1s ease; }
.btn-primary:disabled { opacity: 0.5; cursor: default; box-shadow: none; }
.btn-block { width: 100%; }
.btn-ghost { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.25); }
.btn-ghost:hover { background: rgba(255,255,255,0.15); }
.btn-outline { background: var(--surface); color: var(--red); border: 1.5px solid var(--red); }
.btn-outline:hover:not(:disabled) { background: var(--red-soft); }
.btn-outline:disabled { opacity: .45; cursor: default; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 9px; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger.armed { background: var(--red-dark); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; animation: spin 0.7s linear infinite; }
.spinner.dark { border-color: var(--line); border-top-color: var(--red); }

/* ---------- app shell ---------- */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  background: rgba(21, 18, 18, 0.9); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
  color: #fff; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px;
  position: sticky; top: 0; z-index: 20; box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--red-dark), var(--red-2), var(--red-dark)); opacity: .9; }
.topbar .brand { display: flex; align-items: center; gap: 12px; font-family: 'Space Grotesk', sans-serif; font-weight: 700; }
.topbar .fmark { height: 28px; width: auto; border-radius: 6px; }
.topbar .brand span { font-size: 15px; letter-spacing: -0.01em; }
.topbar .brand .ver { font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 700; background: rgba(255,255,255,.12); padding: 2px 7px; border-radius: 999px; color: rgba(255,255,255,.75); }
.topbar nav { display: flex; gap: 4px; }
.topbar nav a { color: rgba(255,255,255,0.78); text-decoration: none; font-weight: 600; font-size: 13.5px; padding: 8px 13px; border-radius: 9px; transition: background .18s, color .18s; }
.topbar nav a:hover, .topbar nav a.active { background: rgba(255,255,255,0.12); color: #fff; }
.topbar .who { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.topbar .who .pill { background: var(--red); padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; }
.topbar .logout-btn { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,.14); padding: 7px 12px; border-radius: 9px; font-weight: 600; font-size: 12.5px; cursor: pointer; transition: background .18s; }
.topbar .logout-btn:hover { background: rgba(255,255,255,0.2); }
.hamburger-btn { display: none; background: none; border: none; color: #fff; cursor: pointer; width: 42px; height: 42px; min-width: 42px; align-items: center; justify-content: center; border-radius: 10px; padding: 0; flex-shrink: 0; }
.hamburger-btn:hover { background: rgba(255,255,255,0.12); }
.hamburger-btn svg { width: 22px; height: 22px; }
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 40; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.drawer-overlay.show { opacity: 1; visibility: visible; }
.drawer { position: fixed; top: 0; left: 0; bottom: 0; width: 82%; max-width: 310px; background: var(--surface); z-index: 50; transform: translateX(-104%); transition: transform .3s var(--ease); will-change: transform; display: flex; flex-direction: column; box-shadow: 8px 0 40px rgba(0,0,0,0.3); border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.drawer.open { transform: translateX(0); }
.drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.drawer-header img { height: 30px; width: auto; border-radius: 6px; }
.drawer-close { background: none; border: none; font-size: 26px; line-height: 1; color: var(--ink-soft); cursor: pointer; padding: 6px 10px; border-radius: 8px; }
.drawer-close:hover { background: var(--bg); }
.drawer-body { flex: 1; overflow-y: auto; padding: 10px 8px; -webkit-overflow-scrolling: touch; }
.drawer-section-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); font-weight: 700; padding: 16px 12px 6px; }
.drawer-link { display: block; width: 100%; text-align: left; background: none; border: none; padding: 14px 12px; border-radius: 11px; font-size: 15.5px; font-weight: 600; color: var(--ink); cursor: pointer; text-decoration: none; min-height: 48px; transition: background .15s, color .15s, transform .15s var(--ease); }
.drawer-link:hover, .drawer-link.active { background: var(--red-soft); color: var(--red); text-decoration: none; }
.drawer-link:active { transform: scale(.98); }
.drawer-link.logout { color: var(--red); }
.drawer-divider { height: 1px; background: var(--line); margin: 10px 8px; }
.drawer-foot { padding: 12px 16px; font-size: 11.5px; color: var(--ink-faint); border-top: 1px solid var(--line); }

main.container { max-width: 960px; margin: 0 auto; padding: 22px 20px 70px; width: 100%; }
main.container.wide { max-width: 1280px; }
.page-foot { text-align: center; font-size: 11.5px; color: var(--ink-faint); padding: 8px 0 24px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.panel.active .card, .panel.active .reveal { animation: fadeUp .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.note { font-size: 13px; color: var(--ink-soft); line-height: 1.55; }
.note strong { color: var(--ink); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.section-head p { margin: 3px 0 0; font-size: 12.5px; color: var(--ink-soft); }
.count-pill { display: inline-flex; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; align-items: center; justify-content: center; font-family: 'Inter'; }
.count-pill:empty { display: none; }

/* ---------- tabs: segmented with sliding indicator ---------- */
.tabs, .seg-tabs { display: flex; gap: 2px; position: relative; overflow-x: auto; scrollbar-width: none; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 4px; margin-bottom: 18px; }
.tabs::-webkit-scrollbar, .seg-tabs::-webkit-scrollbar { display: none; }
.tabs button, .seg-tabs button {
  position: relative; z-index: 1; border: none; background: none; padding: 9px 15px; font-weight: 650; font-size: 13.5px;
  color: var(--ink-soft); cursor: pointer; white-space: nowrap; border-radius: 10px; transition: color .2s; flex: 0 0 auto; font-family: 'Inter', sans-serif;
}
.tabs button:hover, .seg-tabs button:hover { color: var(--ink); }
.tabs button.active, .seg-tabs button.on { color: var(--red); }
.seg-ind { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-sm), 0 2px 10px rgba(0,0,0,.06); transition: transform .35s var(--ease), width .35s var(--ease); }
.seg-tabs { margin-bottom: 16px; }
.tabs:not(.has-ind) button.active { background: var(--surface); box-shadow: var(--shadow-sm), 0 2px 10px rgba(0,0,0,.06); }
.seg-tabs button { flex: 1 1 0; }
.panel { display: none; }
.panel.active { display: block; animation: fadeIn .25s ease; }

/* ---------- tables, badges, toasts, inputs ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: -2px; padding: 2px; }
.table-scroll table.data { min-width: 640px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); padding: 9px 10px; border-bottom: 1px solid var(--line); }
table.data td { padding: 10px; border-bottom: 1px solid var(--line); }
table.data tr { transition: background .15s; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data tr:last-child td { border-bottom: none; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge.admin, .badge.suspended, .badge.lost { background: var(--red-soft); color: var(--red); }
.badge.sales, .badge.active, .badge.won { background: var(--good-bg); color: var(--good); }
.badge.open { background: var(--warn-bg); color: var(--warn); }
.toast-wrap { position: fixed; bottom: 18px; right: 18px; z-index: 150; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-lg); animation: toastIn .35s var(--spring); max-width: 340px; pointer-events: auto; }
.toast.err { background: var(--red); color: #fff; }
.toast.ok { background: var(--good); color: #fff; }

input:not([type]), input[type="text"], input[type="number"], input[type="email"], input[type="password"], input[type="date"], input[type="search"], input[type="tel"], textarea, select {
  font-family: 'Inter', sans-serif; font-size: 14.5px; padding: 10px 12px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input:hover, textarea:hover, select:hover { border-color: var(--ink-faint); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 12%, transparent); }
input[readonly], input:disabled { background: var(--surface-2); color: var(--ink-soft); }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238C949C' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
label.f-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); margin-bottom: 5px; font-weight: 600; }
.empty-state { text-align: center; padding: 28px 18px; color: var(--ink-soft); font-size: 13.5px; }
.view-note { font-size: 12.5px; color: var(--ink-soft); background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 10px; padding: 9px 12px; margin: 8px 0 12px; }

/* ---------- order layout ---------- */
.order-layout { display: flex; flex-direction: column; }
.order-side { display: contents; }
.order-side > .total-card { order: 0; }
.order-side > #priceBreakdownNote { order: 1; }
.order-main { order: 2; min-width: 0; }
.order-side > .quote-block { order: 3; }
@media (min-width: 1100px) {
  .order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 20px; align-items: start; }
  .order-side { display: block; position: sticky; top: 78px; grid-column: 2; grid-row: 1; max-height: calc(100vh - 92px); overflow-y: auto; scrollbar-width: thin; padding-bottom: 30px;
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); }
  .order-main { grid-column: 1; grid-row: 1; }
}

/* ---------- hero summary card ---------- */
.total-card { position: relative; overflow: hidden; background: linear-gradient(140deg, var(--acc-2) 0%, var(--acc) 45%, var(--acc-d) 100%); color: #fff; border-radius: var(--radius-lg); padding: 18px 20px; margin-bottom: 16px; box-shadow: 0 14px 40px color-mix(in srgb, var(--red) 32%, transparent); isolation: isolate; }
.total-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(500px 200px at 110% -20%, rgba(255,255,255,.22), transparent 60%), radial-gradient(300px 200px at -10% 120%, rgba(0,0,0,.25), transparent 60%); }
.total-card::after { content: ''; position: absolute; top: 0; left: 0; width: 35%; height: 100%; z-index: -1; background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent); transform: translateX(-120%) skewX(-18deg); animation: sheen 3.2s ease-in-out 2; }
.total-card:hover::after { animation: sheen 1.6s ease-in-out 1; }
.level-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,0.2); }
.level-row label, .freight-field label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; opacity: .85; font-weight: 700; }
.total-card select, .freight-field input { background-color: rgba(255,255,255,0.14); color: #fff; border: 1px solid rgba(255,255,255,0.3); border-radius: 10px; font-weight: 700; }
.total-card select { padding: 7px 34px 7px 12px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
.total-card select option { color: #000; }
.total-card input:focus, .total-card select:focus { border-color: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.18); }
.freight-row { display: flex; gap: 10px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,0.2); }
.freight-field { flex: 1; }
.freight-field label { display: block; margin-bottom: 5px; }
.freight-field input { width: 100%; padding: 8px 11px; }
.freight-field input[readonly] { background: rgba(0,0,0,.12); border-color: rgba(255,255,255,0.16); color: rgba(255,255,255,.85); }
.freight-mode-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,0.2); }
.seg { display: inline-flex; background: rgba(0,0,0,0.18); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { border: none; background: transparent; color: #fff; opacity: .78; font-weight: 650; font-size: 12.5px; padding: 7px 11px; border-radius: 8px; cursor: pointer; transition: background .2s, color .2s, opacity .2s, transform .12s; font-family: 'Inter'; }
.seg button:active { transform: scale(.95); }
.seg button.on { background: #fff; color: var(--red); opacity: 1; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.freight-rate-lbl { font-size: 11.5px; opacity: .88; text-align: right; }
.stats-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.stat-block .big { font-family: 'Space Grotesk', sans-serif; font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; display: inline-block; }
.stat-block .lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; opacity: .85; margin-top: 5px; font-weight: 600; }
.stat-block.right { text-align: right; }
.margin-block { display: none; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.2); animation: fadeUp .35s var(--ease); }
.margin-block.show { display: block; }
.margin-stats { display: flex; justify-content: space-between; gap: 10px; }
.margin-stats .big { font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.margin-stats .lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; opacity: .85; margin-top: 3px; }
.margin-floor { margin-top: 12px; font-size: 12.5px; font-weight: 600; line-height: 1.5; background: rgba(0,0,0,0.16); border-radius: 10px; padding: 9px 11px; }
.margin-floor.bad { background: #fff; color: var(--red); }
.giveup-head { margin-top: 8px; font-weight: 700; font-size: 13px; }
.giveup-table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
.giveup-table th { text-align: right; font-weight: 600; font-size: 10.5px; text-transform: uppercase; opacity: .8; padding: 2px 0 4px 6px; }
.giveup-table td { text-align: right; padding: 3px 0 3px 6px; border-top: 1px solid color-mix(in srgb, var(--red) 20%, transparent); }
.giveup-table th:first-child, .giveup-table td:first-child { text-align: left; padding-left: 0; }

/* price breakdown */
#priceBreakdownNote { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; box-shadow: var(--shadow); animation: fadeUp .35s var(--ease); }
.pb-head { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.pb-grid { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.pb-grid span:nth-child(even) { text-align: right; color: var(--ink); font-weight: 600; }
.pb-grid em { font-style: normal; font-size: 11.5px; color: var(--ink-faint); }
.pb-strong { color: var(--ink) !important; font-weight: 700 !important; border-top: 1px solid var(--line); padding-top: 5px; }
.pb-total { color: var(--red) !important; font-weight: 800 !important; font-size: 15px; font-family: 'Space Grotesk', sans-serif; border-top: 1px solid var(--line); padding-top: 6px; }
.pb-warn { margin-top: 10px; font-size: 12px; color: var(--warn); background: var(--warn-bg); border-radius: 9px; padding: 8px 10px; font-weight: 600; line-height: 1.5; }

/* ---------- dual-wall grid ---------- */
.material-header { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 15px; margin: 6px 0 9px 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.material-header .mh-sub { font-family: 'Inter'; font-weight: 500; font-size: 12px; color: var(--ink-soft); }
.material-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 15%, transparent); }
.dot-pe { background: var(--pe); color: var(--pe); } .dot-pp { background: var(--pp); color: var(--pp); }
.order-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.order-list.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0; }
.order-item { border-bottom: 1px solid var(--line); transition: background .15s; }
.order-list.grid .order-item { border-right: 1px solid var(--line); }
.order-item:hover { background: var(--surface-2); }
.order-item.has-qty { background: linear-gradient(90deg, color-mix(in srgb, var(--red) 7%, transparent), transparent 70%); }
.order-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; }
.order-row .size-lbl { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 16px; }
.order-row input { width: 92px; text-align: right; font-variant-numeric: tabular-nums; font-size: 16px; font-weight: 700; padding: 8px 10px; }
.admin-margin-row { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 0 14px 10px; flex-wrap: wrap; }
.admin-min-margin { font-size: 11.5px; font-weight: 700; color: var(--red); }
.admin-margin-field { display: flex; align-items: center; gap: 6px; }
.admin-margin-field label { font-size: 11px; color: var(--ink-soft); }
.admin-margin-field input { width: 70px; text-align: right; padding: 6px 8px; font-size: 13px; }
.admin-margin-field input.below-min, input.below-min { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.admin-sell { font-size: 12px; color: var(--ink-soft); min-width: 74px; text-align: right; font-variant-numeric: tabular-nums; }
.text-btn { width: 100%; padding: 11px; border: 1.5px dashed var(--line-2); border-radius: var(--radius); background: transparent; color: var(--ink-soft); font-weight: 600; font-size: 13.5px; cursor: pointer; margin-bottom: 8px; transition: border-color .15s, color .15s, background .15s; }
.text-btn:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.text-btn.inline { width: auto; padding: 6px 12px; margin: 0; border-radius: 9px; font-size: 12.5px; }

/* ---------- build panes ---------- */
.build-pane { display: none; }
.build-pane.active { display: block; animation: fadeUp .35s var(--ease); }
.line-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.line-card {
  position: relative; text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; padding: 13px 13px 12px;
  cursor: pointer; display: flex; flex-direction: column; gap: 3px; color: var(--ink); font-family: 'Inter';
  transition: border-color .2s, box-shadow .2s, transform .2s var(--ease), background .2s;
  animation: fadeUp .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms);
}
.line-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.line-card:active { transform: scale(.97); }
.line-card svg { width: 26px; height: 26px; color: var(--ink-faint); margin-bottom: 4px; transition: color .2s, transform .3s var(--spring); }
.line-card .lc-name { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 14.5px; }
.line-card .lc-desc { font-size: 11.5px; color: var(--ink-soft); }
.line-card .lc-mat { position: absolute; top: 10px; right: 10px; font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 999px; letter-spacing: .04em; }
.lc-mat.mat-pe { background: color-mix(in srgb, var(--pe) 15%, transparent); color: var(--pe); }
.lc-mat.mat-pp { background: color-mix(in srgb, var(--pp) 18%, transparent); color: var(--pp); }
.line-card.on { border-color: var(--red); background: linear-gradient(160deg, var(--red-soft), var(--surface) 70%); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 10%, transparent), var(--shadow); }
.line-card.on svg { color: var(--red); transform: scale(1.1) rotate(-6deg); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.fg label, .qf-row label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); margin-bottom: 5px; font-weight: 650; }
.fg select, .fg input { width: 100%; }
.seg.light { background: var(--bg-2); border: 1px solid var(--line); }
.seg.light button { color: var(--ink-soft); opacity: 1; }
.seg.light button.on { background: var(--surface); color: var(--red); }
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.stepper:focus-within { border-color: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 12%, transparent); }
.stepper button { width: 38px; border: none; background: var(--surface-2); color: var(--ink); font-size: 18px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; -webkit-tap-highlight-color: transparent; }
.stepper button:hover:not(:disabled) { background: var(--red-soft); color: var(--red); }
.stepper button:active:not(:disabled) { transform: scale(.9); }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper input { width: 64px; border: none !important; box-shadow: none !important; text-align: center; font-weight: 700; font-size: 15px; border-radius: 0; -moz-appearance: textfield; background: transparent; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper.full { display: flex; } .stepper.full input { flex: 1; }
.stepper.sm button { width: 30px; font-size: 16px; } .stepper.sm input { width: 50px; font-size: 14px; padding: 6px 4px; }
.preview-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; margin-bottom: 12px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; min-height: 64px; }
.pv-math { display: flex; flex-direction: column; font-size: 12.5px; color: var(--ink-soft); gap: 2px; font-variant-numeric: tabular-nums; }
.pv-math em { font-style: normal; color: var(--ink-faint); }
.pv-total { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 24px; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.pv-meta, .pv-admin, .pv-none { grid-column: 1 / -1; font-size: 12px; color: var(--ink-soft); }
.pv-admin { font-weight: 600; } .pv-admin.bad { color: var(--red); }
.pv-none { color: var(--warn); font-weight: 600; }
.pb-actions { display: flex; gap: 10px; align-items: center; }
.pb-actions .btn { flex: 1; }

/* fittings browser */
.acc-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 220px); gap: 10px; margin-bottom: 12px; }
.acc-tools input { width: 100%; padding-left: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238C949C' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 11px center; }
.acc-tools select { width: 100%; }
.acc-results { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; max-height: 520px; overflow-y: auto; background: var(--surface); }
.acc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 64px auto; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); transition: background .15s; }
.acc-row:last-child { border-bottom: none; }
.acc-row:hover { background: var(--surface-2); }
.acc-row.flash { animation: flash .8s ease; }
.acc-label { font-weight: 600; font-size: 13.5px; }
.acc-cat { font-size: 11.5px; color: var(--ink-faint); }
.acc-price { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; font-size: 13.5px; }
.acc-price span { font-weight: 500; font-size: 11px; color: var(--ink-faint); margin-left: 3px; }
.acc-qty { width: 64px; text-align: center; padding: 7px 6px !important; font-weight: 700; }

/* "on this quote" items */
.items-list { display: flex; flex-direction: column; gap: 8px; }
.item-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 96px 34px; gap: 10px; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; padding: 10px 10px 10px 14px; transition: opacity .22s ease, transform .22s var(--ease), border-color .2s, background .2s; }
.item-row.enter { animation: rowIn .6s var(--ease); }
.item-row.leaving { opacity: 0; transform: translateX(16px) scale(.97); }
.item-row.below { border-color: var(--red); background: color-mix(in srgb, var(--red-soft) 60%, var(--surface-2)); }
.item-title { font-weight: 650; font-size: 13.5px; line-height: 1.35; }
.item-sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; font-variant-numeric: tabular-nums; }
.item-admin { font-size: 11.5px; color: var(--ink-soft); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.item-admin:empty { display: none; }
.item-admin label { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.item-admin input { width: 68px; padding: 4px 6px; font-size: 12.5px; text-align: right; }
.item-amt { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; }
.item-x { width: 32px; height: 32px; border-radius: 9px; border: none; background: transparent; color: var(--ink-faint); font-size: 20px; cursor: pointer; transition: background .15s, color .15s, transform .15s; }
.item-x:hover { background: var(--red-soft); color: var(--red); transform: rotate(90deg); }
.items-empty { text-align: center; padding: 22px 16px; color: var(--ink-soft); font-size: 13px; border: 1.5px dashed var(--line-2); border-radius: 13px; }

/* truck / savings cards */
.savings-card { display: none; background: var(--good-bg); color: var(--good); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; font-size: 13.5px; font-weight: 500; animation: fadeUp .35s var(--ease); }
.savings-card.show { display: block; }
.fill-card { display: none; background: var(--warn-bg); color: var(--warn); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; font-size: 13.5px; font-weight: 600; animation: fadeUp .35s var(--ease); }
.fill-card.show { display: block; }
.fill-bar { height: 9px; border-radius: 5px; background: rgba(154,107,0,0.18); margin: 9px 0 7px; overflow: hidden; }
.fill-bar div { height: 100%; background: linear-gradient(90deg, var(--warn), #d09a2a); border-radius: 5px; transition: width .6s var(--ease); }
.fill-sub { font-weight: 500; font-size: 12px; opacity: .9; }
.breakdown-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; padding: 11px 14px; margin-bottom: 8px; font-size: 13px; animation: fadeUp .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); }
.breakdown-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.bsize { font-family: 'Space Grotesk', sans-serif; font-weight: 700; }
.btrucks { font-weight: 700; color: var(--red); font-size: 12.5px; white-space: nowrap; }
.btrucks.zero { color: var(--good); }
.breakdown-detail { color: var(--ink-soft); font-size: 12.5px; }

/* ---------- quote form ---------- */
.quote-form { margin: 0; }
.qf-row { margin-bottom: 11px; }
.qf-row.two { display: flex; gap: 10px; } .qf-row.two > div { flex: 1; min-width: 0; }
.qf-row input, .qf-row textarea { width: 100%; }
.qf-row textarea { min-height: 60px; resize: vertical; }
#qReasonRow { animation: fadeUp .3s var(--ease); }
#qReasonRow label { color: var(--red); font-weight: 700; } #qReasonRow textarea { border-color: var(--red); }
.qf-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.qf-actions .btn { flex: 1; }
.qf-msg { font-size: 13px; margin-top: 9px; min-height: 1em; color: var(--ink-soft); }
.qf-msg.err { color: var(--red); font-weight: 600; } .qf-msg.ok { color: var(--good); font-weight: 600; }

/* ---------- my quotes ---------- */
.quotes-tools { margin-bottom: 12px; }
.quotes-tools input { width: 100%; padding-left: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238C949C' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 11px center; }
.quote-summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; font-size: 13.5px; line-height: 1.6; box-shadow: var(--shadow); }
.quote-card { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; font-size: 13px; line-height: 1.5; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s; animation: fadeUp .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); }
.quote-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.quote-card.status-won { border-left-color: var(--good); } .quote-card.status-lost { border-left-color: var(--ink-faint); }
.quote-card.below { border-color: var(--red); border-left-color: var(--red); }
.qc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.qc-num { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 16px; }
.qc-top select { font-size: 12.5px; font-weight: 700; padding: 5px 30px 5px 10px; }
.qc-cust { font-weight: 650; font-size: 14px; }
.qc-meta { color: var(--ink-soft); }
.qc-money { display: flex; justify-content: space-between; margin-top: 6px; font-variant-numeric: tabular-nums; gap: 10px; flex-wrap: wrap; }
.qc-money strong { font-family: 'Space Grotesk', sans-serif; font-size: 17px; }
.qc-give { color: var(--red); font-weight: 600; margin-top: 4px; }
.qc-actions { display: flex; gap: 6px; margin-top: 11px; }
.qc-actions button { flex: 1; padding: 8px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-weight: 650; font-size: 12.5px; cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .12s; }
.qc-actions button:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.qc-actions button:active { transform: scale(.95); }
.qc-actions button.armed { border-color: var(--red); color: #fff; background: var(--red); }

/* ---------- pricing tab ---------- */
.price-level-picker { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.price-level-picker label { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 16px; }
.price-grid-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); gap: 10px; flex-wrap: wrap; transition: background .15s; }
.price-grid-row:hover { background: var(--surface-2); }
.price-grid-row .size-lbl { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 15px; }
.price-grid-row:last-child { border-bottom: none; }
.price-inputs { display: flex; gap: 14px; }
.price-field { display: flex; flex-direction: column; align-items: flex-end; }
.price-field label { font-size: 10px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px; }
.price-field .val, .price-field input { min-width: 84px; text-align: right; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.rate-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 2px; border-bottom: 1px solid var(--line); gap: 10px; }
.rate-row:last-child { border-bottom: none; }
.rate-row .rlabel { font-weight: 600; font-size: 14px; }
.rate-row .val, .rate-row input { width: 96px; text-align: right; font-weight: 700; font-size: 14px; }
.ref-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; box-shadow: var(--shadow-sm); }
.ref-block summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; transition: background .15s; }
.ref-block summary::-webkit-details-marker { display: none; }
.ref-block summary:hover { background: var(--surface-2); }
.ref-block summary strong { font-family: 'Space Grotesk', sans-serif; font-size: 15.5px; margin-right: 8px; }
.ref-block summary em { font-style: normal; font-size: 12px; color: var(--ink-soft); }
.ref-block .chev, details.host-block summary .chev { font-size: 18px; color: var(--ink-faint); transition: transform .25s var(--ease); }
.ref-block[open] .chev, details.host-block[open] summary .chev { transform: rotate(90deg); }
.ref-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); }
.ref-size { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 15px; }
.ref-skus { display: flex; flex-wrap: wrap; gap: 5px; }
.sku-chip { font-size: 11.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.sku-chip em { font-style: normal; color: var(--ink-faint); margin-left: 5px; }
.ref-price { text-align: right; font-variant-numeric: tabular-nums; }
.ref-price strong { display: block; font-size: 14.5px; }
.ref-price span { font-size: 11px; color: var(--ink-soft); }
.acc-cat-head { position: sticky; top: 0; background: var(--bg-2); font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 13px; padding: 7px 14px; border-bottom: 1px solid var(--line); z-index: 1; }
.acc-ref-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.acc-ref-row strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
#accPriceList { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; max-height: 620px; overflow-y: auto; background: var(--surface); }

/* ---------- nesting tab ---------- */
.cap-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.cap-row:last-child { border-bottom: none; }
.cap-row .size-lbl { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 15px; }
.cap-sub { font-size: 11.5px; color: var(--ink-soft); }
.cap-row .val, .cap-row input { width: 92px; text-align: right; font-weight: 700; font-size: 14px; }
.combo-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.combo-sentence { font-size: 14px; line-height: 1.7; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.combo-sentence input, .combo-sentence .val { width: 52px; text-align: center; font-weight: 700; }
details.host-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
details.host-block summary { padding: 13px 16px; cursor: pointer; list-style: none; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 15.5px; display: flex; justify-content: space-between; align-items: center; }
details.host-block summary::-webkit-details-marker { display: none; }
.guest-rows { padding: 0 16px 12px; }
.guest-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px dashed var(--line); }
.guest-lbl { font-size: 14px; font-weight: 500; }
.guest-row .val, .guest-row input { width: 66px; text-align: right; font-weight: 700; font-size: 14px; }

/* ---------- preview banner ---------- */
.preview-banner { background: #F5A623; color: #1a1a1a; text-align: center; font-weight: 700; font-size: 12.5px; padding: 8px 14px; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; position: sticky; top: 0; z-index: 30; }
.preview-banner button { background: #1a1a1a; color: #fff; border: none; padding: 5px 12px; border-radius: 7px; font-weight: 700; font-size: 12px; cursor: pointer; flex-shrink: 0; }
body.previewing .topbar { top: 35px; }

/* ---------- mobile total bar ---------- */
.mobile-total-bar { display: none; }
@media (max-width: 1099px) {
  .mobile-total-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 30;
    background: rgba(21,18,18,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: #fff;
    border-radius: 16px; padding: 10px 10px 10px 16px; box-shadow: 0 16px 40px rgba(0,0,0,.35);
    transform: translateY(140%); transition: transform .4s var(--spring);
  }
  .mobile-total-bar.show { transform: translateY(0); }
  .mobile-total-bar .mb-total { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; line-height: 1.1; }
  .mobile-total-bar .mb-sub { font-size: 11.5px; opacity: .7; }
  body.has-bar main.container { padding-bottom: 110px; }
  .toast-wrap { bottom: 84px; }
}

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .topbar nav { display: none; }
  .hamburger-btn { display: flex; }
  .topbar { padding: 0 8px; gap: 6px; }
  .topbar .brand span:not(.ver) { display: none; }
  .topbar .who .pill { display: none; }
  .topbar .who span:not(.pill) { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  main.container { padding: 14px 12px 70px; }
  .card { padding: 14px; }
  .seg-tabs button { padding: 9px 8px; font-size: 12.5px; }
  .line-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .line-card { padding: 11px; }
  .acc-tools { grid-template-columns: 1fr; }
  .acc-row { grid-template-columns: minmax(0, 1fr) auto; }
  .acc-row .acc-qty { grid-column: 1; justify-self: start; }
  .acc-row .acc-add { grid-column: 2; }
  .item-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main x" "step amt"; padding: 10px 8px 10px 12px; }
  .item-main { grid-area: main; } .item-x { grid-area: x; } .item-row .stepper { grid-area: step; justify-self: start; } .item-amt { grid-area: amt; }
  .ref-row { grid-template-columns: 40px minmax(0, 1fr); }
  .ref-price { grid-column: 1 / -1; text-align: left; display: flex; gap: 8px; align-items: baseline; }
  .row-actions button, table.data .row-actions button { min-height: 36px; padding: 8px 12px; font-size: 12.5px; }
  .qc-actions button { min-height: 40px; }
  .btn, .btn-sm { min-height: 42px; }
  .stat-block .big { font-size: 26px; }
  .order-row input { width: 84px; }
  .toast-wrap { left: 12px; right: 12px; align-items: stretch; }
}
@media (min-width: 641px) {
  .drawer, .drawer-overlay, .hamburger-btn { display: none !important; }
}

/* ---------- reduced motion: keep everything, drop the movement ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Admin price sheet ---------- */
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.adm-table th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); padding: 8px 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-2); font-weight: 700; }
.adm-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.adm-table tbody tr { transition: background .15s; }
.adm-table tbody tr:hover { background: var(--surface-2); }
.adm-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.adm-size { font-family: 'Space Grotesk', sans-serif; font-weight: 700; }
.adm-color { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); margin-left: 4px; }
.adm-faint { color: var(--ink-faint); font-size: 11.5px; }
.adm-sell { font-weight: 700; }
.adm-borrowed td { background: color-mix(in srgb, var(--warn-bg) 45%, transparent); }
.adm-in { width: 86px; text-align: right; padding: 6px 8px; font-weight: 700; }
.adm-in.flash-ok { animation: flash .9s ease; border-color: var(--good); }
.adm-missing td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.item-admin input.item-cost { width: 90px; }

/* ---------- dual-wall stick-length chips ---------- */
.dw-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 4px 0 9px; }
.dw-head .material-header { margin: 0; }
.len-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.len-chip {
  position: relative; display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line-2); background: var(--surface);
  color: var(--ink-soft); font-family: 'Inter', sans-serif; font-weight: 650; font-size: 12.5px; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  transition: border-color .2s, color .2s, background .2s, transform .15s var(--spring), box-shadow .2s; -webkit-tap-highlight-color: transparent;
}
.len-chip:hover { border-color: var(--ink-faint); color: var(--ink); transform: translateY(-1px); }
.len-chip:active { transform: scale(.95); }
.len-chip.on { border-color: var(--red); color: #fff; background: linear-gradient(135deg, var(--red-2), var(--red)); box-shadow: 0 4px 14px color-mix(in srgb, var(--red) 28%, transparent); }
.len-badge { display: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; font-size: 10.5px; font-weight: 800; align-items: center; justify-content: center; background: var(--red); color: #fff; }
.len-badge:not(:empty) { display: inline-flex; animation: pop .35s var(--spring); }
.len-chip.on .len-badge { background: #fff; color: var(--red); }
.order-list.swap { animation: fadeUp .3s var(--ease); }
.dw-sub { font-size: 11px; color: var(--ink-faint); margin-top: 1px; }
.dw-price { font-size: 11.5px; color: var(--ink-soft); padding: 0 14px 9px; text-align: right; font-variant-numeric: tabular-nums; margin-top: -4px; }
.dw-price:empty { display: none; }

/* ---------- item capacities ---------- */
.cap-rows .cap-row { border-top: 1px solid var(--line); }
.cap-item { font-family: 'Inter', sans-serif; font-weight: 500; font-size: 13px; color: var(--ink-soft); margin-left: 4px; }
.cap-row.cap-missing { box-shadow: inset 3px 0 0 var(--warn); background: color-mix(in srgb, var(--warn-bg) 40%, transparent); }
.cap-flag { color: var(--warn); font-weight: 700; }
.cap-in { width: 92px; text-align: right; font-weight: 700; }
.cap-in.flash-ok { animation: flash .9s ease; border-color: var(--good); }
.admin-nit, .ia-nit { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); cursor: pointer; user-select: none; }
.admin-nit input, .ia-nit input { accent-color: var(--red); width: 15px; height: 15px; margin: 0; cursor: pointer; }
.admin-nit input:disabled { cursor: default; opacity: .4; }

/* ---------- admin: all quotes ---------- */
.aq-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 240px) auto auto; gap: 10px; align-items: center; margin-bottom: 14px; }
.aq-tools input { width: 100%; padding-left: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238C949C' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 11px center; }
.aq-tools select { width: 100%; }
.aq-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.aq-big { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 22px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.aq-lbl { font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; }
.aq-warn { margin-top: 12px; font-size: 12.5px; font-weight: 600; color: var(--red); background: var(--red-soft); border-radius: 10px; padding: 8px 12px; }
.aq-table td { vertical-align: top; }
.aq-table .num, .aq-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.aq-num { font-family: 'Space Grotesk', sans-serif; }
.aq-sub { font-size: 11.5px; color: var(--ink-faint); }
.aq-give { font-size: 11.5px; color: var(--red); font-weight: 600; }
.aq-below td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.aq-table button { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-weight: 650; font-size: 12px; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.aq-table button:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.aq-group { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; background: var(--surface); animation: fadeUp .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
.aq-group summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface-2); flex-wrap: wrap; }
.aq-group summary::-webkit-details-marker { display: none; }
.aq-group[open] .chev { transform: rotate(90deg); }
.aq-group .chev { margin-left: auto; font-size: 18px; color: var(--ink-faint); transition: transform .25s var(--ease); }
.aq-rep { display: inline-flex; align-items: center; gap: 10px; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 15px; }
.aq-avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--red-2), var(--red-dark)); color: #fff; font-size: 12px; font-family: 'Inter', sans-serif; font-weight: 800; }
.aq-gstats { font-size: 12.5px; color: var(--ink-soft); }
@media (max-width: 900px) { .aq-tools { grid-template-columns: 1fr 1fr; } .aq-tools input { grid-column: 1 / -1; } }
@media (max-width: 640px) { .aq-tools { grid-template-columns: 1fr; } .aq-tools .seg { justify-self: start; } }

/* ---------- polish pass ---------- */
input[type="checkbox"], input[type="radio"] { accent-color: var(--red); }
.acc-add { min-width: 64px; }
#quoteList { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 12px; }
#quoteList .quote-card { margin-bottom: 0; }
#quoteList .empty-state { grid-column: 1 / -1; }
@media (max-width: 640px) { #quoteList { grid-template-columns: 1fr; } }
.quote-summary .aq-warn { margin-top: 12px; }
#ratesList { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); column-gap: 32px; }
#ratesList .rate-row { border-bottom: 1px solid var(--line); }
.cap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.cap-grid .cap-row { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); border-top: none; }
#priceGrid, #flatPriceGrid { overflow: hidden; }
#priceGrid .adm-table { min-width: 0; }
#priceGrid .adm-table th:first-child, #priceGrid .adm-table td:first-child { padding-left: 16px; }
#priceGrid .adm-table th:last-child, #priceGrid .adm-table td:last-child { padding-right: 16px; }
.aq-table.grouped th:nth-child(2), .aq-table.grouped td:nth-child(2) { display: none; }
.admin-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 18px; margin: 0 0 4px; }
.admin-sub { font-size: 12.5px; color: var(--ink-soft); margin: 0 0 14px; }
@media (max-width: 640px) {
  .order-list.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-list.grid .order-row { padding: 9px 10px; gap: 6px; }
  .order-list.grid .order-row input { width: 68px; font-size: 15px; padding: 7px 8px; }
  .order-list.grid .admin-margin-row { padding: 0 10px 9px; gap: 6px; }
  .tabs { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); padding-right: 32px; }
}

/* ---------- loading: nested / not nested ---------- */
.load-mode-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,0.2); }
.lm-lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; opacity: .85; font-weight: 700; }
.savings-card.not-nested { background: var(--warn-bg); color: var(--warn); }

/* ---------- Admin margin row in the Pipe & coils builder ---------- */
.pb-admin { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: color-mix(in srgb, var(--red-soft) 55%, var(--surface)); border: 1px solid color-mix(in srgb, var(--red) 25%, var(--line)); border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; animation: fadeUp .3s var(--ease); }
.pb-admin-info { font-size: 12.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pb-admin-info strong { color: var(--ink); }
.pb-admin-tag { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: var(--red); color: #fff; padding: 2px 7px; border-radius: 999px; }
.pb-admin-fields { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.pb-admin-fields label { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.pb-admin-fields input { width: 92px; text-align: right; padding: 7px 9px; font-weight: 700; }
.pb-admin-fields input:disabled { opacity: .5; }

/* ---------- dual-wall material cards (open to enter quantities) ---------- */
.dw-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 12px; }
.dw-card { padding: 14px 14px 13px; }
.dw-card .lc-lens { font-size: 11px; color: var(--ink-faint); margin-top: 3px; }
.dw-card-count { position: absolute; right: 12px; bottom: 12px; font-size: 11px; font-weight: 800; color: #fff; background: var(--red); padding: 2px 8px; border-radius: 999px; }
.dw-card-count:empty { display: none; }
.dw-card-count:not(:empty) { animation: pop .35s var(--spring); }
.dw-card::after { content: '›'; position: absolute; right: 14px; top: 50%; transform: translateY(-50%) rotate(0deg); font-size: 20px; color: var(--ink-faint); transition: transform .25s var(--ease), color .2s; }
.dw-card.on::after { transform: translateY(-50%) rotate(90deg); color: var(--red); }
.dw-card .lc-mat { right: 36px; }
.dw-hint { text-align: center; padding: 16px; color: var(--ink-soft); font-size: 13px; border: 1.5px dashed var(--line-2); border-radius: 13px; margin-bottom: 12px; }
.dw-section { margin-bottom: 6px; }
.dw-section.swap { animation: fadeUp .35s var(--ease); }
@media (max-width: 640px) { .dw-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dw-card .lc-lens { display: none; } }

/* ---------- per-account appearance (Account page) ---------- */
:root[data-accent="steel"]    { --acc: #2563A8; --acc-2: #3B82C8; --acc-d: #1B4A80; }
:root[data-accent="field"]    { --acc: #2F7D4F; --acc-2: #43A36A; --acc-d: #1F5A37; }
:root[data-accent="harvest"]  { --acc: #C27313; --acc-2: #E08E26; --acc-d: #8F520A; }
:root[data-accent="graphite"] { --acc: #3F4650; --acc-2: #5A636E; --acc-d: #262B31; }
:root[data-density="compact"] body { font-size: 13px; }
:root[data-density="compact"] .card { padding: 13px; margin-bottom: 12px; }
:root[data-density="compact"] .order-row { padding: 6px 10px; }
:root[data-density="compact"] .order-row input { padding: 6px 8px; font-size: 14px; }
:root[data-density="compact"] .item-row { padding: 7px 8px 7px 12px; }
:root[data-density="compact"] .acc-row { padding: 7px 10px; }
:root[data-density="compact"] .breakdown-card { padding: 8px 12px; }
:root[data-density="compact"] main.container { padding-top: 14px; }
:root[data-density="compact"] .total-card { padding: 14px 16px; }
:root[data-motion="reduced"] *, :root[data-motion="reduced"] *::before, :root[data-motion="reduced"] *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }

/* ================= v1.11 graphics + account + dashboard ================= */
/* satisfying buttons */
.ripple { position: absolute; border-radius: 50%; pointer-events: none; background: currentColor; opacity: .18; transform: scale(0); animation: rippleGo .6s var(--ease) forwards; }
@keyframes rippleGo { to { transform: scale(1); opacity: 0; } }
.btn.celebrate, .btn-primary.celebrate { background: linear-gradient(135deg, #34a867, var(--good)); box-shadow: 0 8px 24px rgba(35,120,74,.35); animation: pop .4s var(--spring); }
.btn-outline.celebrate { background: var(--good-bg); border-color: var(--good); color: var(--good); }
.ok-check path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: drawCheck .35s .05s ease forwards; }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
.burst { position: fixed; z-index: 300; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; border: 2px solid var(--good); pointer-events: none; animation: burstGo .65s var(--ease) forwards; }
.burst:nth-child(odd) { border-color: var(--red); width: 7px; height: 7px; }
@keyframes burstGo { to { transform: translate(var(--dx), var(--dy)) scale(.4); opacity: 0; } }
.line-card.on, .len-chip.on, .theme-pick.on, .accent-pick.on { animation: settle .35s var(--spring); }
@keyframes settle { 0% { transform: scale(.96); } 60% { transform: scale(1.02); } 100% { transform: scale(1); } }

/* product illustrations */
.line-card .lc-art { width: 52px; height: 35px; color: var(--ink-faint); margin-bottom: 4px; transition: color .2s, transform .35s var(--spring); }
.line-card:hover .lc-art { transform: translateX(3px); }
.line-card.on .lc-art { color: var(--red); transform: scale(1.06); }
.line-card.on .lc-art { animation: artPulse .6s var(--spring); }
@keyframes artPulse { 0% { transform: scale(.9); } 55% { transform: scale(1.14); } 100% { transform: scale(1.06); } }

/* truck loading visual */
.truck-viz { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 12px; }
.truck-viz:empty { display: none; }
.truck { width: 150px; animation: truckIn .55s var(--ease) both; animation-delay: calc(var(--i) * 90ms); }
@keyframes truckIn { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
.truck svg { width: 150px; height: 62px; display: block; color: var(--red); }
.truck .trailer { fill: var(--surface-2); stroke: var(--line-2); stroke-width: 1.5; }
.truck .pipe-load { color: var(--red); }
.truck .truck-fill { transition: width .7s var(--ease); }
.truck .cab { fill: var(--red); } .truck .cab-win { fill: var(--surface); opacity: .85; }
.truck .wheel { fill: var(--ink); stroke: var(--surface); stroke-width: 2; }
.truck-lbl { font-size: 11.5px; color: var(--ink-soft); text-align: center; margin-top: 2px; }
.truck-lbl strong { color: var(--ink); }
.truck-more { align-self: center; font-weight: 700; color: var(--ink-soft); font-size: 13px; }

/* empty states */
.items-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-art { width: 120px; height: 64px; color: var(--line-2); }

/* summary card: faint pipe-end texture */
.total-card::before { background:
  radial-gradient(500px 200px at 110% -20%, rgba(255,255,255,.22), transparent 60%),
  radial-gradient(300px 200px at -10% 120%, rgba(0,0,0,.25), transparent 60%),
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='white' stroke-opacity='.07' stroke-width='1.4'%3E%3Ccircle cx='16' cy='16' r='12'/%3E%3Ccircle cx='16' cy='16' r='8'/%3E%3Ccircle cx='48' cy='48' r='12'/%3E%3Ccircle cx='48' cy='48' r='8'/%3E%3C/g%3E%3C/svg%3E"); }

/* account */
.acct-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; background: linear-gradient(135deg, var(--surface), var(--red-soft)); }
.acct-avatar { width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 26px; color: #fff; background: linear-gradient(135deg, var(--red-2), var(--red-dark)); box-shadow: 0 10px 26px color-mix(in srgb, var(--red) 35%, transparent); position: relative; z-index: 1; }
.acct-id { position: relative; z-index: 1; min-width: 0; }
.acct-name { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 22px; letter-spacing: -0.01em; }
.acct-title { color: var(--ink-soft); font-size: 13.5px; margin-top: 1px; }
.acct-meta { font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.acct-levels { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; max-width: 260px; align-content: center; }
.acct-lv-lbl { width: 100%; text-align: right; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); font-weight: 700; }
.lv-chip { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.acct-pipes { position: absolute; right: -10px; bottom: -20px; width: 240px; color: var(--red); opacity: .08; z-index: 0; animation: slowSpin 40s linear infinite; transform-origin: 190px 60px; }
@keyframes slowSpin { to { transform: rotate(360deg); } }
.acct-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.acct-grid > .card { margin-bottom: 0; }
.acct-stats-card { grid-column: 1 / -1; }
.theme-picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.theme-pick { border: 1.5px solid var(--line); background: var(--surface); border-radius: 13px; padding: 8px 8px 9px; cursor: pointer; font: 650 12.5px 'Inter', sans-serif; color: var(--ink); display: flex; flex-direction: column; gap: 7px; align-items: stretch; transition: border-color .2s, box-shadow .2s, transform .15s; }
.theme-pick:hover { transform: translateY(-1px); border-color: var(--line-2); }
.theme-pick.on { border-color: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
.tp-prev { height: 46px; border-radius: 8px; position: relative; overflow: hidden; border: 1px solid rgba(0,0,0,.08); }
.tp-prev i { position: absolute; left: 8px; right: 8px; height: 8px; border-radius: 4px; }
.tp-prev i:first-child { top: 9px; width: 45%; } .tp-prev i:last-child { top: 24px; }
.tp-light { background: #F3F1ED; } .tp-light i { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.1); } .tp-light i:first-child { background: var(--red); }
.tp-dark { background: #0F1012; } .tp-dark i { background: #202326; } .tp-dark i:first-child { background: color-mix(in srgb, var(--red) 75%, white); }
.tp-system { background: linear-gradient(115deg, #F3F1ED 50%, #0F1012 50%); } .tp-system i { background: rgba(128,128,128,.45); } .tp-system i:first-child { background: var(--red); }
.accent-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.accent-pick { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px 6px 7px; cursor: pointer; font: 650 12.5px 'Inter', sans-serif; color: var(--ink); transition: border-color .2s, box-shadow .2s, transform .15s; }
.accent-pick span { width: 18px; height: 18px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 2px rgba(255,255,255,.5); }
.accent-pick:hover { transform: translateY(-1px); }
.accent-pick.on { border-color: var(--sw); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sw) 18%, transparent); }
.pref-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pref-row > span { font-weight: 600; font-size: 13.5px; }
.pref-row select { min-width: 180px; }
.pref-saved { font-size: 12px; color: var(--good); font-weight: 700; opacity: 0; margin-top: 8px; }
.pref-saved.show { animation: savedFlash 2.2s ease; }
@keyframes savedFlash { 0% { opacity: 0; transform: translateY(4px); } 12%, 70% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* stats: KPIs, trend chart, highlights (Account + Admin dashboard) */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; animation: fadeUp .4s var(--ease) both; }
.kpi:nth-child(2) { animation-delay: 50ms; } .kpi:nth-child(3) { animation-delay: 100ms; } .kpi:nth-child(4) { animation-delay: 150ms; } .kpi:nth-child(5) { animation-delay: 200ms; } .kpi:nth-child(6) { animation-delay: 250ms; }
.kpi-val { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 22px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.kpi-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); font-weight: 700; margin-top: 2px; }
.kpi-sub { font-size: 12px; color: var(--ink-faint); margin-top: 4px; }
.kpi-sub .neg, .neg { color: var(--red); font-weight: 700; }
.chart-wrap { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 12px 8px; margin-bottom: 14px; }
.trend-chart { width: 100%; height: 170px; display: block; }
.trend-chart .tc-q { fill: color-mix(in srgb, var(--ink-faint) 40%, transparent); }
.trend-chart .tc-w { fill: var(--red); }
.trend-chart .tc-bar rect { transform-box: fill-box; transform-origin: bottom; animation: barGrow .6s var(--ease) both; animation-delay: calc(var(--i) * 30ms); }
@keyframes barGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.trend-chart .tc-lbl, .trend-chart .tc-max { font-size: 10px; fill: var(--ink-faint); font-family: 'Inter', sans-serif; }
.trend-chart .tc-axis { stroke: var(--line-2); }
.tc-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--ink-soft); padding: 2px 4px; }
.tc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.tc-legend i.tc-q { background: color-mix(in srgb, var(--ink-faint) 40%, transparent); } .tc-legend i.tc-w { background: var(--red); }
.highlight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.hl-card { border-radius: 14px; padding: 14px 16px; position: relative; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.hl-card::after { content: ''; position: absolute; right: -18px; top: -18px; width: 80px; height: 80px; border-radius: 50%; border: 10px solid currentColor; opacity: .07; }
.hl-margin { background: linear-gradient(135deg, var(--good-bg), var(--surface-2)); color: var(--good); }
.hl-big { background: linear-gradient(135deg, var(--red-soft), var(--surface-2)); color: var(--red); }
.hl-kind { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; }
.hl-val { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 26px; color: var(--ink); margin: 2px 0; font-variant-numeric: tabular-nums; }
.hl-sub { font-size: 12.5px; color: var(--ink-soft); }
.hl-empty .hl-val { color: var(--ink-faint); }
@media (max-width: 900px) { .acct-grid { grid-template-columns: 1fr; } .acct-hero { grid-template-columns: auto 1fr; } .acct-levels { grid-column: 1 / -1; justify-content: flex-start; max-width: none; } .acct-lv-lbl { text-align: left; } }
@media (max-width: 640px) { .theme-picks { grid-template-columns: repeat(3, minmax(0, 1fr)); } .acct-avatar { width: 58px; height: 58px; font-size: 21px; } .acct-name { font-size: 19px; } }
/* admin dashboard */
.db-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 16px; }
.db-grid > .card { margin-bottom: 16px; }
.hl-rep { background: linear-gradient(135deg, color-mix(in srgb, var(--pe) 14%, var(--surface-2)), var(--surface-2)); color: var(--pe); }
.hl-rep2 { background: linear-gradient(135deg, color-mix(in srgb, var(--pp) 16%, var(--surface-2)), var(--surface-2)); color: var(--pp); }
.hl-rep .hl-val, .hl-rep2 .hl-val { font-size: 20px; }
.top-job { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); animation: fadeUp .4s var(--ease) both; animation-delay: calc(var(--i) * 60ms); }
.top-job:last-child { border-bottom: none; }
.tj-rank { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: 'Space Grotesk', sans-serif; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line); }
.top-job:first-child .tj-rank { background: linear-gradient(135deg, var(--red-2), var(--red-dark)); color: #fff; border: none; }
.tj-cust { font-weight: 650; }
.tj-bar { height: 5px; background: var(--line); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.tj-bar span { display: block; height: 100%; background: var(--red); border-radius: 3px; animation: barW .8s var(--ease) both; transform-origin: left; }
@keyframes barW { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.tj-amt { text-align: right; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-variant-numeric: tabular-nums; }
.db-table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; transition: color .15s; }
.db-table th.sortable:hover { color: var(--red); }
.db-table th.sorted { color: var(--red); }
.db-table th.sorted::after { content: ' ▾'; } .db-table th.sorted.asc::after { content: ' ▴'; }
.db-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.db-table tr.lead td { background: var(--red-soft); }
@media (max-width: 1000px) { .db-grid { grid-template-columns: 1fr; } }
/* dashboard polish */
.aq-rep, .db-table td:first-child { white-space: nowrap; }
.highlight-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
@media (min-width: 1100px) { #dbKpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } #dbHighlights { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 760px) and (max-width: 1099px) { #dbKpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } #dbHighlights { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
#panel-invites > .card, #panel-users > .card, #panel-changelog > .card, #panel-preview > .card { max-width: 1000px; }
@media (min-width: 901px) { .acct-appearance { grid-column: 2; grid-row: span 2; } }
.tc-box { position: relative; padding-top: 16px; }
.tc-box .tc-max { position: absolute; top: 0; left: 2px; font-size: 10.5px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.trend-chart { height: 150px; }
.tc-labels { display: grid; margin-top: 5px; }
.tc-labels span { font-size: 10.5px; color: var(--ink-faint); text-align: center; white-space: nowrap; overflow: hidden; }
@media (max-width: 640px) { .tc-labels span { overflow: visible; } .tc-labels span:nth-child(even) { visibility: hidden; } }
@media (max-width: 640px) {
  .kpi-grid, #dbKpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; }
  .kpi { padding: 10px 11px; } .kpi-val { font-size: 18px; } .kpi-sub { font-size: 11px; }
  #dbHighlights, .highlight-grid { grid-template-columns: 1fr !important; }
  .hl-val { font-size: 22px; }
}

/* ---------- My Quotes: personal dashboard ---------- */
.mq-hero { background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--red-soft) 40%, var(--surface))); }
#panel-quotes .db-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1100px) { #myKpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } #myHighlights { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 760px) and (max-width: 1099px) { #myKpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } #myHighlights { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { #panel-quotes .db-grid { grid-template-columns: 1fr; } }
.hl-link { text-align: left; font: inherit; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s; }
.hl-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.hl-link:active { transform: scale(.98); }
button.top-job, .fu-row { width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: none; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 10px; transition: background .15s; }
button.top-job:hover, .fu-row:hover { background: var(--surface-2); }
button.top-job:last-child, .fu-row:last-child { border-bottom: none; }
.fu-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 6px; animation: fadeUp .4s var(--ease) both; animation-delay: calc(var(--i) * 60ms); }
.fu-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.fu-tag { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.fu-expired { background: var(--red-soft); color: var(--red); }
.fu-soon { background: var(--warn-bg); color: var(--warn); }
.fu-age { background: var(--surface-2); color: var(--ink-soft); border: 1px solid var(--line); }
.mq-list .quotes-tools { margin-bottom: 14px; }
.quote-card.flash-card { animation: cardFlash 1.4s var(--ease); }
@keyframes cardFlash { 0%, 35% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 35%, transparent), var(--shadow); } 100% { box-shadow: var(--shadow-sm); } }
/* Account: this month at a glance */
.acct-glance { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.glance-row { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.glance-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; color: var(--ink-faint); }
.glance-row > div:not(.glance-lbl) { display: flex; flex-direction: column; }
.glance-row strong { font-family: 'Space Grotesk', sans-serif; font-size: 19px; font-variant-numeric: tabular-nums; }
.glance-row span { font-size: 11.5px; color: var(--ink-soft); }
@media (max-width: 640px) { .glance-row { gap: 14px 20px; } .glance-row strong { font-size: 16px; } }
/* keep My Quotes snappy: the list card itself doesn't fade in (its quote cards still do) */
.panel.active .card.mq-list { animation: none; }
#quoteList .quote-card { animation-duration: .28s; animation-delay: calc(var(--i, 0) * 25ms); }
.trend-chart .tc-bar rect { animation-duration: .4s; animation-delay: calc(var(--i) * 15ms); }
/* fewer, grouped entrance animations: one per chart and per card, not one per bar or row */
.trend-chart .tc-bar rect, .trend-chart .tc-bar rect { animation: none !important; }
.trend-chart { transform-origin: 50% 100%; animation: barGrow .5s var(--ease) both; }
.kpi, .top-job, .fu-row { animation: none !important; }
.cap-row.cap-ride { box-shadow: inset 3px 0 0 var(--good); }

/* ---------- forgot / reset password ---------- */
.forgot-row { display: flex; justify-content: flex-end; margin: -6px 0 12px; }
.forgot-row.center { justify-content: center; margin: 14px 0 0; }
.link-btn { background: none; border: none; padding: 2px 0; color: rgba(255,255,255,.82); font: 600 12.5px 'Inter', sans-serif; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: #fff; }
.auth-step-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 18px; margin-bottom: 4px; }
.auth-step-sub { font-size: 13px; color: rgba(255,255,255,.72); margin: 0 0 16px; line-height: 1.5; }
.reset-wait { display: flex; justify-content: center; padding: 18px 0 8px; }
.auth-card a.btn { text-decoration: none; }

/* ---------- export buttons, reassign, activity ---------- */
.head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.xl-btn { gap: 6px; white-space: nowrap; }
.xl-btn svg { flex-shrink: 0; }
.aq-tools { grid-template-columns: minmax(0, 1fr) minmax(0, 220px) auto auto auto; }
.act-tools { grid-template-columns: minmax(0, 1fr) minmax(0, 240px) auto; }
.reassign-row td { background: var(--surface-2); }
.reassign-box { padding: 12px 6px; animation: fadeUp .3s var(--ease); }
.ra-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.ra-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; align-items: center; max-width: 620px; }
.ra-grid .f-label { margin: 0; }
.ra-grid select { max-width: 320px; }
.ra-note { font-size: 12.5px; color: var(--ink-soft); margin: 10px 0; max-width: 620px; }
.ra-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ra-actions .btn.armed { background: var(--red-dark); }
.act-day { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 13px; color: var(--ink-soft); padding: 14px 0 6px; border-bottom: 1px solid var(--line); }
.act-row { display: grid; grid-template-columns: 70px 14px minmax(0, 1fr); gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--line); animation: fadeUp .3s var(--ease) both; animation-delay: calc(var(--i) * 25ms); }
.act-time { font-size: 12px; color: var(--ink-faint); font-variant-numeric: tabular-nums; padding-top: 2px; }
.act-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; background: var(--ink-faint); box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 15%, transparent); }
.act-bad { background: var(--red); color: var(--red); } .act-good { background: var(--good); color: var(--good); }
.act-move { background: var(--pe); color: var(--pe); } .act-edit { background: var(--warn); color: var(--warn); }
.act-main { font-size: 13.5px; line-height: 1.45; }
.act-action { color: var(--ink-soft); }
.act-target { font-weight: 600; }
.act-sub { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.act-ba s { color: var(--ink-faint); }
@media (max-width: 900px) { .aq-tools { grid-template-columns: 1fr 1fr; } .act-tools { grid-template-columns: 1fr auto; } .act-tools input { grid-column: 1 / -1; } }
@media (max-width: 640px) { .act-row { grid-template-columns: 56px 12px minmax(0, 1fr); } .ra-grid { grid-template-columns: 1fr; } }
.row-actions { white-space: nowrap; }
.row-actions button { white-space: nowrap; }
.cap-pair { display: flex; gap: 8px; }
.cap-mat { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.cap-mat > span:first-child { font-size: 9.5px; font-weight: 800; letter-spacing: .06em; color: var(--ink-faint); }
.cap-mat input { width: 76px; text-align: right; font-weight: 700; }
.cap-grid .cap-row.cap-pp-diff { box-shadow: inset 3px 0 0 var(--pp); }

/* ================= Engineering board ================= */
.eng-head .section-head { margin-bottom: 10px; }
.eng-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 200px) auto auto auto; gap: 10px; align-items: center; }
.eng-tools input[type="search"] { width: 100%; padding-left: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238C949C' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 11px center; }
#engCTools { grid-template-columns: minmax(0, 1fr) auto; }
.eng-arch { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; cursor: pointer; }
.eng-save { font-size: 12px; font-weight: 700; color: var(--ink-faint); opacity: 0; transition: opacity .2s; min-width: 52px; text-align: right; }
.eng-save.on { opacity: 1; } .eng-save.ok { color: var(--good); }
.eng-board { display: flex; gap: 14px; overflow-x: auto; padding: 2px 2px 16px; align-items: flex-start; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; min-height: 420px; }
.eng-col { flex: 0 0 292px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 200px); scroll-snap-align: start; animation: fadeUp .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
.eng-col-head { display: flex; align-items: center; gap: 6px; padding: 10px 10px 6px 12px; }
.eng-col-title { flex: 1; min-width: 0; border: 1px solid transparent !important; background: transparent !important; box-shadow: none !important; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 14.5px; padding: 4px 6px !important; border-radius: 8px; color: var(--ink); }
.eng-col-title:hover { border-color: var(--line-2) !important; }
.eng-col-title:focus { border-color: var(--red) !important; background: var(--surface) !important; }
.eng-count { font-size: 11.5px; font-weight: 800; color: var(--ink-soft); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.eng-col-tools { display: inline-flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.eng-col:hover .eng-col-tools, .eng-col:focus-within .eng-col-tools { opacity: 1; }
.eng-col-tools button { border: none; background: none; color: var(--ink-faint); font-size: 16px; font-weight: 700; width: 24px; height: 24px; border-radius: 6px; cursor: pointer; }
.eng-col-tools button:hover:not(:disabled) { background: var(--surface); color: var(--red); }
.eng-col-tools button:disabled { opacity: .3; cursor: default; }
.eng-col-tools button.armed { width: auto; padding: 0 6px; font-size: 11px; color: #fff; background: var(--red); }
.eng-cards { flex: 1; overflow-y: auto; padding: 4px 10px 6px; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.eng-empty { border: 1.5px dashed var(--line-2); border-radius: 12px; padding: 18px 10px; text-align: center; font-size: 12px; color: var(--ink-faint); }
.eng-add { margin: 2px 10px 10px; border: none; background: none; text-align: left; padding: 8px 8px; border-radius: 9px; color: var(--ink-soft); font: 650 13px 'Inter', sans-serif; cursor: pointer; transition: background .15s, color .15s; }
.eng-add:hover { background: var(--surface); color: var(--red); }
.eng-col-new { flex: 0 0 220px; align-items: center; justify-content: center; min-height: 120px; border-style: dashed; cursor: pointer; color: var(--ink-soft); font: 650 13.5px 'Inter', sans-serif; background: transparent; }
.eng-col-new:hover { color: var(--red); border-color: var(--red); background: var(--red-soft); }
.eng-card { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line-2); border-radius: 12px; padding: 10px 11px 9px; cursor: grab; box-shadow: var(--shadow-sm); transition: box-shadow .18s, transform .18s var(--ease), opacity .18s; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: pan-x pan-y; }
.eng-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.eng-card:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.eng-card.prio-urgent { border-left-color: var(--red); } .eng-card.prio-high { border-left-color: var(--pp); }
.eng-card.prio-normal { border-left-color: var(--pe); } .eng-card.prio-low { border-left-color: var(--line-2); }
.eng-card.archived { opacity: .6; }
.eng-card.drag-source { opacity: .35; border-style: dashed; box-shadow: none; transform: none; }
.eng-card.dropped { animation: pop .35s var(--spring); }
.eng-ghost { position: fixed; z-index: 400; pointer-events: none; margin: 0; cursor: grabbing; box-shadow: 0 18px 40px rgba(0,0,0,.28); transition: none !important; opacity: .96; }
body.eng-dragging, body.eng-dragging * { cursor: grabbing !important; }
body.eng-dragging .eng-cards { background: color-mix(in srgb, var(--red) 3%, transparent); }
.ec-top { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.ec-top:empty { display: none; }
.ec-prio { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--ink-soft); }
.prio-urgent .ec-prio { background: var(--red-soft); color: var(--red); } .prio-high .ec-prio { background: color-mix(in srgb, var(--pp) 16%, transparent); color: var(--pp); }
.ec-due { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--ink-soft); }
.ec-due.soon { color: var(--warn); } .ec-due.late { color: var(--red); }
.ec-arch { font-size: 10px; font-weight: 800; color: var(--ink-faint); text-transform: uppercase; }
.ec-title { font-weight: 650; font-size: 13.5px; line-height: 1.35; color: var(--ink); }
.ec-update { font-size: 12px; color: var(--ink-soft); margin-top: 4px; line-height: 1.4; }
.ec-bar { height: 4px; background: var(--line); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.ec-bar span { display: block; height: 100%; background: var(--good); border-radius: 2px; transition: width .4s var(--ease); }
.ec-meta { display: flex; align-items: center; gap: 10px; margin-top: 7px; font-size: 11.5px; color: var(--ink-faint); font-weight: 600; }
.ec-meta:empty { display: none; }
.ec-meta span { display: inline-flex; align-items: center; gap: 3px; }
.ec-meta .all { color: var(--good); }
.ec-owner { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; justify-content: center; background: linear-gradient(135deg, var(--red-2), var(--red-dark)); color: #fff !important; font-size: 10px !important; font-weight: 800; }
/* card detail */
.eng-modal { position: fixed; inset: 0; z-index: 250; display: none; }
.eng-modal.open { display: block; }
.eng-modal-bg { position: absolute; inset: 0; background: rgba(0,0,0,.45); animation: fadeIn .2s ease; }
.eng-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(880px, 100%); background: var(--surface); box-shadow: -10px 0 40px rgba(0,0,0,.25); overflow-y: auto; padding: 18px 22px 20px; animation: panelIn .32s var(--ease); display: flex; flex-direction: column; gap: 12px; }
@keyframes panelIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
body.eng-modal-open { overflow: hidden; }
.ep-head { display: flex; align-items: center; gap: 10px; }
.ep-title { flex: 1; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 21px !important; border: 1px solid transparent !important; box-shadow: none !important; background: transparent !important; padding: 6px 8px !important; }
.ep-title:hover { border-color: var(--line-2) !important; } .ep-title:focus { border-color: var(--red) !important; background: var(--surface) !important; }
.ep-title-static { flex: 1; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 20px; }
.ep-close { width: 36px; height: 36px; border-radius: 10px; border: none; background: var(--surface-2); font-size: 22px; color: var(--ink-soft); cursor: pointer; }
.ep-close:hover { background: var(--red-soft); color: var(--red); }
.ep-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }
.ep-meta label, .cf-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.ep-meta select, .ep-meta input, .cf-grid input, .cf-grid textarea { width: 100%; text-transform: none; letter-spacing: 0; font-weight: 500; }
.ep-prio { display: flex; flex-direction: column; gap: 4px; }
.ep-prio > span { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.ep-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.ep-sec h3 { font-family: 'Space Grotesk', sans-serif; font-size: 14px; font-weight: 700; margin: 10px 0 6px; display: flex; align-items: center; gap: 8px; }
.ep-count { font-family: 'Inter', sans-serif; font-size: 11.5px; color: var(--ink-faint); font-weight: 600; }
.ep-bar { height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; margin-bottom: 6px; }
.ep-bar span { display: block; height: 100%; background: var(--good); transition: width .35s var(--ease); }
.ep-todos { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ep-todos li { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; transition: background .15s; animation: fadeUp .25s var(--ease); }
.ep-todos li:hover { background: var(--surface-2); }
.ep-todos label { position: relative; display: inline-flex; cursor: pointer; }
.ep-todos input[type="checkbox"] { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; cursor: pointer; }
.ep-tick { width: 20px; height: 20px; border-radius: 6px; border: 1.8px solid var(--line-2); display: inline-flex; align-items: center; justify-content: center; color: transparent; transition: background .15s, border-color .15s, color .15s, transform .2s var(--spring); }
.ep-todos li.done .ep-tick { background: var(--good); border-color: var(--good); color: #fff; transform: scale(1.06); }
.ep-todo-text { flex: 1; border: 1px solid transparent !important; box-shadow: none !important; background: transparent !important; padding: 4px 6px !important; font-size: 13.5px !important; }
.ep-todo-text:focus { border-color: var(--line-2) !important; background: var(--surface) !important; }
.ep-todos li.done .ep-todo-text { text-decoration: line-through; color: var(--ink-faint); }
.ep-todo-x, .epu-x { border: none; background: none; color: var(--ink-faint); font-size: 17px; cursor: pointer; border-radius: 6px; width: 26px; height: 26px; opacity: 0; transition: opacity .15s, background .15s, color .15s; }
.ep-todos li:hover .ep-todo-x, .ep-updates li:hover .epu-x, .epu-x.armed { opacity: 1; }
.ep-todo-x:hover, .epu-x:hover { background: var(--red-soft); color: var(--red); }
.epu-x.armed { width: auto; padding: 0 6px; font-size: 11px; color: #fff; background: var(--red); }
.ep-add, .ep-post { display: flex; gap: 8px; align-items: flex-start; }
.ep-add input { flex: 1; } .ep-post textarea { flex: 1; resize: vertical; }
.ep-sec textarea#ecNotes { width: 100%; resize: vertical; line-height: 1.5; }
.ep-updates { list-style: none; margin: 10px 0 4px; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow-y: auto; }
.ep-updates li { position: relative; }
.ep-updates li:not(.ep-none):not(.ep-loading)::before { content: ''; position: absolute; left: -20px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px var(--surface); }
.epu-head { display: flex; align-items: center; gap: 7px; font-size: 12.5px; }
.epu-av { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--line); font-size: 9.5px; font-weight: 800; }
.epu-when { color: var(--ink-faint); font-size: 11.5px; }
.epu-x { margin-left: auto; }
.epu-body { font-size: 13px; line-height: 1.5; color: var(--ink); margin: 3px 0 0 29px; }
.ep-none, .ep-loading { font-size: 12.5px; color: var(--ink-faint); padding: 4px 0; }
.ep-contacts { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.ep-contact { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; border: 1px solid var(--line); border-radius: 11px; padding: 8px 10px; background: var(--surface-2); animation: fadeUp .25s var(--ease); }
.epc-name { font-weight: 650; font-size: 13px; } .epc-name span { font-weight: 500; color: var(--ink-soft); }
.epc-co { font-size: 11.5px; color: var(--ink-soft); }
.epc-line { grid-column: 1 / -1; font-size: 11.5px; color: var(--ink-faint); }
.epc-actions { display: flex; gap: 4px; align-items: center; grid-row: span 2; }
.epc-actions a, .epc-actions button { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); cursor: pointer; font-size: 16px; text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.epc-actions a:hover { color: var(--red); border-color: var(--red); background: var(--red-soft); }
.epc-actions button:hover { color: var(--red); }
.ep-link { position: relative; }
.ep-link input { width: 100%; }
.ep-results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow-lg); overflow: hidden; }
.ep-results:empty { display: none; }
.ep-results button { display: block; width: 100%; text-align: left; border: none; background: none; padding: 9px 12px; font: 13px 'Inter', sans-serif; color: var(--ink); cursor: pointer; border-bottom: 1px solid var(--line); }
.ep-results button span { color: var(--ink-soft); }
.ep-results button:hover { background: var(--red-soft); }
.ep-results .ep-new-from { color: var(--red); font-weight: 650; }
.ep-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; margin-top: auto; }
.ep-stamp { font-size: 11.5px; color: var(--ink-faint); }
.ep-foot-btns { display: flex; gap: 8px; }
.cf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cf-grid .full { grid-column: 1 / -1; }
/* contacts directory */
.eng-contacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.eng-contacts > .card { margin: 0; }
.eng-co-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.eng-co-head h3 { font-family: 'Space Grotesk', sans-serif; font-size: 16px; font-weight: 700; flex: 1; }
.eng-co-av { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--red-2), var(--red-dark)); color: #fff; font-size: 12px; font-weight: 800; }
.eng-person { border-top: 1px solid var(--line); padding: 9px 0; display: flex; flex-direction: column; gap: 4px; }
.ep-who strong { font-size: 13.5px; } .ep-who span { font-size: 12px; color: var(--ink-soft); margin-left: 6px; }
.ep-how { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; }
.ep-how a { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); text-decoration: none; }
.ep-how a:hover { color: var(--red); }
.ep-cnotes { font-size: 12px; color: var(--ink-soft); }
.ep-projects { display: flex; flex-wrap: wrap; gap: 5px; }
.ep-proj { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 2px 10px; font: 600 11.5px 'Inter', sans-serif; color: var(--ink); cursor: pointer; }
.ep-proj:hover { border-color: var(--red); color: var(--red); }
.ep-cbtns { display: flex; justify-content: flex-end; }
@media (max-width: 900px) { .eng-tools { grid-template-columns: 1fr 1fr; } .eng-tools input[type="search"] { grid-column: 1 / -1; } .ep-grid { grid-template-columns: 1fr; } .ep-meta { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  .eng-col { flex-basis: 84vw; max-height: none; }
  .eng-panel { width: 100%; padding: 14px 14px 18px; border-radius: 0; }
  .cf-grid { grid-template-columns: 1fr; }
  .eng-contacts { grid-template-columns: 1fr; }
  .eng-col-tools { opacity: 1; }
  .ep-todo-x, .epu-x { opacity: 1; }
}
body.eng-dragging .eng-board { scroll-snap-type: none; }
@media (min-width: 641px) {
  .eng-col { flex: 1 1 0; min-width: 232px; max-width: 380px; }
  .eng-col-new { flex: 0 0 150px; min-width: 150px; }
}
.badge.engineering { background: color-mix(in srgb, var(--pe) 15%, transparent); color: var(--pe); }
.role-checks { display: flex; flex-direction: column; gap: 6px; min-width: 250px; }
.role-checks label { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.role-checks label span { display: flex; flex-direction: column; }
.role-checks em { font-style: normal; font-size: 11.5px; color: var(--ink-soft); }
.who-link { color: inherit; text-decoration: none; font-weight: 600; }
.who-link:hover { text-decoration: underline; }
@media (min-width: 641px) {
  .eng-col-tools { display: none; opacity: 1; }
  .eng-col:hover .eng-col-tools, .eng-col:focus-within .eng-col-tools { display: inline-flex; }
}

/* ---------- lost reasons ---------- */
.lost-modal { position: fixed; inset: 0; z-index: 320; display: flex; align-items: center; justify-content: center; padding: 16px; }
.lost-bg { position: absolute; inset: 0; background: rgba(0,0,0,.5); animation: fadeIn .18s ease; }
.lost-card { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border-radius: var(--radius-lg); box-shadow: 0 24px 60px rgba(0,0,0,.35); padding: 18px 20px; animation: popIn .26s var(--spring); }
.lost-modal.closing .lost-card { animation: popOut .18s ease forwards; } .lost-modal.closing .lost-bg { opacity: 0; transition: opacity .18s; }
@keyframes popIn { from { transform: translateY(12px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes popOut { to { transform: translateY(8px) scale(.98); opacity: 0; } }
.lost-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.lost-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 18px; }
.lost-sub { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.lost-x { width: 34px; height: 34px; border-radius: 10px; border: none; background: var(--surface-2); font-size: 20px; color: var(--ink-soft); cursor: pointer; }
.lost-reasons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.lost-opt { position: relative; cursor: pointer; }
.lost-opt input { position: absolute; opacity: 0; pointer-events: none; }
.lost-opt span { display: block; border: 1.5px solid var(--line); border-radius: 11px; padding: 10px 12px; font-size: 13.5px; font-weight: 600; transition: border-color .15s, background .15s, color .15s, transform .15s; }
.lost-opt:hover span { border-color: var(--line-2); transform: translateY(-1px); }
.lost-opt input:checked + span { border-color: var(--red); background: var(--red-soft); color: var(--red); animation: settle .3s var(--spring); }
.lost-opt input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.lost-field { display: flex; flex-direction: column; gap: 4px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin-bottom: 10px; }
.lost-field em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink-faint); }
.lost-field input, .lost-field textarea { text-transform: none; letter-spacing: 0; font-weight: 500; width: 100%; }
.lost-msg { color: var(--red); font-size: 12.5px; font-weight: 600; min-height: 16px; }
.lost-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.qc-lost { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; margin-top: 8px; }
.qc-lost em { display: block; font-style: normal; color: var(--ink-soft); margin-top: 2px; }
.qc-lost.none { color: var(--ink-faint); border-style: dashed; }
.qc-lost button { border: none; background: none; color: var(--red); font: 700 12px 'Inter', sans-serif; cursor: pointer; white-space: nowrap; padding: 0; }
.aq-lost { font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; }
.aq-lost.none { color: var(--ink-faint); font-style: italic; }
.aq-tools { grid-template-columns: minmax(0, 1fr) minmax(0, 200px) auto minmax(0, 190px) auto auto; }
.lost-sum { font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }
.lost-sum strong { color: var(--ink); }
.lost-bars { display: flex; flex-direction: column; gap: 8px; }
.lost-row { display: grid; grid-template-columns: 200px minmax(0, 1fr) 150px; gap: 12px; align-items: center; animation: fadeUp .35s var(--ease) both; animation-delay: calc(var(--i) * 40ms); }
.lr-label { font-size: 13px; font-weight: 600; }
.lost-row.none .lr-label { color: var(--ink-faint); font-style: italic; }
.lr-bar { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; }
.lr-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--red-2), var(--red)); border-radius: 5px; animation: barW .7s var(--ease) both; transform-origin: left; }
.lost-row.none .lr-bar span { background: var(--ink-faint); }
.lr-num { text-align: right; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.lr-num span { display: block; font-family: 'Inter', sans-serif; font-weight: 500; font-size: 11px; color: var(--ink-faint); }
.lost-comp { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.lc-lbl { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); margin-right: 4px; }
.lc-chip { font-size: 12px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.lc-chip b { color: var(--red); margin-left: 3px; }
@media (max-width: 640px) { .lost-reasons { grid-template-columns: 1fr; } .lost-row { grid-template-columns: minmax(0, 1fr) 110px; } .lr-bar { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- delivered $/ft (Admin) ---------- */
.admin-dlv:empty, .item-dlv:empty { display: none; }
.admin-dlv { display: block; font-size: 11px; font-weight: 700; color: var(--pe); margin-top: 1px; }
.cell-dlv { display: block; font-size: 11px; font-weight: 700; color: var(--pe); }
.item-dlv { font-size: 11.5px; font-weight: 700; color: var(--pe); margin-top: 1px; }
.pb-dlv { color: var(--pe); font-size: 12.5px; }
.pb-dlv em { color: var(--ink-faint); font-style: normal; }
.pb-dlv.strong { font-weight: 800; }
.pb-dlv.hint { color: var(--ink-faint); font-style: italic; grid-column: 1 / -1; }
.pv-dlv { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--pe) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--pe) 25%, var(--line)); font-size: 12.5px; animation: fadeUp .25s var(--ease); }
.pv-dlv span { font-weight: 700; color: var(--pe); }
.pv-dlv strong { font-family: 'Space Grotesk', sans-serif; font-size: 15px; color: var(--ink); }
.pv-dlv em { font-style: normal; color: var(--ink-soft); font-size: 12px; }
.pv-dlv b { color: var(--red); }
.pv-dlv.hint { background: none; border: 1px dashed var(--line-2); color: var(--ink-faint); font-style: italic; }

/* ---------- Compare price levels ---------- */
.level-pick { display: flex; gap: 6px; align-items: center; }
.cmp-btn { display: inline-flex; align-items: center; gap: 5px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.14); color: #fff; font: 700 12px 'Inter', sans-serif; padding: 7px 10px; border-radius: 10px; cursor: pointer; white-space: nowrap; transition: background .15s, transform .15s; }
.cmp-btn:hover { background: rgba(255,255,255,.26); transform: translateY(-1px); }
.cmp-card { width: min(1040px, 100%); }
.cmp-seg { margin-bottom: 12px; }
.cmp-scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.cmp-table { width: 100%; font-size: 13px; }
.cmp-table th { white-space: nowrap; }
.cmp-table td { vertical-align: middle; }
.cmp-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cmp-table tbody tr { animation: fadeUp .3s var(--ease) both; animation-delay: calc(var(--i, 0) * 25ms); }
.cmp-table tr.cmp-cur td { background: var(--red-soft); }
.cmp-badge { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; background: var(--red); color: #fff; padding: 1px 7px; border-radius: 999px; margin-left: 4px; }
.cmp-total { font-family: 'Space Grotesk', sans-serif; font-weight: 700; min-width: 120px; }
.cmp-bar { height: 4px; background: var(--line); border-radius: 2px; margin-top: 4px; overflow: hidden; }
.cmp-bar span { display: block; height: 100%; background: var(--red); border-radius: 2px; margin-left: auto; animation: barW .6s var(--ease) both; transform-origin: right; }
.cmp-up { color: var(--good); font-weight: 700; } .cmp-down { color: var(--red); font-weight: 700; }
.cmp-up em, .cmp-down em { font-style: normal; font-weight: 500; font-size: 11.5px; opacity: .85; margin-left: 3px; }
.cmp-same, .cmp-dim { color: var(--ink-faint); }
.cmp-warn { font-size: 11px; color: var(--warn); font-weight: 700; }
tr.cmp-miss .cmp-total { color: var(--ink-soft); }
.cmp-table .neg { color: var(--red); font-weight: 700; }
.cmp-lines td.cmp-cur-col, .cmp-lines th.cmp-cur-col { background: var(--red-soft); }
.cmp-lines td.cmp-lo { color: var(--good); font-weight: 700; }
.cmp-lines td.cmp-hi { color: var(--red); font-weight: 700; }
.cmp-lines tr.cmp-sum td { border-top: 2px solid var(--red); }
.cmp-notes { margin-top: 12px; font-size: 12px; color: var(--ink-soft); display: flex; flex-direction: column; gap: 3px; }
.cmp-notes:empty { display: none; }
@media (max-width: 640px) { .cmp-card { padding: 14px; } .cmp-table { font-size: 12px; } }
.cmp-lines td:first-child, .cmp-lines th:first-child { min-width: 210px; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.cmp-lines td:first-child strong { white-space: nowrap; }
.cmp-lines tr.cmp-sum td:first-child { background: var(--surface); }

/* ================= Production schedule ================= */
.pr-head .section-head { margin-bottom: 10px; }
.pr-add .btn { font-size: 14px; }
.pr-viewonly { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
.pr-tools { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.seg.big button { padding: 9px 16px; font-size: 14px; }
.pr-my { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; }
.pr-my select { min-width: 150px; font-size: 14px; }
.pr-range-wrap { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; }
.pr-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 12.5px; color: var(--ink-soft); }
.pr-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pr-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.pr-legend em { font-style: normal; color: var(--ink-faint); font-size: 11px; }
.pr-move-sw { background: repeating-linear-gradient(135deg, #8C949C 0 4px, #cfd3d7 4px 8px); }
.pr-tl-card { padding: 0; overflow: hidden; }
.pr-tl { --pr-name-w: 230px; position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pr-row { display: flex; min-height: 58px; border-bottom: 1px solid var(--line); }
.pr-row:last-child { border-bottom: none; }
.pr-name { position: sticky; left: 0; z-index: 3; flex: 0 0 var(--pr-name-w); background: var(--surface); border-right: 1px solid var(--line); display: flex; align-items: center; }
.pr-name > div, .pr-mold-edit { display: flex; flex-direction: column; gap: 3px; padding: 8px 12px; width: 100%; text-align: left; background: none; border: none; font: inherit; color: inherit; }
.pr-mold-edit { cursor: pointer; } .pr-mold-edit:hover strong { color: var(--red); text-decoration: underline; }
.pr-name strong { font-size: 14px; }
.pr-loc { font-size: 12px; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 5px; }
.pr-loc::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--ink-faint)); flex: 0 0 8px; }
.pr-loc.s-moving { color: var(--ink); font-weight: 700; } .pr-loc.s-moving::before { animation: pulseDot 1.4s ease-in-out infinite; }
@keyframes pulseDot { 50% { transform: scale(1.5); opacity: .6; } }
.pr-headrow { position: sticky; top: 0; z-index: 4; min-height: 0; background: var(--surface); }
.pr-corner { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); padding: 0 12px; z-index: 5; }
.pr-lane-head { flex: 0 0 auto; }
.pr-months { display: flex; border-bottom: 1px solid var(--line); }
.pr-month { font-size: 12px; font-weight: 800; padding: 5px 8px; border-right: 1px solid var(--line); white-space: nowrap; overflow: hidden; color: var(--ink-soft); }
.pr-days { display: flex; }
.pr-day { flex: 0 0 auto; text-align: center; font-size: 11px; padding: 3px 0; border-right: 1px solid var(--line); color: var(--ink-soft); display: flex; flex-direction: column; align-items: center; }
.pr-day b { font-size: 12px; color: var(--ink); }
.pr-day span { font-size: 10px; }
.pr-day.wkend { background: var(--surface-2); }
.pr-day.today { background: var(--red-soft); } .pr-day.today b { color: var(--red); }
.pr-lane { position: relative; flex: 0 0 auto; background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); background-size: var(--dayw, 26px) 100%; }
.pr-bar { position: absolute; top: 9px; bottom: 9px; border-radius: 9px; background: var(--c); color: #fff; display: flex; align-items: center; gap: 8px; padding: 0 10px; overflow: hidden; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.14); font-size: 12.5px; font-weight: 700; white-space: nowrap; transition: box-shadow .15s, transform .15s, opacity .15s; animation: fadeUp .35s var(--ease) both; }
.pr-bar:hover { box-shadow: 0 6px 16px rgba(0,0,0,.22); transform: translateY(-1px); }
.pr-bar.k-move { background: linear-gradient(90deg, var(--c1), var(--c2)); }
.pr-bar.k-move::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.22) 0 6px, transparent 6px 12px); }
.pr-bar.k-maint { background: repeating-linear-gradient(135deg, #8C949C 0 6px, #9aa1a8 6px 12px); }
.pr-bar.dim { opacity: .3; }
.pr-bar .pb-label { position: relative; overflow: hidden; text-overflow: ellipsis; }
.pr-bar .pb-dates { position: relative; margin-left: auto; font-weight: 600; opacity: .85; font-size: 11.5px; }
.pr-bar .pb-truck { margin-right: 4px; }
.pr-bar.editable { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.pr-bar.dragging { cursor: grabbing; box-shadow: 0 12px 28px rgba(0,0,0,.3); z-index: 5; transform: scale(1.02); transition: none; }
.pb-grip { position: absolute; right: 0; top: 0; bottom: 0; width: 14px; cursor: ew-resize; background: linear-gradient(90deg, transparent, rgba(0,0,0,.18)); }
.pb-grip::after { content: ''; position: absolute; right: 5px; top: 30%; bottom: 30%; width: 2px; border-radius: 1px; background: rgba(255,255,255,.8); }
.pr-todayline { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); z-index: 2; pointer-events: none; }
.pr-todayline span { position: absolute; top: 2px; left: 4px; font-size: 10px; font-weight: 800; color: #fff; background: var(--red); border-radius: 5px; padding: 1px 6px; }
.pr-hint { font-size: 12.5px; color: var(--ink-soft); padding: 10px 14px; border-top: 1px solid var(--line); background: var(--surface-2); }
.pr-empty { padding: 34px 10px; font-size: 15px; }
.pr-tip { position: fixed; transform: translate(-50%, -100%); z-index: 500; background: var(--ink); color: var(--surface); font-weight: 800; font-size: 13px; padding: 5px 10px; border-radius: 8px; pointer-events: none; display: none; white-space: nowrap; }
/* by plant */
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.pp-card { margin: 0; border-top: 5px solid var(--c); animation: fadeUp .4s var(--ease) both; animation-delay: calc(var(--i) * 50ms); }
.pp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pp-head h3 { font-family: 'Space Grotesk', sans-serif; font-size: 18px; flex: 1; }
.pp-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.pp-region { font-size: 11px; font-weight: 800; color: var(--ink-faint); text-transform: uppercase; }
.pp-sec { padding: 8px 0; border-top: 1px solid var(--line); }
.pp-sec-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin-bottom: 4px; }
.pp-item { display: flex; flex-direction: column; padding: 4px 0; font-size: 14px; }
.pp-item span { font-size: 12.5px; color: var(--ink-soft); }
.pp-item.arr strong::before { content: '↘ '; color: var(--good); } .pp-item.lea strong::before { content: '↗ '; color: var(--warn); }
.pp-none { font-size: 12.5px; color: var(--ink-faint); font-style: italic; }
/* moves */
.mv-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 6px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 10px; transition: background .15s; }
.mv-row:hover { background: var(--surface-2); }
.mv-row.past { opacity: .55; }
.mv-row.live { background: color-mix(in srgb, var(--good) 8%, transparent); }
.mv-date { text-align: center; border: 1px solid var(--line); border-radius: 11px; padding: 6px 0; background: var(--surface); }
.mv-date b { display: block; font-size: 11px; text-transform: uppercase; color: var(--red); }
.mv-date span { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 14px; }
.mv-what { font-weight: 700; font-size: 15px; }
.mv-live { font-size: 11px; font-weight: 800; color: #fff; background: var(--good); border-radius: 999px; padding: 1px 8px; margin-left: 6px; }
.mv-route { display: flex; align-items: center; gap: 8px; margin: 4px 0; flex-wrap: wrap; }
.mv-pl { font-weight: 700; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; }
.mv-pl::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.mv-arrow { color: var(--ink-faint); font-weight: 800; }
.mv-sub { font-size: 12.5px; color: var(--ink-soft); }
.mv-past-lbl { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); padding: 14px 6px 4px; }
/* forms */
.pr-card { width: min(600px, 100%); }
.pf-kind { margin-bottom: 12px; }
.pf-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.pf-field > label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.pf-field em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink-faint); }
.pf-field .big { font-size: 16px !important; padding: 11px 12px !important; }
.pf-plants { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.pf-plants button { display: flex; align-items: center; gap: 8px; border: 2px solid var(--line); background: var(--surface); border-radius: 12px; padding: 11px 12px; font: 700 14.5px 'Inter', sans-serif; color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.pf-plants button i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.pf-plants button:hover { transform: translateY(-1px); }
.pf-plants button.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); }
.pf-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pd-lines { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.pd-lines div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; border-bottom: 1px solid var(--line); padding: 8px 0; }
.pd-lines span { color: var(--ink-soft); }
.btn-danger-text { color: var(--red) !important; border-color: color-mix(in srgb, var(--red) 40%, var(--line)) !important; margin-right: auto; }
.btn-danger-text.armed { background: var(--red) !important; color: #fff !important; }
.badge.production { background: color-mix(in srgb, var(--pp) 16%, transparent); color: var(--pp); }
.badge.plant { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
@media (max-width: 640px) {
  .pr-tl { --pr-name-w: 150px; }
  .pr-name strong { font-size: 13px; } .pr-loc { font-size: 11px; }
  .pr-range-wrap { margin-left: 0; }
  .pf-dates { grid-template-columns: 1fr; }
}

/* ================= simpler for everyone ================= */
/* text size (Account > Appearance): scales the whole page, buttons included */
:root[data-textsize="large"] body { zoom: 1.12; }
:root[data-textsize="xlarge"] body { zoom: 1.25; }
/* comfortable finger-size targets */
.btn { min-height: 42px; }
.btn.btn-sm { min-height: 36px; }
.seg button, .seg-tabs button { min-height: 38px; }
input, select { min-height: 40px; }
input[type="checkbox"], input[type="radio"] { min-height: 0; width: 18px; height: 18px; }
.text-btn { min-height: 36px; }
.text-btn.armed { color: #fff; background: var(--red); border-radius: 10px; padding: 8px 14px; }
/* toast with Undo */
.toast.has-action { display: flex; align-items: center; gap: 14px; }
.toast-btn { border: 1.5px solid currentColor; background: transparent; color: inherit; font: 800 13px 'Inter', sans-serif; border-radius: 9px; padding: 6px 14px; cursor: pointer; }
.toast-btn:hover { background: rgba(255,255,255,.15); }
/* big Download PDF after saving */
.qmsg-pdf { margin-top: 10px; width: 100%; font-size: 15px; }
/* how to make a quote */
.howto { background: linear-gradient(135deg, var(--red-soft), var(--surface)); border: 1.5px solid color-mix(in srgb, var(--red) 30%, var(--line)); border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; animation: fadeUp .4s var(--ease); }
.howto-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 17px; margin-bottom: 8px; }
.howto-steps { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.howto-steps li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.4; }
.howto-steps b { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--red); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }

/* ---------- color choice as big buttons ---------- */
.sr-color { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; opacity: 0; pointer-events: none; }
#pbColorWrap { position: relative; }
.color-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.color-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; border: 2px solid var(--line); background: var(--surface); border-radius: 12px; padding: 8px 14px; font: 700 14px 'Inter', sans-serif; color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.color-chip i { width: 18px; height: 18px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.25); }
.color-chip em { font-style: normal; font-weight: 500; font-size: 11.5px; color: var(--ink-soft); }
.color-chip:hover { transform: translateY(-1px); border-color: var(--line-2); }
.color-chip.on { border-color: var(--red); background: var(--red-soft); color: var(--red); animation: settle .3s var(--spring); }
.color-chip.elsewhere { border-style: dashed; color: var(--ink-soft); }
.color-chip.elsewhere i { opacity: .7; }
#pbColorWrap { grid-column: 1 / -1; }

/* ---------- Production map ---------- */
.map-wrap { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, 1fr); gap: 14px; align-items: start; }
.map-card { margin: 0; padding: 14px; }
.map-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.map-asof { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.map-asof > span { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.map-asof input { font-size: 15px; font-weight: 700; }
.map-now { font-size: 11px; font-weight: 800; color: #fff; background: var(--red); border-radius: 999px; padding: 3px 10px; }
.map-road { font-size: 13.5px; color: var(--ink-soft); }
.map-svg { width: 100%; height: auto; max-height: 640px; display: block; }
.map-st { fill: color-mix(in srgb, var(--ink-faint) 10%, var(--surface)); stroke: var(--line-2); stroke-width: 1.2; stroke-linejoin: round; }
.map-st.home { fill: color-mix(in srgb, var(--ink-faint) 20%, var(--surface)); stroke: color-mix(in srgb, var(--ink-faint) 70%, transparent); stroke-width: 1.6; }
.map-stl { font: 800 13px 'Inter', sans-serif; fill: var(--ink-faint); opacity: .55; text-anchor: middle; letter-spacing: .08em; pointer-events: none; }
.map-stl.home { opacity: .9; font-size: 15px; }
.map-route { fill: none; stroke-linecap: round; }
.map-route.soon { stroke: var(--ink-faint); stroke-width: 2; stroke-dasharray: 3 7; opacity: .55; }
.map-route.live { stroke: var(--c2); stroke-width: 3.5; stroke-dasharray: 10 8; animation: routeFlow 1.4s linear infinite; }
@keyframes routeFlow { to { stroke-dashoffset: -36; } }
.map-trip { cursor: pointer; }
.map-truck circle { fill: var(--surface); stroke: var(--ink); stroke-width: 2; filter: url(#pinShadow); }
.map-truck text { font-size: 15px; text-anchor: middle; }
.map-truck { animation: truckBob 1.6s ease-in-out infinite; }
@keyframes truckBob { 50% { translate: 0 -2px; } }
.map-pin { cursor: pointer; outline: none; }
.map-pin .pin-dot { fill: var(--c); stroke: #fff; stroke-width: 3; filter: url(#pinShadow); transition: r .25s var(--spring); }
.map-pin .pin-halo { fill: var(--c); opacity: 0; transition: opacity .2s; }
.map-pin:hover .pin-halo, .map-pin:focus-visible .pin-halo { opacity: .15; }
.map-pin.on .pin-halo { opacity: .22; animation: haloPulse 2s ease-in-out infinite; }
@keyframes haloPulse { 50% { opacity: .08; } }
.map-pin .pin-n { fill: #fff; font: 800 15px 'Space Grotesk', sans-serif; text-anchor: middle; pointer-events: none; }
.map-pin .pin-name { font: 800 15px 'Inter', sans-serif; fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.map-pin .pin-sub { font: 600 12px 'Inter', sans-serif; fill: var(--ink-soft); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.map-pin.on .pin-name { fill: var(--c); }
.map-pin.dim { opacity: .35; }
.map-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.map-pick button { display: flex; align-items: center; gap: 8px; min-height: 46px; border: 2px solid var(--line); background: var(--surface); border-radius: 12px; padding: 8px 12px; font: 700 14.5px 'Inter', sans-serif; color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.map-pick button i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.map-pick button b { margin-left: auto; font-family: 'Space Grotesk', sans-serif; background: var(--surface-2); border-radius: 999px; padding: 1px 9px; font-size: 13px; }
.map-pick button:hover { transform: translateY(-1px); }
.map-pick button.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); }
.map-panel { margin: 0; border-top: 5px solid var(--c); animation: fadeUp .3s var(--ease); position: sticky; top: 76px; }
.mp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.mp-head h3 { font-family: 'Space Grotesk', sans-serif; font-size: 20px; }
.mp-head > div { flex: 1; }
.mp-mine { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--good); background: var(--good-bg); border-radius: 999px; padding: 3px 10px; }
.mp-sec { padding: 10px 0; border-top: 1px solid var(--line); }
.mp-block { padding: 8px 0; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.mp-block + .mp-block { border-top: 1px dashed var(--line); }
.mp-block div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mp-tag { font-size: 12px; font-weight: 800; border-radius: 999px; padding: 2px 10px; }
.mp-tag.run { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); }
.mp-tag.maint { background: var(--surface-2); color: var(--ink-soft); border: 1px solid var(--line); }
.mp-tag.idle { background: var(--warn-bg); color: var(--warn); }
.mp-until { font-size: 12.5px; color: var(--ink-soft); }
@media (max-width: 980px) { .map-wrap { grid-template-columns: 1fr; } .map-panel { position: static; } }
.map-asof > .map-now { color: #fff; font-size: 11px; }
@media (max-width: 640px) {
  .map-pin .pin-name { font-size: 22px; stroke-width: 5px; }
  .map-pin .pin-sub { display: none; }
  .map-pin .pin-n { font-size: 17px; }
  .map-stl { font-size: 17px; } .map-stl.home { font-size: 19px; }
}

/* ---------- Logins ---------- */
.lg-tools { grid-template-columns: minmax(0, 360px) minmax(0, 220px); margin-bottom: 10px; }
.lg-table td { vertical-align: middle; }
.lg-table .aq-rep > span:last-child { display: flex; flex-direction: column; }
.lg-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; vertical-align: 0; background: var(--ink-faint); }
.lg-dot.s-online { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 25%, transparent); animation: pulseDot 1.6s ease-in-out infinite; }
.lg-dot.s-today { background: var(--pe); } .lg-dot.s-week { background: var(--warn); } .lg-dot.s-never { background: transparent; border: 2px solid var(--red); }
.lg-susp td { opacity: .6; }
.lg-inline { font-size: 11.5px; color: var(--ink-soft); display: inline-flex; align-items: center; margin-top: 2px; }
.lg-inline .lg-dot { width: 8px; height: 8px; margin-right: 5px; }
.lgk-sign_in { background: var(--good); color: var(--good); } .lgk-visit { background: var(--pe); color: var(--pe); }
.lgk-password_reset { background: var(--warn); color: var(--warn); } .lgk-blocked { background: var(--red); color: var(--red); }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 16px; }
.role-grid label { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; transition: border-color .15s, background .15s; }
.role-grid label:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.f-hint { font-style: normal; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink-faint); margin-left: 6px; }
.role-grid label, .role-grid label strong, .role-grid label em { text-transform: none; letter-spacing: 0; }
.role-grid label strong { font-size: 14px; color: var(--ink); }
.role-grid label em { font-size: 12px; font-weight: 500; }

/* ---------- Owner ---------- */
.badge.owner { background: linear-gradient(135deg, #1d1f22, #3a3d42); color: #f2c230; }
.owner-note { background: var(--warn-bg); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); border-radius: 12px; padding: 10px 14px; font-weight: 700; font-size: 13.5px; margin-bottom: 12px; }
.purge-box, .inv-edit-box { padding: 12px 4px; display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.purge-box { border-left: 4px solid var(--red); padding-left: 14px; }
.purge-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 17px; color: var(--red); }
.purge-text { font-size: 13.5px; color: var(--ink-soft); }
.purge-box select { max-width: 360px; }
.purge-btns { display: flex; gap: 8px; }
.btn.btn-danger.armed { background: #7d0f18; }

/* =====================================================================
   v3.01 button system (Home first; see "next ideas" in js/home.js)
   ===================================================================== */
.b3 { --b3-red: #BE1E2D; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 12px; border: 2px solid transparent;
  font: 700 14.5px/1.2 'Inter', sans-serif; letter-spacing: .01em; cursor: pointer; text-decoration: none; white-space: nowrap; position: relative;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease; -webkit-tap-highlight-color: transparent; }
.b3 .ic { flex: 0 0 auto; }
.b3:focus-visible { outline: 3px solid color-mix(in srgb, var(--b3-red) 45%, transparent); outline-offset: 2px; }
.b3:disabled, .b3[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.b3-primary { background: var(--b3-red); color: #fff; box-shadow: 0 2px 6px rgba(190, 30, 45, .28); }
.b3-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(190, 30, 45, .32); }
.b3-primary:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 1px 3px rgba(190, 30, 45, .3); }
.b3-secondary { background: var(--surface); color: var(--b3-red); border-color: var(--b3-red); }
.b3-secondary:hover:not(:disabled) { background: var(--b3-red); color: #fff; }
.b3-secondary:active:not(:disabled) { transform: translateY(1px); }
.b3-tertiary { background: none; color: var(--ink); padding: 8px 6px; min-height: 36px; }
.b3-tertiary:hover:not(:disabled) { color: var(--b3-red); text-decoration: underline; text-decoration-color: var(--b3-red); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.b3-danger { background: #2b2d31; color: #fff; }
.b3-danger:hover:not(:disabled) { background: #1a1b1e; transform: translateY(-1px); }
.b3-danger.armed { background: #000; }
.b3-sm { min-height: 38px; padding: 7px 14px; font-size: 13.5px; }
.b3-icon { background: var(--surface-2); color: var(--ink); width: 40px; min-height: 40px; padding: 0; border-radius: 11px; }
.b3-icon:hover:not(:disabled) { background: var(--line); }
.b3.is-loading { pointer-events: none; }
.b3.is-loading .ic { display: none; }
.b3.is-loading::before { content: ''; width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.b3-pill { min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); font: 700 13.5px 'Inter', sans-serif; color: var(--ink); cursor: pointer; transition: all .15s ease; }
.b3-pill:hover { border-color: var(--line-2); }
.b3-pill.on { background: #BE1E2D; border-color: #BE1E2D; color: #fff; }
@media (max-width: 640px) { .b3 { min-height: 48px; } .b3-sm { min-height: 44px; } .b3-pill { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .b3, .b3-pill { transition: none; } }

/* =====================================================================
   Home (v3.01)
   ===================================================================== */
#panel-home { max-width: 1180px; margin: 0 auto; }
.h-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin: 6px 0 16px; }
.h-head h1 { font-family: 'Space Grotesk', sans-serif; font-size: clamp(24px, 3.4vw, 34px); font-weight: 700; letter-spacing: -.01em; }
.h-head p { color: var(--ink-soft); font-size: 15px; margin-top: 2px; }
.h-editbar { background: color-mix(in srgb, #BE1E2D 8%, var(--surface)); border: 1.5px dashed color-mix(in srgb, #BE1E2D 45%, transparent); color: #BE1E2D; font-weight: 700; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
/* hero */
.h-hero { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 21 / 8; min-height: 230px; background: #1d1f22; box-shadow: 0 10px 30px rgba(0,0,0,.14); touch-action: pan-y; }
.hh-track { display: flex; height: 100%; transition: transform .6s cubic-bezier(.22,.8,.22,1); }
.hh-slide { flex: 0 0 100%; height: 100%; margin: 0; position: relative; }
.hh-slide img, .hh-default, .hh-default svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.hh-slide figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 28px 26px; background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,0)); color: #fff; display: flex; flex-direction: column; gap: 4px; }
.hh-slide figcaption strong { font-family: 'Space Grotesk', sans-serif; font-size: clamp(20px, 3vw, 32px); line-height: 1.15; text-shadow: 0 2px 10px rgba(0,0,0,.35); }
.hh-slide figcaption span { font-size: clamp(13px, 1.6vw, 16px); opacity: .9; }
.hh-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: none; background: rgba(255,255,255,.85); color: #1d1f22; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transition: opacity .15s, background .15s; }
.h-hero:hover .hh-nav, .hh-nav:focus-visible { opacity: 1; }
.hh-nav:hover { background: #fff; }
.hh-nav.prev { left: 14px; } .hh-nav.next { right: 14px; }
.hh-dots { position: absolute; right: 22px; bottom: 24px; display: flex; gap: 7px; }
.hh-dots button { width: 9px; height: 9px; border-radius: 999px; border: none; background: rgba(255,255,255,.5); cursor: pointer; padding: 0; transition: width .2s, background .2s; }
.hh-dots button.on { width: 26px; background: #fff; }
.hh-add { position: absolute; top: 18px; right: 18px; }
/* banner manager (owner) */
.h-strip { margin-top: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.hs-list { display: flex; flex-direction: column; gap: 8px; }
.hs-item { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 6px; border-radius: 12px; }
.hs-item:hover { background: var(--surface-2); }
.hs-item img { width: 110px; aspect-ratio: 21 / 8; object-fit: cover; border-radius: 8px; }
.hs-cap { display: flex; flex-direction: column; min-width: 0; } .hs-cap strong, .hs-cap span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-cap span { font-size: 12.5px; color: var(--ink-soft); }
.hs-btns { display: flex; gap: 6px; align-items: center; }
/* sections */
.h-sec { margin-top: 26px; }
.h-title { font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.h-title::before { content: ''; width: 5px; height: 20px; border-radius: 3px; background: #BE1E2D; }
.h-title-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; } .h-title-row .h-title { margin-bottom: 0; }
.h-none { color: var(--ink-soft); background: var(--surface); border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 22px; text-align: center; font-size: 14.5px; }
/* shortcuts */
.h-shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.h-short { display: flex; flex-direction: column; gap: 4px; padding: 18px; min-height: 124px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.05); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; animation: fadeUp .35s var(--ease) both; animation-delay: calc(var(--i) * 40ms); }
.h-short:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.09); border-color: color-mix(in srgb, #BE1E2D 35%, var(--line)); }
.h-short:active { transform: translateY(0); }
.h-short:focus-visible { outline: 3px solid color-mix(in srgb, #BE1E2D 45%, transparent); outline-offset: 2px; }
.hs-ic { width: 46px; height: 46px; border-radius: 13px; background: color-mix(in srgb, #BE1E2D 10%, var(--surface)); color: #BE1E2D; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.hs-t { font-weight: 800; font-size: 16px; } .hs-sub { font-size: 13px; color: var(--ink-soft); }
/* your day */
.h-day { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.h-stat { display: flex; align-items: baseline; gap: 10px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--line-2); border-radius: 14px; text-decoration: none; color: var(--ink); transition: transform .15s ease, box-shadow .15s ease; animation: fadeUp .35s var(--ease) both; animation-delay: calc(var(--i) * 40ms); }
.h-stat:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.07); }
.h-stat b { font-family: 'Space Grotesk', sans-serif; font-size: 30px; line-height: 1; }
.h-stat span { font-size: 14px; color: var(--ink-soft); font-weight: 600; }
.h-stat.warn { border-left-color: var(--warn); } .h-stat.warn b { color: var(--warn); }
.h-stat.good { border-left-color: var(--good); } .h-stat.live { border-left-color: var(--good); } .h-stat.live b { color: var(--good); }
/* news */
.h-news { display: flex; flex-direction: column; gap: 14px; }
.h-post { display: grid; grid-template-columns: 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.05); animation: fadeUp .35s var(--ease) both; animation-delay: calc(var(--i) * 40ms); }
.h-post.has-img { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); }
.h-post.pinned { border-color: color-mix(in srgb, #BE1E2D 40%, var(--line)); box-shadow: 0 0 0 1px color-mix(in srgb, #BE1E2D 25%, transparent), 0 6px 18px rgba(190,30,45,.08); }
.hp-img { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); }
.hp-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hp-cat { position: absolute; top: 12px; left: 12px; background: #BE1E2D; color: #fff; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; border-radius: 999px; padding: 4px 10px; }
.hp-cat.inline { position: static; }
.hp-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hp-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12.5px; color: var(--ink-soft); }
.hp-pin { display: inline-flex; align-items: center; gap: 4px; color: #BE1E2D; font-weight: 800; }
.h-post h3 { font-family: 'Space Grotesk', sans-serif; font-size: 20px; line-height: 1.25; }
.hp-text { font-size: 15px; line-height: 1.6; color: var(--ink); }
.hp-text p + p { margin-top: 10px; }
.hp-text.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.hp-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.h-more { align-self: center; }
/* gallery */
.h-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.h-photo { margin: 0; cursor: pointer; position: relative; animation: fadeUp .35s var(--ease) both; animation-delay: calc(var(--i) * 35ms); }
.hg-img { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--surface-2); box-shadow: 0 2px 8px rgba(0,0,0,.08); transition: transform .15s ease, box-shadow .15s ease; }
.hg-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.h-photo:hover .hg-img { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.14); }
.h-photo:hover .hg-img img { transform: scale(1.04); }
.h-photo:focus-visible .hg-img { outline: 3px solid color-mix(in srgb, #BE1E2D 45%, transparent); outline-offset: 2px; }
.hg-plant { position: absolute; left: 10px; bottom: 10px; background: rgba(20,21,24,.78); color: #fff; font-size: 11.5px; font-weight: 800; border-radius: 999px; padding: 4px 10px; backdrop-filter: blur(2px); }
.h-photo figcaption { padding: 8px 2px 0; font-weight: 700; font-size: 14px; }
.h-photo figcaption span { display: block; font-weight: 500; font-size: 12.5px; color: var(--ink-soft); }
.hg-edit { position: absolute; top: 10px; right: 10px; }
.h-foot { text-align: center; color: var(--ink-faint); font-size: 12px; margin: 34px 0 10px; }
/* lightbox */
.h-lb { position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center; }
.lb-bg { position: absolute; inset: 0; background: rgba(10,10,12,.92); }
.h-lb figure { position: relative; margin: 0; max-width: min(1200px, 94vw); max-height: 88vh; display: flex; flex-direction: column; gap: 10px; animation: popIn .22s var(--spring); }
.h-lb img { max-width: 100%; max-height: 76vh; object-fit: contain; border-radius: 10px; }
.h-lb figcaption { color: #fff; font-size: 15px; display: flex; flex-direction: column; gap: 3px; }
.h-lb figcaption span { opacity: .8; font-size: 13.5px; } .h-lb figcaption em { font-style: normal; opacity: .6; font-size: 12.5px; }
.lb-x, .lb-nav { position: absolute; border: none; background: rgba(255,255,255,.14); color: #fff; width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s; }
.lb-x:hover, .lb-nav:hover { background: rgba(255,255,255,.28); }
.lb-x { top: 18px; right: 18px; } .lb-nav.prev { left: 18px; top: 50%; transform: translateY(-50%); } .lb-nav.next { right: 18px; top: 50%; transform: translateY(-50%); }
/* owner editor */
.h-modal { position: fixed; inset: 0; z-index: 350; display: flex; align-items: center; justify-content: center; padding: 14px; }
.hm-bg { position: absolute; inset: 0; background: rgba(0,0,0,.5); animation: fadeIn .15s ease; }
.hm-card { position: relative; width: min(620px, 100%); max-height: calc(100vh - 28px); overflow-y: auto; background: var(--surface); border-radius: 18px; padding: 20px 22px; box-shadow: 0 24px 60px rgba(0,0,0,.3); display: flex; flex-direction: column; gap: 12px; animation: popIn .22s var(--spring); }
.hm-head { display: flex; justify-content: space-between; align-items: center; } .hm-head h3 { font-family: 'Space Grotesk', sans-serif; font-size: 20px; }
.hm-drop { display: block; position: relative; border: 2px dashed var(--line-2); border-radius: 14px; overflow: hidden; cursor: pointer; background: var(--surface-2); transition: border-color .15s; min-height: 150px; }
.hm-drop:hover { border-color: #BE1E2D; }
.hm-drop img { width: 100%; max-height: 260px; object-fit: cover; display: block; }
.hm-drop-in { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 28px 16px; text-align: center; color: var(--ink-soft); min-height: 150px; }
.hm-drop-in b { color: var(--ink); font-size: 15px; } .hm-drop-in em { font-style: normal; font-size: 12.5px; } .hm-drop-in .ic { color: #BE1E2D; }
.hm-count { position: absolute; right: 10px; bottom: 10px; background: #BE1E2D; color: #fff; font-weight: 800; font-size: 12px; border-radius: 999px; padding: 4px 10px; }
.hm-tip { font-size: 12.5px; color: var(--ink-soft); margin-top: -4px; }
.hm-f { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.hm-f em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink-faint); }
.hm-f input, .hm-f textarea { font-size: 16px; padding: 11px 12px; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink); width: 100%; }
.hm-f textarea { resize: vertical; line-height: 1.5; }
.hm-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.hm-check { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14.5px; cursor: pointer; }
.hm-check input { width: 20px; height: 20px; }
.hm-msg { color: #BE1E2D; font-weight: 700; font-size: 13.5px; min-height: 18px; }
.hm-btns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .hm-btns .grow { flex: 1; }
/* loading skeleton */
.h-skel { display: flex; flex-direction: column; gap: 16px; }
.sk { background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: skel 1.2s ease-in-out infinite; border-radius: 14px; }
.sk-h { height: 44px; width: 320px; max-width: 70%; } .sk-hero { aspect-ratio: 21 / 8; min-height: 230px; border-radius: 18px; }
.sk-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; } .sk-c { height: 124px; }
@keyframes skel { to { background-position: -200% 0; } }
@media (max-width: 760px) { .h-post.has-img { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .h-head { align-items: flex-start; flex-direction: column; } .h-head .b3 { width: 100%; }
  .h-hero { aspect-ratio: 4 / 3; border-radius: 14px; }
  .hh-slide figcaption { padding: 50px 18px 34px; } .hh-dots { left: 18px; right: auto; bottom: 14px; }
  .hh-nav { display: none; }
  .h-shortcuts { grid-template-columns: 1fr 1fr; gap: 10px; } .h-short { min-height: 112px; padding: 14px; }
  .h-day { grid-template-columns: 1fr; }
  .h-gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hs-item { grid-template-columns: 80px minmax(0, 1fr); } .hs-item img { width: 80px; } .hs-btns { grid-column: 1 / -1; justify-content: flex-end; }
  .hm-card { padding: 16px; border-radius: 16px; }
  .hm-btns .b3-primary { flex: 1 1 100%; order: -1; }
  .h-title-row { flex-wrap: wrap; }
  .sk-row { grid-template-columns: 1fr 1fr; }
}
