/* MwabaRodgers: deep navy and gold, following the approved design. One stylesheet for the customer app and the owner panel. */
:root {
  --bg: #090c12;
  --bg-2: #0e131c;
  --panel: #111823;
  --panel-2: #161e2b;
  --line: #1f2937;
  --gold: #f0b232;
  --gold-hi: #f8d070;
  --gold-ink: #1a1405;
  --text: #f1f4f9;
  --muted: #8b96a8;
  --green: #2fd27a;
  --red: #f0645a;
  --blue: #3b82f6;
  --purple: #8b6cf6;
  --warn: #f0b232;
  --radius: 14px;
  --gold-grad: linear-gradient(180deg, #f9d57a, #eeaa28);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: radial-gradient(1100px 520px at 75% -8%, #18212f 0%, var(--bg) 62%) fixed;
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--gold-hi); }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.warn { color: var(--warn); }
.icon { flex: none; }
.flag { border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12); }

.demo-banner { background: var(--gold); color: var(--gold-ink); text-align: center; font-size: 0.85rem; font-weight: 600; padding: 6px 12px; }

/* ---- buttons and fields ---- */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn-gold { background: var(--gold-grad); color: var(--gold-ink); box-shadow: 0 6px 18px rgba(240, 178, 50, 0.18); }
.btn-ghost { background: transparent; border-color: rgba(240, 178, 50, 0.7); color: var(--gold-hi); }
.btn-danger { background: transparent; border-color: var(--red); color: var(--red); }
.btn-big { min-height: 54px; font-size: 1.05rem; width: 100%; }
.btn-sm { min-height: 38px; padding: 6px 12px; font-size: 0.9rem; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 2px;
}

