/* Arvelor Business Portal — dashboard redesign layer (§14)
   Founder order, 5 Dec 2026, 20:54–20:56 GMT: "It looks third class.
   Prototype. Cluttered. Not luxury. Looks AI made. Redesign it properly.
   See the best business dashboards in the world, but theme should be
   ours, and easy to use even on mobile."

   Built on the research note portal-redesign-benchmarks-2026-12-05.md
   (Stripe / Linear / Mercury / Ramp / Revolut / Wise principles,
   translated into OUR theme: deep navy #000F30, white, matte gold
   #B08D2E sparingly, Poppins/Inter, the true master logo).

   PRESENTATION ONLY, scoped to the signed-in shell (.portal-main,
   .brand-side, .glass-header). The §11 sign-in layer and the §13
   declutter layer stay underneath; this file refines them. No
   behaviour, action, or auth change.

   Principles landed here:
   - One spacing rhythm (24px between panels, 24px inside cards).
   - Hairline borders and one soft shadow — decoration removed.
   - A calm type scale: screen title 28, card title 19, body 15,
     quiet meta text; numbers in tabular figures.
   - The sidebar goes quiet: small icons with no white orbs,
     one line per entry, gold only as the active item's edge.
   - Tables read like Mercury/Ramp: quiet uppercase headers,
     hairline rows, generous row padding.
   - Mobile is its own layout: tables stack into readable blocks
     (no 640px squeeze, nothing cut off), tap targets >= 44px,
     inputs >= 48px so nothing needs a pinch or a squint. */

/* ---------- Rhythm ---------- */
.portal-main .grid.gap-8 { gap: 24px; }
.portal-main .glass-card:not([class*="p-0"]) { padding: 24px; }

