/* Smarco client portal and admin panel. Midnight & Brass, same family as the rest of the site. */
:root {
  --bg: #040C1C; --bg-2: #061430; --panel: #0A1A38; --panel-2: #0F2247; --panel-3: #13295A;
  --line: rgba(216,168,72,.24); --line-soft: rgba(255,255,255,.075); --line-hi: rgba(243,217,160,.5);
  --ink: #F7F1E4; --ink-2: rgba(247,241,228,.74); --ink-3: rgba(247,241,228,.52);
  --brass: #D8A848; --brass-hi: #F3D9A0; --brass-lo: #9C7428; --orange: #FC5400; --ok: #5CCB8A; --warn: #FFB48A; --ivory: #F5EFE2;
  --serif: "Instrument Serif", Georgia, serif; --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif; --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.2,.8,.2,1);
  --glass: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
  --shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 0 0 1px var(--line-soft), 0 30px 70px -40px rgba(0,0,0,.85);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: #040C1C; }
body { margin: 0; min-height: 100vh; color: var(--ink); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 700px at 100% -10%, rgba(216,168,72,.13), transparent 60%),
    radial-gradient(900px 700px at -10% 110%, rgba(252,84,0,.06), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 900px) var(--bg); background-repeat: no-repeat; }
/* film grain, very light */
body::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
header, main { position: relative; z-index: 1; }
a { color: var(--brass-hi); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(216,168,72,.35); }
.p-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
[hidden] { display: none !important; }
.ic { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.18em; }

/* ---------- top bar ---------- */
.p-top { position: sticky; top: 0; z-index: 20; background: rgba(4,12,28,.72); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line-soft); }
.p-top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(216,168,72,.45), transparent); }
.p-top .p-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.p-logo { position: relative; display: block; width: 150px; line-height: 0; filter: drop-shadow(0 2px 10px rgba(0,8,24,.55)); transition: transform .35s var(--ease); }
.p-logo:hover { transform: translateY(-1px); }
/* the logo file has empty margins: let the artwork sit flush with the page edge (live layers follow the same box) */
.p-logo > img, .p-logo > .logo-stack { display: block; width: 100%; max-width: none; margin: -6% 0 -8% -4%; }
.p-logo img { width: 100%; height: auto; }
.p-top-right { display: flex; align-items: center; gap: 12px; font-size: .9rem; color: var(--ink-2); }
.p-who { display: flex; align-items: center; gap: 10px; }
.p-who-name { display: grid; line-height: 1.2; text-align: right; }
.p-who-name b { font-weight: 500; color: var(--ink); font-size: .88rem; }
.p-who-name small { color: var(--ink-3); font-size: .74rem; }
.p-label { font-family: var(--mono); font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--brass); }
.p-label.dot::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--brass); box-shadow: 0 0 0 3px rgba(216,168,72,.18); vertical-align: 1px; }

/* avatar with initials */
.p-av { --s: 38px; width: var(--s); height: var(--s); flex: none; border-radius: 50%; display: grid; place-items: center; font: 600 calc(var(--s) * .36)/1 var(--sans); letter-spacing: .02em;
  color: #071631; background: linear-gradient(135deg, #F7E3B4, #D8A848 55%, #A97C2C); box-shadow: 0 0 0 2px rgba(4,12,28,.9), 0 0 0 3px rgba(216,168,72,.45); }
.p-av.lg { --s: 64px; }
.p-av.sm { --s: 34px; }

/* ---------- buttons and fields ---------- */
.p-btn { appearance: none; border: 0; cursor: pointer; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: .92rem; letter-spacing: .005em; color: #071631; text-decoration: none; white-space: nowrap; overflow: hidden;
  background: linear-gradient(135deg, #F7E3B4, #D8A848 48%, #B88A30); box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 12px 28px -14px rgba(216,168,72,.8);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), filter .25s; }
.p-btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%) -150% 0 / 250% 100% no-repeat; transition: background-position .8s var(--ease); }
.p-btn:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 16px 34px -14px rgba(216,168,72,.95); }
.p-btn:hover::after { background-position: 150% 0; }
.p-btn:active { transform: translateY(0); }
.p-btn:disabled { opacity: .55; cursor: default; transform: none; }
.p-btn:focus-visible, .p-tabs button:focus-visible, .p-drop:focus-visible, .p-stage-pick button:focus-visible, .p-client:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 3px; }
.p-btn.ghost { background: rgba(255,255,255,.03); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.p-btn.ghost::after { display: none; }
.p-btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--brass); background: rgba(216,168,72,.08); }
.p-btn.small { padding: 8px 14px; font-size: .82rem; }
.p-btn.danger { background: transparent; color: var(--warn); box-shadow: inset 0 0 0 1px rgba(255,180,138,.4); }
.p-btn.danger::after { display: none; }
.p-btn.danger:hover { background: rgba(255,180,138,.08); box-shadow: inset 0 0 0 1px var(--warn); }
.p-btn.block { width: 100%; padding: 14px 22px; font-size: .98rem; }
.p-btn.icon { padding: 8px; width: 36px; height: 36px; }
.p-btn.busy { pointer-events: none; }
.p-btn.busy::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: p-spin .7s linear infinite; }
@keyframes p-spin { to { transform: rotate(1turn); } }