.field { display: grid; gap: 6px; }
.field > span { font-size: 0.9rem; color: var(--muted); }
input[type="text"], input[type="tel"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0b1018;
  color: var(--text);
  font: inherit;
}
textarea { min-height: 96px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: center; color: var(--muted); }
.check input { width: 20px; height: 20px; accent-color: var(--gold); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; background: #0b1018; border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.seg-btn { appearance: none; border: 0; border-radius: 9px; background: transparent; color: #c3cbd8; font: inherit; font-weight: 650; min-height: 42px; padding: 6px 10px; cursor: pointer; }
.seg-btn.on { background: var(--gold-grad); color: var(--gold-ink); }

.form-msg { padding: 10px 12px; border-radius: 10px; font-size: 0.95rem; }
.form-msg.error { background: rgba(240, 100, 90, 0.12); border: 1px solid var(--red); color: #ffb4a8; }
.form-msg.ok { background: rgba(47, 210, 122, 0.12); border: 1px solid var(--green); color: #b5ecc7; }

.toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); max-width: min(92vw, 420px); background: var(--panel-2); border: 1px solid var(--gold); color: var(--text); padding: 12px 16px; border-radius: 12px; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 80; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: var(--red); }
@media (min-width: 860px) { .toast { bottom: 24px; } }

/* ================= customer app shell ================= */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 20px;
  background: rgba(9, 12, 18, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.brand img { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.wordmark { display: block; font-weight: 800; letter-spacing: 0.07em; font-size: 1.05rem; color: #fff; line-height: 1.15; text-transform: uppercase; }
.wordmark b { color: var(--gold); font-weight: 800; }
.banner-brand .wm-b { display: block; }
.brand small { display: block; font-size: 0.55rem; letter-spacing: 0.3em; color: var(--muted); text-transform: uppercase; }
.top-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn { appearance: none; position: relative; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: #cfd6e2; display: grid; place-items: center; cursor: pointer; }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); border: 2px solid var(--panel); }
.guest { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); text-decoration: none; font-size: 0.9rem; max-width: 190px; }
.guest .avatar { width: 32px; height: 32px; border-radius: 50%; background: #2a3445; display: grid; place-items: center; color: #cfd6e2; flex: none; }
.guest span.name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-btn { display: none; }
.pop { position: absolute; right: 20px; top: 62px; width: min(340px, calc(100vw - 32px)); background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 8px; display: grid; gap: 4px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); z-index: 60; }
.pop a, .pop div.item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: 0.92rem; }
.pop a:hover { background: var(--panel); }
.pop .item small { color: var(--muted); display: block; }

.layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); max-width: 1220px; margin: 0 auto; }
.sidenav { position: sticky; top: 63px; align-self: start; height: calc(100vh - 63px); padding: 18px 14px; display: flex; flex-direction: column; gap: 6px; border-right: 1px solid var(--line); }
.sidenav a.nav { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; color: #c3cbd8; text-decoration: none; font-size: 0.95rem; position: relative; }
.sidenav a.nav:hover { background: var(--panel); }
.sidenav a.nav.on, .menu-sheet a.on { background: var(--gold-grad); color: var(--gold-ink); font-weight: 700; }
.nav .nav-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.nav.on .nav-dot { background: var(--gold-ink); }
.side-foot { margin-top: auto; display: grid; gap: 8px; padding: 12px 8px 0; color: var(--muted); font-size: 0.8rem; }

.content { padding: 24px 24px 48px; display: grid; gap: 18px; align-content: start; min-width: 0; }
.page { display: grid; gap: 18px; align-content: start; }
.page-title { font-size: 1.5rem; font-weight: 750; }
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hello h1 { font-size: 1.7rem; line-height: 1.2; font-weight: 700; }
.hello h1 strong { display: block; font-weight: 800; }
.hello p { color: var(--muted); margin-top: 6px; max-width: 46ch; }

.pill { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 0.9rem; white-space: nowrap; }
.pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.pill.open .dot { background: var(--green); box-shadow: 0 0 8px var(--green); }
.pill.closed .dot { background: var(--red); }

.notice { background: var(--panel-2); border: 1px solid var(--gold); color: var(--gold-hi); border-radius: var(--radius); padding: 12px 14px; }

/* banner */
.banner {
  position: relative; overflow: hidden; border-radius: 18px; border: 1px solid var(--line);
  background: #0f1620 url("../img/hero-notes.svg") center / cover no-repeat;
  min-height: 250px;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 16px; padding: 22px;
}
.banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(9, 12, 18, 0.88) 0%, rgba(9, 12, 18, 0.55) 55%, rgba(9, 12, 18, 0.15) 100%); }
.banner > * { position: relative; }
.banner-brand { display: grid; justify-items: center; gap: 6px; text-align: center; }
.banner-brand img { width: 118px; height: 118px; border-radius: 50%; }
.banner-brand .wordmark { font-size: 1.35rem; line-height: 1.2; }
.banner-brand .cap { font-size: 0.62rem; letter-spacing: 0.32em; color: #c3cbd8; text-transform: uppercase; }
.banner-brand .swap { display: inline-flex; gap: 14px; padding: 3px 18px; border: 1px solid var(--gold); border-radius: 999px; font-size: 0.8rem; letter-spacing: 0.2em; font-weight: 600; }
.banner-brand .tag { font-style: italic; color: var(--gold-hi); font-size: 0.9rem; }
.points { background: rgba(11, 16, 24, 0.82); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; display: grid; gap: 4px; backdrop-filter: blur(4px); }
.points div { display: flex; align-items: center; gap: 12px; padding: 7px 0; font-size: 0.92rem; color: #e6ebf3; }
.points .icon { color: var(--gold); }
.points div + div { border-top: 1px solid rgba(255, 255, 255, 0.06); }

/* action tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.tile { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--text); text-decoration: none; }
.tile:hover { border-color: #2c3a50; background: var(--panel-2); }
.tile .tile-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.tile.green .tile-ico { background: #1c9a5b; }
.tile.blue .tile-ico { background: #2f6fe0; }
.tile.purple .tile-ico { background: #7a5cf0; }
.tile strong { display: block; font-size: 0.98rem; }
.tile small { color: var(--muted); }
.tile > .icon:last-child { color: var(--muted); }

/* panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; gap: 14px; }
.panel h2 { font-size: 1.1rem; font-weight: 700; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.updated { font-size: 0.85rem; color: var(--green); }
.updated.warn { color: var(--warn); }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.stack { display: grid; gap: 14px; }

/* rate rows */
.rate-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); }
.rate-row .rr-name strong { display: block; font-size: 1rem; }
.rate-row .rr-name small { color: var(--muted); }
.rr-val { text-align: right; }
.rr-val strong { display: block; font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rr-val em { font-style: normal; color: var(--muted); font-size: 0.95rem; font-weight: 500; }
.chg { display: inline-flex; align-items: center; gap: 2px; font-size: 0.8rem; font-weight: 650; }
.chg.up { color: var(--green); }
.chg.down { color: var(--red); }
.chg.flat { color: var(--muted); }
.caption { color: var(--muted); font-size: 0.85rem; }

.pills { display: flex; gap: 8px; }
.pills button { appearance: none; border: 0; background: transparent; color: #c3cbd8; font: inherit; font-weight: 650; border-radius: 999px; padding: 6px 16px; min-height: 36px; cursor: pointer; }
.pills button.on { background: var(--gold-grad); color: var(--gold-ink); }

.chart { min-height: 120px; }
.chart svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart-read { min-height: 26px; font-size: 1.05rem; }
.chart-empty { color: var(--muted); padding: 28px 8px; text-align: center; }

/* converter */
.convert { display: grid; gap: 14px; max-width: 560px; }
.money-box { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; padding: 8px 12px 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: #0b1018; }
.money-box .cur { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; padding-right: 10px; border-right: 1px solid var(--line); }
.money-box input { border: 0; background: transparent; text-align: right; font-size: 1.35rem; font-weight: 650; min-height: 44px; padding: 0 4px; font-variant-numeric: tabular-nums; }
.money-box input:focus-visible { outline: none; }
.money-box:focus-within { border-color: var(--gold); }
.money-box output { text-align: right; font-size: 1.35rem; font-weight: 650; font-variant-numeric: tabular-nums; padding: 8px 4px; word-break: break-all; }
.rate-line { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.9rem; }
.rate-line button { appearance: none; border: 0; background: transparent; color: var(--gold); cursor: pointer; display: grid; place-items: center; padding: 4px; border-radius: 6px; }
.rate-line button.spin .icon { animation: spin 0.6s linear; }
@keyframes spin { to { transform: rotate(360deg); } }
.label-sm { font-size: 0.85rem; color: var(--muted); margin-bottom: -6px; }

/* live visit card */
.live { border-radius: 16px; border: 1px solid var(--gold); background: linear-gradient(180deg, #1a1a14, var(--panel)); padding: 16px; display: grid; gap: 10px; }
.live.arrived { border-color: var(--green); background: linear-gradient(180deg, #11231a, var(--panel)); }
.live.finished { border-color: var(--line); background: var(--panel); }
.live-head { display: flex; gap: 12px; align-items: flex-start; }
.live-head .icon { color: var(--gold); margin-top: 3px; }
.live.arrived .live-head .icon { color: var(--green); }
.live-head strong { font-size: 1.15rem; display: block; }
.live .row { display: flex; gap: 10px; flex-wrap: wrap; }
.geo { font-size: 0.9rem; }
.geo.near { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--green); background: rgba(47, 210, 122, 0.1); }
.geo.near strong { color: var(--green); font-size: 1.05rem; }
.geo p { margin: 0; }
.geo .btn { margin-top: 6px; }
.btn.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(240, 178, 50, 0.6); } 50% { box-shadow: 0 0 0 10px rgba(240, 178, 50, 0); } }
.note-ok { color: var(--green); }
.note-warn { color: var(--warn); font-weight: 600; }
.live .row .btn { flex: 1 1 150px; }

/* tables */
.table-scroll { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.tbl th, table.tbl td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tbl th { color: var(--muted); font-weight: 600; font-size: 0.78rem; }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.tbl tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--gold); color: var(--gold-ink); }
.badge.green { background: rgba(47, 210, 122, 0.14); color: var(--green); }
.badge.arrived { background: var(--green); color: #06210f; }
.badge.closed, .badge.muted { background: var(--line); color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 24px 8px; }

.facts { margin: 0; display: grid; gap: 14px; }
.facts dt { font-size: 0.82rem; color: var(--muted); }
.facts dd { margin: 0; }
.contact-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.contact-actions .btn { flex: 1 1 150px; }
.privacy { display: flex; gap: 14px; align-items: center; border-radius: 16px; border: 1px solid #3a2f12; background: linear-gradient(90deg, #17130a, var(--panel)); padding: 14px 16px; }
.privacy .icon { color: var(--gold); }
.privacy strong { display: block; color: var(--gold-hi); }
.credit { color: var(--muted); font-size: 0.82rem; text-align: center; padding-top: 6px; }

/* dialog */
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--gold); border-radius: 16px; padding: 18px 16px; width: min(94vw, 440px); }
dialog::backdrop { background: rgba(0, 0, 0, 0.7); }
dialog form { display: grid; gap: 12px; }
dialog h2 { color: var(--gold-hi); font-size: 1.15rem; }
.result { background: var(--panel-2); border: 1px dashed var(--line); border-radius: 12px; padding: 14px; color: var(--muted); }
.result strong { color: var(--gold-hi); font-size: 1.3rem; font-variant-numeric: tabular-nums; }

/* bottom navigation and menu (phones) */
.bottomnav { display: none; }
.menu-sheet { display: none; }

@media (max-width: 859px) {
  .topbar { padding: 8px 14px; }
  .topbar .wordmark { font-size: 0.85rem; letter-spacing: 0.05em; }
  .topbar .wm-b { display: block; }
  .topbar .brand small { display: none; }
  .layout { display: block; }
  .sidenav, .top-tools .icon-btn.bell, .top-tools .guest { display: none; }
  .menu-btn { display: grid; }
  .content { padding: 16px 14px 96px; }
  .hello h1 { font-size: 1.45rem; }
  .banner { grid-template-columns: 1fr; padding: 18px 14px; }
  .banner::before { background: linear-gradient(180deg, rgba(9, 12, 18, 0.78), rgba(9, 12, 18, 0.5)); }
  .cols { grid-template-columns: 1fr; }
  .pop { right: 12px; top: 56px; }
  .menu-sheet { position: absolute; right: 12px; top: 56px; width: min(300px, calc(100vw - 24px)); background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); z-index: 60; }
  .menu-sheet:not([hidden]) { display: grid; gap: 2px; }
  .menu-sheet a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; color: var(--text); text-decoration: none; }
  .bottomnav {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(12, 17, 25, 0.97); border-top: 1px solid var(--line);
  }
  .bottomnav a { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; color: var(--muted); text-decoration: none; font-size: 0.72rem; position: relative; border-radius: 10px; }
  .bottomnav a.on { color: var(--gold); }
  .bottomnav a .nav-dot { position: absolute; top: 4px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
}
@media (max-width: 420px) {
  .rate-row { grid-template-columns: auto 1fr; }
  .rate-row .rr-val { grid-column: 1 / -1; text-align: left; display: flex; align-items: baseline; justify-content: space-between; }
}

/* ================= owner panel ================= */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; display: grid; gap: 12px; }
.card h2 { font-size: 1.1rem; color: var(--gold-hi); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1 1 140px; }
.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px 24px; display: grid; gap: 16px; }
.logo { border-radius: 50%; width: 88px; height: 88px; box-shadow: 0 0 0 1px var(--line), 0 8px 30px rgba(240, 178, 50, 0.18); }

