/* Experience layer — loaded after app.css.
   Logo colours: blue #2B3990 · red #E8262D · orange #F58220. Works from 320 px phones to wide desktops, light and dark.
   Motion uses view transitions, @starting-style and scroll-driven animation where the browser has them; everything
   still works without them, and all of it is switched off for people who ask for reduced motion. */

:root {
  --r-lg: 16px; --r-md: 12px; --r-sm: 8px;
  --grad: linear-gradient(100deg, var(--brand) 0%, var(--brand-2) 55%, #5b6bd6 100%);
  --stripe: linear-gradient(90deg, var(--accent) 0 33.4%, var(--orange) 33.4% 66.7%, var(--brand) 66.7% 100%);
  --ring: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent);
  --lift: 0 14px 40px -12px rgba(29, 39, 102, .28);
  --spring: linear(0, .18 4.5%, .62 13%, .95 22%, 1.08 30%, 1.1 36%, 1.05 46%, 1 60%, .99 78%, 1);
}
:root[data-theme="dark"] { --lift: 0 14px 40px -12px rgba(0, 0, 0, .6); --grad: linear-gradient(100deg, #3a4ab8 0%, #5565d8 60%, #7786f0 100%); }

html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body { background: radial-gradient(1100px 520px at 105% -12%, color-mix(in srgb, var(--orange) 9%, transparent), transparent 62%), radial-gradient(900px 480px at -8% 0%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 60%), var(--bg); background-attachment: fixed; }
::selection { background: color-mix(in srgb, var(--orange) 35%, transparent); }

/* ── controls ── */
.btn { border-radius: 10px; transition: transform .18s var(--spring), box-shadow .2s, background-color .15s, filter .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0) scale(.97); }
.btn.primary { background: var(--grad); border-color: transparent; box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--brand) 80%, transparent); }
.btn.big { min-height: 50px; padding: 0 24px; font-size: 16px; border-radius: 14px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=search], input[type=number], input[type=tel], input[type=url], textarea, select { border-radius: 10px; transition: border-color .15s, box-shadow .15s, background-color .15s; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.card, .tablewrap, .docgroup, .fgroup { border-radius: var(--r-md); }
.card { transition: box-shadow .25s, transform .25s var(--ease); }
.field label { letter-spacing: .005em; }

/* ── top bars ── */
.top, .portal-top { backdrop-filter: saturate(1.5) blur(14px); background: color-mix(in srgb, var(--surface) 82%, transparent); }
.portal-top { position: sticky; top: 0; z-index: 30; border-bottom: 0; box-shadow: var(--shadow-sm); }
.portal-top::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--stripe); }
.top::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--stripe); opacity: .85; }
.top { position: sticky; }
.top-acts { flex-wrap: nowrap; gap: 6px; }
.portal-top .in { gap: 10px; }
.portal-top .user-chip { max-width: 170px; } .portal-top .user-chip b, .portal-top .user-chip small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.side { background: linear-gradient(180deg, #27338a 0%, #1a2260 70%, #141a4d 100%); }
.nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--orange), 0 6px 18px -10px rgba(0, 0, 0, .5); }
.nav a:hover { transform: translateX(2px); }

/* ── tabs, badges, tables ── */
.tab { border-radius: 10px 10px 0 0; position: relative; }
.tab[aria-selected="true"] { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 9%, transparent), transparent); }
.tab .count, b .count { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--tint); color: var(--brand); font-size: 11.5px; font-weight: 700; }
.badge { padding: 3px 10px; letter-spacing: .01em; }
.badge::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; opacity: .8; }
.data tbody tr { transition: background-color .12s; }
.data tr.clickable:hover { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.data td.tick, .data th.tick { width: 34px; padding-right: 0; }
.data tr.picked-row { background: color-mix(in srgb, var(--orange) 11%, transparent); }
.thumb-btn { border: 0; background: var(--tint); border-radius: 8px; width: 32px; height: 32px; cursor: pointer; font-size: 15px; }

/* ── bulk action bar ── */
.bulkbar { position: sticky; top: 64px; z-index: 15; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; padding: 10px 14px; border-radius: var(--r-md); color: #fff; background: var(--grad); box-shadow: var(--lift); animation: drop .32s var(--spring); }
.bulkbar[hidden] { display: none; }
.bulkbar b { margin-right: auto; }
.bulkbar .btn { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .35); color: #fff; box-shadow: none; }
.bulkbar .btn:hover { background: rgba(255, 255, 255, .28); }
.bulkbar .btn.danger { background: #fff; color: var(--bad-ink); border-color: #fff; }
.bulkbar .link { color: #fff; }

/* ── map link, place pairs ── */
.place-pair { display: grid; gap: 8px; }
.mapfield { display: grid; gap: 6px; padding: 8px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--surface-2); transition: border-color .2s, background-color .2s; }
.mapfield.has-link { border-style: solid; border-color: color-mix(in srgb, var(--ok-ink) 45%, var(--line)); background: color-mix(in srgb, var(--ok-bg) 45%, var(--surface)); }
.mapfield.bad-link { border-color: var(--bad-ink); }
.mapfield-in { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px; }
.mapfield-pin { font-size: 17px; transition: transform .4s var(--spring); } .mapfield.has-link .mapfield-pin { transform: translateY(-2px) scale(1.15); }
.mapfield-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.mapfield .btn.small { min-height: 30px; font-size: 12.5px; }
.map-state { font-size: 12.5px; color: var(--bad-ink); } .map-state:empty { display: none; }
.map-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; background: var(--info-bg); color: var(--info-ink); font-size: 12.5px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: transform .18s var(--spring); }
.map-chip:hover { transform: translateY(-1px) scale(1.03); }

/* ── transport choice ── */
.choice-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; }
.choice, .truck { display: grid; gap: 2px; justify-items: start; text-align: left; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; transition: transform .2s var(--spring), border-color .15s, box-shadow .2s, background-color .15s; }
.choice:hover, .truck:hover { transform: translateY(-2px); border-color: var(--brand-2); box-shadow: var(--shadow-sm); }
.choice.on, .truck.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); box-shadow: var(--ring); }
.choice-ico { font-size: 26px; line-height: 1.1; transition: transform .35s var(--spring); } .choice.on .choice-ico { transform: scale(1.18) rotate(-4deg); }
.choice small, .truck span { color: var(--muted); font-size: 12px; }
.truck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.truck { padding: 9px 12px; border-radius: 12px; } .truck b { font-size: 13.5px; font-weight: 600; }
.truck.small-for-load { opacity: .5; } .truck.small-for-load.on { opacity: 1; border-color: var(--warn-ink); }

