/* Sofly Partner Panel.
   Same language as soflylifestyle.com: near-black ink, warm ivory text, gold gradients,
   Cormorant Garamond headings, DM Sans body, slow "apple" easing and gold light.
   Self-contained: the panel no longer loads the public app.css, so nothing from the site can collide.
   Mobile first. Everything animated respects prefers-reduced-motion. */

:root {
  --ink: #0b0b0a;
  --ink-2: #100f0d;
  --surface: #14130f;
  --surface-2: #1b1915;
  --surface-3: #23201a;
  --text: #f5efe5;
  --muted: rgba(245, 239, 229, .62);
  --faint: rgba(245, 239, 229, .38);
  --line: rgba(224, 188, 117, .2);
  --line-strong: rgba(224, 188, 117, .42);
  --line-soft: rgba(245, 239, 229, .07);
  --gold: #d4ad67;
  --gold-hi: #f0d293;
  --gold-lo: #9a7334;
  --gold-mid: #b98f46;
  --gold-glow: #fff4d6;
  --gold-soft: rgba(212, 173, 103, .12);
  --ok: #8fd1a6;
  --ok-soft: rgba(143, 209, 166, .12);
  --wait: #f0c674;
  --wait-soft: rgba(240, 198, 116, .12);
  --bad: #ec9a8d;
  --bad-soft: rgba(236, 154, 141, .12);
  --r: 4px;
  --r-lg: 20px;
  --ease: cubic-bezier(.22, .9, .32, 1);
  --ease-out: cubic-bezier(.16, .84, .3, 1);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --dock-h: 64px;
  --side-w: 264px;
  color-scheme: dark;
}

/* ── Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
/* Ambient gold light drifting behind everything (same as the client area of the site). */
body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(36% 32% at 82% 12%, rgba(212, 173, 103, .16), transparent 70%),
    radial-gradient(32% 30% at 8% 92%, rgba(212, 173, 103, .1), transparent 70%);
  animation: drift 24s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-3%, 2%, 0) scale(1.06); } }

h1, h2, h3 { margin: 0; font-family: var(--serif); font-variant-numeric: lining-nums; font-weight: 500; line-height: 1.08; letter-spacing: .005em; }
h1 { font-size: clamp(2.3rem, 4.2vw, 3.3rem); }
h2 { font-size: clamp(1.45rem, 2.2vw, 1.75rem); line-height: 1.15; }
h3 { font-size: 1.2rem; }
p { margin: 0; }
a { color: var(--gold-hi); }
img { max-width: 100%; display: block; }
button { -webkit-user-select: none; user-select: none; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
::selection { background: rgba(212, 173, 103, .35); color: var(--text); }
/* Inline icons default to text size; components set their own. */
svg { flex: none; }
.btn svg, .button svg { width: 18px; height: 18px; }
.btn-sm svg { width: 15px; height: 15px; }
.text-link svg, .auth-foot svg { width: 16px; height: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Gold shimmer on italic words in headings: "Your fleet, <em>in command.</em>" */
h1 em, h2 em {
  font-style: italic;
  background: linear-gradient(100deg, var(--gold-mid) 15%, var(--gold-hi) 42%, var(--gold-glow) 50%, var(--gold-hi) 58%, var(--gold-mid) 85%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 7s linear infinite;
  padding-right: .06em;
}
@keyframes shine { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  margin: 0 0 .8rem;
  color: var(--gold);
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: .8; }
.lead { margin-top: .7rem; max-width: 62ch; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.danger-text { display: block; margin-top: 4px; color: var(--bad); font-size: .8rem; }
.text-link {
  display: inline-flex; align-items: center; gap: .35rem;
  color: var(--gold-hi); font-size: .85rem; font-weight: 600; text-decoration: none;
  border-bottom: 1px solid rgba(212, 173, 103, .4);
  transition: color .25s, border-color .25s, gap .35s var(--ease);
}
.text-link:hover { color: var(--gold-glow); border-color: var(--gold-hi); gap: .6rem; }

/* ── Entrance motion ──────────────────────────────────── */
/* Pure CSS, so content is never hidden when JS fails. JS only adds --i for the stagger. */
@keyframes rise { from { opacity: 0; transform: translate3d(0, 18px, 0); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.content > *, .rise { animation: rise .85s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 70ms); }
/* Scroll reveal for long lists, only when JS is running. */
.js [data-reveal] { opacity: 0; transform: translate3d(0, 16px, 0); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--ri, 0) * 50ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ── Buttons ──────────────────────────────────────────── */
.btn, .button {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 46px;
  padding: 0 1.45rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--gold-mid) 0%, var(--gold-hi) 45%, var(--gold-mid) 100%);
  background-size: 200% 100%;
  color: var(--ink);
  font: inherit;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .35s var(--ease), box-shadow .35s ease, background-position .7s ease, opacity .2s;
}
/* Light sweep across the gold on hover. */
.btn::before, .button::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0; bottom: 0; left: -60%;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg);
  transition: left .9s var(--ease);
  pointer-events: none;
}
@media (hover: hover) {
  .btn:hover, .button:hover { transform: translateY(-2px); background-position: 100% 0; box-shadow: 0 18px 40px -14px rgba(212, 173, 103, .6); }
  .btn:hover::before, .button:hover::before { left: 130%; }
}
.btn:active, .button:active { transform: scale(.97); transition-duration: .1s; }
.btn:disabled, .button:disabled { opacity: .45; pointer-events: none; }
.btn-gold { /* default look; kept for existing markup */ }
.btn-ghost {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.btn-ghost::before { display: none; }
@media (hover: hover) {
  .btn-ghost:hover { background: var(--gold-soft); color: var(--gold-hi); box-shadow: inset 0 0 0 1px var(--gold); transform: translateY(-1px); }
}
.btn-ghost.danger { color: var(--bad); box-shadow: inset 0 0 0 1px rgba(236, 154, 141, .35); }
@media (hover: hover) { .btn-ghost.danger:hover { background: var(--bad-soft); color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); } }
.btn-sm { min-height: 38px; padding: 0 1rem; font-size: .66rem; }
.btn-lg { min-height: 56px; padding: 0 1.8rem; font-size: .8rem; }
.btn-block { width: 100%; }
/* Loading state set by panel.js on submit. */
.btn.is-loading, .button.is-loading { pointer-events: none; color: transparent !important; }
.btn.is-loading::after, .button.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(11, 11, 10, .25);
  border-top-color: var(--ink);
  animation: spin .7s linear infinite;
}
.btn-ghost.is-loading::after { border-color: rgba(245, 239, 229, .2); border-top-color: var(--gold-hi); }
@keyframes spin { to { transform: rotate(360deg); } }

