/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 10px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.frame { min-height: 100vh; display: flex; flex-direction: column; }
.app { flex: 1; width: 100%; max-width: 1480px; margin: 0 auto; padding: 0 var(--gutter) 40px; outline: none; }

/* ---------- top bar ---------- */
.topbar { background: var(--surface); position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--line); }
.topbar__inner {
  max-width: 1480px; margin: 0 auto; padding: 12px var(--gutter);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px 20px;
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo__mark { font-weight: 800; font-size: 26px; letter-spacing: -0.04em; line-height: 1; }
.logo__mark b { color: var(--violet); font-weight: 800; }
.logo__name { font-size: 12px; line-height: 1.15; font-weight: 600; color: var(--ink-2); display: none; }
.search {
  grid-column: 1 / -1; grid-row: 2;
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border-radius: var(--r-pill); padding: 0 16px; height: 44px; max-width: 420px; width: 100%;
}
.search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search input { border: 0; background: transparent; outline: none; width: 100%; height: 100%; font-size: var(--fs-sm); }
.search:focus-within { box-shadow: var(--focus); }
.nav { display: flex; align-items: center; gap: 4px; justify-self: end; grid-column: 3; }
.nav__link {
  position: relative; display: inline-flex; white-space: nowrap; align-items: center; gap: 8px;
  padding: 9px 10px; border-radius: var(--r-pill); color: var(--ink); font-weight: 600; font-size: var(--fs-sm);
}
.nav__link:hover { background: var(--bg); text-decoration: none; }
.nav__link.is-active { background: var(--violet-soft); color: var(--violet-ink); }
.nav__link svg { width: 21px; height: 21px; }
.nav__label { display: none; }
.nav__count {
  position: absolute; top: 3px; left: 22px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: var(--r-pill); background: #F2542D; color: #fff; font-size: 10.5px; font-weight: 700;
  display: grid; place-items: center; line-height: 1;
}
.nav__count[hidden] { display: none; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--violet-soft); color: var(--violet-ink);
  display: grid; place-items: center; font-weight: 700; font-size: 13px; margin-left: 6px; flex: none;
}

@media (min-width: 760px) {
  .topbar__inner { grid-template-columns: auto minmax(200px, 380px) 1fr; padding-top: 16px; padding-bottom: 16px; }
  .search { grid-column: 2; grid-row: 1; }
  .logo__name { display: block; }
}
@media (min-width: 1080px) {
  .nav { gap: 8px; }
  .nav__label { display: inline; }
  .nav__count { left: 20px; top: 1px; }
}

/* ---------- case strip & page head ---------- */
.case-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  padding: 14px 0 0; font-size: var(--fs-xs); color: var(--muted);
}
.case-strip strong { color: var(--ink-2); font-weight: 700; }
.dot { width: 4px; height: 4px; border-radius: 50%; background: var(--muted-2); }

.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; padding: 22px 0 18px; }
.page-head h1 { font-size: var(--fs-xl); font-weight: 800; }
.page-head p { color: var(--muted); font-size: var(--fs-sm); margin-top: 4px; max-width: 60ch; }

