/* ==========================================================================
   P.M. Offset Printers · Order Tracking
   Design: calm, minimal surfaces with CMYK as the accent language.
   Type: Cinzel (logo only) · Cormorant Garamond (large titles) · Jost (everything else)
   ========================================================================== */

:root {
  /* Brand */
  --crimson: #8B0000;
  --crimson-hover: #a1100f;
  --crimson-press: #6f0000;
  --crimson-tint: rgba(139, 0, 0, .07);
  --crimson-ring: rgba(139, 0, 0, .18);

  /* Process inks */
  --cyan: #00b4d8;
  --magenta: #e040fb;
  --yellow: #fdd835;
  --key: #111111;
  --cyan-tint: rgba(0, 180, 216, .10);
  --magenta-tint: rgba(224, 64, 251, .10);
  --yellow-tint: rgba(253, 216, 53, .20);
  --key-tint: rgba(17, 17, 17, .06);
  --grad-cmyk: linear-gradient(90deg, var(--cyan) 0%, var(--magenta) 36%, var(--yellow) 70%, var(--key) 100%);

  /* Neutrals */
  --bg: #fbfbfd;
  --surface: #ffffff;
  --fill: #f5f5f7;
  --fill-2: #ececf0;
  --fill-3: #e1e1e6;
  --hairline: rgba(0, 0, 0, .08);
  --hairline-2: rgba(0, 0, 0, .12);
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #8e8e93;

  /* Status */
  --ok: #1f8a4c;
  --ok-tint: rgba(31, 138, 76, .10);
  --warn: #b25e00;
  --warn-tint: rgba(255, 159, 10, .14);
  --danger: #d0302f;
  --danger-tint: rgba(208, 48, 47, .09);

  /* Legacy aliases (used by a few inline styles) */
  --line: var(--hairline);
  --line-strong: var(--hairline-2);
  --muted: var(--text-2);
  --parchment: var(--fill);
  --gold: var(--text-3);

  /* Type */
  --f-logo: 'Jost', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --f-head: 'Cormorant Garamond', Georgia, serif;
  --f-body: 'Jost', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;

  /* Shape & depth */
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --pill: 980px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-2: 0 1px 2px rgba(0, 0, 0, .03), 0 6px 20px rgba(0, 0, 0, .05);
  --shadow-3: 0 2px 6px rgba(0, 0, 0, .04), 0 24px 60px rgba(0, 0, 0, .09);
  --shadow-modal: 0 30px 90px rgba(0, 0, 0, .22);
  --ease: cubic-bezier(.25, .8, .25, 1);

  --max: 1120px;
  --nav-h: 60px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  letter-spacing: .005em;
}