.inline-form { display: inline-flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin: 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* ── Shell ────────────────────────────────────────────── */
.layout { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(26px + var(--safe-t)) 16px calc(18px + var(--safe-b));
  background: linear-gradient(180deg, rgba(20, 19, 15, .96), rgba(11, 11, 10, .98));
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.brand { display: flex; flex-direction: column; gap: 8px; padding: 2px 10px 22px; text-decoration: none; }
.brand-logo { height: 34px; width: auto; object-fit: contain; object-position: left center; }
.brand-mark { font-family: var(--serif); font-size: 1.8rem; line-height: 1; letter-spacing: .34em; color: var(--gold-hi); }
.brand-sub { font-size: .62rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }

.side-company {
  margin: 0 4px 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(120deg, rgba(212, 173, 103, .09), transparent 70%);
}
.side-company small { display: block; font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.side-company strong { display: block; margin-top: 4px; font-family: var(--serif); font-size: 1.2rem; font-weight: 500; line-height: 1.15; overflow-wrap: anywhere; }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: .9rem;
  text-decoration: none;
  transition: background .25s, color .25s, transform .35s var(--ease);
}
.nav-link svg { width: 19px; height: 19px; flex: none; opacity: .85; transition: transform .35s var(--ease); }
.nav-link > span:first-of-type { flex: 1; }
@media (hover: hover) {
  .nav-link:hover { background: rgba(245, 239, 229, .04); color: var(--text); }
  .nav-link:hover svg { transform: translateX(2px); }
}
.nav-link.is-active { color: var(--gold-hi); background: linear-gradient(90deg, rgba(212, 173, 103, .16), rgba(212, 173, 103, .03)); }
.nav-link.is-active::before {
  content: "";
  position: absolute;
  left: 0; top: 10px; bottom: 10px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  animation: grow-y .5s var(--ease) both;
}
@keyframes grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.nav-link.is-locked { opacity: .5; }
.nav-lock { display: inline-flex; color: var(--gold); }
.nav-lock svg { width: 14px; height: 14px; opacity: 1; }

.sidebar-foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.sidebar-user { margin: 0 6px 12px; font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: calc(14px + var(--safe-t)) 36px 14px;
  background: rgba(11, 11, 10, .72);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.is-scrolled .topbar { border-bottom-color: var(--line); background: rgba(11, 11, 10, .9); box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .8); }
.topbar-brand { display: none; text-decoration: none; }
.topbar-brand .brand-logo { height: 26px; }
.topbar-brand .brand-mark { font-size: 1.25rem; }
.topbar-company { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.topbar-company .eyebrow { margin: 0; font-size: .6rem; }
.topbar-company .eyebrow::before { width: 16px; }
.topbar-company strong { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn {
  display: none;
  place-items: center;
  width: 44px; height: 44px;
  flex: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(245, 239, 229, .03);
  color: var(--gold-hi);
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:active { transform: scale(.92); }

.content { width: 100%; max-width: 1280px; padding: 36px 36px 64px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Cards ────────────────────────────────────────────── */
.card {
  position: relative;
  margin-bottom: 20px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(160deg, rgba(27, 25, 21, .94), rgba(16, 15, 13, .96));
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, .85), inset 0 1px 0 rgba(255, 244, 214, .04);
  transition: border-color .35s, transform .45s var(--ease), box-shadow .45s var(--ease);
}
.card.no-pad { padding: 0; overflow: hidden; }
.card.narrow { max-width: 760px; }
.card.empty { text-align: center; padding: 64px 24px; overflow: hidden; }
.card.empty::before {
  content: "";
  display: block;
  width: 64px; height: 64px;
  margin: 0 auto 20px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 173, 103, .25), transparent 65%);
  animation: halo 3.2s ease-out infinite;
}
@keyframes halo { 0% { box-shadow: 0 0 0 0 rgba(212, 173, 103, .45); } 70%, 100% { box-shadow: 0 0 0 18px rgba(212, 173, 103, 0); } }
.card.empty h2 { margin-bottom: 8px; }
.card.empty p { max-width: 46ch; margin: 0 auto 24px; color: var(--muted); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.card-head.pad { padding: 24px 26px 0; margin-bottom: 16px; }
.card-head p { margin-top: 4px; }
.pad { padding-left: 26px; padding-right: 26px; }
.pad:last-child { padding-bottom: 26px; }
/* Gold line travelling along the top edge, for hero cards. */
.glow-line { overflow: hidden; }
.glow-line::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-hi), var(--gold), transparent);
  background-size: 200% 100%;
  animation: sweep 4.5s linear infinite;
  pointer-events: none;
}
@keyframes sweep { from { background-position: -100% 0; } to { background-position: 100% 0; } }

/* Paywall */
.paywall {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 32px;
  align-items: center;
  padding: 34px;
  border-color: var(--line-strong);
  background:
    radial-gradient(circle at 92% 0%, rgba(212, 173, 103, .22), transparent 55%),
    linear-gradient(160deg, rgba(31, 28, 22, .96), rgba(14, 13, 11, .98));
}
.paywall h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: .6rem; }
.paywall-action { display: flex; flex-direction: column; gap: 12px; }
.price { margin: 18px 0 4px; font-family: var(--serif); font-variant-numeric: lining-nums; font-size: 3rem; line-height: 1; color: var(--gold-hi); }
.price span { font-family: var(--sans); font-size: .9rem; color: var(--muted); }
.perks { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.perks li { display: flex; gap: 10px; align-items: flex-start; color: var(--text); font-size: .92rem; }
.perks li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: .55em; transform: rotate(45deg); background: var(--gold); }