/* ── services, goods ── */
.svc-row { transition: background-color .2s, border-color .2s; }
.extra-svc { display: grid; gap: 8px; margin-top: 8px; }
.add-dashed { border-style: dashed; background: transparent; justify-self: start; }
.with-btn { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; } .with-btn .btn { min-height: 40px; }
.with-unit.channel { grid-template-columns: minmax(96px, 34%) minmax(0, 1fr); }
.with-unit.pct { grid-template-columns: minmax(0, 1fr) 28px; align-items: center; } .with-unit .unit { color: var(--muted); font-weight: 700; }
.hs-results { display: grid; gap: 4px; max-height: min(52vh, 460px); overflow: auto; }
.hs-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; text-align: left; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: inherit; cursor: pointer; }
.hs-row:hover, .hs-row:focus-visible { background: var(--tint); }
.hs-row small { color: var(--muted); font-size: 11.5px; } .hs-row.lvl2 b, .hs-row.lvl4 b { color: var(--muted); } .hs-row.lvl6 b { color: var(--brand); }
.photo-fig { margin: 0; display: inline-grid; gap: 4px; max-width: 220px; }
.photo-fig img { width: 100%; max-height: 160px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); cursor: zoom-in; background: var(--surface-2); min-height: 60px; }
.photo-fig figcaption { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); } .clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tax-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(190px, 2fr); gap: 14px; align-items: start; }
.tax-out { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.tax-out.totals { margin-top: 12px; max-width: 420px; margin-left: auto; }
.tax-line { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; } .tax-line span { color: var(--muted); }
.tax-line.total { border-top: 1px solid var(--line); padding-top: 5px; margin-top: 2px; } .tax-line.total b { color: var(--accent); font-size: 15px; }
.jobdocs { display: grid; gap: 8px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--orange) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--orange) 35%, var(--line)); animation: rise .35s var(--ease) both; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; }
.chip.must { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); font-weight: 600; }
.chip-no { min-width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 700; padding: 0 5px; }
.extra-files { background: var(--surface-2); } .files li { align-items: center; }
.sigwrap { display: grid; gap: 6px; }
.sigpad { width: 100%; aspect-ratio: 3 / 1; border: 2px dashed var(--line-strong); border-radius: 14px; background: linear-gradient(transparent 79%, color-mix(in srgb, var(--brand) 25%, transparent) 79% 80%, transparent 80%), #fff; touch-action: none; cursor: crosshair; }
.sig-current { display: grid; place-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; min-height: 110px; } .sig-current img { max-width: 100%; max-height: 150px; }

/* ── progress tracker ── */
.ptrack { display: grid; gap: 8px; }
.track-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: relative; }
.track-steps::before, .track-steps::after { content: ''; position: absolute; top: 13px; left: 10%; height: 4px; border-radius: 4px; }
.track-steps::before { right: 10%; background: var(--line); }
.track-steps::after { width: calc(80% * var(--done) / var(--n)); background: var(--grad); transition: width .8s var(--ease); }
.ptrack.stopped .track-steps::after { background: var(--muted); }
.track-steps li { display: grid; justify-items: center; gap: 3px; text-align: center; position: relative; z-index: 1; font-size: 12px; color: var(--muted); min-width: 0; }
.track-steps b { font-weight: 600; overflow-wrap: anywhere; line-height: 1.25; } .track-steps small { font-size: 11px; }
.track-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line-strong); font-weight: 700; font-size: 12.5px; color: var(--muted); transition: all .3s var(--ease); }
.track-steps li.done { color: var(--ink); } .track-steps li.done .track-dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.track-steps li.now { color: var(--brand); } .track-steps li.now b { font-weight: 700; }
.track-steps li.now .track-dot { border-color: var(--orange); color: var(--orange); background: var(--surface); animation: pulse 2s ease-out infinite; }
.ptrack.stopped .track-steps li.done .track-dot { background: var(--muted); border-color: var(--muted); }
.track-stop { justify-self: start; padding: 3px 12px; border-radius: 999px; background: var(--bad-bg); color: var(--bad-ink); font-weight: 700; font-size: 12.5px; }
.track-note { justify-self: start; font-size: 12.5px; color: var(--muted); }
.track-card h1 { font-size: clamp(22px, 5vw, 30px); letter-spacing: .02em; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); }

