/* public/css/portal.css - the ONE layer for the customer, carrier and clearing-agent portals and the
   document pages customers and carriers open (owner 2026-11-08, Plan A): the Company Profile logo in
   every header, Stripe-style data cards, scannable tables. Tokens only (yuniq-tokens.css); no colour is
   typed here. Loaded last by: dashboard.html, quote-request.html, login.html, register.html,
   carrier-loads.html, vendor-dashboard.html, clearing-agent.html, rate-confirmation.html, track.html,
   pod/public.html. Not the Driver App (its pages are cached for offline use; a change there needs its
   own plan) and not the staff portal (admin-portal/components/theme.css, flat by the owner's rule). */
@import url('/css/yuniq-tokens.css');

:root {
  --portal-logo-h: 2.25rem;
  --portal-logo-w: 5.5rem;     /* a fixed box: the logo scales inside it, so nothing moves when it loads */
  --portal-plate-pad: 0.375rem 0.625rem;
  --portal-cell-y: 0.75rem;
  --portal-cell-x: 1rem;
}

/* ---- The logo: the Company Profile logo through its one address (/api/public/company-logo, the built-in
   logo as fallback). Fixed height, so nothing moves while it (or the web font) loads. On a navy header
   it sits on a white plate (config/company-profile.json "logoPlate": "light"). ---------------------- */
.portal-logo { display: block; height: var(--portal-logo-h); width: var(--portal-logo-w); object-fit: contain; object-position: left center; }
.portal-logo-plate .portal-logo { object-position: center; }
.portal-logo-plate { display: inline-flex; align-items: center; flex-shrink: 0; padding: var(--portal-plate-pad);
  background: var(--yuniq-white); border-radius: var(--yuniq-radius-control); }
.portal-brand { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }

/* Links in a navy header: soft white, white on hover (no gold). */
.portal-navy-header a { color: var(--yuniq-on-navy-muted); }
.portal-navy-header a:hover { color: var(--yuniq-white); }

/* ---- Data cards (Stripe-style): white, 1px edge, soft shadow, no coloured bars ------------------------ */
:is(.card, .stat, .data-card) { background: var(--yuniq-white); border: 1px solid var(--yuniq-border); border-radius: var(--yuniq-radius);
  box-shadow: var(--yuniq-shadow-sm); }
:is(.card, .stat, .data-card) { border-top-width: 1px; border-top-color: var(--yuniq-border); }
:is(.card, .data-card) > h2 { color: var(--yuniq-navy); font-size: var(--yuniq-text-h3); line-height: var(--yuniq-leading-snug); letter-spacing: -0.005em; }

/* KPI tiles: small muted label, large figure with fixed-width digits. */
.stat h3, .kpi-label { color: var(--yuniq-text-muted); font-size: var(--yuniq-text-eyebrow); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 0.375rem; }
.stat .number, .stat .num, .kpi-value { color: var(--yuniq-navy); font-size: var(--yuniq-text-h2); font-weight: 700; line-height: var(--yuniq-leading-tight);
  letter-spacing: var(--yuniq-tracking-display); font-variant-numeric: tabular-nums; }

/* ---- Tables: one standard - quiet header, hairline rows (no zebra), clear hover and active rows --------- */
table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-size: var(--yuniq-text-eyebrow); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--yuniq-text-muted); background: var(--yuniq-slate); padding: 0.625rem var(--portal-cell-x); border-bottom: 1px solid var(--yuniq-border); }
td { padding: var(--portal-cell-y) var(--portal-cell-x); border-bottom: 1px solid var(--yuniq-border); font-size: var(--yuniq-text-small); color: var(--yuniq-text); }
tbody tr:nth-child(even) > td { background: transparent; }  /* no zebra (yuniq-brand.css stripes; hairlines here) */
tbody tr:hover > td { background: var(--yuniq-navy-50); }
tbody tr:is(.is-active, .selected, [aria-selected="true"]) > td { background: var(--yuniq-navy-50); }
tbody tr:is(.is-active, .selected, [aria-selected="true"]) > td:first-child { box-shadow: inset 3px 0 0 var(--yuniq-navy); }
:is(td, th):is(.num, .amount, .money, [data-num]) { font-variant-numeric: tabular-nums; text-align: right; }

/* A logo above a title (the rate confirmation's navy header). */
.portal-brand--above { margin-bottom: 0.75rem; }
/* A document page with no header of its own (the customer's proof of delivery): a quiet white band with the logo. */
.portal-doc-header { display: flex; align-items: center; padding: 0 0 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--yuniq-border); }
/* A title in a navy header: white (the headers set white text; this keeps it whatever a page says). */
.portal-navy-header h1 { color: var(--yuniq-white); }