/* Onboarding steps with a progress rail */
.progress { height: 3px; margin: -4px 0 22px; border-radius: 3px; background: rgba(245, 239, 229, .07); overflow: hidden; }
.progress span { display: block; height: 100%; width: var(--p, 0%); background: linear-gradient(90deg, var(--gold-mid), var(--gold-hi)); border-radius: inherit; transform-origin: left; animation: grow-x 1.2s var(--ease) .3s backwards; }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.steps li { position: relative; display: flex; gap: 16px; align-items: flex-start; padding: 12px 0; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 50px; bottom: -6px; width: 1px; background: var(--line); }
.steps li > span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  flex: none;
  width: 35px; height: 35px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--ink);
  color: var(--gold);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.steps li.is-done > span { border-color: transparent; background: linear-gradient(135deg, var(--gold-hi), var(--gold-mid)); color: var(--ink); font-size: 0; }
.steps li.is-done > span::before { content: ""; width: 12px; height: 7px; margin-top: -3px; border: solid var(--ink); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.steps li.is-next > span { animation: halo 2.6s ease-out infinite; }
.steps div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.steps strong { font-weight: 600; }
.steps small { color: var(--muted); font-size: .86rem; }
.steps .inline-form, .steps .text-link { margin-top: 8px; align-self: flex-start; }

/* KPIs */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  background: linear-gradient(160deg, rgba(27, 25, 21, .9), rgba(16, 15, 13, .95));
  overflow: hidden;
  transition: transform .45s var(--ease), border-color .35s, box-shadow .45s var(--ease);
}
.kpi-gold { border-color: var(--line-strong); background: radial-gradient(circle at 100% 0%, rgba(212, 173, 103, .22), transparent 60%), linear-gradient(160deg, rgba(31, 28, 22, .96), rgba(16, 15, 13, .96)); }
.kpi-label { font-size: .64rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.kpi-value { font-family: var(--serif); font-size: clamp(1.9rem, 3vw, 2.4rem); font-weight: 500; line-height: 1; font-variant-numeric: lining-nums tabular-nums; overflow-wrap: anywhere; }
.kpi-value small { font-family: var(--sans); font-size: .62rem; font-weight: 600; letter-spacing: .14em; color: var(--muted); margin-right: .35em; vertical-align: .55em; }
.kpi-gold .kpi-value { color: var(--gold-hi); }
.kpi-note { font-size: .82rem; color: var(--muted); }

@media (hover: hover) {
  .kpi:hover, .card.lift:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(212, 173, 103, .08); }
}

.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 50px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.list li:last-child { border-bottom: 0; }
.list strong { font-family: var(--serif); font-size: 1.4rem; font-weight: 500; font-variant-numeric: lining-nums tabular-nums; }
.list li.is-hot strong { color: var(--gold-hi); }
.list a { color: inherit; text-decoration: none; }

