/* ==========================================================================
   JMatrix360 — Design System
   Palette source: dataviz skill reference palette (validated, light mode).
   ========================================================================== */

:root {
  color-scheme: light;

  /* Surfaces */
  --page:            #f3f6fb;
  --surface:         #ffffff;
  --surface-2:       #f8fbff;
  --surface-sunken:  #edf2f8;
  --border:          rgba(11,11,11,0.10);
  --border-strong:   rgba(11,11,11,0.16);

  /* Ink */
  --ink-primary:     #0b0b0b;
  --ink-secondary:   #52514e;
  --ink-muted:       #898781;
  --ink-on-accent:   #ffffff;

  /* Brand / accent (categorical slot 1 — blue) */
  --brand:           #2a78d6;
  --brand-strong:    #184f95;
  --brand-wash:      #eaf2fc;

  /* Categorical palette — fixed order, never cycled */
  --cat-1: #2a78d6; /* blue    */
  --cat-2: #eb6834; /* orange  */
  --cat-3: #1baf7a; /* aqua    */
  --cat-4: #eda100; /* yellow  */
  --cat-5: #e87ba4; /* magenta */
  --cat-6: #008300; /* green   */
  --cat-7: #4a3aa7; /* violet  */
  --cat-8: #e34948; /* red     */

  /* Status (fixed — never themed, never reused for series) */
  --status-good:     #0ca30c;
  --status-warning:  #fab219;
  --status-serious:  #ec835a;
  --status-critical: #d03b3b;

  /* Gridlines / chrome */
  --grid:            #e1e0d9;
  --axis:            #c3c2b7;
  --success-text:    #006300;

  /* Radii / shadow / spacing rhythm */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(11,11,11,0.04), 0 1px 1px rgba(11,11,11,0.03);
  --shadow-md: 0 4px 16px rgba(11,11,11,0.06), 0 2px 6px rgba(11,11,11,0.04);
  --shadow-lg: 0 12px 32px rgba(11,11,11,0.10), 0 4px 12px rgba(11,11,11,0.05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--page);
  color: var(--ink-primary);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-variant-numeric: proportional-nums;
  -webkit-font-smoothing: antialiased;
}
body {
  background-color: var(--page);
  background-image:
    radial-gradient(circle at 8% 4%, rgba(42,120,214,.11), transparent 26rem),
    radial-gradient(circle at 92% 10%, rgba(27,175,122,.09), transparent 24rem),
    linear-gradient(180deg, #f7faff 0%, #f3f6fb 46%, #eef3f8 100%);
  background-attachment: fixed;
}

a { color: var(--brand); }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.01em; margin: 0 0 6px; }
h1 { font-size: 28px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { line-height: 1.55; }

.muted    { color: var(--ink-secondary); font-size: 13.5px; }
.tiny     { font-size: 12px; color: var(--ink-muted); }
.tabular  { font-variant-numeric: tabular-nums; }

/* ---------- App shell ---------- */
.app-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250,252,255,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 14px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
/* A thin brand-gradient hairline under the header — a small, consistent
   colorful signal on every page (not just the landing page) that reads
   as deliberate design rather than a leftover default. */
.app-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: linear-gradient(90deg, var(--cat-1), var(--cat-7), var(--cat-3), var(--cat-4), var(--cat-2));
}
.brand-mark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink-primary); }
.brand-mark .logo-chip {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 15px; box-shadow: var(--shadow-sm);
}
.brand-mark .brand-text { font-weight: 800; font-size: 16px; line-height: 1.1; }
.brand-mark .brand-sub { font-size: 11px; color: var(--ink-muted); font-weight: 500; }

.app-nav { display: flex; align-items: center; gap: 4px; }
.app-nav a {
  text-decoration: none; color: var(--ink-secondary); font-size: 13.5px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px; transition: background .12s, color .12s;
}
.app-nav a:hover { background: var(--surface-sunken); color: var(--ink-primary); }
.app-nav a.active { background: var(--brand-wash); color: var(--brand-strong); }

.app-main { max-width: 1360px; margin: 0 auto; padding: 34px 28px 96px; }
.app-main.wide { max-width: 1440px; }

.app-footer {
  border-top: 1px solid var(--border); padding: 22px 32px; color: var(--ink-muted);
  font-size: 12px; margin-top: 48px;
}

/* ---------- Layout helpers ---------- */
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.gap-xs { gap: 6px; } .gap-sm { gap: 10px; } .gap-md { gap: 16px; } .gap-lg { gap: 24px; }
.grid { display: grid; gap: 18px; }
.grid.cols-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } .grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 700; color: var(--brand-strong); margin-bottom: 6px; }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(249,251,255,.94)); border: 1px solid rgba(24,79,149,.10); border-radius: var(--r-md);
  padding: 20px; box-shadow: 0 8px 24px rgba(31,58,90,.055);
}
.card.hoverable { transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.card.hoverable:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card.flush { padding: 0; overflow: hidden; }

a.card-link { color: inherit; text-decoration: none; display: block; }

.section-title { display:flex; align-items:baseline; justify-content:space-between; margin: 40px 0 16px; }
.section-title h2 { margin: 0; }

/* ---------- Stat tiles ---------- */
.stat-tile { background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(246,249,254,.96)); border: 1px solid rgba(24,79,149,.11); border-radius: 16px; padding: 18px 20px; box-shadow: 0 8px 24px rgba(31,58,90,.055); position:relative; overflow:hidden; transition: transform .16s ease, box-shadow .16s ease; }
/* --tile-c1/--tile-c2 let one page recolor its own tiles' accent bar
   per-tile (e.g. style="--tile-c1:var(--cat-4);--tile-c2:#8a6600") without
   a new class per color — falls back to the original brand→aqua bar
   everywhere that doesn't set them, so this is a no-op elsewhere. */
.stat-tile::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:linear-gradient(180deg,var(--tile-c1,var(--brand)),var(--tile-c2,var(--cat-3)));opacity:.75}
.stat-tile.liftable:hover{transform:translateY(-3px);box-shadow:0 14px 32px rgba(31,58,90,.11)}
.stat-tile .stat-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); }
.stat-tile .stat-value { font-size: 30px; font-weight: 800; margin-top: 6px; letter-spacing: -0.02em; }
.stat-tile .stat-delta { font-size: 12.5px; font-weight: 700; margin-top: 6px; display: inline-flex; align-items: center; gap: 4px; }
.stat-tile .stat-delta.up   { color: var(--success-text); }
.stat-tile .stat-delta.down { color: var(--status-critical); }
.stat-tile .stat-foot { font-size: 12px; color: var(--ink-muted); margin-top: 4px; }

/* ---------- Badges / status ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.badge.b-good     { background: rgba(12,163,12,.12); color: var(--success-text); }
.badge.b-warning  { background: rgba(250,178,25,.18); color: #7a5200; }
.badge.b-serious  { background: rgba(236,131,90,.18); color: #9c3f1c; }
.badge.b-critical { background: rgba(208,59,59,.13); color: var(--status-critical); }
.badge.b-neutral  { background: var(--surface-sunken); color: var(--ink-secondary); }
.badge.b-brand    { background: var(--brand-wash); color: var(--brand-strong); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; font-weight: 700; font-size: 14px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background .12s, border-color .12s, transform .08s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-strong); }
.btn-ghost { background: transparent; color: var(--ink-primary); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-sunken); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }

/* ---------- Forms ---------- */
label.field-label { display:block; font-size: 12.5px; font-weight: 700; color: var(--ink-secondary); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; background: var(--surface); color: var(--ink-primary);
  border: 1px solid var(--border-strong); border-radius: 10px; padding: 10px 12px; font-size: 14px;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-wash); }
.field { margin-bottom: 16px; }
.form-errors { background: rgba(208,59,59,.08); border: 1px solid rgba(208,59,59,.3); color: var(--status-critical); border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }

/* ---------- Tables ---------- */
/* Baseline for every plain <table> in the app (list pages, detail pages,
   controls hubs, etc.) — most templates never add a class at all, so
   without a rule here they render at the browser default: zero cell
   padding, no border between rows/columns. That's the literal cause of
   data reading as "scattered" / cells "encroaching" on each other.
   table.data-table below layers on top of this for pages that opt into
   the denser, more explicit report style; everything else just gets
   readable spacing and visible row separation for free. */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table th, table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
table th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); font-weight: 700; border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
table tbody tr:last-child td { border-bottom: none; }
table tbody tr:hover td { background: var(--surface-sunken); }
/* Tables are almost always the direct child of a .card — align their
   edges with the card's own padding instead of double-indenting, and
   let the hover wash bleed to the card edge. */