.p-field { display: grid; gap: 7px; min-width: 0; }
.p-field > span:first-child { font-family: var(--mono); font-size: .63rem; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-3); }
.p-field input, .p-field select, .p-field textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.1); background: rgba(2,8,20,.45); color: var(--ink); font-size: 1rem;
  transition: border-color .2s, box-shadow .2s, background .2s; }
.p-field input::placeholder, .p-field textarea::placeholder { color: rgba(247,241,228,.32); }
.p-field input:hover, .p-field select:hover, .p-field textarea:hover { border-color: rgba(216,168,72,.35); }
.p-field textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.p-field select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background: rgba(2,8,20,.45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23D8A848' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 15px center; }
.p-field select option { color: #071631; background: #F5EFE2; }
.p-field input:focus, .p-field select:focus, .p-field textarea:focus { outline: none; border-color: var(--brass); background-color: rgba(2,8,20,.6); box-shadow: 0 0 0 4px rgba(216,168,72,.14); }
.p-field input[type=date] { color-scheme: dark; }
.p-pw { position: relative; display: block; }
.p-pw input { padding-right: 48px; }
.p-pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; }
.p-pw button:hover { color: var(--brass-hi); background: rgba(255,255,255,.05); }
.p-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.p-msg { min-height: 1.4em; margin: 0; font-size: .9rem; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.p-msg:empty { display: none; }
.p-msg.err { color: var(--warn); }
.p-msg.ok { color: var(--ok); }
.p-msg.err::before, .p-msg.ok::before { content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1.5px currentColor; background: center / 12px no-repeat; }
.p-msg.ok::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235CCB8A' stroke-width='3'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E"); }
.p-msg.err::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFB48A' stroke-width='3'%3E%3Cpath d='M12 6v7M12 17.5v.5'/%3E%3C/svg%3E"); }

/* switch (styled checkbox) */
.p-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .88rem; color: var(--ink-2); user-select: none; }
.p-switch input { appearance: none; -webkit-appearance: none; margin: 0; width: 40px; height: 22px; flex: none; border-radius: 999px; background: rgba(255,255,255,.12); position: relative; cursor: pointer; transition: background .25s; }
.p-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ivory); transition: transform .25s var(--ease); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.p-switch input:checked { background: linear-gradient(135deg, #D8A848, #B88A30); }
.p-switch input:checked::after { transform: translateX(18px); }
.p-switch input:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 3px; }

/* ---------- sign-in: split screen ---------- */
.p-login { min-height: calc(100vh - 66px); display: grid; grid-template-columns: 1.1fr 1fr; padding: 0; max-width: none; }
.p-visual { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 22px; padding: clamp(28px, 5vw, 64px); isolation: isolate; min-height: 100%; }
.p-visual img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transform: scale(1.06); animation: p-kb 24s ease-in-out infinite alternate; }
.p-visual::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(4,12,28,.25) 0%, rgba(4,12,28,.35) 35%, rgba(4,12,28,.92) 82%, var(--bg) 100%),
              linear-gradient(90deg, transparent 60%, rgba(4,12,28,.75)); }
