:root {
  --ink: #071416;
  --ink-2: #0f2428;
  --ink-soft: #17363b;
  --rail: #071416;
  --canvas: #f3f5f4;
  --surface: #ffffff;
  --text: #101c1e;
  --muted: #5a6a6d;
  --line: rgba(7, 20, 22, 0.09);
  --line-strong: rgba(7, 20, 22, 0.16);
  --amber: #d4922a;
  --amber-soft: rgba(212, 146, 42, 0.14);
  --action: #0d6b4f;
  --action-2: #0a5640;
  --danger: #9b2c2c;
  --font-display: "Syne", Georgia, sans-serif;
  --font-body: "DM Sans", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --rail-w: 232px;
  --top: 60px;
  --nav-h: 62px;
  --radius: 12px;
  --space: 1.15rem;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--canvas);
  overflow-x: clip;
  font-feature-settings: "ss01" on;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; display: block; }
.app-root { min-height: 100vh; }

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.28rem;
  letter-spacing: -0.055em;
  text-decoration: none;
  color: var(--ink);
}
.brand em { font-style: normal; color: var(--amber); }

/* Buttons */
.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.btn-action, .btn-primary, .btn-signal {
  background: var(--action);
  color: #f4fbf8;
}
.btn-action:hover, .btn-primary:hover, .btn-signal:hover { background: var(--action-2); }
.btn-dark { background: var(--ink); color: #eef4f3; }
.btn-dark:hover { background: var(--ink-soft); }
.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover { background: rgba(7, 20, 22, 0.04); }
.btn-sm { padding: 0.42rem 0.72rem; font-size: 0.86rem; }
.btn-block { width: 100%; }

/* Toast */
.toast {
  position: fixed;
  top: .85rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  width: min(440px, calc(100% - 1.5rem));
  border-radius: 10px;
  padding: .72rem .9rem;
  font-size: .9rem;
  font-weight: 650;
  box-shadow: 0 14px 36px rgba(7, 20, 22, 0.16);
}
.toast.error { color: var(--danger); background: #fff5f4; border: 1px solid rgba(155, 44, 44, .18); }
.toast.ok { color: var(--action-2); background: #eef8f3; border: 1px solid rgba(13, 107, 79, .18); }

/* Gate */
.gate-screen {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
}
.gate-visual {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  color: #f2f7f6;
}
.gate-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: drift 24s var(--ease) infinite alternate;
}
.gate-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(7, 20, 22, .72) 8%, rgba(7, 20, 22, .28) 50%, rgba(7, 20, 22, .78) 100%);
}
.gate-visual-copy {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1.5rem, 4vw, 3rem);
  max-width: 34rem;
}
.gate-visual-copy .brand {
  color: #fff;
  font-size: clamp(2.5rem, 5vw, 3.6rem);
  margin: 0 0 .7rem;
}
.gate-visual-copy .brand em { color: #e8b04a; }
.gate-visual-copy h1 {
  margin: 0 0 .55rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: -.04em;
  line-height: 1.1;
  max-width: 14ch;
}
.gate-visual-copy p { margin: 0; color: rgba(242, 247, 246, .82); max-width: 30ch; }
.gate-panel {
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
  background: #fafbfb;
}
.gate-card { width: min(390px, 100%); }
.gate-eyebrow {
  margin: 0 0 .45rem;
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--action);
}
.gate-card h2 {
  margin: 0 0 .4rem;
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: -.045em;
}
.gate-card .lead { margin: 0 0 1.3rem; color: var(--muted); line-height: 1.45; }
.gate-links {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 1.2rem;
  font-size: .88rem;
  font-weight: 650;
}
.gate-links a { color: var(--muted); text-decoration: none; }
.gate-links a:hover { color: var(--ink); }

/* Workspace */
.workspace {
  min-height: 100svh;
  display: grid;
  grid-template-columns: var(--rail-w) 1fr;
  background: var(--canvas);
}