.card > table:not([class]), .card > .table-responsive > table:not([class]) { margin: -4px -20px; width: calc(100% + 40px); }
.card > table:not([class]) th:first-child, .card > table:not([class]) td:first-child,
.card > .table-responsive > table:not([class]) th:first-child, .card > .table-responsive > table:not([class]) td:first-child { padding-left: 20px; }
.card > table:not([class]) th:last-child, .card > table:not([class]) td:last-child,
.card > .table-responsive > table:not([class]) th:last-child, .card > .table-responsive > table:not([class]) td:last-child { padding-right: 20px; }

/* `.table-responsive` is used as a wrapper around wide tables throughout
   the app, but had no rule at all — a table wider than its card simply
   overflowed into (or under) whatever sat next to it instead of
   scrolling. This gives it a real, contained horizontal scrollbar. */
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.data-table { font-size: 13.5px; }
table.data-table th { padding: 10px 14px; border-bottom: 1px solid var(--border-strong); }
table.data-table td { padding: 12px 14px; }
table.data-table tfoot td { font-weight: 800; border-top: 2px solid var(--border-strong); border-bottom: none; }
table.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Vehicle catalog cards ---------- */
.filters-bar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 18px 20px; box-shadow: var(--shadow-sm); display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.vehicle-card { position: relative; overflow: hidden; }
/* No real fleet photography is on file yet (Vehicle.photo is unused
   today) — rather than a plain pale wash + small icon, each thumb gets
   a bold gradient keyed to asset category plus a large ghost icon and
   a subtle diagonal texture, so the grid reads as colorful and
   deliberate instead of "photo placeholder." Swap this for real
   vehicle photos the moment they exist (img tag can replace the icon
   without touching the surrounding markup). */
.vehicle-card .thumb {
  position: relative; overflow: hidden;
  height: 128px; border-radius: var(--r-sm); margin-bottom: 14px;
  background: linear-gradient(135deg, var(--cat-1), var(--brand-strong));
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.92); font-size: 40px;
  box-shadow: inset 0 -30px 40px -20px rgba(0,0,0,.25);
}
.vehicle-card .thumb::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background: repeating-linear-gradient(115deg, rgba(255,255,255,.08) 0 2px, transparent 2px 22px);
}
.vehicle-card .thumb i { position: relative; filter: drop-shadow(0 4px 10px rgba(0,0,0,.2)); }
.vehicle-card .thumb.cat-marine    { background: linear-gradient(135deg, var(--cat-3), #0f7a53); }
.vehicle-card .thumb.cat-equipment { background: linear-gradient(135deg, var(--cat-2), #b8481c); }
.vehicle-card .price { color: var(--brand-strong); font-weight: 800; font-size: 18px; margin-top: 10px; }
.vehicle-card .price .per { color: var(--ink-muted); font-weight: 500; font-size: 12px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 8px; margin-top: 28px; }
.pagination a, .pagination span { color: var(--ink-secondary); text-decoration: none; padding: 7px 12px; border: 1px solid var(--border-strong); border-radius: 8px; font-size: 13px; font-weight: 600; }
.pagination a:hover { background: var(--surface-sunken); }

/* ---------- Chart containers ---------- */
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 20px; box-shadow: var(--shadow-sm); }
.chart-card .chart-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4px; }
.chart-card .chart-title { font-weight: 700; font-size: 14.5px; }
.chart-card .chart-sub { font-size: 12px; color: var(--ink-muted); }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--ink-secondary); }
.chart-legend .key { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend .swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart-canvas-wrap { position: relative; width: 100%; }

/* ---------- Login / auth ---------- */
.auth-card { max-width: 400px; margin: 60px auto; }

/* ---------- Nav dropdown (zero-JS, <details>/<summary>) ---------- */
.nav-drop { position: relative; }
.nav-drop summary {
  list-style: none; cursor: pointer; color: var(--ink-secondary); font-size: 13.5px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px;
}
.nav-drop summary::-webkit-details-marker { display: none; }
.nav-drop summary:hover { background: var(--surface-sunken); color: var(--ink-primary); }
.nav-drop[open] summary { background: var(--brand-wash); color: var(--brand-strong); }
.nav-drop .caret { font-size: 10px; opacity: .6; }
.nav-drop .dropdown-panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 60;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); padding: 10px; min-width: 260px;
  display: grid; gap: 2px;
  /* The Back Office menu alone now lists 17 links (this session's new
     areas added several) — without a height cap the panel just grows
     past the bottom of the viewport with no way to reach the rest, since
     the panel itself was never scrollable. Cap it to the visible window
     and let it scroll internally instead. */
  max-height: calc(100vh - 90px);
  overflow-y: auto;
}
.nav-drop .dropdown-panel a {
  display: flex; flex-direction: column; gap: 1px; text-decoration: none; color: var(--ink-primary);
  padding: 9px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600;
}
.nav-drop .dropdown-panel a:hover { background: var(--surface-sunken); }
.nav-drop .dropdown-panel a span.dd-sub { font-weight: 500; font-size: 11.5px; color: var(--ink-muted); }
/* click-away close via CSS: clicking elsewhere in <body> loses :focus-within only for keyboard;
   <details> already toggles on click natively, which is all we need here. */

/* ---------- Hero ---------- */
/* A real photo now sits behind every big marketing hero (set per-page via
   an inline background-image style on the .hero element —
   keeps one CSS component serving several different pages, each with its
   own image). Falls back gracefully to the navy base color if a page
   doesn't set one, or while the photo is still loading. Legibility comes
   from ::before's directional scrim (dark on the copy side, sheer over
   the photo) layered under ::after's brand-color mesh, so the result
   still reads as "JMatrix360 blue," just with a real photo showing
   through — not a stock-photo site with a logo on top. */
.hero {
  position: relative; overflow: hidden; border-radius: var(--r-lg);
  background-color: #0f2f5c;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  color: #fff; padding: 56px 48px; margin-bottom: 40px;
  box-shadow: var(--shadow-lg);
}
.hero::before {
  /* Legibility comes first — the copy column can run wider than the old
     56%-opacity midpoint accounted for (especially once .hero-grid
     collapses to one column under 980px), so this stays solidly dark
     well past that, only easing off near the very right edge. A photo
     showing through at reduced brightness still reads as "there's a
     real place back there"; text that's hard to read does not. */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, rgba(4,14,30,.97) 0%, rgba(7,23,49,.95) 40%, rgba(13,42,84,.88) 68%, rgba(20,60,110,.62) 100%);
}
.hero::after {
  /* Multi-hue mesh (pulls in violet and gold, not just blue-to-teal, so
     the hero reads as a deliberate, layered gradient) plus a faint
     diagonal ruling for texture at close range, invisible from a normal
     viewing distance — the same trick .page-hero uses, so the two hero
     styles feel like one family. Both layered in one rule since they
     share the same stacking position (both sit above the photo/scrim,
     below the text).
  */
  content: ""; position: absolute; inset: 0; opacity: .65; pointer-events: none;
  background:
    radial-gradient(560px 300px at 88% -8%, rgba(94,224,184,.40), transparent 60%),
    radial-gradient(480px 260px at 102% 92%, rgba(154,122,255,.38), transparent 60%),
    radial-gradient(380px 220px at 8% 96%, rgba(255,190,90,.22), transparent 62%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.05) 0 2px, transparent 2px 30px);
}
.hero-eyebrow {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.22);
  color: #eaf2fc; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: 5px 12px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { position: relative; font-size: 42px; line-height: 1.08; max-width: 720px; margin-bottom: 14px; color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,.5); }