@keyframes p-kb { from { transform: scale(1.06) translate(0, 0); } to { transform: scale(1.14) translate(-2%, -1.5%); } }
.p-visual h2 { margin: 0; max-width: 14ch; font: 400 clamp(2.6rem, 5vw, 4.4rem)/.98 var(--serif); letter-spacing: -.015em; text-shadow: 0 10px 40px rgba(0,0,0,.5); }
.p-visual h2 em { color: var(--brass-hi); }
.p-visual > p { margin: 0; max-width: 44ch; color: var(--ink-2); font-size: 1.02rem; }
.p-points { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 12px; }
.p-points li { display: flex; gap: 12px; align-items: center; color: var(--ink); font-size: .95rem; }
.p-points .ic { width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: rgba(216,168,72,.14); color: var(--brass-hi); box-shadow: inset 0 0 0 1px rgba(216,168,72,.3); }
.p-mini-route { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; font: 500 .66rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.p-mini-route i { width: 18px; height: 1px; background: linear-gradient(90deg, var(--brass), var(--orange)); }
.p-login-side { display: grid; place-items: center; padding: clamp(28px, 5vw, 64px) max(20px, env(safe-area-inset-right, 0px)) clamp(28px, 5vw, 64px) 20px; }
.p-card { position: relative; width: min(440px, 100%); padding: clamp(26px, 4vw, 40px); border-radius: 26px; background: var(--glass); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.p-card::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(160deg, rgba(243,217,160,.55), transparent 35%, transparent 70%, rgba(216,168,72,.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.p-card h1 { margin: .5rem 0 .4rem; font: 400 clamp(2.3rem, 4vw, 2.8rem)/1.02 var(--serif); letter-spacing: -.01em; }
.p-card h1 em { color: var(--brass-hi); }
.p-card .p-sub { margin: 0 0 1.6rem; color: var(--ink-2); font-size: .95rem; }
.p-card form { display: grid; gap: 16px; }
.p-help { margin: 1.5rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--line-soft); font-size: .85rem; color: var(--ink-3); }
.p-secure { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: .78rem; color: var(--ink-3); }
.p-secure .ic { color: var(--ok); }
/* the first-sign-in step reuses the card without the picture */
.p-login.solo { grid-template-columns: 1fr; place-items: center; padding: 40px 20px; }

/* ---------- dashboard ---------- */
.p-dash { padding-top: 28px; padding-bottom: 90px; }
.p-hero { position: relative; overflow: hidden; isolation: isolate; border-radius: 26px; padding: clamp(24px, 4.5vw, 46px); min-height: 230px; display: flex; flex-direction: column; justify-content: flex-end;
  box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.p-hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; object-position: 50% 35%; }
.p-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(4,12,28,.95) 0%, rgba(4,12,28,.78) 45%, rgba(4,12,28,.35) 100%), linear-gradient(0deg, rgba(4,12,28,.7), transparent 60%); }
.p-hero h1 { margin: .45rem 0 .35rem; font: 400 clamp(2.3rem, 5vw, 3.6rem)/1 var(--serif); letter-spacing: -.015em; }
.p-hero h1 em { color: var(--brass-hi); }
.p-hero p { margin: 0; color: var(--ink-2); max-width: 52ch; }
.p-hero .p-date { position: absolute; top: clamp(20px, 3vw, 30px); right: clamp(20px, 3vw, 30px); font: 500 .68rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2);
  padding: 8px 12px; border-radius: 999px; background: rgba(4,12,28,.55); box-shadow: inset 0 0 0 1px var(--line-soft); backdrop-filter: blur(6px); }
.p-hero-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }

/* stat tiles */
.p-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.p-stat { position: relative; padding: 18px 18px 16px; border-radius: 18px; background: var(--glass); box-shadow: var(--shadow); overflow: hidden; }
.p-stat::after { content: ""; position: absolute; left: 18px; right: 18px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(216,168,72,.6), transparent); }
.p-stat .ic { color: var(--brass); width: 20px; height: 20px; }
.p-stat b { display: block; margin: 12px 0 2px; font: 400 2.1rem/1 var(--serif); color: var(--ink); }
.p-stat b.sm { font-size: 1.45rem; line-height: 1.2; }
.p-stat span { font-size: .8rem; color: var(--ink-3); }