/* ── Forms ────────────────────────────────────────────── */
.form { display: block; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 18px; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field-wide { grid-column: 1 / -1; }
.field-inline { min-width: 160px; }
.hint { font-size: .78rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--faint); }
/* 16px minimum so iOS Safari never zooms into a field. */
input, select, textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid rgba(212, 173, 103, .24);
  border-radius: var(--r);
  background: rgba(255, 255, 255, .025);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .3s, background .3s, box-shadow .35s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: rgba(212, 173, 103, .4); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); background: rgba(212, 173, 103, .05); box-shadow: 0 0 0 4px rgba(212, 173, 103, .1); }
select {
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4ad67' stroke-width='1.8'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  cursor: pointer;
}
select option { background: var(--surface); color: var(--text); }
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
input[type="number"] { font-variant-numeric: tabular-nums; }
input[type="checkbox"] {
  flex: none;
  width: 22px; height: 22px;
  min-height: 0;
  padding: 0;
  margin: 0;
  border-radius: 5px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
input[type="checkbox"]::after { content: ""; width: 10px; height: 6px; margin-top: -3px; border: solid var(--ink); border-width: 0 0 2px 2px; transform: rotate(-45deg) scale(0); transition: transform .25s var(--ease); }
input[type="checkbox"]:checked { background: linear-gradient(135deg, var(--gold-hi), var(--gold-mid)); border-color: transparent; }
input[type="checkbox"]:checked::after { transform: rotate(-45deg) scale(1); }
input.is-invalid, select.is-invalid, textarea.is-invalid { border-color: var(--bad); animation: shake .45s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* Drop zone for photos */
.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 30px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r);
  background: rgba(212, 173, 103, .03);
  text-align: center;
  cursor: pointer;
  transition: border-color .3s, background .3s, transform .35s var(--ease);
}
.dropzone svg { width: 30px; height: 30px; color: var(--gold); }
.dropzone strong { font-size: .95rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text); }
.dropzone span { font-size: .8rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; }
.dropzone:hover, .dropzone.is-over { border-color: var(--gold); background: rgba(212, 173, 103, .08); }
.dropzone.is-over { transform: scale(1.01); }
.preview-grid { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.preview-grid li { aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); animation: pop .5s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
.preview-grid img { width: 100%; height: 100%; object-fit: cover; }
@keyframes pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }

.spec-rows { display: grid; gap: 10px; }
.spec-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; animation: rise .5s var(--ease) backwards; }
.spec-add { margin-top: 12px; }
.photo-grid { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.photo { position: relative; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--ink); }
.photo img { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; transition: transform .6s var(--ease); }
@media (hover: hover) { .photo:hover img { transform: scale(1.05); } }
.photo form { padding: 8px; }
.photo .btn { width: 100%; }

/* ── Status pills ─────────────────────────────────────── */
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: var(--surface-2);
  color: var(--muted);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.status-wait { background: var(--wait-soft); color: var(--wait); border-color: transparent; }
.status-wait::before { animation: blink 1.6s ease-in-out infinite; }
.status-bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.status-gold { background: var(--gold-soft); color: var(--gold-hi); border-color: transparent; }
.status-idle { background: var(--surface-2); color: var(--muted); }
@keyframes blink { 50% { opacity: .25; } }