.hero p.lede { position: relative; font-size: 16.5px; color: rgba(255,255,255,0.92); max-width: 620px; margin: 0 0 28px; text-shadow: 0 1px 10px rgba(0,0,0,.55); }
.hero-ctas { position: relative; display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 36px; }
.hero .btn-primary { background: #fff; color: var(--brand-strong); }
.hero .btn-primary:hover { background: #eaf2fc; }
.hero .btn-outline {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.4);
}
.hero .btn-outline:hover { background: rgba(255,255,255,0.12); }
/* Two-column hero: copy on the left, a real product screenshot in a
   floating device frame on the right — the "picture" the homepage was
   missing. Uses one of the same screenshots already shown further down
   in "Real screens, not mockups," so it's authentic, not stock imagery. */
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; } .hero-visual { display: none; } }
.hero-visual { position: relative; }
.hero-shot {
  position: relative; border-radius: 14px; overflow: hidden; background: #1b1b1b;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.5), 0 10px 24px -8px rgba(0,0,0,.35);
  transform: perspective(1400px) rotateY(-8deg) rotateX(2deg);
  border: 1px solid rgba(255,255,255,.14);
}
.hero-shot-chrome { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #242424; }
.hero-shot-chrome .dot { width: 8px; height: 8px; border-radius: 50%; }
.hero-shot-chrome .dot.d1 { background: #e34948; } .hero-shot-chrome .dot.d2 { background: #eda100; } .hero-shot-chrome .dot.d3 { background: #0ca30c; }
.hero-shot img { display: block; width: 100%; height: auto; }
.hero-float-card {
  position: absolute; left: -24px; bottom: -20px; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  background: #fff; color: var(--ink-primary); border-radius: 14px; padding: 14px 18px;
  box-shadow: var(--shadow-lg);
}
.hero-float-card i {
  font-size: 20px; color: var(--brand-strong); background: var(--brand-wash);
  width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
}
.hero-float-card .hf-num { font-size: 20px; font-weight: 800; line-height: 1; }
.hero-float-card .hf-lbl { font-size: 11px; color: var(--ink-muted); margin-top: 2px; }

.hero-stats { position: relative; display: flex; gap: 36px; flex-wrap: wrap; }
.hero-stats .stat { min-width: 100px; position: relative; padding-left: 14px; }
.hero-stats .stat::before {
  content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px; border-radius: 3px;
}
.hero-stats .stat:nth-child(5n+1)::before { background: var(--cat-4); }
.hero-stats .stat:nth-child(5n+2)::before { background: var(--cat-3); }
.hero-stats .stat:nth-child(5n+3)::before { background: var(--cat-5); }
.hero-stats .stat:nth-child(5n+4)::before { background: var(--cat-2); }
.hero-stats .stat:nth-child(5n+5)::before { background: var(--cat-7); }
.hero-stats .stat .num { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.hero-stats .stat .lbl { font-size: 12px; color: rgba(255,255,255,0.82); margin-top: 2px; text-shadow: 0 1px 6px rgba(0,0,0,.5); }

/* ---------- Module / feature tiles (the platform hub) ---------- */
.module-tile {
  display: flex; flex-direction: column; gap: 10px; padding: 20px;
  border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface);
  text-decoration: none; color: inherit; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  position: relative; overflow: hidden;
}
.module-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.module-tile::after {
  /* Colored top accent bar, keyed off whichever ic-* chip the tile
     contains (see rules below) — gives each row of the platform-hub
     grid a quick visual "this is the ops group / this is finance"
     read, and makes the page look intentionally colorful at a glance
     instead of white cards with a small tinted icon each. */
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--border);
}
.tile-icon {
  width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0; color: #fff; box-shadow: var(--shadow-sm);
}
.module-tile h3 { margin: 0; font-size: 15px; }
.module-tile p { margin: 0; font-size: 12.5px; color: var(--ink-secondary); line-height: 1.5; }
.module-tile .tile-tag {
  align-self: flex-start; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-muted); background: var(--surface-sunken); padding: 3px 9px; border-radius: 999px; margin-top: auto;
}

/* Icon chip color variants — used per module category. Solid gradient
   chips (white icon) read as far more "colorful" at a glance than a
   colored icon on a pale wash, while staying inside the same 6-hue
   categorical palette everywhere else in the app already uses. */