.rail {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.2rem .85rem 1rem;
  background: var(--rail);
  color: #dce7e5;
}
.rail-brand {
  color: #fff;
  padding: .15rem .55rem;
  font-size: 1.3rem;
}
.rail-brand em { color: #e8b04a; }

.rail-nav { display: grid; gap: .2rem; }
.rail-nav .tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(220, 231, 229, .62);
  text-align: left;
  padding: .78rem .75rem;
  border-radius: 10px;
  font-weight: 650;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .65rem;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.rail-nav .tab span {
  font-family: var(--font-display);
  font-size: .72rem;
  letter-spacing: .04em;
  color: rgba(220, 231, 229, .35);
  min-width: 1.3rem;
}
.rail-nav .tab:hover {
  background: rgba(255, 255, 255, .05);
  color: #fff;
}
.rail-nav .tab.is-active {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}
.rail-nav .tab.is-active span { color: #e8b04a; }

.rail-credits {
  margin-top: auto;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .05);
  border-radius: 12px;
  padding: .8rem .85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: inherit;
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.rail-credits:hover { background: rgba(255, 255, 255, .08); }
.rail-credits span {
  font-size: .7rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(220, 231, 229, .5);
}
.rail-credits strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -.04em;
  color: #e8b04a;
}

.rail-foot {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  padding: .2rem .45rem 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding-top: .85rem;
}
.rail-foot a {
  color: rgba(220, 231, 229, .45);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 650;
}
.rail-foot a:hover { color: #fff; }

.workspace-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

.topbar-app {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--top);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 var(--space);
  background: rgba(243, 245, 244, .88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.topbar-kicker {
  margin: 0;
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.topbar-page {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -.03em;
  font-weight: 750;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  justify-content: flex-end;
}
.meta, .chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .38rem .65rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: .82rem;
  font-weight: 650;
  color: var(--ink);
  max-width: 210px;
}
.meta b, .chip b { color: var(--action); font-weight: 750; }
.meta-btn, .chip-btn {
  appearance: none;
  cursor: pointer;
  font: inherit;
}
.meta-btn:hover, .chip-btn:hover { border-color: var(--line-strong); }
.meta-email, .chip-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-weight: 600;
}

.content {
  flex: 1;
  padding: 1.15rem var(--space) 2rem;
  width: min(1220px, 100%);
}
.page { animation: rise .35s var(--ease) both; }

.hero-band, .page-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .9rem;
  margin-bottom: 1rem;
}
.page-head.compact { margin-bottom: .85rem; }
.hero-band h1, .page-head h1 {
  margin: 0 0 .25rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.5vw, 2rem);
  letter-spacing: -.045em;
  line-height: 1.05;
}
.sub {
  margin: 0;
  color: var(--muted);
  font-size: .94rem;
  max-width: 46ch;
}
.page-actions { display: flex; flex-wrap: wrap; gap: .4rem; }

.surface {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .95rem 1rem;
}
.surface-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .65rem;
  margin-bottom: .8rem;
}
.surface-head.tight { margin-bottom: .55rem; padding: 0 .15rem; }
.surface-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: -.03em;
}

.field { margin-bottom: .8rem; }
.field label {
  display: block;
  margin-bottom: .25rem;
  font-size: .7rem;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: .7rem .8rem;
  background: #fff;
  color: var(--text);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: rgba(13, 107, 79, .45);
  box-shadow: 0 0 0 3px rgba(13, 107, 79, .1);
}
.field textarea { min-height: 90px; resize: vertical; }
.hint { color: var(--muted); font-size: .86rem; }
.hint a { color: var(--action); font-weight: 700; text-decoration: none; }
.hint a:hover { text-decoration: underline; }