/* ── Alerts ───────────────────────────────────────────── */
.alert, .flash {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 22px;
  padding: 14px 46px 14px 16px;
  border: 1px solid transparent;
  border-radius: var(--r);
  font-size: .92rem;
  line-height: 1.5;
  animation: drop .6s var(--ease) both;
}
.alert::before, .flash::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: .45em; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent); }
.alert-success, .flash-success { background: rgba(212, 173, 103, .08); color: var(--gold-hi); border-color: var(--line-strong); }
.alert-error, .flash-error { background: var(--bad-soft); color: #f6c4ba; border-color: rgba(236, 154, 141, .4); }
.alert.is-leaving { animation: leave .35s var(--ease) forwards; }
.alert-close { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; opacity: .7; cursor: pointer; }
.alert-close svg { width: 16px; height: 16px; }
@keyframes drop { from { opacity: 0; transform: translate3d(0, -10px, 0); } to { opacity: 1; transform: none; } }
@keyframes leave { to { opacity: 0; transform: translate3d(0, -8px, 0); height: 0; margin: 0; padding-top: 0; padding-bottom: 0; } }

/* ── Tables ───────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { padding: 14px 20px; border-bottom: 1px solid var(--line); background: rgba(245, 239, 229, .02); color: var(--muted); font-size: .64rem; font-weight: 600; letter-spacing: .16em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.table td { padding: 16px 20px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr { transition: background .25s; }
@media (hover: hover) { .table tbody tr:not(.notes-row):hover { background: rgba(212, 173, 103, .04); } }
.table tr:last-child td { border-bottom: 0; }
.table small { display: block; margin-top: 2px; color: var(--muted); font-size: .78rem; }
.table strong { font-weight: 600; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.asset-cell { display: flex; gap: 14px; align-items: center; min-width: 0; }
.asset-cell img, .thumb { flex: none; width: 64px; height: 48px; border-radius: var(--r); object-fit: cover; }
.thumb { background: linear-gradient(135deg, var(--surface-3), var(--surface)); border: 1px dashed var(--line); }
.asset-cell > div { min-width: 0; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions > * + * { margin-left: 6px; }
.row-actions form { display: inline; }
.notes-row td { padding-top: 0; }
.notes-row details { border: 1px solid var(--line-soft); border-radius: var(--r); background: rgba(245, 239, 229, .02); }
.notes-row summary { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; color: var(--gold-hi); font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; list-style: none; }
.notes-row summary::-webkit-details-marker { display: none; }
.notes-row summary::after { content: ""; width: 7px; height: 7px; margin-left: auto; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform .35s var(--ease); }
.notes-row details[open] summary::after { transform: rotate(-135deg); }
.notes-row details[open] > :not(summary) { animation: rise .5s var(--ease) backwards; }
.notes-body { padding: 0 16px 14px; }
.note { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.note p { margin-bottom: 2px; }
.note small { color: var(--muted); font-size: .76rem; }
.note-form { margin-top: 12px; width: 100%; }
.note-form .field { flex: 1 1 260px; }
.customer-head { display: flex; align-items: center; gap: 12px; }
.avatar { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-strong); background: radial-gradient(circle at 30% 20%, rgba(212, 173, 103, .3), transparent 70%); font-family: var(--serif); font-size: 1.05rem; font-variant-numeric: lining-nums; color: var(--gold-hi); }

/* ── Rentals ──────────────────────────────────────────── */
.filters { display: flex; gap: 8px; margin: -6px 0 18px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: .78rem; font-weight: 600; white-space: nowrap; cursor: pointer; transition: all .3s var(--ease); }
.chip b { font-weight: 600; color: var(--faint); }
.chip.is-active { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-hi); }
.chip.is-active b { color: var(--gold); }
.rental-list { display: grid; gap: 14px; }
.rental { margin-bottom: 0; padding: 0; overflow: hidden; }
.rental.is-requested { border-color: var(--line-strong); }
.rental.is-requested::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo)); }
.rental[hidden] { display: none; }
.rental-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 22px 24px 0; flex-wrap: wrap; }
.rental-head strong { display: block; font-family: var(--serif); font-size: 1.45rem; font-weight: 500; line-height: 1.15; }
.rental-dates { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--muted); font-size: .85rem; }
.rental-dates svg { width: 15px; height: 15px; color: var(--gold); }
.rental-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: end; padding: 20px 24px 22px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 22px; margin: 0; }
.facts dt { font-size: .62rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 3px 0 0; font-size: .95rem; overflow-wrap: anywhere; }
.facts dd strong { font-family: var(--serif); font-variant-numeric: lining-nums; font-size: 1.3rem; font-weight: 500; color: var(--gold-hi); }
.facts-wide { grid-column: 1 / -1; }
.facts-locked dd { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-style: italic; }
.facts-locked svg { width: 14px; height: 14px; color: var(--gold); }
.rental-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; justify-content: flex-end; }
.rental-actions form { margin: 0; }

/* ── Sales chart ──────────────────────────────────────── */
.chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; align-items: end; height: 260px; padding-top: 18px; }
.bar-col { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; height: 100%; min-width: 0; }
.bar-track { position: relative; flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.bar {
  width: 100%;
  max-width: 44px;
  min-height: 2px;
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 55%, rgba(212, 173, 103, .25) 100%);
  box-shadow: 0 0 22px -6px rgba(212, 173, 103, .5);
  transform-origin: bottom;
  animation: bar-up 1.1s var(--ease) backwards;
  animation-delay: calc(.25s + var(--i, 0) * 55ms);
}
.bar-col.is-empty .bar { background: rgba(245, 239, 229, .08); box-shadow: none; }
@keyframes bar-up { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.bar-value { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translate(-50%, 4px); padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); color: var(--gold-hi); font-size: .72rem; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .25s, transform .3s var(--ease); z-index: 2; }
.bar-col:hover .bar-value, .bar-col:focus-within .bar-value, .bar-col.is-peek .bar-value { opacity: 1; transform: translate(-50%, 0); }
.bar-col:hover .bar, .bar-col.is-peek .bar { filter: brightness(1.15); }
.bar-label { font-size: .68rem; font-weight: 600; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.bar-col button { all: unset; position: absolute; inset: 0; cursor: pointer; }

.bullets { margin: 0 0 22px; padding: 0; list-style: none; display: grid; gap: 10px; }
.bullets li { display: flex; gap: 12px; align-items: flex-start; }
.bullets li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: .6em; transform: rotate(45deg); background: var(--gold); }