/* ---------- chips ---------- */
.chips {
  display: flex; gap: 10px; padding: 16px 0; margin: 0 calc(var(--gutter) * -1);
  padding-left: var(--gutter); padding-right: var(--gutter);
  overflow-x: auto; scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 0; background: var(--surface); color: var(--ink); font-weight: 600; font-size: var(--fs-sm);
  padding: 10px 18px; border-radius: var(--r-pill); white-space: nowrap; transition: background .15s, color .15s;
}
.chip:hover { background: var(--violet-faint); }
.chip.is-active { background: var(--violet); color: #fff; }
.chip__n { margin-left: 6px; font-weight: 700; opacity: .55; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: var(--r-pill); padding: 11px 20px; font-weight: 700; font-size: var(--fs-sm);
  background: var(--bg); color: var(--ink); text-decoration: none; transition: background .15s, transform .05s;
}
.btn:hover { text-decoration: none; background: #E4E7EE; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--violet); color: #fff; }
.btn--primary:hover { background: var(--violet-strong); }
.btn--outline { background: transparent; box-shadow: inset 0 0 0 1.5px var(--violet); color: var(--violet-ink); }
.btn--outline:hover { background: var(--violet-faint); }
.btn--block { width: 100%; }
.btn--sm { padding: 7px 14px; font-size: var(--fs-xs); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface); color: var(--violet);
  display: grid; place-items: center; flex: none;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: var(--violet-faint); }
.icon-btn--ghost { background: var(--bg); color: var(--ink); }
.link-btn { border: 0; background: none; padding: 0; color: var(--violet); font-weight: 600; font-size: var(--fs-sm); }
.link-btn:hover { text-decoration: underline; }

/* ---------- cards & forms ---------- */
.card { background: var(--surface); border-radius: var(--r-card); padding: 20px; }
.card + .card { margin-top: 12px; }
.card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card__head h2, .card__head h3 { font-size: 17px; font-weight: 700; }
.card__head .link-btn, .card__head .muted { font-size: var(--fs-xs); }

.field { display: grid; gap: 6px; }
.field + .field { margin-top: 14px; }
.field > span { font-size: var(--fs-xs); font-weight: 700; color: var(--ink-2); letter-spacing: .01em; }
.field small { color: var(--muted); font-size: var(--fs-xs); }
.input, .select, .textarea {
  width: 100%; border: 1.5px solid transparent; background: var(--bg); border-radius: 14px;
  padding: 11px 14px; font-size: var(--fs-sm); outline: none;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--violet); background: var(--surface); }
.textarea { min-height: 84px; resize: vertical; }
.row { display: grid; gap: 14px; }
@media (min-width: 560px) { .row--2 { grid-template-columns: 1fr 1fr; } .row--3 { grid-template-columns: 1fr 1fr 1fr; } }
.row .field + .field { margin-top: 0; }