/* tabs */
.p-tabs { display: flex; gap: 4px; margin: 28px 0 22px; padding: 5px; border-radius: 999px; background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 1px var(--line-soft); width: max-content; max-width: 100%; }
.p-tabs button { appearance: none; border: 0; background: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; color: var(--ink-2); font-weight: 500; font-size: .9rem;
  transition: color .2s, background .25s var(--ease), box-shadow .25s; }
.p-tabs button:hover { color: var(--ink); }
.p-tabs button .ic { opacity: .75; }
.p-tabs button[aria-selected="true"] { color: #071631; background: linear-gradient(135deg, #F7E3B4, #D8A848 60%, #C0923A); box-shadow: 0 8px 20px -12px rgba(216,168,72,.9); }
.p-tabs button[aria-selected="true"] .ic { opacity: 1; }
.p-count { min-width: 20px; padding: 2px 6px; border-radius: 999px; font: 600 .7rem/1.2 var(--mono); background: rgba(255,255,255,.1); color: var(--ink-2); text-align: center; }
.p-tabs button[aria-selected="true"] .p-count { background: rgba(7,22,49,.18); color: #071631; }
.p-count:empty { display: none; }

.p-panel { display: grid; gap: 16px; }
.p-panel.in > * { animation: p-rise .55s var(--ease) both; }
.p-panel.in > *:nth-child(2) { animation-delay: .06s; } .p-panel.in > *:nth-child(3) { animation-delay: .12s; } .p-panel.in > *:nth-child(4) { animation-delay: .18s; } .p-panel.in > *:nth-child(n+5) { animation-delay: .24s; }
@keyframes p-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.p-box { position: relative; padding: clamp(20px, 3vw, 28px); border-radius: 22px; background: linear-gradient(180deg, rgba(15,34,71,.75), rgba(10,26,56,.75)); box-shadow: var(--shadow); }
.p-box h2 { margin: 0 0 .35rem; font: 400 1.7rem/1.15 var(--serif); letter-spacing: -.005em; }
.p-box h3 { margin: 0; font: 400 1.55rem/1.15 var(--serif); }
.p-box-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 16px; }
.p-box-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; }
.p-box-head h2 .ic { color: var(--brass); width: 22px; height: 22px; }
.p-empty { color: var(--ink-3); margin: 0; }
.p-empty-state { display: grid; justify-items: center; gap: 10px; padding: 34px 16px; text-align: center; color: var(--ink-3); border-radius: 18px; background: rgba(255,255,255,.02); border: 1px dashed rgba(255,255,255,.1); }
.p-empty-state .ic { width: 46px; height: 46px; padding: 11px; border-radius: 14px; color: var(--brass-hi); background: rgba(216,168,72,.1); box-shadow: inset 0 0 0 1px rgba(216,168,72,.25); }
.p-empty-state b { color: var(--ink); font: 400 1.35rem/1.2 var(--serif); }
.p-empty-state p { margin: 0; max-width: 46ch; font-size: .92rem; }