/* Home */
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .65rem;
  margin-bottom: .9rem;
}
.kpi {
  appearance: none;
  text-align: left;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .9rem .85rem;
  background: var(--surface);
  color: inherit;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.kpi:hover {
  transform: translateY(-2px);
  border-color: rgba(7, 20, 22, .2);
}
.kpi-label {
  display: block;
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.kpi strong {
  display: block;
  margin-top: .4rem;
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: -.05em;
  line-height: 1;
}
.kpi-hint {
  display: block;
  margin-top: .35rem;
  font-size: .78rem;
  color: var(--muted);
}

.dash-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: .75rem;
}
.map-surface { margin-top: .75rem; }

.pipe-bars { display: grid; gap: .5rem; }
.pipe-row {
  display: grid;
  grid-template-columns: 7rem 1fr auto;
  gap: .5rem;
  align-items: center;
  font-size: .85rem;
}
.pipe-row span:first-child { color: var(--muted); }
.pipe-track {
  height: .36rem;
  border-radius: 99px;
  background: rgba(7, 20, 22, .07);
  overflow: hidden;
}
.pipe-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--action), #15946c);
  transition: width .45s var(--ease);
}
.pipe-row em { font-style: normal; font-weight: 750; font-variant-numeric: tabular-nums; }

.dash-recent { display: grid; }
.dash-recent-item {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  padding: .62rem 0;
  cursor: pointer;
  color: inherit;
}
.dash-recent-item:first-child { border-top: 0; padding-top: 0; }
.dash-recent-item strong {
  display: block;
  font-family: var(--font-display);
  letter-spacing: -.02em;
  font-size: .96rem;
}
.dash-recent-item span {
  display: block;
  color: var(--muted);
  font-size: .8rem;
  margin-top: .1rem;
}
.dash-empty { color: var(--muted); font-size: .9rem; margin: 0; }