/* Visibility meter */
.meter { position: relative; height: 8px; margin: 22px 0 10px; border-radius: 8px; background: rgba(245, 239, 229, .07); overflow: hidden; }
.meter span { display: block; height: 100%; width: var(--p); border-radius: inherit; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); transform-origin: left; animation: grow-x 1.3s var(--ease) .3s backwards; }
.meter-labels { display: flex; justify-content: space-between; font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ── Mobile dock + drawer + sheet ─────────────────────── */
.dock { display: none; }
.scrim { position: fixed; inset: 0; z-index: 55; background: rgba(5, 5, 4, .6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .35s var(--ease); }
.scrim.is-open { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed;
  z-index: 70;
  left: max(10px, var(--safe-l));
  right: max(10px, var(--safe-r));
  bottom: calc(10px + var(--safe-b));
  max-width: 440px;
  margin: 0 auto;
  padding: 26px 22px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(31, 28, 22, .98), rgba(14, 13, 11, .98));
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
  transform: translate3d(0, 120%, 0);
  visibility: hidden;
  transition: transform .5s var(--ease), visibility 0s linear .5s;
}
.sheet.is-open { transform: none; visibility: visible; transition: transform .5s var(--ease), visibility 0s; }
.sheet h3 { font-size: 1.6rem; margin-bottom: 6px; }
.sheet p { color: var(--muted); margin-bottom: 20px; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet .grabber { width: 40px; height: 4px; margin: -12px auto 16px; border-radius: 4px; background: rgba(245, 239, 229, .2); }

/* ── Auth (sign in, register, errors) ─────────────────── */
.auth-body { min-height: 100vh; min-height: 100dvh; }
.auth {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6.5rem);
  max-width: 1280px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(clamp(1.5rem, 4vw, 4rem) + var(--safe-t)) clamp(1.1rem, 4vw, 3rem) calc(clamp(1.5rem, 4vw, 4rem) + var(--safe-b));
}
.auth.is-compact { grid-template-columns: minmax(0, 520px); justify-content: center; }
.auth-aside { display: flex; flex-direction: column; gap: 2.4rem; min-width: 0; }
.auth-aside .brand { padding: 0; width: fit-content; }
.auth-aside .brand-logo { height: 52px; }
.auth-aside .brand-mark { font-size: 2.2rem; }
.auth-copy h1 { margin: 0 0 1.1rem; font-size: clamp(2.8rem, 5.6vw, 4.9rem); line-height: 1.02; }
.auth-copy p:not(.eyebrow) { max-width: 460px; color: var(--muted); line-height: 1.75; }
.path { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.path li { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: var(--r); background: linear-gradient(120deg, rgba(212, 173, 103, .08), transparent 70%); transition: transform .45s var(--ease), border-color .3s, background .3s; }
@media (hover: hover) { .path li:hover { transform: translateX(8px); border-color: var(--gold); background: linear-gradient(120deg, rgba(212, 173, 103, .16), transparent 75%); } }
.path li > span { display: grid; place-items: center; flex: 0 0 2.5rem; height: 2.5rem; border: 1px solid rgba(212, 173, 103, .55); border-radius: 50%; color: var(--gold); }
.path li > span svg { width: 18px; height: 18px; }
.path strong { display: block; font-size: .96rem; font-weight: 600; }
.path small { display: block; margin-top: .15rem; color: var(--muted); font-size: .84rem; }

.auth-card {
  position: relative;
  overflow: hidden;
  padding: clamp(1.6rem, 3.6vw, 2.9rem);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(160deg, rgba(26, 23, 18, .94), rgba(11, 11, 10, .96));
  box-shadow: 0 40px 90px -34px rgba(0, 0, 0, .85), inset 0 1px 0 rgba(255, 244, 214, .06);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.auth-card::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--gold-hi), var(--gold), transparent); background-size: 200% 100%; animation: sweep 4.5s linear infinite; pointer-events: none; }
.auth-card-head { margin-bottom: 1.8rem; }
.auth-card-head h2 { margin: .5rem 0 .5rem; font-size: clamp(1.9rem, 3.4vw, 2.5rem); line-height: 1.1; }
.auth-card-head p { color: var(--muted); line-height: 1.6; }
.auth-card .brand-inline { display: none; }

.auth-form { display: grid; gap: 1.1rem; }
.auth-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.span-2 { grid-column: 1 / -1; }
.block { display: grid; gap: 1rem; }
.block + .block { margin-top: .8rem; }
.block-head { display: flex; align-items: center; gap: .9rem; padding-bottom: .7rem; border-bottom: 1px solid rgba(212, 173, 103, .16); }
.block-head > span { color: var(--gold); font-size: .7rem; font-weight: 700; letter-spacing: .16em; }
.block-head h3 { font-family: var(--sans); font-size: .95rem; font-weight: 600; letter-spacing: .02em; }