/* ---------- order card ---------- */
.p-order { padding: 0; overflow: hidden; }
.p-order-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 20px; align-items: flex-start; padding: clamp(20px, 3vw, 28px) clamp(20px, 3vw, 28px) 0; }
.p-order-top h3 { margin-top: 8px; }
.p-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.p-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font: 500 .7rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--line-soft); }
.p-chip.live { color: #FFD3BC; background: rgba(252,84,0,.12); box-shadow: inset 0 0 0 1px rgba(252,84,0,.35); }
.p-chip.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); animation: p-pulse 1.8s ease-out infinite; }
.p-chip.done { color: #BDF0D2; background: rgba(92,203,138,.12); box-shadow: inset 0 0 0 1px rgba(92,203,138,.35); }
@keyframes p-pulse { 0% { box-shadow: 0 0 0 0 rgba(252,84,0,.6); } 100% { box-shadow: 0 0 0 8px rgba(252,84,0,0); } }
.p-eta { text-align: right; }
.p-eta small { display: block; font: 500 .62rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.p-eta b { font: 400 1.5rem/1.1 var(--serif); color: var(--brass-hi); }
.p-eta b.tbc { font-size: 1.1rem; color: var(--ink-2); }

.p-route { --n: 5; list-style: none; margin: 26px 0 0; padding: 0 clamp(12px, 2vw, 20px) 24px; display: grid; grid-template-columns: repeat(var(--n), 1fr); position: relative; }
.p-route::before, .p-route::after { content: ""; position: absolute; top: 21px; height: 2px; border-radius: 2px; left: calc(clamp(12px, 2vw, 20px) + 10%); }
.p-route::before { right: calc(clamp(12px, 2vw, 20px) + 10%); background: repeating-linear-gradient(90deg, rgba(255,255,255,.18) 0 6px, transparent 6px 11px); }
.p-route::after { width: calc((100% - 2 * clamp(12px, 2vw, 20px)) * .8 * var(--done, 0)); background: linear-gradient(90deg, var(--brass), var(--orange)); box-shadow: 0 0 12px rgba(252,84,0,.45);
  transform-origin: left; animation: p-grow 1.2s var(--ease) .15s both; }
@keyframes p-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.p-route li { position: relative; z-index: 1; display: grid; justify-items: center; gap: 10px; font-size: .8rem; color: var(--ink-3); text-align: center; line-height: 1.25; }
.p-route .node { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.16); color: var(--ink-3); transition: all .3s; }
.p-route .node .ic { width: 20px; height: 20px; }
.p-route li.done .node { background: linear-gradient(135deg, #2A3D63, #1A2C52); color: var(--brass-hi); box-shadow: inset 0 0 0 1.5px var(--brass); }
.p-route li.now .node { color: #fff; background: radial-gradient(circle at 35% 30%, #FF8A4C, var(--orange) 60%, #C83F00); box-shadow: 0 0 0 6px rgba(252,84,0,.16), 0 10px 26px -8px rgba(252,84,0,.8); animation: p-glow 2.4s ease-in-out infinite; }
.p-route li.now.last .node { background: radial-gradient(circle at 35% 30%, #8BE3AE, var(--ok) 60%, #2F9B5E); box-shadow: 0 0 0 6px rgba(92,203,138,.16), 0 10px 26px -8px rgba(92,203,138,.7); animation: none; }
@keyframes p-glow { 50% { box-shadow: 0 0 0 10px rgba(252,84,0,.08), 0 10px 26px -8px rgba(252,84,0,.9); } }
.p-route li.done, .p-route li.now { color: var(--ink); }
.p-route li.now span { font-weight: 600; }

.p-order-body { display: grid; grid-template-columns: 1fr 1.3fr; gap: 1px; background: var(--line-soft); border-top: 1px solid var(--line-soft); }
.p-order-body > div { padding: 20px clamp(20px, 3vw, 28px) 24px; background: rgba(8,22,48,.92); }
.p-order-body > div:only-child { grid-column: 1 / -1; }
.p-order-body h4 { margin: 0 0 10px; font: 500 .63rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.p-order-body h4 .ic { color: var(--brass); }
.p-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: .94rem; color: var(--ink); }
.p-items li { display: flex; gap: 10px; }
.p-items li::before { content: ""; flex: none; width: 5px; height: 5px; margin-top: .6em; border-radius: 50%; background: var(--brass); }
.p-note { margin: 0; padding-left: 14px; border-left: 2px solid var(--brass); color: var(--ink-2); font-size: .96rem; white-space: pre-line; }
.p-note-time { display: block; margin-top: 10px; font-size: .76rem; color: var(--ink-3); }

/* ---------- documents ---------- */
.p-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.p-file { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.025); box-shadow: inset 0 0 0 1px var(--line-soft);
  transition: background .2s, box-shadow .2s, transform .25s var(--ease); }
.p-file:hover { background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--line); transform: translateY(-1px); }
.p-file-ic { --c: var(--brass); position: relative; width: 42px; height: 50px; border-radius: 8px 14px 8px 8px; display: grid; place-items: end center; padding-bottom: 7px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 28%, transparent), color-mix(in srgb, var(--c) 10%, transparent)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent);
  color: color-mix(in srgb, var(--c) 60%, #fff); font: 700 .56rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.p-file-ic::before { content: ""; position: absolute; top: 0; right: 0; width: 12px; height: 12px; border-radius: 0 12px 0 6px; background: color-mix(in srgb, var(--c) 45%, transparent); }
.p-file-ic[data-k="pdf"] { --c: #F2676B; } .p-file-ic[data-k="sheet"] { --c: #4CC38A; } .p-file-ic[data-k="doc"] { --c: #6AA4FF; } .p-file-ic[data-k="img"] { --c: #C08BFF; } .p-file-ic[data-k="zip"] { --c: #E9B44C; }
.p-file-name { font-weight: 500; overflow-wrap: anywhere; }
.p-file-sub { font-size: .8rem; color: var(--ink-3); }
.p-file-actions { display: flex; gap: 6px; }
.p-badge { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; font: 500 .66rem/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; background: rgba(216,168,72,.14); color: var(--brass-hi); vertical-align: 1px; }
.p-badge.client { background: rgba(106,164,255,.14); color: #B9D3FF; }

/* ---------- upload ---------- */
.p-drop { position: relative; display: grid; place-items: center; gap: 10px; padding: 42px 18px; border-radius: 20px; text-align: center; cursor: pointer; overflow: hidden;
  background: radial-gradient(600px 200px at 50% 0%, rgba(216,168,72,.1), transparent 70%), rgba(2,8,20,.35);
  border: 1.5px dashed rgba(216,168,72,.45); transition: background .25s, border-color .25s, transform .25s var(--ease); }
.p-drop .ic { width: 54px; height: 54px; padding: 13px; border-radius: 16px; color: #071631; background: linear-gradient(135deg, #F7E3B4, #D8A848 55%, #B88A30); box-shadow: 0 14px 30px -14px rgba(216,168,72,.9); transition: transform .35s var(--ease); }
.p-drop:hover, .p-drop.over { border-color: var(--brass-hi); background: radial-gradient(600px 220px at 50% 0%, rgba(216,168,72,.2), transparent 70%), rgba(2,8,20,.35); }
.p-drop:hover .ic, .p-drop.over .ic { transform: translateY(-4px); }
.p-drop.over { transform: scale(1.01); }
.p-drop strong { font-weight: 600; font-size: 1.02rem; }
.p-drop small { color: var(--ink-3); }
.p-drop .p-types { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 4px; }
.p-progress { display: grid; gap: 10px; }
.p-progress:empty { display: none; }
.p-prog { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line-soft); font-size: .86rem; color: var(--ink-2); }
.p-bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
.p-bar span { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--brass), var(--orange)); transition: width .25s ease; }
.p-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.p-cats button { appearance: none; border: 0; cursor: pointer; padding: 8px 14px; border-radius: 999px; font-size: .85rem; color: var(--ink-2); background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line-soft); transition: all .2s; }
.p-cats button:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.p-cats button[aria-pressed="true"] { color: var(--brass-hi); background: rgba(216,168,72,.14); box-shadow: inset 0 0 0 1px var(--brass); }

/* account */
.p-profile { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.p-profile h3 { margin: 0; }
.p-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 20px; }
.p-kv div { padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line-soft); }
.p-kv small { display: block; font: 500 .6rem/1 var(--mono); letter-spacing: .15em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.p-kv span { overflow-wrap: anywhere; }
.p-help-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }

/* ---------- admin ---------- */
.p-search { position: relative; min-width: min(280px, 100%); }
.p-search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.p-search input { padding-left: 42px; border-radius: 999px; }
.p-clients { display: grid; gap: 8px; }
.p-client { display: grid; grid-template-columns: auto minmax(0, 2fr) minmax(0, 1fr) repeat(2, minmax(70px, .6fr)) minmax(0, 1fr) auto; gap: 16px; align-items: center; width: 100%; text-align: left;
  appearance: none; border: 0; cursor: pointer; color: inherit; padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.025); box-shadow: inset 0 0 0 1px var(--line-soft); transition: all .25s var(--ease); }
.p-client:hover { background: rgba(216,168,72,.06); box-shadow: inset 0 0 0 1px var(--line); transform: translateY(-1px); }
.p-client:hover .chev { color: var(--brass-hi); transform: translateX(3px); }
.p-client .chev { color: var(--ink-3); transition: transform .25s var(--ease), color .2s; }
.p-client b { display: block; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-client small { display: block; color: var(--ink-3); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-client .num { font: 400 1.3rem/1 var(--serif); color: var(--ink); }
.p-client .mono { font: .82rem/1.2 var(--mono); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.p-client-head { display: grid; grid-template-columns: auto minmax(0, 2fr) minmax(0, 1fr) repeat(2, minmax(70px, .6fr)) minmax(0, 1fr) auto; gap: 16px; padding: 0 16px 8px; font: 500 .6rem/1 var(--mono); letter-spacing: .15em; text-transform: uppercase; color: var(--ink-3); }
.p-client-head span:first-child { width: 34px; }
.p-client-head span:last-child { width: 1.15em; }
.p-off { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font: 500 .62rem/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--warn); background: rgba(255,180,138,.1); }
.p-pill-off { color: var(--warn); font-size: .8rem; }

.p-new { border: 0; box-shadow: var(--shadow), 0 0 0 1px var(--line); animation: p-rise .45s var(--ease) both; }
.p-secret { display: grid; gap: 14px; padding: 20px; border-radius: 20px; background: linear-gradient(180deg, rgba(92,203,138,.1), rgba(92,203,138,.04)); box-shadow: inset 0 0 0 1px rgba(92,203,138,.35); animation: p-rise .45s var(--ease) both; }
.p-secret-top { display: flex; align-items: center; gap: 12px; }
.p-secret-top .ic { width: 38px; height: 38px; padding: 9px; border-radius: 12px; color: #0C2A1A; background: var(--ok); }
.p-secret-creds { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.p-secret-creds div { padding: 12px 14px; border-radius: 14px; background: rgba(2,8,20,.45); box-shadow: inset 0 0 0 1px var(--line-soft); }
.p-secret-creds small { display: block; font: 500 .6rem/1 var(--mono); letter-spacing: .15em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.p-secret code { font: 600 1.15rem/1 var(--mono); letter-spacing: .06em; color: var(--ink); overflow-wrap: anywhere; }

.p-client-card { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 22px; }
.p-client-card h1 { margin: .3rem 0 .4rem; font: 400 clamp(2rem, 4.4vw, 3rem)/1 var(--serif); }
.p-contacts { display: flex; flex-wrap: wrap; gap: 8px; }
.p-contacts span, .p-contacts a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font-size: .84rem; color: var(--ink-2); background: rgba(4,12,28,.5); box-shadow: inset 0 0 0 1px var(--line-soft); text-decoration: none; }
.p-contacts a:hover { color: var(--brass-hi); box-shadow: inset 0 0 0 1px var(--line); }
.p-contacts .ic { color: var(--brass); }

.p-order-edit { display: grid; gap: 16px; padding: 20px; border-radius: 20px; background: linear-gradient(180deg, rgba(15,34,71,.8), rgba(10,26,56,.8)); box-shadow: var(--shadow); }
.p-order-edit-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.p-order-edit-head h3 { font: 400 1.35rem/1.2 var(--serif); margin: 0; display: flex; align-items: center; gap: 10px; }
.p-order-edit-head .n { font: 500 .66rem/1 var(--mono); letter-spacing: .14em; color: var(--brass); padding: 5px 9px; border-radius: 999px; background: rgba(216,168,72,.12); }
.p-stage-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.p-stage-pick button { appearance: none; border: 0; cursor: pointer; display: grid; justify-items: center; gap: 6px; padding: 12px 6px; border-radius: 14px; font-size: .78rem; color: var(--ink-3);
  background: rgba(2,8,20,.4); box-shadow: inset 0 0 0 1px var(--line-soft); transition: all .2s; }
.p-stage-pick button .ic { width: 20px; height: 20px; }
.p-stage-pick button:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.p-stage-pick button.done { color: var(--brass-hi); background: rgba(216,168,72,.08); }
.p-stage-pick button[aria-pressed="true"] { color: #fff; background: linear-gradient(135deg, #FF7A35, var(--orange) 60%, #D44400); box-shadow: 0 10px 24px -12px rgba(252,84,0,.9); }
.p-stage-pick button[aria-pressed="true"].last { background: linear-gradient(135deg, #7BDDA2, #3FAF70); }
.p-savebar { position: sticky; bottom: 14px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; padding: 12px 14px 12px 20px; border-radius: 20px;
  background: rgba(8,20,44,.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 0 0 1px var(--line), 0 24px 50px -20px rgba(0,0,0,.9); }
.p-danger { box-shadow: inset 0 0 0 1px rgba(255,180,138,.22), 0 30px 70px -40px rgba(0,0,0,.85); background: linear-gradient(180deg, rgba(60,24,18,.35), rgba(10,26,56,.75)); }
.p-flex { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.p-between { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.p-back { display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 960px) {
  .p-login { grid-template-columns: 1fr; min-height: 0; }
  .p-visual { min-height: 0; padding-top: 140px; padding-bottom: 34px; gap: 14px; }
  .p-visual::before { background: linear-gradient(180deg, rgba(4,12,28,.2) 0%, rgba(4,12,28,.65) 55%, var(--bg) 100%); }
  .p-visual h2 { font-size: clamp(2.3rem, 9vw, 3.2rem); }
  .p-points, .p-mini-route { display: none; }
  .p-login-side { padding: 0 20px 56px; place-items: start center; }
  .p-stats { grid-template-columns: repeat(2, 1fr); }
  .p-client, .p-client-head { grid-template-columns: auto minmax(0, 1fr) auto auto auto; }
  .p-client .c-user, .p-client .c-seen, .p-client-head .c-user, .p-client-head .c-seen { display: none; }
}
@media (max-width: 640px) {
  .p-top .p-wrap { padding-top: 10px; padding-bottom: 10px; }
  .p-logo { width: 124px; }
  .p-who-name, .p-top-right > .p-label { display: none; }
  .p-home { padding: 8px 11px; }
  .p-hero { min-height: 200px; border-radius: 22px; }
  .p-hero .p-date { display: none; }
  .p-stat { padding: 14px; }
  .p-stat b { font-size: 1.7rem; margin-top: 10px; }
  .p-stat b.sm { font-size: 1.15rem; }
  .p-tabs { width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-radius: 20px; }
  .p-tabs button { position: relative; flex-direction: column; justify-content: center; gap: 4px; padding: 9px 4px; border-radius: 16px; font-size: .74rem; }
  .p-tabs button .ic { width: 18px; height: 18px; }
  .p-count { position: absolute; top: 5px; left: calc(50% + 8px); min-width: 17px; padding: 1px 4px; font-size: .6rem; }
  .p-order-top { flex-direction: column; }
  .p-eta { text-align: left; }
  .p-route { padding-left: 6px; padding-right: 6px; }
  .p-route::before { left: 10%; right: 10%; } .p-route::after { left: 10%; width: calc(80% * var(--done, 0)); }
  .p-route .node { width: 36px; height: 36px; }
  .p-route::before, .p-route::after { top: 17px; }
  .p-route .node .ic { width: 16px; height: 16px; }
  .p-route li { font-size: .66rem; gap: 8px; }
  .p-order-body { grid-template-columns: 1fr; }
  .p-file { grid-template-columns: auto 1fr; }
  .p-file-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .p-client, .p-client-head { grid-template-columns: auto minmax(0, 1fr) auto; }
  .p-client .c-ord, .p-client .c-files, .p-client-head .c-ord, .p-client-head .c-files { display: none; }
  .p-client-head { display: none; }
  .p-stage-pick { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .p-stage-pick button { font-size: .62rem; padding: 10px 2px; }
  .p-savebar { bottom: 8px; padding: 12px; }
  .p-savebar .p-btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .p-visual img.bg { transform: none; }
}