.banner {
  border-radius: 10px;
  padding: .75rem .9rem;
  margin-bottom: .85rem;
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.4;
}
.banner-soft { background: #e9efed; border: 1px solid var(--line); color: var(--ink-2); }
.banner-ok { background: #eef8f3; border: 1px solid rgba(13, 107, 79, .16); color: var(--action-2); }
.banner-warn { background: var(--amber-soft); border: 1px solid rgba(212, 146, 42, .28); color: #7a4e08; }
.linkish {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  color: var(--action);
  font: inherit;
  font-weight: 750;
  text-decoration: underline;
  cursor: pointer;
}
.onboarding { margin-bottom: .9rem; }
.onboard-steps {
  margin: 0 0 .85rem;
  padding-left: 1.1rem;
  color: var(--muted);
  display: grid;
  gap: .3rem;
}
.onboard-steps strong { color: var(--ink); }

/* Search */
.search-frame {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.search-bar {
  display: grid;
  grid-template-columns: 1fr 96px auto;
  gap: .6rem;
  align-items: end;
  padding: .9rem 1rem .55rem;
  border-bottom: 1px solid var(--line);
}
.search-bar .field { margin: 0; }
.search-bar .btn { height: 2.75rem; padding-inline: 1.15rem; }

.suggest-row {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding: .55rem 1rem .8rem;
  border-bottom: 1px solid var(--line);
  background: #fafbfb;
}
.suggest {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: .32rem .65rem;
  font-size: .8rem;
  font-weight: 650;
  cursor: pointer;
}
.suggest:hover { border-color: var(--line-strong); background: #f3f5f4; }

.search-split {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  min-height: min(64vh, 580px);
}
.search-map-pane { min-height: 320px; border-right: 1px solid var(--line); }
.search-list-pane {
  display: flex;
  flex-direction: column;
  min-height: 320px;
  max-height: min(64vh, 580px);
  padding: .85rem .95rem;
}
.search-list-pane .list {
  overflow: auto;
  flex: 1;
}

.map-box {
  height: min(36vh, 320px);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #d3ddd9;
}
.map-box-fill {
  height: 100%;
  min-height: 320px;
  border: 0;
  border-radius: 0;
}
.map-box > div,
.map-box-fill > div { width: 100%; height: 100%; }
.map-box .leaflet-container,
.map-box-fill .leaflet-container {
  width: 100%;
  height: 100%;
  font: inherit;
  border-radius: inherit;
}
.gmap-popup {
  font-family: var(--font-body, inherit);
  font-size: .9rem;
  line-height: 1.35;
  color: #101c1e;
  max-width: 200px;
}
.gmap-popup strong { display: block; margin-bottom: .15rem; }

.list { display: grid; gap: 0; }
.row {
  display: grid;
  gap: .35rem;
  padding: .85rem .1rem;
  border-top: 1px solid var(--line);
}
.row:first-child { border-top: 0; padding-top: .1rem; }
.row.is-active {
  background: linear-gradient(90deg, rgba(13, 107, 79, .06), transparent);
  margin: 0 -.35rem;
  padding-left: .35rem;
  padding-right: .35rem;
  border-radius: 8px;
}
.row-top {
  display: flex;
  justify-content: space-between;
  gap: .7rem;
  align-items: flex-start;
}
.row h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.02rem;
  letter-spacing: -.025em;
}
.row .meta,
.list .meta,
.dash-recent .meta {
  display: block;
  border: 0;
  background: transparent;
  padding: 0;
  max-width: none;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 500;
  border-radius: 0;
}
.badge {
  display: inline-flex;
  padding: .18rem .45rem;
  border-radius: 6px;
  background: rgba(7, 20, 22, .06);
  color: var(--ink);
  font-size: .72rem;
  font-weight: 750;
}
.actions { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .15rem; }
.tags { display: flex; flex-wrap: wrap; gap: .28rem; }
.tag {
  font-size: .7rem;
  font-weight: 750;
  color: var(--action);
  background: rgba(13, 107, 79, .08);
  padding: .16rem .4rem;
  border-radius: 6px;
}
.empty {
  color: var(--muted);
  padding: 1rem .1rem;
  font-size: .9rem;
  line-height: 1.45;
}
.empty strong { color: var(--ink); }
.empty-cta { display: grid; gap: .5rem; justify-items: start; }
.empty-cta p { margin: 0; }

/* Lists */
.lists-toolbar { display: grid; gap: .6rem; margin-bottom: .75rem; }
.lists-filter-field { margin: 0; }
.filter-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.filter-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: .34rem .65rem;
  font-size: .78rem;
  font-weight: 650;
  color: var(--muted);
  cursor: pointer;
}
.filter-chip b { margin-left: .2rem; color: var(--ink); }
.filter-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #eef4f3;
}
.filter-chip.is-active b { color: #e8b04a; }

.export-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .6rem;
  margin: 0 0 .75rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--line);
}
.export-label { color: var(--muted); font-size: .88rem; font-weight: 650; }
.export-actions { display: flex; flex-wrap: wrap; gap: .35rem; }

/* Account */
.account-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .6rem;
  margin-bottom: .85rem;
}
.summary-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .8rem .85rem;
}
.summary-card.accent {
  background: var(--ink);
  border-color: var(--ink);
  color: #eef4f3;
}
.summary-card.accent span { color: rgba(238, 244, 243, .55); }
.summary-card.accent strong { color: #e8b04a; }
.summary-card span {
  display: block;
  font-size: .7rem;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
}
.summary-card strong {
  display: block;
  margin-top: .3rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -.03em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: .75rem;
  align-items: start;
}
.packs { display: grid; gap: .5rem; }
.pack {
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  align-items: center;
  padding: .8rem .85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfc;
}
.pack.is-featured {
  border-color: rgba(212, 146, 42, .4);
  background: linear-gradient(180deg, var(--amber-soft), #fff);
}
.pack-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  margin-bottom: .15rem;
}
.pack-title strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
  letter-spacing: -.03em;
}
.pack-badge {
  font-style: normal;
  font-size: .66rem;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #7a4e08;
  background: rgba(212, 146, 42, .18);
  padding: .15rem .4rem;
  border-radius: 6px;
}
.pack-info span { color: var(--muted); font-size: .84rem; }
.pack-buy { display: grid; gap: .35rem; justify-items: end; }
.pack-price {
  font-family: var(--font-display);
  font-size: 1.12rem;
  letter-spacing: -.03em;
}