/* ── client site ── */
.portal { max-width: 980px; }
.hero { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(18px, 4vw, 40px); align-items: center; padding: clamp(22px, 5vw, 48px); border-radius: 24px; color: #fff; position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(520px 320px at 88% 12%, rgba(245, 130, 32, .75), transparent 62%), radial-gradient(460px 340px at 8% 108%, rgba(232, 38, 45, .7), transparent 60%), linear-gradient(135deg, #1d2766, #2b3990 55%, #3f4fb5); box-shadow: var(--lift); }
.hero::before { content: ''; position: absolute; inset: -40%; z-index: -1; background: conic-gradient(from 0deg, transparent 0 62%, rgba(255, 255, 255, .12) 72%, transparent 82%); animation: spin 16s linear infinite; }
.hero .eyebrow { color: #ffd2a8; }
.hero h1 { color: #fff; font-size: clamp(28px, 6vw, 46px); line-height: 1.08; letter-spacing: -.02em; margin: 8px 0 12px; }
.hero p { font-size: clamp(15px, 2.2vw, 17.5px); color: #e4e8ff; max-width: 46ch; margin-bottom: 20px; }
.hero .btn { border-color: rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .12); color: #fff; }
.hero .btn.primary { background: #fff; color: var(--brand); border-color: #fff; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .55); }
.hero .link { color: #fff; }
.hero-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hero-steps li { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(6px); animation: rise .5s var(--ease) both; animation-delay: calc(var(--i) * 90ms + 120ms); }
.hero-no { grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--brand); font-weight: 800; }
.hero-steps small { color: #dfe4ff; }
.auth { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(16px, 4vw, 36px); align-items: start; }
.auth-side h1 { margin-bottom: 8px; } .ticks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.ticks li { padding-left: 28px; position: relative; } .ticks li::before { content: '✓'; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok-ink); font-size: 12px; font-weight: 800; }
.auth-form { box-shadow: var(--lift); border-radius: var(--r-lg); padding: clamp(16px, 4vw, 26px); }
.err:empty { display: none; } .err { color: var(--bad-ink); background: var(--bad-bg); border-radius: 10px; padding: 8px 12px; font-weight: 600; font-size: 13.5px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat-row .stat { display: grid; gap: 2px; text-align: left; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; transition: transform .2s var(--spring), border-color .15s, box-shadow .2s; animation: rise .4s var(--ease) both; animation-delay: calc(var(--i) * 50ms); }
.stat-row .stat b { font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--brand); } .stat-row .stat span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat-row .stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.stat-row .stat.on { border-color: var(--brand); box-shadow: var(--ring); }
.stat-row .stat.attention b { color: var(--accent); } .stat-row .stat.attention { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.client-filters { padding: 12px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.req-list { display: grid; gap: 12px; }
.req-card { display: grid; gap: 10px; text-align: left; width: 100%; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform .25s var(--spring), box-shadow .25s, border-color .2s; animation: rise .45s var(--ease) both; animation-delay: calc(var(--i) * 45ms); }
.req-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--stripe); background-size: 100% 300%; background-image: linear-gradient(180deg, var(--accent), var(--orange), var(--brand)); opacity: 0; transition: opacity .2s; }
.req-card:hover { transform: translateY(-3px); box-shadow: var(--lift); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); } .req-card:hover::before { opacity: 1; }
.req-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .req-ref { font-weight: 800; color: var(--brand); letter-spacing: .02em; }
.req-title { font-weight: 700; font-size: 16px; }
.req-route { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; } .req-route i { color: var(--orange); font-style: normal; font-weight: 800; }
.req-foot { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); align-items: center; } .req-cta { margin-left: auto; color: var(--accent); }
.steps { counter-reset: none; gap: 0; position: relative; padding-top: 0; }
.steps li { border-top: 0; padding-top: 0; display: grid; justify-items: center; gap: 5px; text-align: center; position: relative; z-index: 1; }
.steps::before, .steps::after { content: ''; position: absolute; top: 14px; left: 12.5%; height: 4px; border-radius: 4px; }
.steps::before { right: 12.5%; background: var(--line); } .steps::after { width: calc(75% * var(--at, 0) / var(--n, 3)); background: var(--grad); transition: width .5s var(--ease); }
.step-no { width: 32px; height: 32px; border-radius: 50%; display: grid !important; place-items: center; background: var(--surface); border: 2px solid var(--line-strong); font-weight: 700; color: var(--muted); transition: all .3s var(--ease); }
.steps li.past .step-no { background: var(--brand); border-color: var(--brand); color: #fff; } .steps li.on .step-no { border-color: var(--orange); color: var(--orange); box-shadow: 0 0 0 5px color-mix(in srgb, var(--orange) 18%, transparent); }
.steps li.on { border-top-color: transparent; }
.wizard-nav { position: sticky; bottom: 0; z-index: 12; padding: 10px 12px; margin: 0 -4px; border-radius: 16px 16px 0 0; backdrop-filter: blur(12px); background: color-mix(in srgb, var(--surface) 86%, transparent); box-shadow: 0 -8px 24px -16px rgba(29, 39, 102, .4); }
.docgroup > h3 { background: var(--grad); }

/* ── quotation editor: the side panel stays in view ── */
.q-side-sticky { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }

/* ── motion ── */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes drop { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
@keyframes spin { to { transform: rotate(1turn); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--orange) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 10px transparent; } }
.portal.enter > * { animation: rise .42s var(--ease) both; }
.portal.enter > :nth-child(2) { animation-delay: 50ms; } .portal.enter > :nth-child(3) { animation-delay: 100ms; } .portal.enter > :nth-child(4) { animation-delay: 150ms; } .portal.enter > :nth-child(n+5) { animation-delay: 200ms; }
.modal { border-radius: 18px; transition: opacity .22s, transform .3s var(--spring); }
@starting-style { .modal { opacity: 0; transform: translateY(14px) scale(.96); } .toast { opacity: 0; transform: translateY(8px); } .pop { opacity: 0; transform: translateY(-6px) scale(.98); } }
.modal-back { backdrop-filter: blur(4px); }
.toast { transition: opacity .25s, transform .3s var(--spring); border-radius: 12px; }
.pop { transition: opacity .16s, transform .22s var(--spring); border-radius: 14px; transform-origin: top right; position: fixed; }
::view-transition-old(root) { animation: vt-out .18s ease-in both; } ::view-transition-new(root) { animation: vt-in .3s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } } @keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
/* thin reading-progress line under the top bar, driven by the page scroll */
@supports (animation-timeline: scroll()) {
  .portal-top::before { content: ''; position: absolute; left: 0; bottom: -3px; height: 3px; width: 100%; z-index: 1; background: #fff; mix-blend-mode: soft-light; transform-origin: left; animation: grow linear both; animation-timeline: scroll(root); }
  @keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* ── small screens ── */
@media (max-width: 860px) { .hero, .auth { grid-template-columns: 1fr; } .tax-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .portal-top .in { flex-wrap: wrap; row-gap: 6px; } .portal-top .brand small { display: none; } .portal-top .brand img { max-width: 92px; }
  .top-acts { margin-left: auto; } .seg button { padding: 6px 8px; font-size: 12px; }
  .track-steps b { font-size: 10.5px; } .track-steps small { display: none; } .track-dot { width: 26px; height: 26px; } .track-steps::before, .track-steps::after { top: 11px; }
  .steps li span:not(.step-no) { display: block; font-size: 10.5px; } .hs-row { grid-template-columns: 64px minmax(0, 1fr); } .hs-row small { display: none; }
  .bulkbar { top: 56px; } .req-cta { margin-left: 0; flex-basis: 100%; } .choice-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .truck-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .with-btn { grid-template-columns: 1fr; } .btn.big { width: 100%; } .q-side-sticky { position: static; max-height: none; }
  .modal { width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; align-self: end; } .modal-back { padding: 0; place-items: end center; }
}
@media (max-width: 380px) { .choice-row, .truck-grid, .stat-row { grid-template-columns: 1fr 1fr; } .portal { padding-left: 10px; padding-right: 10px; } }
@media (hover: none) { .btn:hover, .req-card:hover, .choice:hover, .truck:hover, .stat-row .stat:hover { transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
@media print { .portal-top, .top, .side, .bulkbar, .wizard-nav { display: none !important; } body { background: #fff; } }

/* ── quotation editor side panel: status on top, one tab at a time, always in view ── */
.q-layout { grid-template-columns: minmax(0, 1fr) minmax(300px, 340px); }
.q-side { position: static; display: block; }
.q-side-sticky { display: grid; gap: 10px; align-content: start; padding-right: 2px; }
.q-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); position: sticky; top: 0; z-index: 2; box-shadow: var(--shadow-sm); }
.q-tab { border: 0; background: none; border-radius: 10px; padding: 7px 4px; font: inherit; font-size: 11.5px; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background-color .15s, color .15s; }
.q-tab:hover { color: var(--brand); background: var(--tint); }
.q-tab[aria-selected="true"] { background: var(--grad); color: #fff; box-shadow: 0 6px 14px -8px color-mix(in srgb, var(--brand) 80%, transparent); }
.q-panel { display: grid; gap: 10px; animation: rise .25s var(--ease) both; }
.q-panel > .card > h3:first-child { display: none; }
.q-auto summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--brand); padding: 4px 2px; }
.qlabels { display: grid; gap: 4px; max-height: 46vh; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.qlabels-head, .qlabels-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.qlabels-head { position: sticky; top: -8px; background: var(--surface); padding: 2px 0 4px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.qlabels-row input { min-height: 32px; padding: 4px 8px; font-size: 13px; }
@media (max-width: 1100px) { .q-layout { grid-template-columns: 1fr; } .q-side-sticky { position: static; max-height: none; } .q-tabs { position: sticky; top: 60px; } }

/* ── phones: nothing may push the page wider than the screen ── */
body { overflow-x: clip; }
.portal-top .in { max-width: 980px; }
@media (max-width: 860px) { .hero, .auth { grid-template-columns: minmax(0, 1fr); } .hero .row { display: grid; grid-template-columns: minmax(0, 1fr); } .hero .btn { white-space: normal; } }
@media (max-width: 520px) {
  .portal-top .in { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .top-acts { justify-content: flex-end; flex-wrap: wrap; row-gap: 6px; min-width: 0; }
  .top-acts .btn.small { padding: 0 10px; }
  .portal-top .seg button { padding: 6px 7px; }
  .hero { border-radius: 18px; padding: 20px 18px; }
  .hero-steps li { padding: 12px; }
}

[hidden] { display: none !important; }

/* back office: wide tables scroll inside their own box instead of widening the page */
.main, .content, .cols > *, .form-layout > *, .two-col > *, .q-layout > *, .q-main { min-width: 0; }
@media (max-width: 1000px) { .shell { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .cols { grid-template-columns: minmax(0, 1fr); } }

/* quotation editor: the whole side panel sticks beside the form and scrolls on its own */
@media (min-width: 1101px) {
  .q-side { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 88px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .q-side-sticky { position: static; max-height: none; overflow: visible; }
}
.stack { grid-template-columns: minmax(0, 1fr); }
.q-side .row > .btn.small { width: auto; flex: 1 1 calc(50% - 10px); }
.q-tab { white-space: normal; line-height: 1.15; padding: 6px 3px; font-size: 11px; }

/* ── country picker ── */
.cpick { position: relative; }
.cpick-box { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 40px; padding: 0 6px 0 7px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.cpick-box:hover { border-color: var(--steel); }
.cpick-box:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.cpick input.cpick-input { border: 0; box-shadow: none; padding: 8px 0; min-height: 38px; background: transparent; outline: none; }
.cpick-code { display: inline-grid; place-items: center; min-width: 32px; height: 24px; padding: 0 6px; border-radius: 7px; background: var(--grad); color: #fff; font-weight: 800; font-size: 11.5px; letter-spacing: .06em; font-variant-numeric: tabular-nums; transition: transform .3s var(--spring); }
.cpick-code.is-empty { background: var(--tint); color: var(--muted); }
.cpick-code.free { background: color-mix(in srgb, var(--orange) 18%, var(--surface)); color: var(--warn-ink); }
.cpick.has-value:not(.free) .cpick-box .cpick-code { animation: pop-in .35s var(--spring); }
.cpick.free .cpick-box .cpick-code { background: color-mix(in srgb, var(--orange) 18%, var(--surface)); color: var(--warn-ink); }
.cpick-clear { border: 0; background: none; color: var(--muted); width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .15s, background-color .15s; }
.cpick.has-value .cpick-clear { opacity: 1; pointer-events: auto; } .cpick-clear:hover { background: var(--tint); color: var(--ink); }
.cpick-list { position: absolute; z-index: 50; left: 0; right: 0; top: calc(100% + 6px); max-height: min(320px, 46vh); overflow: auto; overscroll-behavior: contain; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--lift); transform-origin: top center; animation: drop .22s var(--spring); }
.cpick-head { padding: 6px 8px 3px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.cpick-opt { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; cursor: pointer; }
.cpick-opt .cpick-code { background: var(--tint); color: var(--brand); }
.cpick-opt.on { background: color-mix(in srgb, var(--brand) 9%, var(--surface)); } .cpick-opt.on .cpick-code { background: var(--grad); color: #fff; }
.cpick-opt.picked .cpick-name b::after { content: ' ✓'; color: var(--ok-ink); }
.cpick-name { display: grid; line-height: 1.25; min-width: 0; } .cpick-name b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cpick-name small { color: var(--muted); font-size: 12px; }
.cpick-empty { padding: 12px; color: var(--muted); text-align: center; }
@keyframes pop-in { from { transform: scale(.6); } }
@media (max-width: 700px) { .cpick-list { max-height: 52vh; } .cpick-opt { padding: 10px 8px; } }

/* ── quotation: page partition ── */
.qsheet { position: relative; }
.q-pbar { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 14px; margin: 4px 0; }
.q-pbar-add { opacity: 0; border: 1px dashed transparent; background: none; color: var(--muted); font: 600 11.5px var(--font); padding: 2px 10px; border-radius: 999px; cursor: pointer; transition: opacity .15s, border-color .15s, color .15s, background-color .15s; }
.qsheet:hover .q-pbar-add { opacity: .55; }
.q-pbar-add:hover, .q-pbar-add:focus-visible { opacity: 1 !important; border-color: var(--orange); color: var(--warn-ink); background: color-mix(in srgb, var(--orange) 10%, transparent); }
.q-pbar.on { margin: 10px 0; padding: 4px 0; }
.q-pbar.on::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed var(--orange); }
.q-pbar-label { position: relative; z-index: 1; padding: 2px 12px; border-radius: 999px; background: var(--orange); color: #fff; font: 700 11.5px var(--font); letter-spacing: .02em; box-shadow: 0 4px 12px -6px rgba(245, 130, 32, .8); }
.q-pbar-x { position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%; border: 0; background: #fff; color: var(--warn-ink); box-shadow: 0 0 0 1.5px var(--orange); cursor: pointer; font-size: 11px; }
.q-pbar-x:hover { background: var(--orange); color: #fff; }
.q-pbrow td { padding: 0 !important; border: 0 !important; background: transparent !important; }
.icon-btn.sm.on { background: var(--orange); color: #fff; }
.q-guide { position: absolute; left: -10px; right: -10px; height: 0; border-top: 2px dashed color-mix(in srgb, var(--brand) 45%, transparent); pointer-events: none; z-index: 3; animation: fade .3s ease-out; }
.q-guide.forced { border-top-color: transparent; }
.q-guide span { position: absolute; right: 12px; top: -11px; padding: 1px 9px; border-radius: 999px; background: var(--brand); color: #fff; font: 700 10.5px var(--font); white-space: nowrap; box-shadow: var(--shadow-sm); }
.q-guide.forced span { background: var(--orange); }
.q-pagecount { position: absolute; top: 8px; right: 10px; padding: 2px 10px; border-radius: 999px; background: var(--tint); color: var(--brand); font: 700 11px var(--font); pointer-events: none; }
@keyframes fade { from { opacity: 0; } }
@media (hover: none) { .q-pbar-add { opacity: .6; } }
@media print { .q-guide, .q-pagecount, .q-pbar-add { display: none !important; } }

/* ── documents overview on the Documents step ── */
.jobdocs .chip { font: inherit; font-size: 12.5px; color: var(--ink); cursor: pointer; transition: transform .18s var(--spring), border-color .15s, background-color .15s; }
.jobdocs .chip:hover { transform: translateY(-1px); border-color: var(--brand-2); }
.jobdocs .chip.done { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok-ink) 35%, var(--line)); color: var(--ok-ink); }
.jobdocs .chip.done .chip-no { background: var(--ok-ink); }
.jobdocs .meter { height: 6px; } .jobdocs .meter span { background: var(--grad); transition: width .6s var(--ease); }
.jobdocs-count { font-size: 12px; font-weight: 700; color: var(--warn-ink); } .jobdocs-count.ok { color: var(--ok-ink); }
.doc.flash { animation: flash 1.4s ease-out; }
@keyframes flash { 0%, 30% { background: color-mix(in srgb, var(--orange) 22%, var(--surface)); box-shadow: inset 4px 0 0 var(--orange); } 100% { background: transparent; box-shadow: none; } }

/* ── quotation editor: action bar that stays on screen ── */
.q-dock { position: sticky; bottom: 12px; z-index: 30; margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px 10px 16px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); box-shadow: var(--lift); animation: rise .35s var(--ease) both; }
.q-dock::before { content: ''; position: absolute; left: 18px; right: 18px; top: -1px; height: 3px; border-radius: 3px; background: var(--stripe); }
.q-dock-info { display: grid; line-height: 1.25; min-width: 0; }
.q-dock-info b { color: var(--brand); letter-spacing: .03em; }
.q-dock-state { font-size: 12px; font-weight: 600; color: var(--ok-ink); }
.q-dock-state::before { content: '● '; }
.q-dock-state.dirty { color: var(--warn-ink); }
.q-dock-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.q-dock .btn { min-height: 42px; gap: 7px; }
.q-dock .btn.primary { min-width: 120px; }
.q-dock .btn.primary.pulse { animation: savepulse 1.6s ease-out infinite; }
.q-dock-ico { font-size: 15px; line-height: 1; }
@keyframes savepulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--orange) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 10px transparent; } }
@media (max-width: 760px) {
  .q-dock { bottom: 8px; padding: 8px; gap: 8px; border-radius: 16px; }
  .q-dock-info { display: none; }
  .q-dock-btns { flex-wrap: nowrap; width: 100%; }
  .q-dock-btns .btn { flex: 1 1 0; min-width: 0; padding: 0 6px; }
  .q-dock-btns .btn:not(.primary) .q-dock-txt { display: none; }
  .q-dock .btn.primary { flex: 2 1 0; min-width: 0; }
}

/* ── quotation side panel: collapsible sections ── */
.q-acc { gap: 8px; }
.q-sec { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.q-sec[open] { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); box-shadow: var(--lift); }
.q-sec > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 11px 14px; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--ink); user-select: none; }
.q-sec > summary::-webkit-details-marker { display: none; }
.q-sec > summary > span:first-child { flex: 1; }
.q-sec > summary:hover { background: var(--tint); }
.q-sec[open] > summary { color: var(--brand); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 6%, transparent), transparent); }
.q-sec-chev { font-size: 16px; color: var(--muted); transition: transform .25s var(--spring); }
.q-sec[open] .q-sec-chev { transform: rotate(180deg); color: var(--brand); }
.q-sec-body { padding: 12px 14px 14px; display: grid; gap: 10px; animation: rise .25s var(--ease) both; }
.q-sec-body > .card { border: 0; box-shadow: none; padding: 0; background: transparent; }
.q-sec-body > .card > h3:first-child, .q-sec-body > .card > .row:first-child:has(> h3) { display: none; }
.q-acc-tools { text-align: right; font-size: 12px; color: var(--muted); padding: 0 4px; }
.q-side .q-tabs { display: none; }

/* ── action bar: work + output on the left, manage on the right ── */
.q-dock-btns { flex: 1; justify-content: flex-end; gap: 10px; }
.q-dock-grp { display: flex; gap: 6px; flex-wrap: wrap; }
.q-dock-grp + .q-dock-grp { padding-left: 10px; border-left: 1px solid var(--line); }
.q-dock .btn.share { background: color-mix(in srgb, var(--orange) 14%, var(--surface)); border-color: color-mix(in srgb, var(--orange) 45%, var(--line)); color: var(--warn-ink); }
@media (max-width: 1280px) { .q-dock-grp:last-child .q-dock-txt { display: none; } }
@media (max-width: 760px) {
  .q-dock-btns { flex-direction: column; gap: 6px; }
  .q-dock-grp { flex-wrap: nowrap; width: 100%; }
  .q-dock-grp + .q-dock-grp { padding-left: 0; border-left: 0; }
  .q-dock-grp .btn { flex: 1 1 0; min-width: 0; padding: 0 4px; min-height: 40px; }
  .q-dock-grp .btn:not(.primary) .q-dock-txt { display: none; }
  .q-dock-grp:last-child .btn .q-dock-txt { display: inline; font-size: 12.5px; }
  .q-dock .btn.primary { flex: 1.6 1 0; }
}
@media (max-width: 1500px) { .q-dock-grp:last-child .q-dock-txt { display: none; } .q-dock-grp:last-child .btn { padding: 0 12px; } }
.q-dock .btn { min-width: 0; } .q-dock-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
@media (max-width: 760px) { .q-dock-grp:last-child .q-dock-txt { display: inline; } }

/* ══════════ Profile pictures ══════════ */
.avatar { position: relative; display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; color: #fff; font-weight: 800; letter-spacing: .02em;
  background: radial-gradient(120% 120% at 20% 10%, color-mix(in srgb, var(--av-b) 85%, #fff), var(--av-a)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); user-select: none; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.ring { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px color-mix(in srgb, var(--brand) 55%, transparent), 0 10px 24px -10px rgba(29, 39, 102, .55); }
.person { display: flex; align-items: center; gap: 10px; }

/* ══════════ Name chip + profile menu ══════════ */
.user-chip { display: inline-flex; flex-direction: row; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); transition: box-shadow .2s, border-color .2s, transform .2s var(--spring); }
.user-chip:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); box-shadow: var(--shadow-sm); transform: translateY(-1px); background: var(--surface); }
.uc-text { display: grid; text-align: left; line-height: 1.2; max-width: 170px; }
.uc-text b, .uc-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uc-text small { color: var(--muted); font-size: 11.5px; }
.pop { padding: 0; overflow: hidden auto; border: 1px solid color-mix(in srgb, var(--brand) 14%, var(--line)); box-shadow: 0 24px 60px -18px rgba(29, 39, 102, .45); width: min(320px, calc(100vw - 24px)); }
.pm-head { position: relative; display: grid; justify-items: center; gap: 2px; padding: 26px 16px 14px; text-align: center; }
.pm-cover { position: absolute; inset: 0 0 auto; height: 58px; background: radial-gradient(140px 80px at 85% 0%, rgba(245, 130, 32, .8), transparent 70%), radial-gradient(160px 90px at 10% 120%, rgba(232, 38, 45, .65), transparent 70%), linear-gradient(120deg, #1d2766, #3f4fb5); }
.pm-head .avatar { position: relative; margin-bottom: 6px; }
.pm-head b { font-size: 15.5px; }
.pm-list { display: grid; padding: 6px; border-top: 1px solid var(--line); }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: inherit; font-weight: 600; font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; transition: background-color .12s, transform .15s var(--spring); }
.menu-item:hover { background: var(--tint); transform: translateX(2px); }
.menu-item.danger { color: var(--bad-ink); } .menu-item.danger:hover { background: var(--bad-bg); }
.mi-ico { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--tint); font-size: 15px; flex: none; }
.menu-item.danger .mi-ico { background: var(--bad-bg); }
.pm-theme { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 6px 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.pm-theme button { border: 0; background: none; border-radius: 9px; padding: 7px 4px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.pm-theme button[aria-pressed="true"] { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }
.pf-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: var(--tint); color: var(--brand); font-size: 12px; font-weight: 700; margin-top: 4px; }
.pf-tag.role { background: color-mix(in srgb, var(--orange) 14%, var(--surface)); color: var(--warn-ink); }

/* ══════════ My profile page ══════════ */
.pf { display: grid; gap: 18px; max-width: 1100px; }
.pf-hero { position: relative; border-radius: 22px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--lift); animation: rise .45s var(--ease) both; }
.pf-cover { height: 150px; position: relative; background: radial-gradient(420px 180px at 92% -10%, rgba(245, 130, 32, .85), transparent 65%), radial-gradient(380px 200px at 5% 130%, rgba(232, 38, 45, .7), transparent 62%), linear-gradient(120deg, #1d2766 0%, #2b3990 55%, #4a5bd0 100%); }
.pf-cover::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 28px, rgba(255, 255, 255, .05) 28px 29px); }
.pf-id { display: flex; align-items: flex-end; gap: 18px; padding: 0 24px 22px; margin-top: -54px; flex-wrap: wrap; position: relative; }
.pf-avatar { position: relative; flex: none; }
.pf-avatar .avatar.ring { box-shadow: 0 0 0 5px var(--surface), 0 0 0 7px color-mix(in srgb, var(--brand) 50%, transparent), 0 18px 34px -14px rgba(29, 39, 102, .6); }
.pf-cam { position: absolute; right: 2px; bottom: 2px; width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--surface); background: var(--grad); color: #fff; font-size: 15px; cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-sm); transition: transform .2s var(--spring); }
.pf-cam:hover { transform: scale(1.1) rotate(-6deg); }
.pf-avatar.sm .pf-cam { width: 30px; height: 30px; font-size: 13px; }
.pf-who { flex: 1; min-width: 220px; padding-bottom: 2px; }
.pf-who h1 { font-size: clamp(22px, 3vw, 28px); letter-spacing: -.01em; }
.pf-who > p { color: var(--muted); margin-top: 2px; }
.pf-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.pf-remove { align-self: center; }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; }
.pf-card { display: grid; gap: 14px; border-radius: 18px; padding: 20px; animation: rise .45s var(--ease) both; }
.pf-grid > :nth-child(2) { animation-delay: 60ms; } .pf-grid > :nth-child(3) { animation-delay: 120ms; } .pf-grid > :nth-child(n+4) { animation-delay: 180ms; }
.pf-head { display: flex; gap: 12px; align-items: center; }
.pf-head h2 { font-size: 16.5px; }
.pf-ico { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 13px; font-size: 19px; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 14%, var(--surface)), color-mix(in srgb, var(--orange) 14%, var(--surface))); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 12%, transparent); }
.pf-tiles { display: grid; gap: 8px; }
.pf-tiles.langs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pf-tiles.themes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pf-tile { display: grid; gap: 4px; justify-items: center; padding: 12px 6px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; transition: transform .2s var(--spring), border-color .15s, box-shadow .2s; }
.pf-tile:hover { transform: translateY(-2px); border-color: var(--brand-2); }
.pf-tile.on { border-color: var(--brand); box-shadow: var(--ring); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.pf-tile b { font-size: 15px; } .pf-tile small { color: var(--muted); font-size: 11.5px; }
.pf-mini { width: 74px; height: 46px; border-radius: 9px; border: 1px solid var(--line); display: grid; grid-template-columns: 18px 1fr; grid-template-rows: 10px 1fr; overflow: hidden; }
.pf-mini i:nth-child(1) { grid-row: span 2; } .pf-mini i:nth-child(3) { margin: 5px; border-radius: 4px; }
.theme-light .pf-mini { background: #f4f5fb; } .theme-light .pf-mini i:nth-child(1) { background: #2b3990; } .theme-light .pf-mini i:nth-child(2) { background: #fff; } .theme-light .pf-mini i:nth-child(3) { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.theme-dark .pf-mini { background: #0e1128; border-color: #2c3263; } .theme-dark .pf-mini i:nth-child(1) { background: #0d1130; } .theme-dark .pf-mini i:nth-child(2) { background: #171b3a; } .theme-dark .pf-mini i:nth-child(3) { background: #1d2247; }
.theme-system .pf-mini { background: linear-gradient(135deg, #f4f5fb 50%, #0e1128 50%); } .theme-system .pf-mini i:nth-child(1) { background: linear-gradient(#2b3990 50%, #0d1130 50%); } .theme-system .pf-mini i:nth-child(3) { background: linear-gradient(135deg, #fff 50%, #1d2247 50%); }
.pf-pw { position: relative; } .pf-pw input { padding-right: 44px; }
.pf-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 32px; border: 0; background: none; border-radius: 8px; cursor: pointer; font-size: 15px; }
.pf-eye:hover { background: var(--tint); }
.pf-strength { display: grid; gap: 6px; }
.pf-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.pf-meter span { height: 6px; border-radius: 6px; background: var(--line); transition: background-color .3s; }
.pf-meter[data-score="1"] span:nth-child(-n+1) { background: var(--accent); }
.pf-meter[data-score="2"] span:nth-child(-n+2) { background: var(--orange); }
.pf-meter[data-score="3"] span:nth-child(-n+3) { background: #c7a400; }
.pf-meter[data-score="4"] span { background: #16a34a; }
.pf-sig { display: grid; place-items: center; min-height: 120px; border-radius: 14px; border: 1.5px dashed var(--line-strong); background: linear-gradient(transparent 74%, color-mix(in srgb, var(--brand) 18%, transparent) 74% 75%, transparent 75%), #fff; }
.pf-sig img { max-height: 110px; max-width: 100%; }
.pf-drive { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.pf-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--line-strong); flex: none; }
.pf-drive.on .pf-dot { background: #16a34a; box-shadow: 0 0 0 4px color-mix(in srgb, #16a34a 20%, transparent); }
.pd-head { display: flex; gap: 16px; align-items: center; padding: 6px 0 4px; }
.pd-sec { padding-top: 6px; border-top: 1px solid var(--line); }
.pd-pw summary { cursor: pointer; font-weight: 700; color: var(--brand); padding: 6px 0; }
@media (max-width: 600px) { .pf-id { padding: 0 16px 18px; gap: 12px; } .pf-cover { height: 110px; } .pf-tiles.langs { grid-template-columns: repeat(2, 1fr); } .uc-text { display: none; } .user-chip { padding: 3px; } }

/* ══════════ Polish across every panel ══════════ */
.card { border-radius: 16px; border-color: color-mix(in srgb, var(--brand) 8%, var(--line)); }
.page-head h1 { font-size: clamp(22px, 2.6vw, 27px); letter-spacing: -.015em; }
.modal { border: 1px solid color-mix(in srgb, var(--brand) 14%, var(--line)); box-shadow: 0 30px 80px -24px rgba(13, 20, 60, .55); overflow: hidden; }
.modal-head { position: relative; background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 7%, var(--surface)), var(--surface)); }
.modal-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--stripe); }
.modal-head h2 { font-size: 17px; }
.modal-foot { background: var(--surface-2); }
.modal-back { background: rgba(10, 14, 40, .45); backdrop-filter: blur(6px) saturate(1.2); }
.tablewrap { border-radius: 16px; border-color: color-mix(in srgb, var(--brand) 8%, var(--line)); }
.data th { background: linear-gradient(180deg, var(--surface-2), color-mix(in srgb, var(--brand) 4%, var(--surface-2))); color: color-mix(in srgb, var(--brand) 60%, var(--muted)); }
.data tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--brand) 2%, transparent); }
.data tr.clickable:hover td { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 1px solid color-mix(in srgb, currentColor 30%, transparent); background: color-mix(in srgb, var(--ok-bg) 92%, var(--surface)); box-shadow: 0 16px 40px -16px rgba(13, 20, 60, .5); backdrop-filter: blur(8px); }
.toast::before { content: '✓'; flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: currentColor; color: var(--surface); font-weight: 900; font-size: 13px; }
.toast.bad { background: color-mix(in srgb, var(--bad-bg) 92%, var(--surface)); color: var(--bad-ink); } .toast.bad::before { content: '!'; }
.empty { border-radius: 18px; padding: 48px 20px; background: radial-gradient(240px 120px at 50% 0%, color-mix(in srgb, var(--brand) 8%, transparent), transparent 70%), var(--surface); }
.callout { border-radius: 12px; border: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
.badge { box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 18%, transparent); }
.icon-btn { border-radius: 10px; transition: background-color .15s, transform .2s var(--spring); } .icon-btn:hover { transform: translateY(-1px); }
.top .search { border-radius: 999px; padding-left: 38px; background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b7392' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 4 4'/%3E%3C/svg%3E") no-repeat 14px 50%; }
.side .nav a { border-radius: 10px; }
.fgroup, .item { border-radius: 14px; }
.docgroup { border-radius: 16px; }

/* ══════════ Quotation editor: action header pinned at the top ══════════ */
.q-page { --apptop: 64px; --qtop: 74px; }
.q-dock.q-top { position: sticky; top: calc(var(--apptop) + 6px); bottom: auto; z-index: 25; margin: 0 0 10px; padding: 10px 12px 10px 10px; align-items: center; flex-wrap: nowrap; gap: 14px; animation: drop .35s var(--spring) both; }
.q-dock.q-top::before { top: auto; bottom: -1px; }
.q-top .q-dock-info { display: flex; align-items: center; gap: 10px; min-width: 0; flex: none; }
.q-back { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--tint); color: var(--brand); text-decoration: none; font-weight: 800; font-size: 17px; transition: transform .2s var(--spring), background-color .15s; }
.q-back:hover { transform: translateX(-2px); background: color-mix(in srgb, var(--brand) 14%, var(--surface)); }
.q-ref { font-size: 18px; letter-spacing: .03em; }
.q-top .q-dock-btns { display: flex; align-items: flex-end; justify-content: flex-end; gap: 0; flex: 1; flex-direction: row; min-width: 0; }
.q-top .q-dock-grp { display: grid; gap: 3px; padding: 0 10px; border-left: 1px solid var(--line); }
.q-top .q-dock-grp:first-child { border-left: 0; }
.q-top .q-dock-grp:last-child { padding-right: 0; }
.q-grp-label { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-left: 2px; }
.q-grp-btns { display: flex; gap: 6px; }
.q-top .btn { min-height: 40px; padding: 0 12px; gap: 6px; font-size: 13.5px; }
.q-top .btn.primary { min-width: 104px; }
.q-top .btn.pdf { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); color: color-mix(in srgb, var(--accent) 75%, var(--ink)); }
.q-top .btn.xls { background: color-mix(in srgb, #16a34a 9%, var(--surface)); border-color: color-mix(in srgb, #16a34a 38%, var(--line)); color: #15803d; }
:root[data-theme="dark"] .q-top .btn.xls { color: #86efac; }
.q-lead { margin: 0 0 10px 4px; }
.fmtbar { top: calc(var(--apptop) + var(--qtop) + 14px); }
@media (min-width: 1101px) { .q-side { top: calc(var(--apptop) + var(--qtop) + 14px); max-height: calc(100vh - var(--apptop) - var(--qtop) - 28px); } }
/* laptops: labels on Save + Output only */
@media (max-width: 1600px) { .q-top .q-dock-grp:last-child .q-dock-txt { display: none; } }
@media (max-width: 1360px) { .q-top .q-dock-grp:not(.save) .btn:not(.pdf):not(.xls) .q-dock-txt { display: none; } .q-top .q-grp-label { display: none; } .q-top .q-dock-btns { align-items: center; } }
@media (max-width: 1100px) { .q-top .btn .q-dock-txt { display: none; } .q-top .btn.primary .q-dock-txt { display: inline; } }
/* phones: reference on the first line, every button in one scrollable row underneath */
@media (max-width: 760px) {
  .q-page { --apptop: 56px; }
  .q-dock.q-top { flex-wrap: wrap; padding: 8px; gap: 6px; border-radius: 16px; top: calc(var(--apptop) + 4px); }
  .q-top .q-dock-info { width: 100%; display: flex; }
  .q-top .q-dock-btns { width: 100%; flex-direction: row; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .q-top .q-dock-btns::-webkit-scrollbar { display: none; }
  .q-top .q-dock-grp { display: block; width: auto; padding: 0 6px; flex: none; }
  .q-top .q-dock-grp + .q-dock-grp { border-left: 1px solid var(--line); }
  .q-top .q-grp-btns { flex-wrap: nowrap; }
  .q-top .q-dock-grp .btn { flex: none; min-width: 42px; padding: 0 10px; }
  .q-top .q-dock-grp .btn .q-dock-txt { display: none; }
  .q-top .q-dock-grp .btn.primary .q-dock-txt { display: inline; }
  .q-ref { font-size: 16px; }
}
.q-top .q-dock-btns { flex-wrap: nowrap; }
@media (max-width: 1480px) and (min-width: 761px) {
  .q-top .q-dock-grp:not(.save) .btn:not(.pdf):not(.xls) .q-dock-txt { display: none; }
  .q-top .q-dock-grp:not(.save) .btn:not(.pdf):not(.xls) { padding: 0 11px; }
}
.avatar-ini { line-height: 1; }
@media (min-width: 601px) { .pf-who { padding-top: 62px; } .pf-remove { align-self: flex-end; margin-bottom: 4px; } }
.fmtbar { top: calc(var(--apptop) + var(--qtop) + 6px); }
@media (min-width: 1101px) { .q-side { top: calc(var(--apptop) + var(--qtop) + 6px); } }

/* ══════════ Icons (icons.js) ══════════ */
.i { display: inline-grid; place-items: center; flex: none; line-height: 0; vertical-align: -0.2em; }
.i svg { display: block; }
.with-i { display: inline-flex; align-items: center; gap: 7px; }
.btn .i, .menu-item .i, .link .i, .tab .i, .filebtn .i, .map-chip .i, .pf-tag .i, .q-pbar-label .i, .q-pbar-add .i { flex: none; }
.btn, .link, .map-chip, .pf-tag, .q-pbar-label, .q-pbar-add, .filebtn { gap: 6px; }
.link { display: inline-flex; align-items: center; }
.nav a .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(255, 255, 255, .07); transition: background-color .15s, transform .2s var(--spring); }
.nav a:hover .ico { background: rgba(255, 255, 255, .14); transform: scale(1.05); }
.nav a[aria-current="page"] .ico { background: var(--grad); color: #fff; box-shadow: 0 6px 14px -8px rgba(43, 57, 144, .9); }
.mi-ico { color: var(--brand); } .menu-item.danger .mi-ico { color: var(--bad-ink); }
.icon-btn .i { color: var(--ink); } .icon-btn:hover .i { color: var(--brand); }
.icon-btn.sm .i svg { width: 14px; height: 14px; }
.choice-ico { color: var(--brand); display: grid; } .choice.on .choice-ico { color: var(--accent); }
.pf-ico { color: var(--brand); }
.pf-cam .i { color: #fff; }
.q-dock-ico { display: inline-grid; }
.q-sec > summary .with-i .i { color: var(--brand); }
.q-sec-chev { display: grid; }
.mapfield-pin { color: var(--accent); display: grid; }
.share-ico { display: grid; place-items: center; }
.jobdocs .with-i .i { color: var(--warn-ink); }
.edit-banner { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--orange) 45%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--orange) 12%, var(--surface)), var(--surface)); box-shadow: var(--shadow-sm); animation: drop .35s var(--spring) both; }
.edit-banner > div { flex: 1; display: grid; gap: 2px; }
.edit-banner p { color: var(--muted); font-size: 13.5px; }
.edit-banner .warn-line { color: var(--warn-ink); font-weight: 600; }
.edit-banner-ico { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--orange); color: #fff; }
.change-list { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 2px; font-size: 13px; color: var(--ink); }
.change-list li::marker { color: var(--orange); }

/* ══════════ Document cards (client Documents step and request page) ══════════ */
.dcard { gap: 10px; border-left: 4px solid transparent; transition: background-color .2s, border-color .2s; }
.dcard.dt-ok { border-left-color: #16a34a; background: color-mix(in srgb, #16a34a 4%, var(--surface)); }
.dcard.dt-warn { border-left-color: var(--orange); }
.dcard.dt-bad { border-left-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.dcard.dt-muted { border-left-color: var(--line-strong); }
.dcard-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: start; gap: 12px; }
.dcard-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--tint); color: var(--brand); }
.dcard.dt-ok .dcard-ico { background: #16a34a; color: #fff; }
.dcard.dt-bad .dcard-ico { background: var(--accent); color: #fff; }
.dcard.dt-warn .dcard-ico { background: color-mix(in srgb, var(--orange) 16%, var(--surface)); color: var(--warn-ink); }
.dstate { align-self: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--neutral-bg); color: var(--neutral-ink); }
.dstate.ok { background: var(--ok-bg); color: var(--ok-ink); } .dstate.warn { background: var(--warn-bg); color: var(--warn-ink); } .dstate.bad { background: var(--bad-bg); color: var(--bad-ink); }
.dcard-x { align-self: center; color: var(--muted); } .dcard-x:hover { background: var(--bad-bg); } .dcard-x:hover .i { color: var(--bad-ink); }
.dfile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); margin-left: 50px; }
.dfile > .i { color: var(--brand); }
.dfile-name { display: grid; min-width: 0; } .dfile-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dfile-name small { color: var(--muted); font-size: 12px; }
.dcard-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-left: 50px; }
.dont-have { color: var(--muted); font-size: 13px; }
.dvers summary { cursor: pointer; font-size: 12.5px; color: var(--brand); font-weight: 600; }
.add-doc { background: transparent; }
.removed-docs summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.removed-docs[open] summary { color: var(--ink); margin-bottom: 8px; }
@media (max-width: 600px) {
  .dcard-top { grid-template-columns: auto minmax(0, 1fr) auto; }
  .dcard-top .dstate { grid-column: 2; grid-row: 2; justify-self: start; }
  .dfile, .dcard-acts { margin-left: 0; }
}