.bar { position: sticky; top: 0; z-index: 10; background: rgba(9, 12, 18, 0.94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.bar-in { max-width: 760px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.bar-in img { width: 40px; height: 40px; border-radius: 50%; }
.bar-in .grow { flex: 1; min-width: 0; }
.bar-in strong { display: block; color: var(--gold-hi); line-height: 1.2; }
.bar-in small { color: var(--muted); }
.bar-in .grow strong, .bar-in .grow small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 480px) {
  .bar-in { flex-wrap: wrap; row-gap: 8px; }
  .bar-in .grow { flex: 1 1 calc(100% - 60px); }
  .bar-in .switch { margin-left: auto; }
}
.wrap.wide { max-width: 760px; padding-top: 16px; }
.login { max-width: 420px; margin: 40px auto; padding: 0 16px; display: grid; gap: 16px; text-align: center; }
.login form { display: grid; gap: 14px; text-align: left; }
.login h2 { color: var(--gold-hi); font-size: 1.15rem; }
.login h1 { font-size: 1.6rem; text-wrap: balance; }
.linklike { appearance: none; background: none; border: 0; padding: 6px; color: var(--gold-hi); font: inherit; font-size: 0.95rem; text-decoration: underline; cursor: pointer; justify-self: center; }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 650; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 48px; height: 28px; border-radius: 999px; background: #38425a; position: relative; transition: background 0.15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--text); transition: transform 0.15s; }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 2px solid var(--gold-hi); outline-offset: 2px; }

.tabs { display: flex; gap: 4px; max-width: 760px; margin: 0 auto; padding: 0 16px; overflow-x: auto; }
.tab { appearance: none; background: transparent; border: 0; border-bottom: 3px solid transparent; color: var(--muted); font: inherit; font-weight: 650; padding: 10px 12px; cursor: pointer; white-space: nowrap; }
.tab.on { color: var(--gold-hi); border-bottom-color: var(--gold); }
@media (max-width: 480px) { .tab { padding: 10px 9px; font-size: 0.92rem; } }
.tab .count { background: var(--gold); color: var(--gold-ink); border-radius: 999px; font-size: 0.75rem; padding: 1px 7px; margin-left: 4px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.stat small { color: var(--muted); display: block; }
.stat strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }

.visit { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 12px; padding: 14px; display: grid; gap: 8px; }
.visit.arrived { border-left-color: var(--green); background: #101d17; }
.visit.closed { border-left-color: var(--line); opacity: 0.75; }
.visit-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.visit-top strong { font-size: 1.1rem; }
.visit .row .btn { flex: 1 1 110px; }
.person { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 8px; }
.person.permanent { border-color: var(--gold); background: linear-gradient(180deg, #1a1a14, var(--panel)); }
.person-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.person-top strong { font-size: 1.05rem; }
.person .row .btn { flex: 1 1 130px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }

.list { display: grid; gap: 10px; }
.rates-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rates-form h3 { grid-column: 1 / -1; font-size: 1rem; color: var(--gold-hi); }
.preview { white-space: pre-wrap; font-family: ui-monospace, Consolas, monospace; font-size: 0.9rem; background: #0b1018; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
table.deals { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.deals th, table.deals td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.deals th { color: var(--muted); font-weight: 600; font-size: 0.8rem; }
table.deals td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

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