/* Floating-label fields: the label rests inside the field until focus or input. */
.float { position: relative; min-width: 0; }
.float input, .float textarea {
  height: 60px;
  padding: 1.45rem 1rem .5rem;
  border-radius: var(--r);
  background: rgba(255, 255, 255, .03);
}
.float textarea { height: auto; min-height: 130px; padding-top: 1.8rem; }
.float input::placeholder, .float textarea::placeholder { color: transparent; transition: color .3s; }
.float input:focus::placeholder, .float textarea:focus::placeholder { color: var(--faint); }
.float label {
  position: absolute;
  left: 1rem;
  top: 30px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1rem;
  pointer-events: none;
  transition: top .3s var(--ease), font-size .3s var(--ease), color .3s, letter-spacing .3s;
}
.float input:focus + label, .float input:not(:placeholder-shown) + label,
.float textarea:focus + label, .float textarea:not(:placeholder-shown) + label,
.float input:-webkit-autofill + label {
  top: 15px;
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
}
.float input:-webkit-autofill, .float input:-webkit-autofill:hover, .float input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px #191713 inset;
  caret-color: var(--text);
  transition: background-color 9999s;
}
.float.has-eye input { padding-right: 3.6rem; }
.eye {
  position: absolute;
  right: 6px;
  top: 30px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .25s, background .25s;
}
.eye:hover, .eye[aria-pressed="true"] { color: var(--gold-hi); }
.eye svg { width: 20px; height: 20px; }
.eye .eye-off, .eye[aria-pressed="true"] .eye-on { display: none; }
.eye[aria-pressed="true"] .eye-off { display: block; }
.float-note { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; min-height: 1.2em; font-size: .78rem; color: var(--muted); }
.caps { color: var(--wait); opacity: 0; transform: translateY(-4px); transition: opacity .25s, transform .3s var(--ease); }
.caps.is-on { opacity: 1; transform: none; }
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 10px; }
.strength i { height: 3px; border-radius: 3px; background: rgba(245, 239, 229, .1); transition: background .4s var(--ease); }
.strength[data-level="1"] i:nth-child(-n+1) { background: var(--bad); }
.strength[data-level="2"] i:nth-child(-n+2) { background: var(--wait); }
.strength[data-level="3"] i:nth-child(-n+3) { background: var(--gold); }
.strength[data-level="4"] i { background: linear-gradient(90deg, var(--gold), var(--gold-hi)); }
.match { color: var(--ok); opacity: 0; transition: opacity .3s; }
.match.is-on { opacity: 1; }
.match.is-off { color: var(--bad); opacity: 1; }

.consent { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: .88rem; line-height: 1.55; cursor: pointer; }
.consent input { margin-top: 1px; }
.consent a { color: var(--gold-hi); }
.auth-form .btn { width: 100%; min-height: 58px; margin-top: .4rem; font-size: .78rem; }
.auth-switch { margin-top: 1.4rem; text-align: center; color: var(--muted); font-size: .92rem; }
.auth-switch a { color: var(--gold-hi); font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(212, 173, 103, .4); }
.auth-foot { margin-top: 1.6rem; text-align: center; font-size: .82rem; }
.auth-foot a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; transition: color .25s, gap .35s var(--ease); }
.auth-foot a:hover { color: var(--gold-hi); gap: 10px; }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 1.1rem; color: var(--faint); font-size: .76rem; letter-spacing: .04em; }
.secure-note svg { width: 14px; height: 14px; color: var(--gold); }
.auth .flash { margin-bottom: 1.2rem; }
.error-code { font-family: var(--serif); font-size: clamp(5rem, 18vw, 8rem); line-height: .9; background: linear-gradient(180deg, var(--gold-hi), rgba(212, 173, 103, .1)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed;
    z-index: 60;
    inset: 0 auto 0 0;
    width: min(86vw, 320px);
    padding-left: calc(16px + var(--safe-l));
    border-radius: 0 var(--r-lg) var(--r-lg) 0;
    transform: translate3d(-104%, 0, 0);
    transition: transform .5s var(--ease), box-shadow .5s, visibility 0s linear .5s;
    visibility: hidden;
  }
  .sidebar.is-open { transform: none; visibility: visible; box-shadow: 30px 0 80px rgba(0, 0, 0, .7); transition: transform .5s var(--ease), box-shadow .5s, visibility 0s; }
  .sidebar.is-open .nav-link { animation: rise .55s var(--ease) backwards; animation-delay: calc(.08s + var(--n, 0) * 40ms); }
  .icon-btn { display: grid; }
  .topbar-brand { display: block; }
  .topbar-company .eyebrow { display: none; }
  .paywall { grid-template-columns: 1fr; }
  .rental-body { grid-template-columns: 1fr; }
  .rental-actions { justify-content: stretch; }
  .auth { grid-template-columns: 1fr; align-items: start; gap: 1.8rem; max-width: 620px; }
  .auth-aside { gap: 1.4rem; }
  .auth-copy h1 { font-size: clamp(2.5rem, 9vw, 3.6rem); }
}