/* ── file lines (customer's documents) ── */
.flines { display: grid; gap: 6px; }
.flines.in-card { margin-left: 50px; }
.fline { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); animation: rise .25s var(--ease) both; }
.fline-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--tint); color: var(--brand); }
.fline-name { display: grid; min-width: 0; line-height: 1.3; }
.fline-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.fline-name small { color: var(--muted); font-size: 12px; }
.fline-acts { display: flex; gap: 6px; }
.fline-acts .btn.danger { padding: 0 9px; }
@media (max-width: 600px) { .flines.in-card { margin-left: 0; } .hide-sm { display: none; } }
.toast::before { background: var(--ok-ink); color: #fff; }
.toast.bad::before { background: var(--bad-ink); }

/* ── My requests: quick actions on a card ── */
.req-card { cursor: pointer; }
.req-card:focus-visible { outline: none; box-shadow: var(--ring), var(--lift); }
.req-quick { display: flex; gap: 6px; justify-content: flex-end; padding-top: 10px; border-top: 1px dashed var(--line); }
.req-quick .btn { min-height: 32px; }

/* ── Client accounts & customer records (back office CRUD) ── */
.acct-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.acct-cell > div { display: grid; min-width: 0; } .acct-cell small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-acts { display: inline-flex; gap: 2px; }
.row-acts .icon-btn { width: 34px; height: 34px; color: var(--muted); transition: color .15s, background .15s, transform .2s var(--spring); }
.row-acts .icon-btn:hover { color: var(--brand); transform: translateY(-1px); }
.row-acts .icon-btn.danger:hover { color: var(--bad-ink); background: var(--bad-bg); }
.data tr .row-acts { opacity: .55; transition: opacity .15s; } .data tr:hover .row-acts, .data tr:focus-within .row-acts { opacity: 1; }
@media (hover: none) { .data tr .row-acts { opacity: 1; } }
.modal-foot .ghost-left { margin-right: auto; border-color: transparent; }
.acct-meta { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(110deg, color-mix(in srgb, var(--brand) 9%, var(--surface)), color-mix(in srgb, var(--orange) 7%, var(--surface))); animation: rise .35s var(--ease) both; }
.acct-meta > div { display: grid; gap: 2px; min-width: 0; }
.acct-company { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--brand); border-radius: 12px; background: color-mix(in srgb, var(--brand) 6%, var(--surface)); color: var(--brand); animation: pop-in .25s var(--spring); }
.acct-company > div { display: grid; flex: 1; min-width: 0; color: var(--ink); }
.pw-row { display: flex; gap: 6px; align-items: center; } .pw-row input { flex: 1; min-width: 0; letter-spacing: .04em; }
.stack-sm { display: grid; gap: 8px; margin-top: 6px; }
.acct-done { display: flex; gap: 14px; align-items: center; }
.acct-done-ic { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #22a565, #128a52); box-shadow: 0 10px 24px -10px #128a52; animation: pop-in .4s var(--spring); }
.acct-cred { padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--surface-2, var(--tint)); }
.acct-cred dd { word-break: break-all; }
.contact-li { align-items: flex-start; }
.contact-li .primary-tag { margin-left: 6px; font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--tint); color: var(--brand); font-weight: 700; }
.danger-zone { border: 1px solid color-mix(in srgb, var(--bad-ink) 30%, var(--line)); background: color-mix(in srgb, var(--bad-bg) 45%, var(--surface)); }
@media (max-width: 560px) {
  .hide-sm { display: none; }
  .acct-meta small { font-size: 11.5px; }
  .modal .seg { flex-wrap: wrap; }
}
.acct-search { position: relative; display: block; max-width: 460px; margin-bottom: 14px; }
.acct-search .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.acct-search input { padding-left: 40px; border-radius: 999px; }
.acct-table .c-cust a, .acct-table .ic-txt { display: inline-flex; align-items: center; gap: 5px; } .acct-table .c-cust .i, .acct-table .ic-txt .i { color: var(--muted); }
.m-only { display: none; }
@media (max-width: 640px) {
  .stat-row.stat-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat-row.stat-3 .stat { padding: 10px 12px; } .stat-row.stat-3 .stat b { font-size: 20px; } .stat-row.stat-3 .stat span { font-size: 11.5px; }
  .acct-search { max-width: none; }
  /* accounts become cards: name + status on top, company, then language · RFIs · last sign-in, then actions */
  .acct-table .tablewrap { overflow: visible; border: 0; background: none; box-shadow: none; }
  .acct-table .data, .acct-table .data tbody { display: block; } .acct-table .data thead { display: none; }
  .acct-table .data tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 12px 12px 8px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); animation: rise .35s var(--ease) both; }
  .acct-table .data td { display: block; padding: 0; border: 0; background: none !important; }
  .acct-table td.tick { order: 0; } .acct-table td.c-acct { order: 1; flex: 1 1 0; min-width: 0; } .acct-table td.c-status { order: 2; }
  .acct-table td.c-cust { order: 3; flex-basis: 100%; padding-left: 30px; } .acct-table td.c-cust small { display: inline !important; margin-left: 6px; }
  .acct-table td.c-lang, .acct-table td.c-rfi, .acct-table td.c-login { order: 4; font-size: 12.5px; color: var(--muted); text-align: left; }
  .acct-table td.c-lang { padding-left: 30px; } .acct-table td.c-rfi::before, .acct-table td.c-login::before { content: '·'; margin-right: 8px; }
  .acct-table td.c-acts { order: 5; flex-basis: 100%; display: flex; justify-content: flex-end; border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 4px; }
  .acct-table .row-acts { opacity: 1 !important; }
  .m-only { display: inline; }
}
/* built-in logo on the dark sidebar: white-text version, no white tile */
.side .brand img.on-dark { background: none; padding: 4px 6px; border-radius: 0; max-width: 176px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .25)); transition: transform .3s var(--spring); }
.side .brand:hover img.on-dark { transform: scale(1.03); }
/* the request a client has just sent: highlighted once when they land back on the overview */
.req-card.just-sent { border-color: color-mix(in srgb, var(--orange) 60%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--orange) 16%, transparent), var(--lift); animation: rise .45s var(--ease) both, sentglow 2.4s ease-out .45s; }
.req-card.just-sent::before { opacity: 1; }
.just-tag { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 2px 10px; border-radius: 999px; background: linear-gradient(100deg, var(--accent), var(--orange)); color: #fff; font-size: 11.5px; font-weight: 700; animation: pop-in .4s var(--spring) .3s both; }
@keyframes sentglow { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--orange) 55%, transparent), var(--lift); } 60% { box-shadow: 0 0 0 14px transparent, var(--lift); } 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--orange) 16%, transparent), var(--lift); } }
/* quotation preview: bilingual headings like the printed form (second language, English beside it) */
.q-bi { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 .35em; }
.q-bi > span { animation: fade .25s ease-out; }
.q-table th .q-bi { justify-content: center; }
.q-table th.unit .q-bi { flex-direction: column; align-items: center; }
/* client header logo: no box behind it; white-text version on the dark theme */
.portal-top .brand img { background: none !important; padding: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.logo-for-dark { display: none !important; }
:root[data-theme="dark"] .logo-for-light { display: none !important; }
:root[data-theme="dark"] .logo-for-dark { display: block !important; }

/* ── Print preview (staff and client): the real printed form, scaled to fit any screen ── */
.pv-back { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-rows: auto 1fr; background: color-mix(in srgb, #0f1533 88%, transparent); backdrop-filter: blur(8px); animation: fade .2s ease-out; }
.pv-back.closing { animation: fade .18s ease-in reverse forwards; }
.pv-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; padding: 10px 16px; background: var(--surface); box-shadow: 0 6px 24px -10px rgba(0, 0, 0, .5); position: relative; animation: drop .3s var(--ease); }
.pv-bar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--stripe); }
.pv-title { display: flex; align-items: center; gap: 10px; min-width: 0; } .pv-title > div { display: grid; min-width: 0; } .pv-title b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .pv-title small { color: var(--muted); font-size: 12px; }
.pv-ico { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--grad); }
.pv-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pv-zoom { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 10px; }
.pv-zoom .icon-btn { width: 30px; height: 30px; font-size: 18px; font-weight: 700; } .pv-zoom-val { min-width: 44px; text-align: center; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); }
.pv-zoom .pv-fit { min-height: 30px; padding: 4px 10px; }
.pv-close { width: 38px; height: 38px; }
.pv-stage { position: relative; overflow: auto; padding: 24px; display: grid; justify-items: center; align-content: start; -webkit-overflow-scrolling: touch; }
.pv-paper { position: relative; overflow: hidden; border-radius: 4px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .6); transition: opacity .3s; background: #e9ebf5; }
.pv-frame { display: block; border: 0; transform-origin: 0 0; background: #fff; }
.pv-back.busy .pv-paper { opacity: .35; }
.pv-loading { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%); display: none; align-items: center; gap: 12px; padding: 14px 20px; border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--lift); }
.pv-back.busy .pv-loading { display: inline-flex; animation: pop-in .3s var(--spring); }
.pv-spin { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--tint); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@media (max-width: 720px) {
  .pv-bar { padding: 8px 10px; } .pv-title b { font-size: 14px; } .pv-ico { width: 30px; height: 30px; }
  .pv-tools { width: 100%; justify-content: space-between; } .pv-lbl { display: none; } .pv-zoom-val { min-width: 38px; }
  .pv-close { position: absolute; top: 6px; right: 8px; }
  .pv-title { padding-right: 44px; }
  .pv-stage { padding: 8px; }
}
@media print { .pv-back { display: none !important; } }
/* client request form: the step bar is also the navigation — click any step to go there */
.steps-nav .step-btn { display: grid; justify-items: center; gap: 5px; width: 100%; padding: 4px 2px 6px; border: 0; border-radius: 12px; background: none; color: inherit; font: inherit; cursor: pointer; transition: background .15s, transform .2s var(--spring); }
.steps-nav .step-btn:hover { background: color-mix(in srgb, var(--brand) 7%, transparent); }
.steps-nav .step-btn:hover .step-no { transform: scale(1.08); border-color: var(--brand-2); }
.steps-nav .step-btn:active { transform: scale(.97); }
.steps-nav .step-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.steps-nav li.on .step-btn { cursor: default; } .steps-nav li.on .step-btn:hover { background: none; } .steps-nav li.on .step-btn:hover .step-no { transform: none; }
.steps-nav .step-no { transition: transform .2s var(--spring), border-color .15s, background .2s; }