.check { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: var(--fs-md); cursor: pointer; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check__box {
  width: 24px; height: 24px; border-radius: 7px; flex: none; margin-left: auto;
  border: 1.5px solid var(--violet); display: grid; place-items: center; color: #fff; background: var(--surface);
}
.check__box svg { width: 15px; height: 15px; opacity: 0; }
.check input:checked + .check__box { background: var(--violet); }
.check input:checked + .check__box svg { opacity: 1; }
.check input:focus-visible + .check__box { box-shadow: var(--focus); }
.check__icon { width: 26px; height: 26px; border-radius: 8px; background: var(--bg); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.check__icon svg { width: 15px; height: 15px; }
.check__n { color: var(--muted); font-size: var(--fs-xs); font-weight: 600; }
.check--left .check__box { margin-left: 0; }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; background: var(--bg); padding: 4px; border-radius: var(--r-pill); }
.segmented button {
  border: 0; background: transparent; border-radius: var(--r-pill); padding: 10px 12px; font-weight: 600; font-size: var(--fs-sm); color: var(--ink);
}
.segmented button.is-active { background: var(--violet); color: #fff; }
.segmented button[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- tags & badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; border-radius: var(--r-pill);
  padding: 4px 12px; font-size: 12.5px; font-weight: 700; white-space: nowrap; line-height: 1.4;
}
.badge--available { background: var(--yellow); color: var(--yellow-ink); }
.badge--reserved { background: var(--violet); color: #fff; }
.badge--upcoming { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.badge--pending { background: #E6E8EE; color: var(--ink-2); }
.badge--done { background: var(--ink); color: #fff; }

.tag {
  display: inline-flex; align-items: center; gap: 4px; border-radius: 8px; padding: 2px 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; line-height: 1.6; vertical-align: middle;
}
.tag--briefing { background: var(--violet-soft); color: var(--violet-ink); }
.tag--course { background: #E7F0FF; color: #1D4FA8; }
.tag--reference { background: #E8F4F1; color: #17665A; }
.tag--general { background: #F1F2F5; color: var(--ink-2); }
.tag--sim { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-strong); }
.tag--unknown { background: #F1F2F5; color: var(--muted); }
.tag--ai { background: var(--warn-soft); color: var(--warn); }

/* ---------- browse layout ---------- */
.browse { display: grid; gap: var(--gap); align-items: start; }
.browse__filters { display: none; }
.browse__filters.is-open { display: block; }
.browse__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.browse__bar .muted { font-size: var(--fs-sm); }
.filters-toggle { display: inline-flex; }

@media (min-width: 900px) {
  .browse { grid-template-columns: 270px minmax(0, 1fr); }
  .browse__filters { display: block; position: sticky; top: 96px; }
  .filters-toggle { display: none; }
}

/* ---------- material cards ---------- */
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.mcard {
  position: relative; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-card);
  text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; outline: none;
}
.mcard:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.mcard:focus-visible { box-shadow: var(--focus); }
.mcard.is-selected { box-shadow: 0 0 0 2.5px var(--violet); }
.mcard__media {
  position: relative; aspect-ratio: 1 / .82; background: var(--tile); border-radius: var(--r-card) var(--r-card) 0 0;
  display: grid; place-items: center; overflow: hidden;
}
.mcard__media img, .mcard__media .illo { width: 72%; height: 72%; object-fit: contain; }
.mcard__media img.photo { width: 100%; height: 100%; object-fit: cover; }
.mcard__fav { position: absolute; top: 12px; right: 12px; z-index: 2; }
.mcard__fav.is-on svg { fill: var(--violet); }
.mcard__deal { position: absolute; top: 12px; left: 12px; z-index: 2; }
.mcard__badge { position: absolute; left: 50%; top: 0; transform: translate(-50%, -50%); z-index: 2; }
.mcard__body { position: relative; padding: 26px 16px 18px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.mcard__title { font-size: 16px; font-weight: 700; max-width: 100%; }
.mcard__link { color: inherit; text-decoration: none; }
.mcard__link:hover { text-decoration: none; }
.mcard__link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.mcard__link:focus-visible { box-shadow: none; }
.mcard:focus-within { box-shadow: var(--focus); }
.mcard.is-selected:focus-within { box-shadow: 0 0 0 2.5px var(--violet); }
.mcard__meta { font-size: var(--fs-xs); color: var(--muted); }
.qty {
  display: inline-flex; align-items: center; gap: 8px; border-radius: var(--r-pill); padding: 6px 14px;
  box-shadow: inset 0 0 0 1.5px var(--violet); color: var(--violet-ink); font-weight: 700; font-size: var(--fs-sm); white-space: nowrap;
}
.qty svg { width: 17px; height: 17px; flex: none; }
@media (max-width: 420px) {
  .qty { padding: 6px 10px; gap: 6px; font-size: var(--fs-xs); }
  .mcard__title { font-size: 15px; }
  .mcard__body { padding-left: 10px; padding-right: 10px; }
}
[tabindex="-1"]:focus { outline: none; box-shadow: none; }
.qty__sim { font-size: 10.5px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.qty--unknown { box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--muted); }

.empty { background: var(--surface); border-radius: var(--r-card); padding: 40px 24px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--ink); font-size: 17px; margin-bottom: 6px; }

.kv { display: grid; gap: 2px; }
.kv__label { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.kv__value { font-size: var(--fs-sm); color: var(--ink); font-weight: 600; }
.kv__value .tag { margin-left: 6px; }
.note { font-size: var(--fs-sm); color: var(--ink-2); background: var(--bg); border-radius: var(--r-sm); padding: 10px 12px; }
.note .tag { margin-left: 4px; }
.note svg { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.list { margin: 0; padding-left: 18px; font-size: var(--fs-sm); color: var(--ink-2); display: grid; gap: 4px; }

/* ---------- steps / timeline ---------- */
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.step { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); padding: 7px 12px 7px 8px; border-radius: var(--r-pill); background: var(--surface); }
.step__n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); color: var(--ink-2); font-size: 11px; }
.step.is-current { color: var(--violet-ink); box-shadow: inset 0 0 0 1.5px var(--violet); }
.step.is-current .step__n { background: var(--violet); color: #fff; }
.step.is-done .step__n { background: var(--ink); color: #fff; }

.track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 0 4px; }
.track__item { font-size: 11px; font-weight: 700; color: var(--muted); display: grid; gap: 6px; }
.track__bar { height: 6px; border-radius: var(--r-pill); background: var(--line); }
.track__item.is-done .track__bar { background: var(--violet); }
.track__item.is-done { color: var(--violet-ink); }

/* ---------- two-column pages ---------- */
.split { display: grid; gap: var(--gap); align-items: start; }
@media (min-width: 980px) { .split { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } .split__aside { position: sticky; top: 96px; } }

.upload {
  display: grid; place-items: center; gap: 8px; text-align: center; padding: 28px 16px; border-radius: var(--r-md);
  background: var(--bg); border: 1.5px dashed var(--line-strong); color: var(--muted); font-size: var(--fs-sm); cursor: pointer;
}
.upload:hover { border-color: var(--violet); color: var(--violet-ink); }
.upload svg { width: 28px; height: 28px; }
.upload strong { color: var(--ink); }
.preview { border-radius: var(--r-md); background: var(--tile); aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; }
.preview img { width: 100%; height: 100%; object-fit: cover; }
.preview .illo { width: 55%; height: 80%; }
.scenarios { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.scenario {
  border: 0; background: var(--bg); border-radius: var(--r-md); padding: 10px 8px 12px; display: grid; gap: 6px; justify-items: center;
  font-size: var(--fs-xs); font-weight: 700; color: var(--ink-2); text-align: center;
}
.scenario .illo { width: 64px; height: 52px; }
.scenario.is-active { background: var(--violet-soft); color: var(--violet-ink); box-shadow: inset 0 0 0 1.5px var(--violet); }

.docs { display: grid; gap: 8px; }
.doc {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: var(--r-md); background: var(--bg); font-size: var(--fs-sm);
}
.doc__state { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--muted); }
.doc__state svg { width: 15px; height: 15px; }
.doc.is-ready .doc__state { background: var(--violet); color: #fff; }
.doc__name { font-weight: 600; }
.doc__file { display: block; color: var(--muted); font-size: var(--fs-xs); font-weight: 500; }
.doc label.btn { cursor: pointer; }
.doc input[type=file] { position: absolute; opacity: 0; width: 1px; height: 1px; }

/* ---------- requests ---------- */
.req { display: grid; gap: 14px; grid-template-columns: 72px minmax(0, 1fr); align-items: start; }
.req__media { width: 72px; height: 72px; border-radius: var(--r-md); background: var(--tile); display: grid; place-items: center; }
.req__media .illo { width: 52px; height: 52px; }
.req__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.req__title { font-weight: 700; }
.req__meta { color: var(--muted); font-size: var(--fs-xs); margin-top: 2px; }
.req__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ---------- statement ---------- */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.tile { background: var(--surface); border-radius: var(--r-card); padding: 18px; display: grid; gap: 6px; align-content: start; }
.tile__label { font-size: var(--fs-xs); color: var(--muted); font-weight: 700; }
.tile__value { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.tile__value.is-unknown { color: var(--muted-2); }
.tile__foot { font-size: var(--fs-xs); color: var(--muted); }
.section-title { font-size: var(--fs-lg); font-weight: 800; margin: 28px 0 12px; }

.elev { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 0 14px; }
.elev__floors { display: grid; }
.elev__floor { height: 14px; font-size: 10px; color: var(--muted); font-weight: 600; text-align: right; line-height: 14px; }
.elev__chart { position: relative; }
.elev__row { height: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-items: center; }
.elev__cell { height: 10px; border-radius: 3px; background: var(--tile); }
.elev__cell.is-bracket { background: var(--violet); }
.elev__cell.is-fan { background: var(--yellow); }
.elev__cell.is-deck { background: var(--ink-2); }
.elev__legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: var(--fs-xs); color: var(--ink-2); margin-top: 14px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; vertical-align: -2px; margin-right: 6px; }

.lifts { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.lift { border-radius: var(--r-sm); background: var(--bg); padding: 10px; display: grid; gap: 2px; }
.lift__n { font-size: 11px; font-weight: 800; color: var(--violet-ink); }
.lift__floors { font-size: var(--fs-xs); font-weight: 700; }
.lift__note { font-size: 10.5px; color: var(--muted); }

.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--r-card); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 680px; }
.table th, .table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: var(--fs-xs); color: var(--muted); font-weight: 700; }
.table tr:last-child td { border-bottom: 0; }
.table td strong { display: block; }

/* ---------- footer & toast ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer__inner {
  max-width: 1480px; margin: 0 auto; padding: 16px var(--gutter); display: flex; flex-wrap: wrap; gap: 6px 18px;
  font-size: var(--fs-xs); color: var(--muted);
}
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 600;
  transition: opacity .2s, transform .2s; z-index: 90; max-width: calc(100vw - 32px);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* =====================================================================
   Multi-company platform: roles, deals, passport page, cart, inspection
   ===================================================================== */

.panel__eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.tag--demo { background: var(--violet-faint); color: var(--violet-ink); box-shadow: inset 0 0 0 1px rgba(94, 73, 246, .45); }
.select--sm { width: auto; padding: 7px 12px; font-size: var(--fs-xs); border-radius: var(--r-pill); }
.sub { font-size: var(--fs-md); font-weight: 700; margin: 22px 0 10px; }
.check__text { display: grid; }
.check__text small { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: 11.5px; font-weight: 500; }

/* deal chip */
.deal {
  display: inline-flex; align-items: center; gap: 5px; border-radius: var(--r-pill); padding: 4px 10px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap; background: var(--surface); color: var(--ink-2);
  box-shadow: 0 1px 2px rgba(21, 21, 29, .06);
}
.deal svg { width: 13px; height: 13px; }
.deal--lease { background: var(--violet-soft); color: var(--violet-ink); }
.deal--lg { padding: 7px 14px; font-size: var(--fs-sm); }
.deal--lg svg { width: 16px; height: 16px; }

/* role switcher */
.role { position: relative; margin-left: 4px; }
.role__btn {
  display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--ink);
  padding: 4px; border-radius: var(--r-pill); text-align: left;
}
.role__btn:hover { background: var(--bg); }
.role__btn > svg { width: 16px; height: 16px; flex: none; color: var(--muted); display: none; }
.role .avatar { margin-left: 0; }
.role__text { display: none; line-height: 1.2; }
.role__text strong { font-size: 13px; }
.role__text small { display: block; font-size: 11.5px; color: var(--muted); }
.role__menu {
  position: absolute; right: 0; top: calc(100% + 10px); width: min(360px, calc(100vw - 24px)); z-index: 80;
  background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-pop), 0 0 0 1px var(--line); padding: 8px;
  animation: pop .14s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.role__hint { font-size: 11.5px; color: var(--muted); padding: 6px 10px 8px; }
.role__item {
  display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: transparent; padding: 10px;
  border-radius: 14px; text-align: left; color: var(--ink);
}
.role__item:hover { background: var(--bg); }
.role__item.is-on { background: var(--violet-faint); box-shadow: inset 0 0 0 1.5px var(--violet); }
.role__item .role__text { display: grid; flex: 1; }
@media (min-width: 1080px) {
  .role__btn { padding-right: 12px; }
  .role__btn .role__text { display: grid; }
  .role__btn > svg { display: block; }
}
.nav__count--inline { position: static; display: inline-grid; margin-left: 4px; vertical-align: 1px; }

/* passport page */
.pp { padding-top: 14px; }
.pp__crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; font-size: var(--fs-xs); }
.pp__hero { display: grid; gap: var(--gap); }
.pp__media {
  position: relative; background: var(--tile); border-radius: var(--r-card); aspect-ratio: 4 / 3;
  display: grid; place-items: center; overflow: hidden;
}
.pp__media .illo { width: 66%; height: 66%; }
.pp__media img.photo { width: 100%; height: 100%; object-fit: cover; }
.pp__media .mcard__fav { top: 14px; right: 14px; }
.pp__info { display: flex; flex-direction: column; gap: 12px; padding: 22px; }
.pp__title { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.pp__origin { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-sm); color: var(--ink-2); }
.pp__origin svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--muted); }
.pp__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pp__request { background: var(--bg); border-radius: var(--r-md); padding: 16px; }
.pp__why { font-size: var(--fs-xs); text-align: center; margin-top: 8px; }
.pp__tabs, .pp__where { margin-top: var(--gap); }
.pp__where { display: grid; gap: var(--gap); align-items: start; }
.pp__where > .card + .card, .split > .card + .card { margin-top: 0; }
.split > *, .pp__where > *, .pp__hero > * { min-width: 0; }
@media (min-width: 900px) {
  .pp__hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
  .pp__media { aspect-ratio: auto; min-height: 440px; }
  .pp__info { padding: 28px; }
  .pp__title { font-size: 32px; }
  .pp__where { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.buy { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.buy__unit { display: grid; font-weight: 700; font-size: var(--fs-sm); }
.buy__unit small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.buy__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.buy__actions .btn--primary { flex: 1 1 200px; }

.stepper { display: inline-flex; align-items: center; background: var(--surface); border-radius: var(--r-pill); padding: 4px; box-shadow: inset 0 0 0 1.5px var(--line); }
.stepper__btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--bg); font-size: 20px; font-weight: 700; line-height: 1; color: var(--ink); }
.stepper__btn:hover { background: var(--violet-soft); color: var(--violet-ink); }
.stepper__btn:active { transform: scale(.94); }
.stepper__input { width: 76px; border: 0; background: transparent; text-align: center; font-weight: 800; font-size: 17px; outline: none; -moz-appearance: textfield; }
.stepper__input::-webkit-inner-spin-button, .stepper__input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper--sm .stepper__btn { width: 30px; height: 30px; font-size: 16px; }
.stepper--sm .stepper__input { width: 58px; font-size: 14px; }

/* status timeline */
.tl { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tl__step { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); }
.tl__step::before { content: ''; position: absolute; top: 13px; right: 50%; width: 100%; height: 2px; background: var(--line); }
.tl__step:first-child::before { display: none; }
.tl__step.is-done::before, .tl__step.is-current::before { background: var(--violet); }
.tl__dot {
  position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); color: var(--ink-2); font-size: 11px; box-shadow: 0 0 0 4px var(--surface);
}
.tl__dot svg { width: 14px; height: 14px; }
.tl__step.is-done .tl__dot { background: var(--violet); color: #fff; }
.tl__step.is-current .tl__dot { background: var(--surface); color: var(--violet-ink); box-shadow: inset 0 0 0 2px var(--violet), 0 0 0 4px var(--surface); animation: ring 1.8s ease-out infinite; }
.tl__step.is-done .tl__label, .tl__step.is-current .tl__label { color: var(--ink); }
@keyframes ring { 0% { box-shadow: inset 0 0 0 2px var(--violet), 0 0 0 4px var(--surface), 0 0 0 4px rgba(94, 73, 246, .35); } 100% { box-shadow: inset 0 0 0 2px var(--violet), 0 0 0 4px var(--surface), 0 0 0 12px rgba(94, 73, 246, 0); } }

/* tabs */
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 4px; background: var(--bg); border-radius: var(--r-pill); }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; border: 0; background: transparent; padding: 9px 16px; border-radius: var(--r-pill); font-weight: 700; font-size: var(--fs-sm); color: var(--ink-2); }
.tab:hover { color: var(--ink); }
.tab.is-active { background: var(--surface); color: var(--violet-ink); box-shadow: 0 1px 3px rgba(21, 21, 29, .08); }
.tabs:not(.card .tabs) { background: var(--surface); display: inline-flex; max-width: 100%; }
.tabs:not(.card .tabs) .tab.is-active { background: var(--violet); color: #fff; }
.tabpanel { padding: 18px 4px 4px; display: grid; gap: 12px; animation: fade .2s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.kv-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .kv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hist li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; font-size: var(--fs-sm); }
.hist__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--violet); margin-top: 6px; box-shadow: 0 0 0 3px var(--violet-soft); }
.hist small { display: block; color: var(--muted); font-size: 11.5px; }

/* elevation */
.toggles { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.toggle { border: 0; border-radius: var(--r-pill); padding: 6px 12px; font-size: var(--fs-xs); font-weight: 700; background: var(--bg); color: var(--ink-2); }
.toggle.is-on { background: var(--violet-soft); color: var(--violet-ink); box-shadow: inset 0 0 0 1.5px var(--violet); }
.el { width: 100%; height: auto; max-height: 440px; font-family: var(--font); }
.el-fl { fill: var(--tile); transition: fill .15s; }
.el-fl:hover { fill: var(--violet-soft); }
.el-pod { fill: #E4E7ED; }
.el-fl.is-zone { fill: #E4E0FD; }
.el-fl.is-hit { fill: var(--violet); }
.el-fl.is-hit:hover { fill: var(--violet-strong); }
.el-outline { fill: none; stroke: var(--line-strong); stroke-width: 1.2; }
.el-outline.is-zone { stroke: var(--violet); stroke-width: 2; }
.el-bracket { fill: var(--violet-ink); }
.el-fan { stroke: #E0B100; stroke-width: 2.5; stroke-linecap: round; fill: none; }
.el-deck { fill: var(--ink); }
.el-ground { stroke: var(--ink); stroke-width: 1.5; }
.el-label { font-size: 8.5px; fill: var(--muted); font-weight: 600; }
.el-name { font-size: 10px; fill: var(--ink-2); font-weight: 700; }

/* map */
.map { width: 100%; height: auto; max-height: 300px; font-family: var(--font); }
.map-bg { fill: var(--tile); }
.map-grid { stroke: #E0E3E9; stroke-width: 1; }
.map-route { stroke: var(--violet); stroke-width: 2.5; stroke-dasharray: 6 5; animation: dash 1.1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -22; } }
.map-pill { fill: var(--surface); stroke: var(--violet); stroke-width: 1.5; }
.map-km { font-size: 11px; font-weight: 800; fill: var(--violet-ink); }
.map-site circle { fill: #C9CED8; stroke: var(--surface); stroke-width: 2; }
.map-site.is-mine circle { fill: var(--violet); }
.map-site.is-there circle { fill: var(--yellow); stroke: var(--ink); stroke-width: 1.5; }
.map-site text { font-size: 10px; font-weight: 700; fill: var(--ink-2); }

/* request list lines */
.lines { display: grid; gap: 10px; margin: 14px 0; }
.line { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px; border-radius: var(--r-md); background: var(--bg); }
.line.is-blocked { box-shadow: inset 0 0 0 1.5px var(--warn); }
.line__media { width: 64px; height: 64px; border-radius: 12px; background: var(--surface); display: grid; place-items: center; overflow: hidden; }
.line__media .illo { width: 52px; height: 52px; }
.line__media img.photo { width: 100%; height: 100%; object-fit: cover; }
.line__main { display: grid; gap: 4px; min-width: 0; }
.line__name { font-weight: 700; color: var(--ink); text-decoration: none; }
.line__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--muted); }
.line__qty { display: grid; justify-items: end; gap: 4px; }
.line__qty small { font-size: 11px; color: var(--muted); }
.line--compact { grid-template-columns: 48px minmax(0, 1fr); padding: 8px; }
.line--compact .line__media { width: 48px; height: 48px; }
.line--compact .illo { width: 40px; height: 40px; }
@media (max-width: 640px) {
  .line { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .line__media { width: 56px; height: 56px; }
  .line__qty { grid-column: 1 / -1; grid-row: 2; grid-auto-flow: column; justify-content: start; align-items: center; justify-items: start; }
}
.group__head { display: flex; gap: 12px; align-items: center; }
.group__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }

/* inspection */
.insp { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: start; }
.insp__media { width: 96px; height: 96px; border-radius: var(--r-md); background: var(--tile); display: grid; place-items: center; overflow: hidden; }
.insp__media .illo { width: 80px; height: 80px; }
.insp__media img.photo { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 480px) { .insp { grid-template-columns: 64px minmax(0, 1fr); } .insp__media { width: 64px; height: 64px; } .insp__media .illo { width: 54px; height: 54px; } }

/* card ↔ passport morph */
::view-transition-group(*) { animation-duration: .38s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