.cart-surface { position: sticky; top: calc(var(--top) + .75rem); }
.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .7rem;
  margin-bottom: .5rem;
}
.cart-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: -.03em;
}
.cart-lines { display: grid; }
.cart-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: .55rem;
  align-items: center;
  padding: .65rem 0;
  border-top: 1px solid var(--line);
}
.cart-line:first-child { border-top: 0; }
.cart-line strong {
  display: block;
  font-family: var(--font-display);
  letter-spacing: -.02em;
}
.cart-line span { color: var(--muted); font-size: .84rem; }
.qty {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .12rem;
}
.qty button {
  appearance: none;
  border: 0;
  background: transparent;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 6px;
  font-weight: 750;
  cursor: pointer;
}
.qty button:hover { background: rgba(7, 20, 22, .05); }
.qty em { font-style: normal; min-width: 1rem; text-align: center; font-weight: 750; }
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .9rem;
  margin-top: .7rem;
  padding-top: .8rem;
  border-top: 1px solid var(--line);
}
.cart-total strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.28rem;
  letter-spacing: -.03em;
}
.cart-total span { color: var(--muted); font-size: .86rem; }
.cart-empty-box { padding: .25rem 0 .45rem; }
.cart-empty { color: var(--muted); font-size: .9rem; margin: 0 0 .25rem; }
.account-help {
  margin-top: .9rem;
  padding-top: .75rem;
  border-top: 1px solid var(--line);
}

/* Bottom nav / modal */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: none;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.bottom-nav button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 750;
  font-size: .64rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  cursor: pointer;
}
.bottom-nav button.is-active { color: var(--ink); }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(7, 20, 22, .5);
  display: grid;
  place-items: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}
.modal {
  width: min(520px, 100%);
  max-height: 88vh;
  overflow: auto;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 1.15rem;
  box-shadow: 0 24px 50px rgba(7, 20, 22, .2);
}
.modal h3 {
  margin: 0 0 .4rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: -.035em;
}
.detail-grid { display: grid; gap: .45rem; margin: .8rem 0 .95rem; }
.detail-grid > div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: .45rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--line);
  font-size: .92rem;
}
.detail-grid dt { color: var(--muted); font-weight: 650; }

.hidden { display: none !important; }
.panel { display: contents; }
.section-label {
  margin: 0 0 .5rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes drift {
  from { transform: scale(1.04); }
  to { transform: scale(1.09) translate3d(-1%, -1%, 0); }
}

@media (max-width: 1100px) {
  .search-split, .dash-grid, .account-grid { grid-template-columns: 1fr; }
  .account-summary { grid-template-columns: 1fr 1fr; }
  .search-map-pane { border-right: 0; border-bottom: 1px solid var(--line); }
  .search-list-pane { max-height: none; }
  .map-box-fill { min-height: 270px; height: 270px; }
  .cart-surface { position: static; }
}

@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .rail { display: none; }
  .bottom-nav { display: grid; }
  .content {
    padding: .95rem .85rem calc(var(--nav-h) + 1.35rem + env(safe-area-inset-bottom, 0px));
  }
  .topbar-app {
    height: auto;
    min-height: var(--top);
    padding: .65rem .85rem;
    flex-direction: column;
    align-items: stretch;
  }
  .meta-row { justify-content: flex-start; }
  .meta-email { max-width: 130px; }
  .dash-kpis { grid-template-columns: 1fr 1fr; }
  .search-bar { grid-template-columns: 1fr 84px; }
  .search-bar .btn { grid-column: 1 / -1; width: 100%; }
  .gate-screen { grid-template-columns: 1fr; }
  .gate-visual { min-height: 36svh; max-height: 40svh; }
  .gate-visual-copy { padding: 3.8rem 1.1rem 1.1rem; }
  .pipe-row { grid-template-columns: 1fr auto; }
  .pipe-row span:first-child { grid-column: 1 / -1; }
  .cart-line { grid-template-columns: 1fr; }
  .cart-total { flex-direction: column; align-items: stretch; }
  .modal-backdrop { align-items: end; padding: .6rem; }
  .detail-grid > div { grid-template-columns: 1fr; gap: .12rem; }
}

@media (max-width: 520px) {
  .account-summary { grid-template-columns: 1fr; }
  .kpi strong { font-size: 1.45rem; }
  .packs .pack { flex-direction: column; align-items: stretch; }
  .pack-buy { justify-items: stretch; }
  .pack-buy .btn { width: 100%; }
}

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