@media (max-width: 720px) {
  body { font-size: 15px; }
  :root { --r: 14px; }
  .topbar { padding: calc(10px + var(--safe-t)) 16px 10px; gap: 12px; }
  .topbar-company { display: none; }
  .topbar-brand { flex: 1; }
  .content { padding: 22px 16px calc(var(--dock-h) + 36px + var(--safe-b)); }
  .page-head { margin-bottom: 22px; gap: 16px; }
  .page-head > div { width: 100%; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; min-height: 52px; }
  h1 { font-size: clamp(2.2rem, 10vw, 2.7rem); }
  .lead { font-size: .95rem; }
  .card { padding: 20px 18px; margin-bottom: 14px; }
  .card-head.pad { padding: 20px 18px 0; }
  .pad { padding-left: 18px; padding-right: 18px; }
  .pad:last-child { padding-bottom: 20px; }
  .paywall { padding: 24px 20px; gap: 20px; }
  .price { font-size: 2.5rem; }
  .btn { min-height: 50px; }
  .btn-sm { min-height: 42px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 16px 14px; gap: 6px; }
  .kpi-gold { grid-column: 1 / -1; padding: 20px 18px; }
  .kpi:nth-child(4):last-child { grid-column: 1 / -1; }
  .kpi-value { font-size: 1.55rem; }
  .kpi-gold .kpi-value { font-size: 2.3rem; }
  .kpi-label { font-size: .58rem; letter-spacing: .14em; }
  .kpi-note { font-size: .74rem; }
  .two-col { grid-template-columns: 1fr; gap: 14px; }
  .form-grid { grid-template-columns: 1fr; gap: 14px; }

  /* Tables become stacked cards. */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tbody tr:not(.notes-row) { padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
  .table tr.has-notes { border-bottom: 0 !important; padding-bottom: 6px !important; }
  .table td { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 34px; padding: 5px 0; border: 0; text-align: right; }
  .table td::before { content: attr(data-label); flex: none; color: var(--muted); font-size: .62rem; font-weight: 600; letter-spacing: .14em; text-align: left; text-transform: uppercase; }
  .table td.cell-main { display: block; padding: 0 0 10px; text-align: left; }
  .table td.cell-main::before { display: none; }
  .table td.row-actions { display: flex; justify-content: stretch; gap: 8px; padding-top: 12px; }
  .table td.row-actions::before { display: none; }
  .table td.row-actions > *, .table td.row-actions form .btn { flex: 1; width: 100%; margin: 0; }
  .table td.row-actions form { display: flex; flex: 1; }
  .table td[colspan] { display: block; text-align: left; padding: 0 18px 16px; }
  .table td[colspan]::before { display: none; }
  .asset-cell img, .thumb { width: 76px; height: 56px; }

  .rental-head { padding: 18px 18px 0; }
  .rental-head strong { font-size: 1.3rem; }
  .rental-body { padding: 16px 18px 18px; gap: 18px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
  .rental-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .rental-actions .inline-form { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .rental-actions .btn { width: 100%; }

  .chart { height: 210px; gap: 5px; }
  .bar-label { font-size: .56rem; letter-spacing: 0; }
  .bar-col:nth-child(even) .bar-label { opacity: 0; }
  .bar-value { font-size: .66rem; }

  .spec-row { grid-template-columns: 1fr; padding: 12px; border: 1px solid var(--line-soft); border-radius: var(--r); }
  /* Sticky submit bar on long forms. */
  .form-actions {
    position: sticky;
    z-index: 25;
    bottom: calc(var(--dock-h) + 18px + var(--safe-b));
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 8px;
    margin: 6px -6px 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: rgba(18, 16, 12, .92);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
  }
  .kbd .form-actions { bottom: calc(10px + var(--safe-b)); }

  /* Bottom dock: native tab bar feel, same as the public site. */
  .dock {
    position: fixed;
    z-index: 50;
    left: max(10px, var(--safe-l));
    right: max(10px, var(--safe-r));
    bottom: calc(10px + var(--safe-b));
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 6px;
    border: 1px solid rgba(224, 188, 117, .26);
    border-radius: 24px;
    background: rgba(18, 16, 12, .94);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
    transition: transform .4s var(--ease), opacity .25s;
    animation: dock-in .7s var(--ease) .15s backwards;
  }
  @keyframes dock-in { from { transform: translate3d(0, 140%, 0); } to { transform: none; } }
  .dock a, .dock button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 52px;
    padding: 6px 2px;
    border: 0;
    border-radius: 18px;
    background: transparent;
    color: #a69b8e;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: color .2s, background .25s, transform .15s;
  }
  .dock a:active, .dock button:active { transform: scale(.92); }
  .dock svg { width: 22px; height: 22px; }
  .dock small { font-size: .6rem; font-weight: 600; letter-spacing: .02em; line-height: 1; white-space: nowrap; }
  .dock .is-active { color: var(--gold-hi); background: rgba(212, 173, 103, .13); }
  .dock .is-active::before { content: ""; position: absolute; top: 3px; width: 16px; height: 2px; border-radius: 2px; background: var(--gold); animation: grow-x .4s var(--ease) both; }
  .dock .is-locked { opacity: .45; }
  .nav-open .dock, .kbd .dock { transform: translate3d(0, 160%, 0); opacity: 0; pointer-events: none; }

  .alert, .flash { font-size: .9rem; }

  .auth { padding-top: calc(22px + var(--safe-t)); gap: 1.4rem; }
  .auth-aside .brand-logo { height: 40px; }
  .auth-copy h1 { font-size: clamp(2.4rem, 11.5vw, 3rem); margin-bottom: .7rem; }
  .auth-copy p:not(.eyebrow) { font-size: .95rem; line-height: 1.6; }
  .auth-aside .path { display: none; }
  .auth-card { padding: 26px 18px 22px; border-radius: var(--r-lg); }
  .auth-card-head { margin-bottom: 1.3rem; }
  .auth-grid { grid-template-columns: 1fr; gap: .85rem; }
  .auth-form .btn { position: relative; }
}

@media (max-width: 380px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .dock small { font-size: .55rem; }
}

@media (hover: none) {
  .btn:hover, .button:hover, .kpi:hover, .card:hover, .path li:hover { transform: none; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  body::before { animation: none; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