.tile-icon.ic-blue    { background: linear-gradient(135deg, var(--cat-1), #184f95); box-shadow: 0 6px 16px -7px rgba(42,120,214,.65); }
.tile-icon.ic-orange  { background: linear-gradient(135deg, var(--cat-2), #b8481c); box-shadow: 0 6px 16px -7px rgba(235,104,52,.65); }
.tile-icon.ic-aqua    { background: linear-gradient(135deg, var(--cat-3), #0f7a53); box-shadow: 0 6px 16px -7px rgba(27,175,122,.65); }
.tile-icon.ic-yellow  { background: linear-gradient(135deg, var(--cat-4), #8a6600); box-shadow: 0 6px 16px -7px rgba(237,161,0,.55); }
.tile-icon.ic-magenta { background: linear-gradient(135deg, var(--cat-5), #a13a63); box-shadow: 0 6px 16px -7px rgba(232,123,164,.6); }
.tile-icon.ic-violet  { background: linear-gradient(135deg, var(--cat-7), #2c1f6b); box-shadow: 0 6px 16px -7px rgba(74,58,167,.6); }

.module-tile:has(.ic-blue)::after    { background: linear-gradient(90deg, var(--cat-1), #6fb3f2); }
.module-tile:has(.ic-orange)::after  { background: linear-gradient(90deg, var(--cat-2), #ffb385); }
.module-tile:has(.ic-aqua)::after    { background: linear-gradient(90deg, var(--cat-3), #74e3bb); }
.module-tile:has(.ic-yellow)::after  { background: linear-gradient(90deg, var(--cat-4), #ffd166); }
.module-tile:has(.ic-magenta)::after { background: linear-gradient(90deg, var(--cat-5), #ffb3cf); }
.module-tile:has(.ic-violet)::after  { background: linear-gradient(90deg, var(--cat-7), #9b8ae0); }

/* ---------- Section band (alternating page rhythm) ---------- */
.band { padding: 48px 0; }
.band-title { text-align: center; max-width: 620px; margin: 0 auto 32px; }
.band-title h2 { font-size: 26px; }
/* Pill-badge eyebrow (matches .hero-eyebrow's treatment) instead of
   plain uppercase text — plus an optional per-section hue so scrolling
   down the page reads as a sequence of distinct, colorful sections
   rather than one long white page with blue links. */
.band-title .eyebrow {
  justify-content: center; display: inline-flex; margin: 0 auto 6px;
  background: var(--brand-wash); color: var(--brand-strong);
  padding: 5px 14px; border-radius: 999px;
}
.band-title.hue-violet .eyebrow  { background: #ece9fa; color: #4a3aa7; }
.band-title.hue-aqua .eyebrow    { background: #e2f7ef; color: #0f7a53; }
.band-title.hue-magenta .eyebrow { background: #fbe8ef; color: #a13a63; }
.band-title.hue-gold .eyebrow    { background: #fdf1d8; color: #8a6600; }

/* ---------- Persona cards (portal landing on hub) ---------- */
.persona-card {
  border-radius: var(--r-lg); padding: 26px; color: #fff; position: relative; overflow: hidden;
  min-height: 190px; display: flex; flex-direction: column; justify-content: flex-end; text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: transform .18s ease, box-shadow .18s ease;
}
.persona-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background:
    radial-gradient(160px 160px at 108% -10%, rgba(255,255,255,.30), transparent 60%),
    radial-gradient(220px 140px at 100% 115%, rgba(0,0,0,.18), transparent 60%);
}
.persona-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.persona-card h3 { color: #fff; font-size: 19px; margin-bottom: 6px; position: relative; }
.persona-card p { color: rgba(255,255,255,0.85); font-size: 12.5px; margin: 0; position: relative; }
.persona-card .persona-icon {
  position: relative; font-size: 22px; margin-bottom: 14px; width: 46px; height: 46px; border-radius: 13px;
  background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.28);
  display: flex; align-items: center; justify-content: center;
}
.persona-card.p-driver  { background: linear-gradient(135deg, #eb6834, #b8481c); }
.persona-card.p-booking { background: linear-gradient(135deg, #2a78d6, #184f95); }
.persona-card.p-owner   { background: linear-gradient(135deg, #1baf7a, #0f7a53); }
.persona-card.p-staff   { background: linear-gradient(135deg, #4a3aa7, #2c1f6b); }
.persona-card.p-account { background: linear-gradient(135deg, #1c5cab, #0f2f5c); }
/* Hover glow tinted to match each card's own gradient, instead of one
   generic dark shadow for all five — small touch, makes the hover
   state feel designed rather than a browser default lift. */
.persona-card.p-driver:hover  { box-shadow: 0 18px 38px -12px rgba(235,104,52,.55); }
.persona-card.p-booking:hover { box-shadow: 0 18px 38px -12px rgba(42,120,214,.55); }
.persona-card.p-owner:hover   { box-shadow: 0 18px 38px -12px rgba(27,175,122,.55); }
.persona-card.p-staff:hover   { box-shadow: 0 18px 38px -12px rgba(74,58,167,.55); }
.persona-card.p-account:hover { box-shadow: 0 18px 38px -12px rgba(28,92,171,.55); }

/* ---------- Page hero (compact colored header for every module page) ---------- */
.page-hero {
  position: relative; overflow: hidden; border-radius: var(--r-lg);
  background: linear-gradient(120deg, var(--brand) 0%, var(--brand-strong) 100%);
  color: #fff; padding: 28px 32px; margin-bottom: 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
}
.page-hero::before {
  content: ""; position: absolute; inset: 0; opacity: .55; pointer-events: none;
  background:
    radial-gradient(460px 240px at 96% -30%, rgba(255,255,255,.28), transparent 60%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.045) 0 2px, transparent 2px 28px);
}
.page-hero .ph-main { position: relative; display: flex; align-items: center; gap: 16px; min-width: 240px; }
.page-hero .ph-icon {
  width: 52px; height: 52px; border-radius: 15px; flex-shrink: 0;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.26);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.page-hero .eyebrow { color: rgba(255,255,255,.78); margin-bottom: 4px; }
.page-hero h1 { color: #fff; font-size: 23px; margin-bottom: 2px; }
.page-hero p { color: rgba(255,255,255,.82); font-size: 13px; margin: 0; max-width: 520px; }
.page-hero .ph-actions { position: relative; display: flex; gap: 10px; flex-wrap: wrap; }
.page-hero .btn-primary { background: #fff; color: var(--brand-strong); }
.page-hero .btn-primary:hover { background: #eaf2fc; }
.page-hero .btn-outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.42); }
.page-hero .btn-outline:hover { background: rgba(255,255,255,.14); }
.page-hero.hue-orange  { background: linear-gradient(120deg, #eb6834, #b8481c); }
.page-hero.hue-aqua    { background: linear-gradient(120deg, #1baf7a, #0f7a53); }
.page-hero.hue-violet  { background: linear-gradient(120deg, #4a3aa7, #2c1f6b); }
.page-hero.hue-magenta { background: linear-gradient(120deg, #e87ba4, #a13a63); }
.page-hero.hue-yellow  { background: linear-gradient(120deg, #eda100, #8a6600); }
/* "Jet" — Manufacturing360's own hue (replaces the old hue-orange it used
   to share with other generic orange UI accents elsewhere). A deep
   afterburner indigo cooling into electric cyan, chosen for the module's
   precision/speed character rather than the warm industrial orange it
   had before. Scoped to its own hue-jet class so --cat-2/hue-orange (used
   by unrelated things like the fleet-status donut and ic-orange tiles)
   is untouched. */
.page-hero.hue-jet     { background: linear-gradient(120deg, #142a63 0%, #1d4ed8 48%, #06b6d4 100%); }
.page-hero.hue-jet::before {
  background:
    radial-gradient(460px 240px at 96% -30%, rgba(125,211,252,.35), transparent 60%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.05) 0 2px, transparent 2px 28px);
}
@media (max-width: 640px) { .page-hero { padding: 22px 20px; } .page-hero h1 { font-size: 20px; } }

/* Opt-in photo backing for a page-hero, reserved for pages that are
   actually inviting someone in (browse-the-fleet, sign-up) rather than
   internal back-office tools — most .page-hero users stay plain-gradient
   on purpose, so this only fires where a page sets both a hue class AND
   `.photo`, with an inline background-image style supplying
   the actual photo per page. The hue's own gradient becomes the ::before
   scrim tint instead of the visible background, so the photo shows
   through while the page keeps its color identity. */
.page-hero.photo {
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.page-hero.photo::before {
  /* Same fix as .hero: dark zone pushed well past the text column
     (ph-main has no fixed max-width, so it can run wider than the old
     48%-opacity midpoint assumed) and the lightest point raised so the
     photo never fully washes out the copy sitting on top of it. */
  opacity: 1;
  background: linear-gradient(100deg, rgba(8,26,54,.95) 0%, rgba(15,47,92,.90) 42%, rgba(42,120,214,.68) 70%, rgba(42,120,214,.42) 100%);
}
.page-hero.hue-orange.photo::before  { background: linear-gradient(100deg, rgba(56,26,9,.95) 0%, rgba(90,42,14,.90) 42%, rgba(235,104,52,.66) 70%, rgba(235,104,52,.38) 100%); }
.page-hero.hue-aqua.photo::before    { background: linear-gradient(100deg, rgba(6,38,26,.95) 0%, rgba(9,58,40,.90) 42%, rgba(27,175,122,.66) 70%, rgba(27,175,122,.38) 100%); }
.page-hero.hue-violet.photo::before  { background: linear-gradient(100deg, rgba(19,14,46,.95) 0%, rgba(30,22,72,.90) 42%, rgba(74,58,167,.68) 70%, rgba(74,58,167,.40) 100%); }
.page-hero.hue-magenta.photo::before { background: linear-gradient(100deg, rgba(51,16,31,.95) 0%, rgba(80,25,48,.90) 42%, rgba(232,123,164,.62) 70%, rgba(232,123,164,.36) 100%); }
.page-hero.hue-yellow.photo::before  { background: linear-gradient(100deg, rgba(47,35,0,.95) 0%, rgba(74,55,0,.90) 42%, rgba(237,161,0,.62) 70%, rgba(237,161,0,.36) 100%); }
.page-hero.photo h1, .page-hero.photo p, .page-hero.photo .eyebrow {
  text-shadow: 0 1px 10px rgba(0,0,0,.5);
}

/* ---------- Trust / stat bar (marketing pages) ---------- */
.trust-bar {
  display: flex; justify-content: center; gap: 52px; flex-wrap: wrap;
  padding: 22px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  margin: 8px 0 48px;
}
.trust-bar .trust-stat { text-align: center; }
.trust-bar .trust-stat .num { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.trust-bar .trust-stat .lbl { font-size: 11.5px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }

/* ---------- Pricing cards ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; } }
.pricing-card {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-lg);
  padding: 30px 26px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  position: relative; transition: transform .18s ease, box-shadow .18s ease;
}
.pricing-card:hover { transform: translateY(-3px); }
.pricing-card.featured {
  border-color: var(--brand); box-shadow: var(--shadow-lg);
  background: linear-gradient(180deg, var(--brand-wash) 0%, var(--surface) 180px);
}
.pricing-card .plan-ribbon {
  position: absolute; top: -12px; left: 26px; background: var(--brand); color: #fff;
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  padding: 4px 12px; border-radius: 999px; box-shadow: var(--shadow-sm);
}
.pricing-card .plan-name { font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-strong); }
.pricing-card .plan-price { font-size: 24px; font-weight: 800; margin: 10px 0 2px; letter-spacing: -0.01em; }
.pricing-card .plan-tagline { color: var(--ink-secondary); font-size: 13px; margin: 0 0 22px; min-height: 34px; }
.pricing-card ul.plan-features { list-style: none; padding: 0; margin: 0 0 26px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.pricing-card ul.plan-features li { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; color: var(--ink-secondary); line-height: 1.4; }
.pricing-card ul.plan-features li i { color: var(--success-text); margin-top: 2px; flex-shrink: 0; }
.pricing-card .btn { margin-top: auto; }

/* ---------- FAQ accordion ---------- */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq-item summary { cursor: pointer; font-weight: 700; font-size: 14.5px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 20px; font-weight: 400; color: var(--ink-muted); transition: transform .15s ease; flex-shrink: 0; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 10px 0 0; color: var(--ink-secondary); font-size: 13.5px; line-height: 1.6; }

/* ---------- Icon-choice tiles (visual radio buttons, e.g. priority/type pickers) ---------- */
.choice-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.choice-tile { position: relative; }
.choice-tile input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-tile label {
  display: flex; align-items: center; gap: 10px; padding: 13px 14px;
  border: 1.5px solid var(--border-strong); border-radius: 12px; cursor: pointer;
  font-weight: 700; font-size: 13.5px; color: var(--ink-secondary);
  transition: border-color .12s, background .12s, box-shadow .12s, color .12s;
}
.choice-tile label i { font-size: 17px; color: var(--ink-muted); transition: color .12s; }
.choice-tile input:checked + label { border-color: var(--brand); background: var(--brand-wash); color: var(--brand-strong); box-shadow: 0 0 0 3px var(--brand-wash); }
.choice-tile input:checked + label i { color: var(--brand-strong); }
.choice-tile input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 1px; }

/* ---------- Approval step tracker ---------- */
.step-track { display: flex; align-items: flex-start; gap: 0; margin: 20px 0 8px; overflow-x: auto; padding-bottom: 4px; }
.step-track .step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; min-width: 92px; position: relative; }
.step-track .step .dot {
  width: 30px; height: 30px; border-radius: 50%; background: var(--surface-sunken);
  border: 2px solid var(--border-strong); display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: var(--ink-muted); z-index: 1; background-clip: padding-box;
}
.step-track .step.done .dot { background: var(--status-good); border-color: var(--status-good); color: #fff; }
.step-track .step.current .dot { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 0 0 4px var(--brand-wash); }
.step-track .step .lbl { font-size: 11px; text-align: center; color: var(--ink-secondary); font-weight: 600; max-width: 100px; }
.step-track .step:not(:last-child)::after {
  content: ""; position: absolute; top: 15px; left: 50%; width: 100%; height: 2px; background: var(--border-strong); z-index: 0;
}
.step-track .step.done:not(:last-child)::after { background: var(--status-good); }

/* ---------- Empty states ---------- */
.empty-state { text-align: center; padding: 52px 24px; color: var(--ink-muted); }
.empty-state .es-icon {
  width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px; background: var(--surface-sunken);
  display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--ink-muted);
}
.empty-state h3 { color: var(--ink-secondary); margin-bottom: 4px; }

/* ---------- Icon buttons inline in text/badges ---------- */
.btn i, .app-nav a i, .nav-drop .dropdown-panel a i { margin-right: 2px; }
.dd-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; background: var(--brand-wash); color: var(--brand-strong); font-size: 13px; flex-shrink: 0; }
.nav-drop .dropdown-panel a { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; }
.nav-drop .dropdown-panel a .dd-copy { display: flex; flex-direction: column; gap: 1px; }

/* ---------- Landing: product showcase (real screenshots in a browser frame) ---------- */
.showcase-tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 22px; flex-wrap: wrap; }
.showcase-tabs button {
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px;
  padding: 9px 18px; font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--ink-secondary);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.showcase-tabs button:hover { border-color: var(--border-strong); }
.showcase-tabs button.active { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 6px 16px -6px rgba(42,120,214,.5); }
.showcase-frame {
  max-width: 980px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.showcase-chrome { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.showcase-chrome .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.showcase-chrome .dot.d1 { background: #e34948; }
.showcase-chrome .dot.d2 { background: #eda100; }
.showcase-chrome .dot.d3 { background: #0ca30c; }
.showcase-chrome .url { margin-left: 8px; font-size: 11.5px; color: var(--ink-muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 3px 14px; }
.showcase-panel { display: none; }
.showcase-panel.active { display: block; animation: jm-fade-up .35s ease; }
.showcase-panel img { display: block; width: 100%; height: auto; }
@keyframes jm-fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Urgent, unresolved-until-a-human-acts indicator ---------- */
/* Reserved for conditions that genuinely need attention right now (e.g.
   a paid booking still waiting on a driver) — not for routine warnings,
   which use a static badge/tile color instead. Reuses --status-critical,
   no new color introduced. */
@keyframes jm-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.blink-critical { animation: jm-blink 1.2s ease-in-out infinite; }

/* ---------- Landing: how-it-works step sequence ---------- */
.hiw-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .hiw-track { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .hiw-track { grid-template-columns: 1fr; } }
.hiw-step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 22px 18px; }
.hiw-step .hiw-num {
  width: 34px; height: 34px; border-radius: 50%; background: var(--brand-wash); color: var(--brand-strong);
  font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.hiw-step h3 { font-size: 14.5px; margin: 0 0 6px; }
.hiw-step p { font-size: 12.5px; color: var(--ink-secondary); margin: 0; line-height: 1.5; }

/* ---------- Landing: honest capability comparison table ---------- */
.compare-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.compare-table th, .compare-table td { padding: 14px 18px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--border); vertical-align: top; }
.compare-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-muted); background: var(--surface-2); }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table td.col-us { background: var(--brand-wash); font-weight: 600; }
.compare-table th.col-us { background: var(--brand); color: #fff; }
.compare-table td i.bi-check-circle-fill { color: var(--success-text); margin-right: 6px; }
.compare-table td i.bi-dash-circle { color: var(--ink-muted); margin-right: 6px; }
.compare-table-wrap { overflow-x: auto; }
.compare-table-wrap table { min-width: 640px; }

/* ===== v1.5 product experience ===== */
.product-nav{position:sticky;top:72px;z-index:30;display:flex;align-items:center;gap:4px;padding:7px;background:rgba(255,255,255,.92);backdrop-filter:blur(10px);border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow-sm);margin:-10px 0 24px;max-width:100%;overflow:visible}
.product-nav>a,.product-nav summary{display:flex;align-items:center;gap:7px;padding:9px 13px;border-radius:9px;text-decoration:none;color:var(--ink-secondary);font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap;list-style:none}
.product-nav>a:hover,.product-nav summary:hover,.product-nav>a.active,.product-nav details[open] summary{background:var(--brand-wash);color:var(--brand-strong)}
.product-nav summary::-webkit-details-marker{display:none}.product-nav details{position:relative}.product-nav summary span{font-size:9px;opacity:.65}
.product-menu{position:absolute;top:44px;left:0;min-width:270px;background:white;border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow-lg);padding:8px;z-index:80}.product-menu-right{left:auto;right:0}
.product-menu a{display:flex;flex-direction:column;text-decoration:none;color:var(--ink-primary);padding:10px 12px;border-radius:9px}.product-menu a:hover{background:var(--surface-sunken)}.product-menu a b{font-size:13px}.product-menu a small{font-size:11.5px;color:var(--ink-muted);margin-top:2px;font-weight:500}
.import-drop{padding:28px;display:grid;grid-template-columns:auto 1fr;gap:18px;align-items:start}.import-drop-icon,.upload-big-icon{width:56px;height:56px;border-radius:16px;background:var(--brand-wash);color:var(--brand-strong);display:flex;align-items:center;justify-content:center;font-size:25px}.import-types{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:8px}.import-type{display:flex;flex-direction:column;gap:5px;border:1px solid var(--border);border-radius:13px;padding:18px;text-decoration:none;color:var(--ink-primary);background:var(--surface-2);transition:.15s}.import-type:hover{transform:translateY(-2px);box-shadow:var(--shadow-md);border-color:#a9c8ec}.import-type i{font-size:22px;color:var(--brand)}.import-type b{font-size:14px}.import-type small{color:var(--ink-muted);line-height:1.4}.recognition{display:flex;align-items:center;gap:8px}.b-rejected{font-size:11px;color:var(--status-critical);background:rgba(208,59,59,.09);padding:3px 7px;border-radius:999px}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:36px;color:var(--ink-muted);gap:7px;text-align:center}.empty-state i{font-size:28px;color:var(--brand)}.empty-state.compact{padding:18px}.upload-zone{text-align:left}.upload-big-icon{margin-bottom:14px}.import-wizard-grid{align-items:start}.process-list{display:flex;flex-direction:column;gap:6px;margin-top:14px}.process-list>div{display:flex;gap:12px;padding:12px 0;border-bottom:1px solid var(--border)}.process-list>div:last-child{border-bottom:0}.process-list span{width:28px;height:28px;border-radius:50%;background:var(--brand-wash);color:var(--brand-strong);display:flex;align-items:center;justify-content:center;font-weight:800;font-size:12px;flex:none}.process-list p{margin:0;display:flex;flex-direction:column;gap:2px}.process-list small{color:var(--ink-muted)}
.stat-value-sm{font-size:18px!important;line-height:1.35}.attention-card{display:flex;align-items:flex-start;gap:16px;margin-top:18px;border-color:rgba(250,178,25,.5);background:#fffbf0}.attention-icon{width:44px;height:44px;border-radius:12px;background:#fff3cf;color:#8a6600;display:flex;align-items:center;justify-content:center;font-size:20px;flex:none}.diagnostic-list{margin:14px 0}.diagnostic-list>div{display:flex;justify-content:space-between;padding:9px 0;border-bottom:1px solid var(--border)}.diagnostic-list dt{color:var(--ink-muted)}.diagnostic-list dd{margin:0;font-weight:700}.chip-list{display:flex;flex-wrap:wrap;gap:6px}.chip-list span{background:var(--surface-sunken);border:1px solid var(--border);padding:5px 8px;border-radius:8px;font-size:11px}.reason-list{display:flex;flex-direction:column}.reason-list>div{display:flex;justify-content:space-between;gap:16px;padding:10px 0;border-bottom:1px solid var(--border);font-size:13px}.reason-list>div:last-child{border-bottom:0}.money-value{font-size:24px!important}.bank-kpis h2{font-size:24px;margin-top:4px}
.onboarding-step{display:flex;flex-direction:column;gap:12px}.onboarding-step .step-top{display:flex;justify-content:space-between;gap:10px}.onboarding-step.done{background:#f3fbf6;border-color:rgba(12,163,12,.2)}.onboarding-actions{display:flex;gap:10px;justify-content:space-between;align-items:center;flex-wrap:wrap;margin-top:18px}.login-shell{min-height:calc(100vh - 180px);display:grid;place-items:center}.login-card{width:min(440px,94vw);padding:30px}.login-brand{display:flex;align-items:center;gap:12px;margin-bottom:24px}.login-brand .logo-chip{width:44px;height:44px;border-radius:13px;background:linear-gradient(135deg,var(--brand),var(--brand-strong));display:grid;place-items:center;color:white;font-weight:900}.login-card form p{margin:0 0 14px}.login-card label{display:block;font-size:12px;font-weight:700;color:var(--ink-secondary);margin-bottom:5px}.workspace-card{max-width:680px;margin:40px auto;text-align:center}
@media(max-width:900px){.import-types{grid-template-columns:repeat(2,1fr)}.product-nav{overflow-x:auto}.app-header{padding:12px 18px}.app-nav{overflow-x:auto;max-width:75vw}}
@media(max-width:600px){.import-types{grid-template-columns:1fr}.import-drop{grid-template-columns:1fr}.import-drop-icon{display:none}}

/* ---------- Executive experience v2.9 ---------- */
.exec-hero{position:relative;overflow:hidden;padding:30px;border-radius:24px;margin-bottom:20px;background:linear-gradient(125deg,#102a43 0%,#155e75 55%,#0f766e 100%);color:#fff;box-shadow:0 18px 50px rgba(16,42,67,.18)}
.exec-hero:after{content:"";position:absolute;right:-100px;top:-150px;width:390px;height:390px;border:58px solid rgba(255,255,255,.07);border-radius:50%}.exec-hero-grid{display:grid;grid-template-columns:1.4fr .6fr;gap:24px;align-items:center}.exec-hero h1{font-size:clamp(30px,4vw,46px);margin:7px 0 10px;max-width:850px}.exec-hero p{max-width:800px;color:rgba(255,255,255,.86);font-size:15.5px}.exec-orbit{position:relative;min-height:170px}.exec-orbit .core{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:92px;height:92px;border-radius:28px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.28);display:grid;place-items:center;font-size:42px;backdrop-filter:blur(10px)}.exec-orbit .orb{position:absolute;padding:8px 11px;border-radius:12px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.22);font-size:11px;font-weight:800;backdrop-filter:blur(8px)}.exec-orbit .o1{left:0;top:10px}.exec-orbit .o2{right:0;top:24px}.exec-orbit .o3{left:8%;bottom:8px}.exec-orbit .o4{right:3%;bottom:2px}.decision-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:0 0 20px}.decision-card{border:1px solid var(--border);border-radius:17px;padding:17px;background:linear-gradient(180deg,var(--surface),var(--surface-2));position:relative;overflow:hidden}.decision-card:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--brand)}.decision-card.warn:before{background:var(--status-warning)}.decision-card.risk:before{background:var(--status-critical)}.decision-card .decision-value{font-size:27px;font-weight:850;margin:5px 0}.exec-section{display:flex;align-items:end;justify-content:space-between;gap:14px;margin:26px 0 12px}.exec-section h2{margin:0}.exec-section p{margin:4px 0 0}.progress-track{height:9px;border-radius:999px;background:var(--surface-sunken);overflow:hidden}.progress-fill{height:100%;border-radius:999px;background:linear-gradient(90deg,var(--brand),#4aa59b)}.progress-fill.warn{background:linear-gradient(90deg,#d9a441,#f0c35a)}.progress-fill.risk{background:linear-gradient(90deg,#b94a48,#df7772)}.insight-callout{border:1px solid var(--border);border-radius:18px;padding:20px;background:linear-gradient(135deg,var(--brand-wash),var(--surface));}.mini-bars{display:flex;align-items:flex-end;gap:6px;height:72px}.mini-bars i{display:block;flex:1;min-height:4px;border-radius:5px 5px 2px 2px;background:var(--brand)}
@media(max-width:900px){.exec-hero-grid{grid-template-columns:1fr}.exec-orbit{display:none}.decision-strip{grid-template-columns:1fr}.exec-section{align-items:start;flex-direction:column}}

/* GMD recovery: comprehensive operations mega-menu. Critical operational
   routes from the original Fleet_CRM9 build stay visible instead of being
   hidden behind intelligence-only navigation. */
.mega-ops-panel { min-width: 350px !important; width: min(430px, 92vw); }
.mega-ops-panel .dd-section {
  position: sticky; top: -10px; z-index: 1; margin: 5px -2px 3px; padding: 8px 12px 5px;
  background: var(--surface); color: var(--brand-strong); font-size: 10.5px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid var(--border);
}
.mega-ops-panel .ops-critical-link { background: color-mix(in srgb, var(--status-critical) 7%, var(--surface)); }
.ops-action-ribbon { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.ops-action-card { display:flex; flex-direction:column; gap:5px; text-decoration:none; color:var(--ink-primary); background:var(--surface); border:1px solid var(--border); border-radius:var(--r-md); padding:16px; box-shadow:var(--shadow-sm); }
.ops-action-card span { font-size:12px; color:var(--ink-secondary); font-weight:700; }
.ops-action-card strong { font-size:30px; line-height:1; font-variant-numeric:tabular-nums; }
.ops-action-card small { color:var(--ink-muted); }
.ops-action-card.ops-danger { border-color:color-mix(in srgb,var(--status-critical) 45%,var(--border)); }
.ops-action-card.ops-warning { border-color:color-mix(in srgb,var(--status-warning-text,#a36a00) 35%,var(--border)); }
@media(max-width:1000px){.ops-action-ribbon{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:620px){.ops-action-ribbon{grid-template-columns:1fr;}}

/* ========================================================================== 
   v3.1 Layout Integrity Guardrails
   Prevent long labels, KPI values, actions and tables from escaping cards.
   These rules are deliberately global so every current/future landing page
   inherits the same professional wrapping and responsive behaviour.
   ========================================================================== */
/* overflow-x: clip (not hidden) deliberately — the CSS spec silently forces
   overflow-y to compute as `auto` on any element whose overflow-x is
   anything other than `visible`/`clip`. With `hidden` here, html AND body
   both became scroll containers even though neither one actually scrolls,
   which took away the real (window-level) scrolling ancestor that every
   position:sticky element in the app (the topbar, .product-nav, ...)
   needs in order to stick — they were computing "stuck" relative to a
   non-scrolling box and just drifting off-screen with the rest of the
   page instead. `clip` blocks the same horizontal overflow without
   tripping that rule. Do not change this back to `hidden`. */
html, body { max-width: 100%; overflow-x: clip; }
img, svg, canvas, video { max-width: 100%; height: auto; }

/* Grid/flex children otherwise default to min-width:auto and can force an
   entire page wider than its container when they contain long labels. */
.grid > *, .decision-strip > *, .exec-hero-grid > *, .page-head > *,
.page-hero > *, .ph-main > *, .ph-text, .ph-actions, .app-header > *,
.app-nav, .nav-drop, .card, .stat-tile, .module-tile, .ops-action-card,
.insight-callout, .exec-section > *, .dropdown-panel a > * { min-width: 0; }

/* User/company/reference text can be arbitrarily long. It must wrap inside
   the component, never widen or overlap the next component. */
h1, h2, h3, h4, p, small, .muted, .tiny, .stat-label, .stat-foot,
.module-tile h3, .module-tile p, .decision-card small, .dd-copy, .dd-sub,
.badge, .ops-action-card span, .ops-action-card small, table.data-table td,
table.data-table th { overflow-wrap: anywhere; word-break: normal; }

/* Large money/count strings scale down gracefully rather than shooting out
   of KPI cards. */
.stat-tile .stat-value,
.decision-card .decision-value,
.ops-action-card strong {
  max-width: 100%;
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

/* Buttons may contain long workflow names. Keep the control in its parent. */
.btn {
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.ph-actions { justify-content: flex-end; max-width: 100%; }
.ph-actions .btn { flex: 0 1 auto; }
.quick-links .btn { flex: 0 1 auto; }

/* A short action button (e.g. "Reject") sharing a flex row with a reason/
   text input must not be squeezed below its own content width — that's what
   was wrapping "Reject" into "Reje" / "ct". The input should give up the
   space instead: it can always scroll its own text, a button's label can't
   break cleanly at 3-4 letters. Scoped narrowly (button immediately after a
   .form-control) so the "long workflow name" wrapping above still applies
   everywhere else. */
.form-control { flex: 1 1 120px; min-width: 90px; }
.form-control ~ .btn { flex: 0 0 auto; white-space: nowrap; }

/* Executive hero orbit chips previously used fixed absolute positions and
   could collide when labels became longer. Constrain each label and hide the
   decorative orbit on medium widths before collision occurs. */
.exec-orbit .orb {
  max-width: 46%;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

/* Dropdown content wraps cleanly without forcing a menu wider than viewport. */
.nav-drop .dropdown-panel { max-width: min(430px, calc(100vw - 24px)); }
.nav-drop .dropdown-panel a { align-items: flex-start; }
.nav-drop .dropdown-panel a .dd-copy { flex: 1 1 auto; min-width: 0; }
.nav-drop .dropdown-panel a span.dd-sub { white-space: normal; line-height: 1.35; }

/* Tables need horizontal scrolling on narrow screens; clipping a financial or
   operational column is worse than allowing an intentional scroll. */
.card.flush.responsive-table-card,
.card.flush:has(> table.data-table) { overflow-x: auto; overflow-y: hidden; }
table.data-table { min-width: 680px; }

/* Keep compact cards visually aligned even when descriptions vary in length. */
.module-tile { min-height: 168px; }
.module-tile h3 { line-height: 1.3; }
.module-tile p { line-height: 1.45; }
.decision-card { min-height: 120px; }
.ops-action-card { min-height: 130px; }

@media (max-width: 1100px) {
  .exec-hero-grid { grid-template-columns: 1fr; }
  .exec-orbit { display: none; }
  .app-header { gap: 12px; }
}
@media (max-width: 760px) {
  .app-main { padding-left: 14px; padding-right: 14px; }
  .page-hero { padding: 22px 18px; }
  .page-hero .ph-main { min-width: 0; }
  .page-hero .ph-actions { width: 100%; justify-content: flex-start; }
  .page-hero .ph-actions .btn { flex: 1 1 180px; }
  .page-head { align-items: flex-start; }
  .module-tile { min-height: 0; }
}
@media (max-width: 480px) {
  h1 { font-size: 24px; }
  .exec-hero h1 { font-size: 28px; }
  .stat-tile .stat-value, .decision-card .decision-value, .ops-action-card strong { font-size: 1.55rem; }
  .btn { width: 100%; justify-content: center; }
}

/* Typography breathing room — long dashboard copy should read as intentional
   hierarchy, never stacked text fighting for the same pixels. */
h1 { line-height: 1.12; }
h2 { line-height: 1.2; }
h3, h4 { line-height: 1.3; }
.stat-tile .stat-label { line-height: 1.35; }
.stat-tile .stat-foot, .decision-card small, .ops-action-card small { line-height: 1.45; }
.decision-card { padding: 20px; }
.stat-tile { padding: 20px; }
.grid { row-gap: 20px; column-gap: 20px; }
.exec-section { margin-top: 32px; }

/* Product-ready enterprise workspace polish */
.page-head{padding:24px 26px;border:1px solid rgba(42,120,214,.12);border-radius:20px;background:linear-gradient(120deg,rgba(255,255,255,.92),rgba(235,244,255,.86));box-shadow:0 12px 34px rgba(31,58,90,.06)}
.page-head h1{font-size:30px;line-height:1.12}
.page-head .muted{max-width:980px}
.ops-action-ribbon{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px!important}
.ops-action-card{background:linear-gradient(145deg,#fff,#f7faff)!important;border:1px solid rgba(42,120,214,.12)!important;box-shadow:0 8px 22px rgba(31,58,90,.055)!important}
.quick-links{padding:10px 12px;border-radius:14px;background:rgba(255,255,255,.62);border:1px solid rgba(42,120,214,.08)}
@media(max-width:900px){.ops-action-ribbon{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.ops-action-ribbon{grid-template-columns:1fr}.app-main{padding:22px 14px 72px}.app-header{padding:12px 14px}}


/* ---------- v3.5 market entrance: time, migration funnel, human sessions ---------- */
.brand-zone{display:flex;align-items:center;gap:16px;min-width:0}.header-clock{display:flex;align-items:center;gap:7px;padding-left:15px;border-left:1px solid var(--border);color:var(--ink-secondary);white-space:nowrap}.header-clock>i{color:var(--brand)}.header-clock span{display:flex;flex-direction:column;line-height:1.05}.header-clock strong{font-size:12.5px;font-variant-numeric:tabular-nums;color:var(--ink-primary)}.header-clock small{font-size:9.5px;color:var(--ink-muted);margin-top:3px}.nav-data-gateway{background:linear-gradient(135deg,rgba(97,72,180,.08),rgba(42,120,214,.08));border:1px solid rgba(97,72,180,.12)}
.login-time{display:flex;align-items:center;gap:10px;background:var(--surface-sunken);border:1px solid var(--border);border-radius:12px;padding:10px 12px;margin:-8px 0 18px}.login-time>i{font-size:18px;color:var(--brand)}.login-time span{display:flex;flex-direction:column}.login-time strong{font-size:15px;font-variant-numeric:tabular-nums}.login-time small{font-size:10px;color:var(--ink-muted);margin-top:2px}.signed-out-card{text-align:center}.signed-out-icon{width:62px;height:62px;border-radius:20px;margin:0 auto 16px;display:grid;place-items:center;background:rgba(12,163,12,.10);color:var(--success-text);font-size:31px}.logout-time{display:inline-flex;align-items:center;gap:7px;margin:8px auto 20px;padding:8px 12px;border-radius:999px;background:var(--surface-sunken);font-size:12px;color:var(--ink-secondary)}
.migration-callout{display:flex;align-items:center;justify-content:space-between;gap:20px;background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(237,244,255,.96))}.migration-copy{display:flex;align-items:flex-start;gap:14px;min-width:0}.gateway-flow{
  display:grid;
  /* Six stages + five arrows. The previous 9-track definition only had
     room for five stages, which forced Intelligence onto a second row. */
  grid-template-columns:
    minmax(0,1fr) 22px
    minmax(0,1fr) 22px
    minmax(0,1fr) 22px
    minmax(0,1fr) 22px
    minmax(0,1fr) 22px
    minmax(0,1fr);
  align-items:stretch;
  gap:8px;
  margin:0 0 22px;
  width:100%;
}
.gateway-flow>div{
  min-width:0;
  background:rgba(255,255,255,.86);
  border:1px solid var(--border);
  border-radius:14px;
  padding:13px 9px;
  text-align:center;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:3px;
}
.gateway-flow>div span{width:24px;height:24px;display:grid;place-items:center;margin:0 auto 4px;border-radius:50%;background:var(--brand-wash);color:var(--brand-strong);font-size:11px;font-weight:800}
.gateway-flow b{font-size:12px}
.gateway-flow small{font-size:10px;color:var(--ink-muted);line-height:1.3}
.gateway-flow>i{color:var(--ink-muted);align-self:center;justify-self:center}

@media(max-width:1180px) and (min-width:761px){
  .gateway-flow{gap:5px;grid-template-columns:minmax(0,1fr) 16px minmax(0,1fr) 16px minmax(0,1fr) 16px minmax(0,1fr) 16px minmax(0,1fr) 16px minmax(0,1fr)}
  .gateway-flow>div{padding:11px 6px}
  .gateway-flow b{font-size:11px}
  .gateway-flow small{font-size:9px}
}.gateway-tags{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0 18px}.gateway-tags span{font-size:11px;font-weight:700;padding:5px 9px;border-radius:999px;background:var(--surface-sunken);border:1px solid var(--border);color:var(--ink-secondary)}
@media(max-width:1150px){.header-clock{display:none}.app-nav a{padding:8px 10px;font-size:12.5px}}
@media(max-width:760px){.migration-callout{align-items:flex-start;flex-direction:column}.migration-callout>.btn{width:100%}.gateway-flow{grid-template-columns:1fr}.gateway-flow>i{transform:rotate(90deg);justify-self:center}.brand-zone{gap:8px}}


/* v3.5.3 header rhythm — keep identity/time as one calm zone and give
   navigation its own visual start, so the clock and Home never compete. */
.brand-zone{
  flex:0 0 auto;
  padding-right:22px;
  margin-right:4px;
  border-right:1px solid rgba(24,79,149,.12);
}
.header-clock{
  min-width:92px;
  padding-left:18px;
  margin-left:4px;
}
.app-nav{
  min-width:0;
  flex:1 1 auto;
  gap:6px;
}
.app-nav>a:first-child{
  margin-left:8px;
}
@media(max-width:1280px){
  .app-header{padding-left:22px;padding-right:22px;gap:14px}
  .app-nav a{padding-left:10px;padding-right:10px;font-size:12.5px}
  .brand-zone{padding-right:14px}
}
@media(max-width:1150px){
  .brand-zone{border-right:0;padding-right:0;margin-right:0}
  .app-nav>a:first-child{margin-left:0}
}

/* v3.5.4 FINAL HEADER SPACING */
.app-header{justify-content:flex-start!important;gap:0!important;padding:12px 30px!important}
.brand-zone{flex:0 0 auto!important;display:flex!important;align-items:center!important;gap:22px!important;padding-right:34px!important;margin-right:22px!important;border-right:1px solid rgba(24,79,149,.16)!important}
.header-clock{min-width:105px!important;padding-left:22px!important;margin-left:0!important;border-left:1px solid rgba(24,79,149,.16)!important}
.app-nav{flex:1 1 auto!important;display:flex!important;align-items:center!important;gap:7px!important;min-width:0!important}
.app-nav>a:first-child{margin-left:0!important}
.app-nav a{padding:9px 12px!important}
@media(max-width:1180px){.header-clock{display:none!important}.brand-zone{padding-right:20px!important;margin-right:14px!important}.app-nav a{padding:8px 9px!important;font-size:12px!important}}


/* =========================
   v3.5.5 LOCKED REFERENCE HEADER
   The approved screenshot is the visual source of truth.
   ========================= */
.app-header{
  min-height:96px!important;
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr) auto!important;
  align-items:center!important;
  column-gap:22px!important;
  padding:10px 24px!important;
  background:rgba(255,255,255,.96)!important;
}
.brand-zone{
  display:flex!important;
  align-items:center!important;
  gap:18px!important;
  padding-right:24px!important;
  margin-right:0!important;
  border-right:1px solid rgba(31,58,90,.13)!important;
}
.brand-mark .logo-chip{
  width:48px!important;
  height:48px!important;
  min-width:48px!important;
  box-sizing:border-box!important;
  border-radius:12px!important;
  font-size:14px!important;
  line-height:1!important;
  letter-spacing:-0.7px!important;
  white-space:nowrap!important;
  padding:0 2px!important;
  overflow:visible!important;
}
.brand-mark .brand-text{font-size:17px!important}
.brand-mark .brand-sub{font-size:10px!important;margin-top:3px!important;display:block}
.header-clock{
  display:flex!important;
  min-width:132px!important;
  gap:9px!important;
  padding-left:18px!important;
  border-left:1px solid rgba(31,58,90,.11)!important;
}
.header-clock>i{font-size:19px!important}
.header-clock strong{font-size:16px!important;letter-spacing:.01em}
.header-clock small{font-size:9px!important;margin-top:5px!important}

.app-nav{
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:3px!important;
  overflow:visible!important;
}
.app-nav>a,
.app-nav>.nav-drop>summary{
  min-height:66px!important;
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  align-items:center!important;
  text-align:center!important;
  gap:5px!important;
  padding:7px 10px!important;
  border-radius:12px!important;
  font-size:10.5px!important;
  line-height:1.12!important;
  white-space:normal!important;
}
.app-nav>a>i,
.app-nav>.nav-drop>summary>i{font-size:16px!important}
.app-nav>a.active{
  background:#edf4ff!important;
  color:#0f5ed7!important;
  box-shadow:inset 0 -3px 0 #176be4!important;
}
.nav-data-gateway{
  background:transparent!important;
  border:0!important;
}
.app-nav>.nav-drop{position:relative!important}
.app-nav>.nav-drop>summary{
  cursor:pointer!important;
  list-style:none!important;
  color:var(--ink-secondary)!important;
  font-weight:700!important;
}
.app-nav>.nav-drop>summary::-webkit-details-marker{display:none!important}
.app-nav>.nav-drop>summary .caret{display:none!important}

.header-user-zone{
  display:flex;
  align-items:center;
  gap:11px;
  min-width:250px;
  justify-content:flex-end;
  padding-left:18px;
  border-left:1px solid rgba(31,58,90,.12);
}
.header-greeting{
  display:flex;
  align-items:flex-start;
  gap:8px;
  text-align:right;
}
.header-greeting>i{
  color:#ffab08;
  font-size:18px;
  margin-top:1px;
}
.header-greeting span{display:grid}
.header-greeting strong{
  font-size:11px;
  color:#0d3a79;
  white-space:nowrap;
}
.header-greeting small{
  font-size:8.5px;
  color:var(--ink-muted);
  margin-top:4px;
  white-space:nowrap;
}
.header-user-chip{position:relative;text-decoration:none}
.header-avatar{
  width:38px;height:38px;border-radius:50%;
  display:grid;place-items:center;
  background:linear-gradient(135deg,#e8f0fb,#c9d9ee);
  border:1px solid #d4dfeb;
  color:#163b69;font-weight:850;font-size:14px;
}
.header-user-dot{
  position:absolute;right:-1px;bottom:1px;
  width:9px;height:9px;border-radius:50%;
  background:#16a05f;border:2px solid #fff;
}
.header-icon-link{
  text-decoration:none;color:#2b4667;font-size:18px;
  width:32px;height:32px;display:grid;place-items:center;border-radius:9px;
}
.header-icon-link:hover{background:#edf3fa}

@media(max-width:1420px){
  .header-user-zone{display:none!important}
  .app-header{grid-template-columns:auto minmax(0,1fr)!important}
  .app-nav>a,.app-nav>.nav-drop>summary{padding-left:8px!important;padding-right:8px!important;font-size:10px!important}
}
@media(max-width:1180px){
  .app-header{min-height:82px!important}
  .header-clock{display:none!important}
  .brand-zone{padding-right:16px!important}
  .app-nav>a,.app-nav>.nav-drop>summary{min-height:58px!important;font-size:9.5px!important}
}
@media(max-width:900px){
  .app-header{display:flex!important;overflow-x:auto!important;align-items:center!important}
  .brand-zone{position:sticky;left:0;z-index:2;background:rgba(255,255,255,.98);flex:0 0 auto!important}
  .app-nav{flex:0 0 auto!important}
}

/* v4.0.7 — MJ360 brand legibility.
   The mark is intentionally wider than a square because five glyphs cannot be
   rendered reliably inside the old 44/48px chip at Windows browser scaling. */
.brand-mark .logo-chip,
.login-brand .logo-chip{
  width:62px!important;
  min-width:62px!important;
  height:48px!important;
  padding:0 5px!important;
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
  white-space:nowrap!important;
  font-size:16px!important;
  line-height:1!important;
  letter-spacing:-0.65px!important;
  font-weight:900!important;
}
.login-brand{gap:14px!important}


/* v4.1.1 — contextual-search layout hotfix.
   Search belongs to data-heavy pages, never in the global navigation shell. */
html, body { width:100%; max-width:100%; overflow-x:clip!important; } /* see the overflow-x:clip note above — do not change to hidden */
.app-header { width:100%; max-width:100%; box-sizing:border-box!important; }
.app-header > .brand-zone, .app-header > .app-nav { min-width:0!important; }
.app-nav { max-width:100%!important; }
.app-main { width:100%; max-width:1360px; min-width:0; box-sizing:border-box; }
.app-main.wide { max-width:1440px; }
.app-main > * { min-width:0; }
.context-search { display:flex; gap:10px; align-items:end; flex-wrap:wrap; margin:14px 0 18px; }
.context-search .search-grow { flex:1 1 320px; min-width:220px; }
.context-search input, .context-search select { max-width:100%; box-sizing:border-box; }
@media(max-width:900px) {
  .app-header { max-width:100vw!important; }
  .app-main { padding-left:16px!important; padding-right:16px!important; }
}

/* ---- Row actions: one primary action + a "⋯" menu for the rest (keeps tables calm) ---- */
.row-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; white-space: nowrap; }
.row-menu { position: relative; }
.row-menu > summary { list-style: none; cursor: pointer; width: 34px; height: 34px; display: inline-flex; align-items: center;
  justify-content: center; border-radius: 8px; border: 1px solid var(--border-strong); color: inherit; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu > summary:hover, .row-menu[open] > summary { background: var(--surface-sunken); }
.row-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 210px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--shadow-lg); }
.row-menu-list a, .row-menu-list button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 10px;
  border-radius: 7px; color: var(--ink-primary); text-decoration: none; font-size: 13.5px; background: none; border: 0; text-align: left; cursor: pointer; }
.row-menu-list a:hover, .row-menu-list button:hover { background: var(--brand-wash); }
.row-menu-list hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }
.cell-main { font-weight: 600; color: var(--ink-primary); text-decoration: none; }
a.cell-main:hover { text-decoration: underline; }
.cell-sub { display: block; font-size: 12px; color: var(--ink-muted); margin-top: 2px; }
.cell-flag { display: block; font-size: 12px; margin-top: 4px; color: var(--status-serious); }

/* ---- Vessel shop front (marine charter) ---- */
.vessel-card .thumb.cat-marine { background: linear-gradient(135deg, #0f4c81, #0a7f8c); }
.vessel-card .specs { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-secondary); margin-top: 6px; }
.vessel-card .specs span { display: inline-flex; gap: 5px; align-items: center; }
.vessel-card .quote-line { font-size: 12.5px; color: var(--ink-secondary); margin-top: 2px; }
.vessel-photo { height: 300px; border-radius: var(--r-md); background: linear-gradient(135deg, #0f4c81, #0a7f8c) center/cover no-repeat;
  display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.85); font-size: 64px; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px 20px; }
.spec-grid .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); }
.spec-grid .v { font-weight: 600; margin-top: 2px; }
.busy-list { list-style: none; padding: 0; margin: 8px 0 0; }
.busy-list li { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.staff-strip { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px;
  border: 1px dashed var(--border-strong); border-radius: 10px; margin-bottom: 14px; font-size: 13px; color: var(--ink-secondary); }