/* ---------- Type scale ---------- */
.portal-main h1.font-display {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.portal-main .glass-card h2.font-display {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.portal-main .glass-card div.mb-4 p {
  font-size: 14px;
  line-height: 1.55;
}
.portal-main dl dd,
.portal-main table { font-variant-numeric: tabular-nums; }

/* ---------- Sidebar: quiet, one line per entry ---------- */
.brand-side .nav-item {
  min-height: 46px;
  padding-top: 7px;
  padding-bottom: 7px;
  border-radius: 12px;
  gap: 11px;
}
.brand-side .nav-orb {
  width: 22px;
  height: 22px;
  background: transparent;
  box-shadow: none;
  color: #98c0d9;
}
.brand-side .nav-item[data-active="true"] {
  background: rgba(152, 192, 217, 0.13);
  box-shadow: inset 3px 0 0 #b08d2e;
}
.brand-side .nav-item[data-active="true"] .nav-orb { color: #ffffff; }
.brand-side .nav-item > span.min-w-0 > span:first-child { font-size: 15px; }
.brand-side .nav-item > span.min-w-0 > span:last-child { display: none; }

/* ---------- Tables: calm headers, hairline rows ---------- */
.portal-main table th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 12px 16px;
}
.portal-main table td { padding: 15px 16px; }
.portal-main table tbody tr { transition: background 120ms ease; }
.portal-main table tbody tr:hover { background: #ffffff; }

/* ---------- Touch targets ---------- */
.portal-main .btn-primary-glass,
.portal-main .btn-soft { min-height: 48px; }
.portal-main input:not([type="checkbox"]):not([type="radio"]),
.portal-main select,
.portal-main textarea { min-height: 48px; }
.portal-main .tap-row { min-height: 72px; }

/* ---------- Mobile tab bar: no orbs, calm active state ---------- */
nav.glass-header .tab-orb { background: transparent; box-shadow: none; }
nav.glass-header .tab-item[data-active="true"] .tab-orb {
  background: rgba(152, 192, 217, 0.16);
}

/* ---------- Mobile: stacked tables, no squeeze ---------- */
@media (max-width: 820px) {
  .portal-main .glass-card:not([class*="p-0"]) { padding: 18px; }
  .portal-main h1.font-display { font-size: 25px; }
  .portal-main table { min-width: 0 !important; width: 100%; }
  .portal-main table thead { display: none; }
  .portal-main table,
  .portal-main table tbody,
  .portal-main table tr,
  .portal-main table td { display: block; width: 100%; }
  .portal-main table tr {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
  }
  .portal-main table tr:last-child { border-bottom: none; }
  .portal-main table td {
    padding: 1px 0 !important;
    border: none !important;
    text-align: left !important;
  }
  .portal-main table tbody tr:hover { background: transparent; }
}

/* ---------- Modernisation layer (founder order, 5 Dec 2026,
   22:35 + 23:00 GMT): brand gold as the restrained accent, Steel /
   Ice panel depth on Deep Navy, a clear divider between the
   sidebar and the content, divider lines inside pages, the legal
   reading panel with its own styled scrollbar, and the whole-
   portal 100%-zoom fit standard. Presentation only. ---------- */

html, body { overflow-x: clip; }

/* Sidebar: its own deep-navy panel, divided from the content by a
   fine gold hairline — the two never melt together again. */
.brand-side {
  background: linear-gradient(178deg, #000f30 0%, #000f30 58%, #000f30 100%);
  border-right: 1px solid rgba(176, 141, 46, 0.45);
  box-shadow: 14px 0 34px -20px rgba(0, 15, 48, 0.5);
}

/* Cards: contemporary depth — one soft shadow, calm radius. */
.portal-main .glass-card {
  border-radius: 20px;
  box-shadow:
    0 1px 2px rgba(0, 15, 48, 0.05),
    0 14px 34px -18px rgba(0, 15, 48, 0.22);
}

/* Divider lines between sections inside cards and long pages. */
.portal-main .glass-card section + section {
  border-top: 1px solid var(--border);
  margin-top: 22px;
  padding-top: 22px;
}
.portal-main .glass-card hr {
  border: none;
  border-top: 1px solid var(--border);
}

/* Gold where it belongs: primary actions carry the deep-navy
   button with a gold edge on hover; focus is always visible. */
.portal-main .btn-primary-glass {
  box-shadow: 0 10px 22px -10px rgba(0, 15, 48, 0.55);
}
.portal-main button:focus-visible,
.portal-main a:focus-visible,
.portal-main input:focus-visible,
.portal-main select:focus-visible,
.portal-main textarea:focus-visible {
  outline: 2px solid #6390af;
  outline-offset: 2px;
}

/* ---------- Privacy & Legal: one column, premium finish ------ */
.legal-wrap { max-width: 880px; }
.legal-doc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 26px 28px;
  box-shadow:
    0 1px 2px rgba(0, 15, 48, 0.05),
    0 14px 34px -18px rgba(0, 15, 48, 0.22);
}
.legal-version {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #b08d2e;
  margin-bottom: 14px;
}
.legal-panel {
  max-height: min(56vh, 540px);
  overflow-y: auto;
  padding: 2px 16px 6px 2px;
  scrollbar-width: thin;
  scrollbar-color: #b08d2e rgba(0, 15, 48, 0.08);
}
.legal-panel::-webkit-scrollbar { width: 10px; }
.legal-panel::-webkit-scrollbar-track {
  background: rgba(0, 15, 48, 0.06);
  border-radius: 8px;
}
.legal-panel::-webkit-scrollbar-thumb {
  background: #B08D2E;
  border-radius: 8px;
}
.legal-h {
  font-family: "Poppins", "Inter", sans-serif;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  border-top: 1px solid var(--border);
  box-shadow: inset 3px 0 0 #b08d2e;
  padding: 18px 0 0 12px;
  margin-top: 20px;
}
.legal-h:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.legal-p {
  font-size: 16px;
  line-height: 1.68;
  color: var(--dim);
  margin-top: 10px;
}
.legal-p strong { color: var(--text); }
.legal-ul {
  list-style: disc;
  padding-left: 24px;
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.68;
  color: var(--dim);
}
.legal-credit { font-size: 14px; }

/* ---------- Mobile: stacked tables keep hidden cells hidden -- */
@media (max-width: 820px) {
  .portal-main table td.hidden,
  .portal-main table th.hidden { display: none !important; }
}

/* ---------- 100%-zoom fit: tighter rhythm on short laptops --- */
@media (min-width: 1024px) and (max-height: 820px) {
  .portal-main .grid.gap-8 { gap: 18px; }
  .portal-main .glass-card:not([class*="p-0"]) { padding: 20px; }
  .portal-main h1.font-display { font-size: 26px; }
}

/* Zero-fix: legal pipe tables (Terms plan table) render as real tables. */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 15px;
}
.legal-table th,
.legal-table td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
  color: var(--dim);
}
.legal-table th {
  color: var(--text);
  font-weight: 600;
  background: var(--surface2, transparent);
}

/* ---------- Zero-fix pass #2 (6 Dec 2026) ----------
   H-15: the short-laptop pass now reaches 900px tall and covers
   Home's own root gap, not only .grid.gap-8. Compaction only. */
@media (min-width: 1024px) and (max-height: 900px) {
  .portal-main .grid.gap-8 { gap: 20px; }
  .portal-main .grid.gap-5 { gap: 18px; }
  .portal-main .glass-card:not([class*="p-0"]) { padding: 22px; }
}

/* H-21: icon discs inside white cards get an Ice Light fill —
   never white-on-white again. */
.portal-main .nav-orb { background: #a6d3e9; }

/* Part 25 A1: the sticky sidebar scrolls within itself instead of
   stranding its lower entries below the fold at 1366x768. */
.brand-side {
  max-height: calc(100dvh - 72px);
  overflow-y: auto;
}

/* Part 25 B-03: one focus outline colour (Steel) everywhere. */
:focus-visible { outline-color: #6390af; }

/* Part 18: the legal tab bar sticks while the page scrolls. */
.legal-wrap [role="tablist"] {
  position: sticky;
  top: 76px;
  z-index: 15;
  background: #000f30;
  padding: 6px 0;
}

/* Part 18: print — the legal documents print whole, in black on
   white, with the shell chrome removed and the panel unclipped. */
@media print {
  .brand-side, nav.glass-header, .brand-foot, .legal-wrap [role="tablist"] {
    display: none !important;
  }
  body, .portal-main { background: #ffffff !important; }
  .legal-doc { box-shadow: none !important; border: none !important; }
  .legal-panel { max-height: none !important; overflow: visible !important; padding: 0; }
  .legal-h, .legal-p, .legal-ul, .legal-version { color: #000000 !important; }
  .portal-main h1, .portal-main h2, .portal-main p { color: #000000 !important; }
}