img, svg { max-width: 100%; }
a { color: var(--crimson); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
::selection { background: rgba(0, 180, 216, .22); }

h1, h2, h3, h4, h5 { margin: 0 0 .4em; color: var(--text); font-weight: 500; line-height: 1.12; }
h1, h2 { font-family: var(--f-head); font-weight: 500; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); }
h3 { font-family: var(--f-body); font-size: 1.2rem; font-weight: 500; letter-spacing: -.005em; }
h4 { font-family: var(--f-body); font-size: 1.06rem; font-weight: 500; }
p { margin: 0 0 1em; }

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.muted { color: var(--text-2); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.center { text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: .55rem;
  letter-spacing: .01em;
}
.lede { color: var(--text-2); font-size: 1.08rem; max-width: 520px; }
.page-intro.center .lede { margin-left: auto; margin-right: auto; }

:focus-visible { outline: 3px solid var(--crimson-ring); outline-offset: 2px; border-radius: 6px; }

/* ==========================================================================
   Navigation
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 251, 253, .78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.nav {
  max-width: var(--max); margin: 0 auto; height: var(--nav-h); padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--text); text-align: left;
}
.brand-mark { width: 30px; height: 30px; flex: 0 0 30px; display: block; }
.logo-mark { width: 100%; height: 100%; display: block; isolation: isolate; overflow: visible; }
.logo-mark circle { mix-blend-mode: multiply; transition: transform .6s var(--ease); transform-origin: 20px 20px; }
.logo-mark .ink-c { fill: var(--cyan); }
.logo-mark .ink-m { fill: var(--magenta); }
.logo-mark .ink-y { fill: var(--yellow); }
.brand:hover .logo-mark .ink-c { transform: translate(-1.5px, -1px); }
.brand:hover .logo-mark .ink-m { transform: translate(1.5px, -1px); }
.brand:hover .logo-mark .ink-y { transform: translate(0, 1.6px); }

.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-name {
  font-family: var(--f-logo); font-weight: 500; font-size: 1.12rem;
  letter-spacing: -.01em; color: var(--text); white-space: nowrap;
}
.brand-sub { font-size: .72rem; color: var(--text-2); margin-top: 2px; letter-spacing: .02em; white-space: nowrap; }

.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-user { display: flex; align-items: center; gap: 12px; }
.nav-user .who { text-align: right; line-height: 1.2; }
.nav-user .who strong { display: block; font-weight: 500; font-size: .9rem; }
.role-pill { font-size: .72rem; color: var(--text-2); }

/* CMYK strip */
.cmyk-strip { display: flex; height: 3px; }
.cmyk-strip span { flex: 1; position: relative; transition: flex .5s var(--ease), transform .6s var(--ease); }
.cmyk-strip .c { background: var(--cyan); }
.cmyk-strip .m { background: var(--magenta); }
.cmyk-strip .y { background: var(--yellow); }
.cmyk-strip .k { background: var(--key); }
body.on-landing .cmyk-strip span { cursor: pointer; }
body.on-landing .cmyk-strip span:hover { flex: 1.25; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  --b-bg: var(--crimson); --b-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  font-family: var(--f-body); font-size: .95rem; font-weight: 500; line-height: 1;
  letter-spacing: .005em;
  padding: .78em 1.35em; min-height: 42px;
  border: 0; border-radius: var(--pill);
  background: var(--b-bg); color: var(--b-fg);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .12s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { --b-bg: var(--crimson-hover); text-decoration: none; }
.btn:active { transform: scale(.98); --b-bg: var(--crimson-press); }
.btn[disabled], .btn.is-loading { opacity: .55; cursor: default; }
.btn.is-loading { position: relative; color: transparent !important; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn-secondary, .btn-ghost, .btn-outline { --b-bg: var(--fill); --b-fg: var(--text); }
.btn-secondary:hover, .btn-ghost:hover, .btn-outline:hover { --b-bg: var(--fill-2); }
.btn-secondary:active, .btn-ghost:active, .btn-outline:active { --b-bg: var(--fill-3); }
.btn-secondary.is-loading::after, .btn-ghost.is-loading::after, .btn-outline.is-loading::after, .btn-danger.is-loading::after { border-color: var(--fill-3); border-top-color: var(--text-2); }
.btn-dark { --b-bg: var(--text); }
.btn-dark:hover { --b-bg: #000; }
.btn-dark:active { --b-bg: #000; }
.btn-danger { --b-bg: var(--danger-tint); --b-fg: var(--danger); }
.btn-danger:hover { --b-bg: var(--danger); --b-fg: #fff; }
.btn-lg { font-size: 1.02rem; min-height: 50px; padding: .9em 1.6em; }
.btn-sm { font-size: .86rem; min-height: 34px; padding: .55em 1.05em; }
.btn-xs { font-size: .8rem; min-height: 28px; padding: .4em .85em; }
.btn-block { width: 100%; }

.link-btn {
  background: none; border: 0; padding: 0; font: inherit; font-size: .9rem;
  color: var(--crimson); cursor: pointer;
}
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-btn.danger { color: var(--danger); }
.link-btn.muted { color: var(--text-2); }

.icon-btn {
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-grid; place-items: center;
  border: 0; background: var(--fill); color: var(--text-2);
  cursor: pointer; font-size: 1rem; line-height: 1; transition: background .2s, color .2s;
}
.icon-btn:hover { background: var(--fill-2); color: var(--text); }

/* ==========================================================================
   Forms
   ========================================================================== */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; min-width: 0; }
.field > label, .field-label { font-size: .84rem; font-weight: 500; color: var(--text); }
.field .req { color: var(--crimson); margin-left: 1px; }
.optional { font-weight: 400; color: var(--text-3); margin-left: 4px; font-size: .8rem; }
.hint { font-size: .8rem; color: var(--text-2); }

input[type=text], input[type=password], input[type=email], input[type=tel],
input[type=date], input[type=number], input[type=search], select, textarea {
  font-family: var(--f-body); font-size: 1rem; color: var(--text);
  background: var(--fill);
  border: 1px solid transparent; border-radius: var(--r-sm);
  padding: .72em .95em; width: 100%; min-width: 0; min-height: 44px;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
  appearance: none; -webkit-appearance: none;
}
input:hover, select:hover, textarea:hover { background: var(--fill-2); }
input:focus, select:focus, textarea:focus {
  outline: none; background: var(--surface);
  border-color: var(--crimson); box-shadow: 0 0 0 4px var(--crimson-ring);
}
input[readonly] { color: var(--text-2); background: var(--fill); box-shadow: none; border-color: transparent; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236e6e73' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1em center; padding-right: 2.4em; cursor: pointer;
}
textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; }
.upper { text-transform: uppercase; }
.upper::placeholder { text-transform: none; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-section-title {
  grid-column: 1 / -1; font-family: var(--f-body); font-size: 1rem; font-weight: 500;
  margin: 10px 0 12px; padding-top: 18px; border-top: 1px solid var(--hairline);
}

/* Chip checkboxes */
.check-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.check {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  font-size: .9rem; color: var(--text);
  background: var(--fill); border-radius: var(--pill);
  padding: .5em 1em .5em .8em; cursor: pointer; user-select: none;
  transition: background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.check:hover { background: var(--fill-2); }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box {
  width: 16px; height: 16px; flex: 0 0 16px; border-radius: 5px;
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--hairline-2);
  display: grid; place-items: center; transition: all .2s var(--ease);
}
.check input:checked ~ .box { background: var(--crimson); box-shadow: none; }
.check input:checked ~ .box::after {
  content: ""; width: 8px; height: 4.5px; border: 2px solid #fff; border-top: 0; border-right: 0;
  transform: rotate(-45deg) translate(1px, -1px);
}
.check:has(input:checked) { background: var(--crimson-tint); color: var(--crimson); }
.check input:focus-visible ~ .box { outline: 3px solid var(--crimson-ring); outline-offset: 2px; }
.other-input { margin-top: 8px; }

.form-error, .form-success {
  border-radius: var(--r-sm); padding: .7em .95em; font-size: .9rem; margin-bottom: 14px;
}
.form-error { background: var(--danger-tint); color: var(--danger); }
.form-success { background: var(--ok-tint); color: var(--ok); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* Client picker */
.client-picker { background: var(--fill); border-radius: var(--r-sm); padding: 6px; }
.client-picker .picked { display: flex; flex-wrap: wrap; gap: 6px; }
.client-picker .picked:not(:empty) { padding: 4px 4px 8px; }
.client-picker select { background-color: var(--surface); }

/* Contacts */
.contact-row {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 8px; align-items: center;
  margin-bottom: 8px; padding: 8px; background: var(--fill); border-radius: var(--r);
}
.contact-row input { background: var(--surface); min-height: 40px; font-size: .92rem; padding: .6em .8em; }

/* Job blocks (New PO form) */
.job-block { background: var(--fill); border-radius: var(--r-lg); padding: 16px 18px 4px; margin-bottom: 12px; position: relative; }
.job-block::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 3px; background: var(--grad-cmyk); background-size: 100% 400%; }
.job-block:nth-child(4n+1)::before { background: var(--cyan); }
.job-block:nth-child(4n+2)::before { background: var(--magenta); }
.job-block:nth-child(4n+3)::before { background: var(--yellow); }
.job-block:nth-child(4n+4)::before { background: var(--key); }
.job-block-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.job-block-title { font-weight: 500; font-size: .95rem; }
.job-block input, .job-block select, .job-block textarea { background-color: var(--surface); }
.job-block .check { background: var(--surface); }
.job-block .check:has(input:checked) { background: var(--crimson-tint); }
.job-block .field > label { display: flex; flex-direction: column; gap: 7px; }

/* ==========================================================================
   Layout
   ========================================================================== */
main { flex: 1; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 900px; }
.section { padding: 40px 0 80px; }
.section.tight-top { padding-top: 28px; }
.view { animation: fadeUp .5s var(--ease); }

.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-2); }
.card-pad-lg { padding: 32px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h2 { margin: 0 0 4px; }
.page-head p { color: var(--text-2); }

.empty {
  text-align: center; padding: 56px 24px; color: var(--text-2);
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1);
}
.empty h4 { color: var(--text); margin-bottom: .3em; font-size: 1.1rem; }
.empty .btn { margin-top: 8px; }
.loading-block { text-align: center; padding: 48px; color: var(--text-2); font-size: .92rem; }
.loading-block.boot { padding: 140px 0; }
.spinner {
  width: 26px; height: 26px; margin: 0 auto 12px; border-radius: 50%;
  background: conic-gradient(var(--cyan), var(--magenta), var(--yellow), var(--key), var(--cyan));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  animation: spin .9s linear infinite;
}

/* CMYK ambient orbs */
.orbs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: drift 22s ease-in-out infinite alternate; }
.orb.oc { width: 460px; height: 460px; background: var(--cyan); left: -120px; top: -140px; opacity: .32; }
.orb.om { width: 420px; height: 420px; background: var(--magenta); right: -120px; top: -60px; opacity: .26; animation-delay: -6s; }
.orb.oy { width: 380px; height: 380px; background: var(--yellow); left: 28%; top: 240px; opacity: .34; animation-delay: -11s; }
.orb.ok { width: 260px; height: 260px; background: #6b6b6b; right: 18%; top: 420px; opacity: .10; animation-delay: -3s; }
.orbs.soft .orb { opacity: .22; filter: blur(80px); }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(40px, 30px) scale(1.08); } }

/* ==========================================================================
   Landing
   ========================================================================== */
.hero { position: relative; padding: 72px 0 72px; overflow: hidden; }
.hero-inner { position: relative; z-index: 1; max-width: 600px; margin: 0 auto; padding: 0 20px; text-align: center; }
.hero-inner .eyebrow { display: block; }
.hero-title { position: relative; display: inline-block; font-size: clamp(3rem, 7.5vw, 5rem); margin-bottom: .2em; letter-spacing: -.02em; }
.hero-title .plate { position: absolute; inset: 0; opacity: 0; pointer-events: none; mix-blend-mode: multiply; color: transparent; white-space: nowrap; }
.hero-lede { color: var(--text-2); font-size: 1.2rem; margin: 0 auto 40px; }

.track-card {
  position: relative; text-align: left;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-radius: var(--r-xl); box-shadow: var(--shadow-3);
  padding: 36px 36px 32px;
}
.track-card .reg { position: absolute; width: 14px; height: 14px; color: var(--fill-3); transition: color .4s, transform .8s var(--ease); cursor: crosshair; }
.track-card .reg svg { width: 100%; height: 100%; display: block; }
.track-card .reg.tl { top: 14px; left: 14px; }
.track-card .reg.tr { top: 14px; right: 14px; }
.track-card .reg.bl { bottom: 14px; left: 14px; }
.track-card .reg.br { bottom: 14px; right: 14px; }
.track-card .reg:hover { transform: rotate(90deg); color: var(--text-3); }

.option-title { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.option-title h3 { margin: 0; font-size: 1.15rem; }
.option-title .num {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: .75rem; font-weight: 600; color: #fff;
}
.option-title .num.c { background: var(--cyan); }
.option-title .num.m { background: var(--magenta); }
.option-sub { font-size: .92rem; color: var(--text-2); margin: 0 0 16px 32px; }
#po-search-form .form-error, #client-login-form .form-error { margin-left: 32px; }

.search-pill {
  display: flex; align-items: center; gap: 6px;
  background: var(--fill); border-radius: var(--pill); padding: 5px 5px 5px 18px;
  border: 1px solid transparent; transition: all .2s var(--ease);
}
.search-pill:focus-within { background: var(--surface); border-color: var(--crimson); box-shadow: 0 0 0 4px var(--crimson-ring); }
.search-pill .search-ico { width: 18px; height: 18px; color: var(--text-3); flex: 0 0 18px; }
.search-pill input { background: transparent !important; border: 0 !important; box-shadow: none !important; font-size: 1.08rem; padding: .55em .4em; min-height: 46px; }
.search-pill .btn { min-height: 46px; padding: 0 1.6em; }

.or-divider { display: flex; align-items: center; gap: 14px; margin: 28px 0 24px; color: var(--text-3); }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }
.or-divider span {
  font-size: .85rem; cursor: default; transition: color .3s;
  background-clip: text; -webkit-background-clip: text;
}
.or-divider span:hover { color: transparent; background-image: var(--grad-cmyk); }
#client-login-form .form-grid, #client-login-form > .btn { margin-left: 32px; width: calc(100% - 32px); }

.hero-foot { margin-top: 24px; font-size: .88rem; color: var(--text-2); }

.features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  max-width: var(--max); margin: 0 auto; padding: 8px 24px 96px;
}
.feature { background: var(--surface); border-radius: var(--r-lg); padding: 26px 26px 24px; box-shadow: var(--shadow-1); }
.feature .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px; }
.feature .ico svg { width: 20px; height: 20px; }
.feature .ico.c { background: var(--cyan-tint); color: #0089a6; }
.feature .ico.m { background: var(--magenta-tint); color: #b31fcf; }
.feature .ico.y { background: var(--yellow-tint); color: #9a7b00; }
.feature h4 { margin-bottom: .3em; }
.feature p { font-size: .92rem; color: var(--text-2); margin: 0; }

/* Setup */
.setup-wrap { max-width: 520px; margin: 0 auto; padding: 64px 20px 88px; }
.page-intro { margin-bottom: 28px; }
.page-intro h1 { font-size: clamp(2.2rem, 5vw, 3rem); }

/* ==========================================================================
   PO / tracking display
   ========================================================================== */
.back-link {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 20px;
  font-family: var(--f-body); font-size: .92rem; color: var(--crimson);
  background: none; border: 0; padding: 0; cursor: pointer;
}
.back-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.po-sheet { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-2); overflow: hidden; }
.po-hero {
  position: relative; overflow: hidden;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap;
  padding: 36px 36px 30px;
}
.po-hero > *:not(.orbs) { position: relative; z-index: 1; }
.po-hero h2 { margin: 0; font-family: var(--f-body); font-weight: 600; font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -.02em; }
.po-number { font-family: var(--f-body); font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.meta-list { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 18px 0 0; }
.meta dt, .meta .k { font-size: .78rem; color: var(--text-2); display: block; margin-bottom: 2px; }
.meta dd, .meta .v { margin: 0; font-size: .98rem; font-weight: 500; }

.summary-ring { display: flex; align-items: center; gap: 14px; }
.summary-ring .ring { width: 76px; height: 76px; }
.summary-ring .ring circle { fill: none; stroke-width: 6; }
.summary-ring .ring .bg { stroke: var(--fill-2); }
.summary-ring .ring .fg { stroke-linecap: round; transition: stroke-dashoffset 1.2s var(--ease); }
.summary-ring .label { font-size: .85rem; color: var(--text-2); line-height: 1.35; }
.summary-ring .label strong { display: block; font-size: 1.7rem; font-weight: 600; color: var(--text); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.jobs-list { padding: 0 20px 20px; }

/* Job */
.job { background: var(--surface); border-radius: var(--r-lg); padding: 22px 22px 18px; margin-top: 12px; box-shadow: inset 0 0 0 1px var(--hairline); }
.jobs-list .job, .po-detail .job { background: var(--surface); }
.job-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.job-title { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.job-title h4 { margin: 0; font-size: 1.2rem; font-weight: 500; letter-spacing: -.01em; }
.job-index { font-size: .86rem; color: var(--text-2); }
.job-head .small.muted { margin-top: 2px; }
.job-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.job-body { padding: 0; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 500; padding: 4px 10px; border-radius: var(--pill); white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.no-dot::before { display: none; }
.badge-ok { color: var(--ok); background: var(--ok-tint); }
.badge-warn { color: var(--warn); background: var(--warn-tint); }
.badge-crimson { color: var(--text); background: var(--fill); }
.badge-muted { color: var(--text-2); background: var(--fill); }
.badge-dark { color: #fff; background: var(--text); }
.badge-md { color: var(--crimson); background: var(--crimson-tint); }

.code-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .76rem; font-weight: 600; letter-spacing: .06em;
  padding: 3px 9px; border-radius: 6px; background: var(--fill); color: var(--text);
}
.code-chip.lg { font-size: .85rem; padding: 5px 12px; background: rgba(255, 255, 255, .7); }
.code-chip button { border: 0; background: none; padding: 0; cursor: pointer; color: var(--text-3); font-size: 1rem; line-height: 1; }
.code-chip button:hover { color: var(--crimson); }
.client-picker .code-chip { background: var(--surface); box-shadow: var(--shadow-1); }

.delay-banner {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--warn-tint); color: #8a4a00;
  padding: 10px 14px; border-radius: var(--r-sm); font-size: .92rem; margin: 10px 0 4px;
}
.delay-banner strong { font-weight: 500; }

/* Pipeline — each stage carries its own ink along the C→M→Y→K spectrum (set inline as --ink) */
.pipeline {
  list-style: none; margin: 20px 0 22px; padding: 0;
  display: grid; grid-template-columns: repeat(6, 1fr);
}
.pipeline li { position: relative; text-align: center; padding: 0 4px; font-size: .8rem; line-height: 1.3; color: var(--text-3); --ink: var(--text); --prev: var(--text); }
.pipeline li::before {
  content: ""; position: absolute; top: 13px; left: calc(-50% + 16px); right: calc(50% + 16px); height: 3px; border-radius: 3px;
  background: var(--fill-2);
}
.pipeline li:first-child::before { display: none; }
.pipeline li.done::before, .pipeline li.current::before { background: linear-gradient(90deg, var(--prev), var(--ink)); }
.pipeline .dot {
  position: relative; z-index: 1; width: 28px; height: 28px; margin: 0 auto 10px; border-radius: 50%;
  display: grid; place-items: center; font-size: .78rem; font-weight: 600;
  background: var(--fill); color: var(--text-3);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.pipeline .dot svg { width: 13px; height: 13px; }
.pipeline li.done .dot { background: var(--ink); color: var(--on-ink, #fff); }
.pipeline li.current .dot { background: var(--surface); color: var(--text); box-shadow: 0 0 0 3px var(--ink), 0 0 0 7px color-mix(in srgb, var(--ink) 18%, transparent); }
.pipeline li.current.final .dot { background: var(--ink); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 16%, transparent); }
.pipeline li.current.delayed .dot { box-shadow: 0 0 0 3px #ff9f0a, 0 0 0 7px rgba(255, 159, 10, .2); }
.pipeline .name { display: block; color: var(--text-2); }
.pipeline li.done .name { color: var(--text); }
.pipeline li.current .name { color: var(--text); font-weight: 500; }
.pipeline li.pending .name { color: var(--text-3); }
.pipeline .when { display: block; font-size: .72rem; color: var(--text-3); margin-top: 3px; font-variant-numeric: tabular-nums; }
.pipeline.editable li { cursor: pointer; }
.pipeline.editable li:hover .dot { transform: scale(1.12); }
.pipeline.editable li:hover .name { color: var(--crimson); }

/* Specs */
.specs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px 20px;
  background: var(--fill); border-radius: var(--r); padding: 16px 18px; margin-bottom: 14px;
}
.spec { min-width: 0; }
.spec .k { display: block; font-size: .76rem; color: var(--text-2); margin-bottom: 2px; }
.spec .v { font-size: .94rem; overflow-wrap: anywhere; }
.spec.wide { grid-column: 1 / -1; }
.yes { color: var(--ok); font-weight: 500; }
.no { color: var(--text-3); }

/* Notes */
.notes { padding-top: 4px; }
.notes-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: .84rem; font-weight: 500; color: var(--text); }
.note-list { list-style: none; margin: 0; padding: 0; }
.note { position: relative; padding: 8px 0 8px 18px; font-size: .92rem; }
.note::before { content: ""; position: absolute; left: 3px; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--fill-3); }
.note:first-child::before { background: var(--magenta); }
.note + .note { border-top: 1px solid var(--hairline); }
.note .note-meta { font-size: .78rem; color: var(--text-2); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.note .note-text { color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.note-empty { font-size: .88rem; color: var(--text-3); margin: 0; }
.note-form { display: flex; gap: 8px; margin-top: 10px; }
.note-form input { min-height: 38px; font-size: .92rem; padding: .5em .9em; border-radius: var(--pill); }

/* Completed */
.completed-card { text-align: center; padding: 64px 28px; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-2); position: relative; overflow: hidden; }
.completed-card > *:not(.orbs) { position: relative; }
.seal {
  width: 76px; height: 76px; margin: 0 auto 20px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: conic-gradient(from 200deg, var(--cyan), var(--magenta), var(--yellow), var(--cyan));
}
.seal svg { width: 32px; height: 32px; }
.seal.muted-seal { background: var(--fill); color: var(--text-2); }
.completed-card h2 { font-family: var(--f-head); }

/* ==========================================================================
   Client dashboard
   ========================================================================== */
.client-banner { position: relative; overflow: hidden; background: var(--bg); }
.client-banner .container { position: relative; z-index: 1; padding-top: 48px; padding-bottom: 36px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.client-banner h1 { margin: 0 0 12px; }
.client-stats { display: flex; gap: 12px; }
.client-stats .stat { background: rgba(255, 255, 255, .8); backdrop-filter: blur(10px); border-radius: var(--r); padding: 12px 18px; min-width: 104px; box-shadow: var(--shadow-1); }
.client-stats .stat strong { display: block; font-size: 1.6rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.client-stats .stat span { font-size: .8rem; color: var(--text-2); }
.client-stats .stat:nth-child(1) strong { color: #0089a6; }
.client-stats .stat:nth-child(2) strong { color: #b31fcf; }
.client-stats .stat:nth-child(3) strong { color: var(--warn); }

/* Toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.toolbar .field { margin: 0; flex: 1 1 150px; }
.toolbar .field.grow { flex: 3 1 260px; }
.toolbar .field > label { font-size: .78rem; color: var(--text-2); font-weight: 400; }
.toolbar input, .toolbar select { background-color: var(--surface); box-shadow: var(--shadow-1); height: 40px; min-height: 40px; font-size: .92rem; padding-top: .55em; padding-bottom: .55em; }
.toolbar input:hover, .toolbar select:hover { background-color: var(--surface); }
.toolbar .tb-actions { display: flex; gap: 8px; margin-left: auto; }
.toolbar .tb-actions .btn { min-height: 40px; }
.toolbar .check { background: var(--surface); box-shadow: var(--shadow-1); min-height: 40px; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 13px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-icon input { padding-left: 38px; }
.result-count { font-size: .84rem; color: var(--text-2); margin: 0 0 12px; }

/* PO accordion */
.po-card { background: var(--surface); border-radius: var(--r-lg); margin-bottom: 12px; box-shadow: var(--shadow-1); transition: box-shadow .3s var(--ease); }
.po-card:hover { box-shadow: var(--shadow-2); }
.po-card.open { box-shadow: var(--shadow-2); }
.po-summary {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.3fr) minmax(0, .9fr) 170px;
  gap: 20px; align-items: center; padding: 18px 22px; cursor: pointer; user-select: none; border-radius: var(--r-lg);
}
.po-summary:focus-visible { outline-offset: -3px; }
.po-id { display: flex; flex-direction: column; min-width: 0; }
.po-id .po-number { font-size: 1.12rem; line-height: 1.25; overflow-wrap: anywhere; }
.po-id .cust { font-size: .9rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.po-id .codes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.po-progress { min-width: 0; }
.po-progress .bar { position: relative; height: 6px; border-radius: 6px; overflow: hidden; background: var(--grad-cmyk); }
.po-progress .bar span { position: absolute; right: 0; top: 0; bottom: 0; background: var(--fill-2); transition: width .8s var(--ease); }
.po-progress .lbl { font-size: .8rem; color: var(--text-2); margin-top: 7px; display: flex; justify-content: space-between; gap: 8px; font-variant-numeric: tabular-nums; }
.po-dates { font-size: .86rem; color: var(--text); line-height: 1.6; font-variant-numeric: tabular-nums; }
.po-dates .k { color: var(--text-2); margin-right: 6px; }
.po-flags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.chev { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); background: var(--fill); transition: transform .35s var(--ease), background .2s; }
.po-card.open .chev { transform: rotate(180deg); }
.po-detail { padding: 0 22px 22px; }
.po-detail .job { margin-top: 12px; }
.po-toolbar { display: flex; flex-wrap: wrap; gap: 12px 16px; justify-content: space-between; align-items: center; padding: 16px 0 6px; border-top: 1px solid var(--hairline); }
.po-toolbar .grp { display: flex; flex-wrap: wrap; gap: 8px; }
.po-toolbar .meta-list { margin: 0; }

/* Archived jobs (staff only) */
.archived-jobs { margin-top: 16px; }
.archived-jobs summary { cursor: pointer; font-size: .88rem; color: var(--text-2); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.archived-jobs summary::-webkit-details-marker { display: none; }
.archived-jobs summary::before { content: "›"; display: inline-block; transition: transform .2s; font-size: 1.1rem; line-height: 1; }
.archived-jobs[open] summary::before { transform: rotate(90deg); }
.archived-job { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; background: var(--fill); border-radius: var(--r); margin-top: 8px; }
.archived-job .nm { font-weight: 500; }
.archived-job .dt { font-size: .8rem; color: var(--text-2); }

/* ==========================================================================
   Admin
   ========================================================================== */
.admin-head { position: relative; }
.admin-head .container { padding-top: 40px; padding-bottom: 8px; }
.admin-head h1 { margin: 0 0 22px; font-size: clamp(2.2rem, 4.6vw, 3rem); }

/* Segmented control */
.tabs {
  display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--fill-2);
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  font-family: var(--f-body); font-size: .9rem; font-weight: 500;
  padding: 8px 16px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2);
  cursor: pointer; white-space: nowrap; transition: background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .1), 0 1px 1px rgba(0, 0, 0, .04); }
.tab .count { margin-left: 6px; font-size: .78rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tab.active .count { color: var(--crimson); }
.admin-body { padding: 24px 0 88px; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat-card { background: var(--surface); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-1); position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; right: -24px; top: -24px; width: 80px; height: 80px; border-radius: 50%; opacity: .16; }
.stat-card:nth-child(1)::after { background: var(--cyan); }
.stat-card:nth-child(2)::after { background: var(--magenta); }
.stat-card:nth-child(3)::after { background: var(--yellow); opacity: .35; }
.stat-card:nth-child(4)::after { background: var(--key); opacity: .08; }
.stat-card strong { display: block; font-size: 2rem; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-card span { font-size: .84rem; color: var(--text-2); }

/* Tables → grouped lists */
.table-wrap { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th {
  text-align: left; font-weight: 500; font-size: .78rem; color: var(--text-2);
  padding: 14px 18px 10px; border-bottom: 1px solid var(--hairline); white-space: nowrap;
}
table.data td { padding: 14px 18px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background .15s; }
table.data tbody tr:hover td { background: #fcfcfd; }
table.data .actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
table.data tr.md-only td:first-child { box-shadow: inset 3px 0 0 var(--crimson); }
.action-tag { font-size: .78rem; font-weight: 500; padding: 3px 9px; border-radius: 6px; background: var(--fill); color: var(--text); white-space: nowrap; }
.action-tag.del { background: var(--danger-tint); color: var(--danger); }
.action-tag.create { background: var(--cyan-tint); color: #007a94; }
.action-tag.warn { background: var(--yellow-tint); color: #7d6200; }
.action-tag.archive { background: var(--magenta-tint); color: #a01cba; }

.contact-mini { font-size: .88rem; line-height: 1.45; }
.contact-mini + .contact-mini { margin-top: 8px; }
.contact-mini .d { color: var(--text-2); font-size: .82rem; }
.role-select { width: auto; min-width: 140px; min-height: 34px; font-size: .88rem; padding: .4em 2.2em .4em .8em; }

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, .32);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 8vh 16px 24px; overflow-y: auto; animation: fadeIn .2s ease;
}
.modal {
  width: 100%; max-width: 440px; background: var(--surface);
  border-radius: var(--r-xl); box-shadow: var(--shadow-modal); position: relative;
  animation: modalIn .35s var(--ease);
}
.modal.wide { max-width: 760px; }
.modal-head { padding: 30px 32px 4px; }
.modal-head .eyebrow { margin-bottom: 4px; }
.modal-head h3 { margin: 0; font-family: var(--f-body); font-size: 1.45rem; font-weight: 600; letter-spacing: -.02em; }
.modal-head p { margin: 6px 0 0; color: var(--text-2); font-size: .94rem; }
.modal-body { padding: 20px 32px 28px; }
.modal-close { position: absolute; top: 16px; right: 16px; }
.modal-foot { padding: 0 32px 28px; display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.modal-alt { text-align: center; margin: 16px 0 0; }
.question { font-size: 1.05rem; margin: 0; padding: 12px 14px; background: var(--fill); border-radius: var(--r-sm); }

/* ==========================================================================
   Toasts
   ========================================================================== */
.toasts {
  position: fixed; z-index: 200; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px; width: max-content; max-width: calc(100vw - 32px);
}
.toast {
  background: rgba(29, 29, 31, .92); color: #fff; font-size: .92rem;
  padding: 11px 18px; border-radius: var(--pill);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
  display: flex; align-items: center; gap: 10px;
  animation: toastIn .4s var(--ease);
}
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #34c759; flex: 0 0 8px; }
.toast.error::before { background: #ff453a; }
.toast.cmyk::before { width: 10px; height: 10px; flex-basis: 10px; background: conic-gradient(var(--cyan), var(--magenta), var(--yellow), var(--key), var(--cyan)); }
.toast.out { animation: toastOut .3s ease forwards; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: #111113; color: #a1a1a6; font-size: .9rem; margin-top: auto; }
.site-footer .cmyk-strip { height: 3px; }
.footer-grid { max-width: var(--max); margin: 0 auto; padding: 56px 24px 36px; display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; }
.footer-logo { display: flex; align-items: center; gap: 10px; }
.footer-logo .logo-mark { width: 30px; height: 30px; }
.footer-logo .logo-mark circle { mix-blend-mode: screen; }
.footer-logo .brand-name { color: #f5f5f7; font-size: 1.2rem; }
.footer-brand p { margin-top: 14px; max-width: 320px; line-height: 1.65; color: #86868b; }
.site-footer h5 { font-family: var(--f-body); font-size: .8rem; font-weight: 500; color: #f5f5f7; margin: 0 0 12px; letter-spacing: .01em; }
.site-footer h5.mt { margin-top: 20px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; line-height: 2; }
.site-footer a { color: #a1a1a6; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--max); margin: 0 auto; padding: 18px 24px 30px;
  border-top: 1px solid #242427;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: .8rem; color: #6e6e73;
}

/* ==========================================================================
   Easter eggs
   ========================================================================== */
/* 1. Misregistration: click the logo three times */
body.eg-misreg .hero-title, body.eg-misreg .brand-name { animation: misreg 1.6s var(--ease); }
body.eg-misreg .brand-mark .ink-c { transform: translate(-5px, -3px); }
body.eg-misreg .brand-mark .ink-m { transform: translate(5px, -2px); }
body.eg-misreg .brand-mark .ink-y { transform: translate(0, 5px); }
@keyframes misreg {
  0% { text-shadow: none; }
  15% { text-shadow: -6px 2px 0 rgba(0, 180, 216, .75), 5px -3px 0 rgba(224, 64, 251, .7), 3px 5px 0 rgba(253, 216, 53, .85); }
  55% { text-shadow: -3px 1px 0 rgba(0, 180, 216, .6), 2px -2px 0 rgba(224, 64, 251, .55), 1px 3px 0 rgba(253, 216, 53, .7); }
  100% { text-shadow: 0 0 0 transparent; }
}
body.eg-misreg .cmyk-strip span:nth-child(1) { transform: translateX(-4px); }
body.eg-misreg .cmyk-strip span:nth-child(2) { transform: translateX(3px); }
body.eg-misreg .cmyk-strip span:nth-child(3) { transform: translateX(-2px); }

/* 2. Colour separation: type "cmyk" */
body.eg-plates .hero-title .plate { animation: plateSlide 2.4s var(--ease); }
body.eg-plates .hero-title .plate.pc { color: var(--cyan); --dx: -22px; --dy: -8px; }
body.eg-plates .hero-title .plate.pm { color: var(--magenta); --dx: 20px; --dy: -10px; animation-delay: .08s; }
body.eg-plates .hero-title .plate.py { color: var(--yellow); --dx: -16px; --dy: 12px; animation-delay: .16s; }
body.eg-plates .hero-title .plate.pk { color: var(--key); --dx: 16px; --dy: 10px; animation-delay: .24s; }
body.eg-plates .hero-title .ink { animation: inkFade 2.4s ease; }
body.eg-plates .track-card .reg { color: var(--crimson); transform: rotate(360deg); }
@keyframes plateSlide {
  0% { opacity: 0; transform: translate(0, 0); }
  20%, 65% { opacity: .9; transform: translate(var(--dx), var(--dy)); }
  100% { opacity: 0; transform: translate(0, 0); }
}
@keyframes inkFade { 0%, 100% { opacity: 1; } 20%, 65% { opacity: .1; } }

/* 3. Press check: click the strip C → M → Y → K */
.halftone-burst { position: fixed; inset: 0; pointer-events: none; z-index: 150; overflow: hidden; }
.halftone-burst i { position: absolute; border-radius: 50%; mix-blend-mode: multiply; opacity: .85; animation: dotFall var(--t, 2.2s) cubic-bezier(.3, .6, .4, 1) forwards; }
@keyframes dotFall {
  0% { transform: translateY(0) scale(.2); opacity: 0; }
  12% { opacity: .85; transform: translateY(10px) scale(1); }
  100% { transform: translateY(var(--fall, 70vh)) scale(.6); opacity: 0; }
}

/* 4. Registration: click all four corner marks */
.track-card.eg-aligned { box-shadow: var(--shadow-3), 0 0 0 2px var(--cyan), 0 0 0 5px rgba(224, 64, 251, .35), 0 0 0 9px rgba(253, 216, 53, .3); transition: box-shadow .4s; }

/* ==========================================================================
   Motion
   ========================================================================== */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.96); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .po-summary { grid-template-columns: minmax(0, 1fr) auto; }
  .po-summary .po-progress { grid-column: 1 / -1; order: 3; }
  .po-summary .po-dates { display: none; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  :root { --nav-h: 56px; }
  body { font-size: 15.5px; }
  .nav, .container { padding-left: 16px; padding-right: 16px; }
  .brand-sub { display: none; }
  .brand-name { font-size: 1.02rem; }
  .nav-user .who { display: none; }

  .hero { padding: 44px 0 48px; }
  .hero-lede { font-size: 1.05rem; margin-bottom: 28px; }
  .track-card { padding: 28px 20px 24px; border-radius: 24px; }
  .option-sub, #po-search-form .form-error, #client-login-form .form-error { margin-left: 0; }
  #client-login-form .form-grid, #client-login-form > .btn { margin-left: 0; width: 100%; }
  .search-pill { padding-left: 14px; }
  .search-pill .btn { padding: 0 1.2em; }
  .features { grid-template-columns: 1fr; gap: 12px; padding-bottom: 64px; }

  .form-grid { grid-template-columns: 1fr; }
  .contact-row { grid-template-columns: 1fr 1fr; }
  .contact-row .icon-btn { grid-column: 2; justify-self: end; }
  .card-pad-lg { padding: 24px 20px; }

  .po-hero { padding: 26px 20px 22px; }
  .jobs-list { padding: 0 10px 12px; }
  .job { padding: 18px 16px 14px; }
  .po-summary { padding: 16px; gap: 12px; }
  .po-detail { padding: 0 12px 14px; }

  /* Vertical pipeline */
  .pipeline { grid-template-columns: 1fr; margin: 16px 0 18px; }
  .pipeline li { display: grid; grid-template-columns: 28px 1fr; column-gap: 14px; text-align: left; padding: 0 0 16px; align-items: center; }
  .pipeline li::before { top: calc(-100% + 28px + 4px); bottom: auto; left: 12.5px; right: auto; width: 3px; height: calc(100% - 32px); background: var(--fill-2); }
  .pipeline li.done::before, .pipeline li.current::before { background: linear-gradient(180deg, var(--prev), var(--ink)); }
  .pipeline .dot { margin: 0; grid-row: span 2; }
  .pipeline .name { font-size: .92rem; }
  .pipeline .when { margin-top: 0; }
  .pipeline li:last-child { padding-bottom: 0; }

  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; gap: 12px 14px; }

  .toolbar .field { flex: 1 1 calc(50% - 10px); }
  .toolbar .field.grow { flex-basis: 100%; }
  .toolbar .tb-actions { width: 100%; margin-left: 0; }
  .toolbar .tb-actions .btn { flex: 1; }

  .client-banner .container { padding-top: 32px; padding-bottom: 24px; }
  .client-stats { width: 100%; }
  .client-stats .stat { flex: 1; min-width: 0; padding: 10px 12px; }

  .admin-head .container { padding-top: 28px; }
  .admin-head h1 { margin-bottom: 16px; }
  .tabs { display: flex; }
  .tab { padding: 8px 12px; font-size: .86rem; }

  .modal-head { padding: 26px 22px 4px; }
  .modal-body { padding: 18px 22px 24px; }
  .modal-foot { padding: 0 22px 22px; }
  .modal-backdrop { padding-top: 16px; }
  .modal-foot .btn { flex: 1; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; padding-top: 40px; }
  .toasts { bottom: 16px; }

  table.data.stack thead { display: none; }
  table.data.stack, table.data.stack tbody, table.data.stack tr, table.data.stack td { display: block; width: 100%; }
  table.data.stack tr { padding: 12px 0; border-bottom: 1px solid var(--hairline); }
  table.data.stack tr:last-child { border-bottom: 0; }
  table.data.stack td { border: 0; padding: 4px 16px; }
  table.data.stack td[data-label]::before { content: attr(data-label); display: block; font-size: .74rem; color: var(--text-2); }
  table.data.stack .actions { justify-content: flex-start; padding-top: 8px; }
}

@media (max-width: 400px) {
  .brand-name { font-size: .96rem; }
  .stat-row { gap: 8px; }
  .stat-card { padding: 14px 16px; }
}

@media print {
  .site-header, .site-footer, .toolbar, .job-actions, .note-form, .po-toolbar, .back-link, .orbs { display: none !important; }
  body { background: #fff; }
}

.btn-danger-solid { --b-bg: var(--danger); --b-fg: #fff; }
.btn-danger-solid:hover { --b-bg: #b82625; }

.list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0 14px; flex-wrap: wrap; }
.list-head .result-count { margin: 0; }
.list-head .grp { display: flex; gap: 8px; }
.stat-card::after { width: 64px; height: 64px; right: -20px; top: -20px; }

input[type=date] { line-height: 1.2; }
input[type=date]::-webkit-calendar-picker-indicator { opacity: .5; cursor: pointer; }
@media (max-width: 960px) { .po-summary { grid-template-columns: minmax(0, 1fr) auto; } }

/* Section titles inside tabs sit below the big greeting, so keep them quieter */
.tab-panel .page-head h2 { font-family: var(--f-body); font-size: 1.45rem; font-weight: 600; letter-spacing: -.02em; }
.tab-panel .page-head p { font-size: .94rem; }
table.data th.text-right { text-align: right; }

/* Company logo */
.brand-logo { height: 42px; width: auto; display: block; flex: 0 0 auto; }
.footer-logo-img { height: 46px; width: auto; display: block; }
.footer-logo { gap: 12px; }
body.eg-misreg .brand-logo { animation: logoShake 1.4s var(--ease); }
@keyframes logoShake { 0%,100% { transform: none; } 20% { transform: translate(-2px, 1px) rotate(-3deg); } 45% { transform: translate(2px, -1px) rotate(2deg); } 70% { transform: translate(-1px, 0) rotate(-1deg); } }
@media (max-width: 720px) { .brand-logo { height: 34px; } }
