/* BlueStar Imex ACE platform — brand theme */

:root {
  --blue: #1B5FC4;
  --blue-bright: #2466CC;
  --blue-deep: #123C7D;
  --blue-panel: #174A99;
  --link: #14509F;
  --link-hover: #0E3E7E;
  --gold: #D9A93C;
  --gold-bright: #E9C55F;
  --gold-ink: #B07E17;
  --ink: #1B2229;
  --ink-2: #4A5560;
  --ink-3: #7A828C;
  --bar: #14181C;
  --bar-2: #232B33;
  --bg: #EDEFF2;
  --card: #FFFFFF;
  --line: #D7DBE0;
  --line-soft: #EAEDF0;
  --head: #F3F5F7;
  --ok: #2F8F3B; --ok-bg: #DFEEE5; --ok-ink: #14603A;
  --warn: #E09410; --warn-bg: #F9EDD4; --warn-ink: #7A4D07;
  --bad: #D23B2E; --bad-bg: #FADFDC; --bad-ink: #96261B;
  --info-bg: #E5EAF4; --info-ink: #2A4B85;
  --neutral-bg: #ECEEE9; --neutral-ink: #4A5560;
  --neon-blue: #2FD2E8;
  --neon-blue-glow: rgba(47, 210, 232, 0.5);
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --sans: 'Public Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { overflow-x: hidden; } /* the app's own scroll containers (tables, panels, overlays) handle their own horizontal scroll; this is the last-resort backstop so nothing can widen the page itself on a phone. */
body { margin: 0; font-family: var(--sans); background: var(--bg); color: var(--ink); font-size: 14px; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }
button { font-family: var(--sans); cursor: pointer; }
input, select, textarea { font-family: var(--sans); font-size: 13px; color: var(--ink); }

.app { min-height: 100vh; display: flex; flex-direction: column; }

/* ---- top bar ---- */
/* white-space:nowrap keeps every bar item on one line — once the bar
   runs out of room it scrolls within itself (see the <=900px rule
   below) instead of each label wrapping to two lines and pushing the
   bar taller. */
.topbar {
  height: 48px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0) 40%),
    linear-gradient(115deg, #050B18 0%, #0C2A54 45%, #123B72 78%, #050C1C 100%);
  color: #fff;
  display: flex; align-items: center; gap: 14px; padding: 0 16px;
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid rgba(217, 169, 60, 0.35);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; white-space: nowrap; }
.brand img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,0.15); }
.brand b { font-size: 15.5px; font-weight: 800; letter-spacing: 0.01em; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.6); }
.brand b span { color: var(--gold-bright); text-shadow: 0 0 14px rgba(233, 197, 95, 0.45); }
.nav-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 6px;
  background: linear-gradient(120deg, var(--gold-ink), var(--gold-bright));
  color: #241A05; border: 1px solid rgba(0,0,0,0.15); font-size: 13px; font-weight: 700;
  flex-shrink: 0; white-space: nowrap; box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset;
}
.nav-btn:hover { filter: brightness(1.05); }
.nav-btn.open { background: linear-gradient(120deg, #8C6512, var(--gold-ink)); box-shadow: 0 1px 4px rgba(0,0,0,0.35) inset; }
.top-link { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; color: #E4E9EE; font-size: 13px; font-weight: 600; letter-spacing: 0.01em; cursor: pointer; flex-shrink: 0; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.top-link:hover { color: #fff; }
.top-link.gold { color: var(--gold-bright); text-shadow: 0 0 12px rgba(233, 197, 95, 0.35); }
.top-link.armed { color: #fff; background: var(--bad); padding: 4px 9px; border-radius: 6px; text-shadow: none; }
.top-sep { width: 1px; height: 20px; background: rgba(255,255,255,0.14); flex-shrink: 0; }
.top-meta { font-family: var(--mono); font-size: 11px; color: #D7DEE5; letter-spacing: 0.02em; flex-shrink: 0; white-space: nowrap; }
#crumb.top-link { overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(145deg, var(--blue-bright), var(--blue-deep)); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 700; box-shadow: 0 0 0 1px rgba(255,255,255,0.18); cursor: pointer; border: none; padding: 0; flex-shrink: 0; }
.profile-dropdown { width: 260px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 40px rgba(10,30,45,0.22); z-index: 9999; overflow: hidden; }
.profile-dropdown-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); background: var(--head); }
.profile-dropdown-body { padding: 8px; }
.profile-menu-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 12px; border-radius: 7px; border: none; background: none; color: var(--ink); font-size: 13px; font-weight: 500; font-family: var(--sans); cursor: pointer; text-decoration: none; text-align: left; }
.profile-menu-item:hover { background: var(--bg); }
.profile-logout { color: var(--bad-ink); }
.profile-logout:hover { background: var(--bad-bg, #fff0f0); }
.profile-divider { border: none; border-top: 1px solid var(--line-soft); margin: 4px 0; }
.spacer { flex: 1; }

/* ---- modal overlay (entry submit review, etc.) ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(18, 24, 30, 0.45); z-index: 40; display: flex; align-items: center; justify-content: center; padding: 24px; overflow-y: auto; }
.modal-card { background: var(--card); border-radius: 10px; box-shadow: 0 24px 60px rgba(10, 30, 45, 0.4); width: 640px; max-width: calc(100vw - 48px); max-height: calc(100vh - 48px); display: flex; flex-direction: column; overflow: hidden; }
.modal-body { padding: 18px 22px; overflow-y: auto; }
.modal-actions { display: flex; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line-soft); background: var(--head); flex-wrap: wrap; }

/* ---- navigator overlay ---- */
.nav-overlay { position: fixed; inset: 48px 0 0 0; background: rgba(18, 24, 30, 0.35); z-index: 30; overflow-y: auto; }
.nav-panel { position: absolute; top: 0; left: 16px; width: 540px; max-width: calc(100vw - 32px); background: var(--blue-panel); border-radius: 0 0 10px 10px; box-shadow: 0 18px 40px rgba(10, 30, 45, 0.35); overflow: hidden; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; }
.tile { background: var(--blue-bright); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 74px; font-size: 11.5px; font-weight: 600; text-align: center; padding: 6px; border: none; line-height: 1.2; }
.tile:hover { background: #1B54AD; color: #fff; }
/* 25 tiles fill the 5-wide grid exactly; the badge row spans below. */
.tile.badge { background: var(--blue-deep); color: #DCEFFA; font-size: 11px; grid-column: 1 / -1; height: 40px; flex-direction: row; gap: 10px; }

/* ---- two-pane layouts (main + fixed-width side panel) ---- */
/* Base desktop width supplied per view via the --w custom property;
   the >=901px rule below is the default, the <=900px breakpoint
   overrides it so the panel goes full-width once .content (or
   .split-pane) stacks to a single column. */
.aside-panel { width: var(--w, 340px); flex-shrink: 0; display: flex; flex-direction: column; gap: 14px; }
.split-list { width: var(--w, 340px); flex-shrink: 0; background: var(--card); border-right: 1px solid var(--line); overflow: auto; }

/* ---- layout ---- */
.view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.toolbar { background: var(--card); border-bottom: 1px solid var(--line); padding: 9px 16px; display: flex; align-items: center; gap: 12px; font-size: 13px; flex-wrap: wrap; }
.tab { font-weight: 600; color: var(--ink-2); background: none; border: none; padding: 0 0 2px; font-size: 13px; }
.tab.on { color: var(--link); border-bottom: 2px solid var(--link); }
.content { flex: 1; padding: 16px; display: flex; gap: 14px; align-items: flex-start; }
.content.col { flex-direction: column; align-items: stretch; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.card-pad { padding: 14px 16px; }
.card h3 { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-2); }

/* ---- collapsible sections (native <details>/<summary>) ---- */
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary .chev { transition: transform 0.15s ease; flex-shrink: 0; }
details[open] > summary .chev { transform: rotate(90deg); }

/* ---- tables ---- */
table.grid { border-collapse: collapse; width: 100%; font-size: 12px; background: var(--card); }
table.grid th { background: var(--head); border-bottom: 1px solid var(--line); padding: 7px 8px; font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); text-align: left; white-space: nowrap; position: sticky; top: 0; }
table.grid td { padding: 7px 8px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
table.grid tr.sel { background: #EAF0FA; }
table.grid tr.click { cursor: pointer; }
table.grid tr.click:hover { background: #F4F7FB; }
.num { text-align: right; }
.ctr { text-align: center; }
.mono { font-family: var(--mono); font-size: 11.5px; }
.dim { color: var(--ink-2); }
.faint { color: #9AA2AB; }

/* ---- chips & flags ---- */
.chip { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok-ink); }
.chip.warn { background: var(--warn-bg); color: var(--warn-ink); }
.chip.bad { background: var(--bad-bg); color: var(--bad-ink); }
.chip.info { background: var(--info-bg); color: var(--info-ink); }
.chip.neutral { background: var(--neutral-bg); color: var(--neutral-ink); }

/* ---- forms & buttons ---- */
/* min-width:0 stops .field from ever forcing its grid/flex track wider
   than the space available — without it, a grid column defined as
   minmax(0, 1fr) still blows out to fit the input's own intrinsic
   content width (the classic CSS Grid/flex "blowout" case), which is
   exactly what happens once these layouts are narrow enough to matter. */
.field { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); min-width: 0; overflow-wrap: break-word; word-break: break-word; }
.field input, .field select, .field textarea { padding: 8px 10px; border: 1px solid #C6CCD3; border-radius: 6px; background: #fff; font-size: 13px; width: 100%; min-width: 0; min-height: 35px; }
.field input.mono { font-family: var(--mono); }
.field input.bad-input { border: 1.5px solid var(--bad); background: #FEF7F6; }
.field input.warn-input { border: 1.5px solid var(--warn); background: #FFFDF7; }
.btn { padding: 8px 14px; border-radius: 7px; border: 1px solid #C6CCD3; background: #fff; color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.btn.primary { border: none; background: var(--blue); color: #fff; }
.btn.primary:hover { background: #17509F; }
.btn:disabled { opacity: 0.5; cursor: default; }

/* ---- queue raw panels ---- */
.raw { background: var(--bar); border-radius: 8px; padding: 14px 16px; color: #D7E3EC; overflow: auto; }
.raw pre { margin: 0; font-family: var(--mono); font-size: 12px; line-height: 1.65; white-space: pre-wrap; }
.raw-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; color: #8FA3B5; margin-bottom: 8px; }
.raw.reject { background: #fff; border: 1px solid #E5B8B2; color: var(--bad-ink); }
.raw.reject .raw-label { color: var(--bad-ink); }

/* ---- status footer ---- */
.statusbar { background: var(--bar); padding: 8px 16px; display: flex; align-items: center; gap: 18px; }
.statusbar .mono { color: #C9D2DA; font-size: 11px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.ok { background: #4CC38A; }

/* ---- portal ---- */
.portal-hero { background: var(--blue-deep); color: #fff; padding: 22px 24px 46px; }
.portal-hero h1 { margin: 0; font-size: 21px; font-weight: 800; }
.portal-hero p { margin: 5px 0 0; font-size: 13px; color: #BFD0E8; }
.stat-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: -34px 24px 0; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; box-shadow: 0 6px 18px rgba(16, 34, 62, 0.08); }
.stat .label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.stat .value { font-size: 26px; font-weight: 800; line-height: 1.2; }
.stat .sub { font-size: 12px; color: var(--ink-2); }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }

/* Entry detail's header/7501/PGA/232 field grids (js/views/entry.js) — kept
   as classes rather than inline grid-template-columns so these breakpoints
   can override them; an inline style would out-rank a plain class rule. */
/* align-items: start prevents a tall cell (long/wrapping label) from
   stretching all sibling cells in the same row — each cell sits at the
   top of its row track, sized only to its own content. */
.grid-cols-1 { display: grid; grid-template-columns: 1fr; align-items: start; }
.grid-cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.grid-cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.grid-cols-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
.grid-cols-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: start; }

/* Side-by-side card rows (e.g. entry.js's Exporter/Importer of record
   pair) that need the same flex-to-column stacking .content already
   gets below — a class instead of an inline style so the breakpoints
   here can override it. */
.two-col-cards { display: flex; gap: 14px; align-items: stretch; }

/* ---- tablet / large phone topbar: hide non-essential actions so the
   avatar and install button are always reachable without horizontal scroll.
   Covers iPad landscape (1024 px) where the full bar overflows. ---------- */
@media (max-width: 1080px) {
  #dl-manual, #reset { display: none; }
  /* overflow-x:auto is a safety net; with dl-manual+reset hidden the bar
     fits on every tablet viewport, so scrolling is rarely needed. */
  .topbar { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 900px) {
  .grid-cols-4, .grid-cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col-cards { flex-direction: column; }
  /* .content normally aligns its row of panels to flex-start, which
     sizes each one to its own content (fit-content) — fine side by
     side, but once flex-direction flips to column that same sizing
     lets a wide table/section grow to whatever width it wants instead
     of filling the now-single-column viewport. stretch makes each
     stacked child fill the available width like a normal block. */
  .content { flex-direction: column; align-items: stretch; }
  .kpis, .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tile { height: 60px; font-size: 10.5px; gap: 4px; padding: 5px; }
  .tile.badge { height: 34px; }
  .aside-panel { width: 100%; }
  .split-pane { flex-direction: column; }
  .split-list { width: 100%; max-height: 260px; border-right: none; border-bottom: 1px solid var(--line); }

  /* Drop filer/office meta and separators; padding+gap tighten to fit
     the remaining items (brand, nav, +New, crumb, install, avatar). */
  .topbar { padding: 0 10px; gap: 8px; }
  .top-meta, .top-sep { display: none; }
  .brand b { font-size: 13.5px; }
  .top-link { font-size: 12px; }
}

@media (max-width: 600px) {
  .nav-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { height: 52px; font-size: 10px; gap: 3px; padding: 4px; }
  .tile.badge { height: 30px; font-size: 10px; }
  .content { padding: 10px; }
  .kpis, .stat-tiles { grid-template-columns: 1fr; margin-left: 10px; margin-right: 10px; }
  .grid-cols-2, .grid-cols-3, .grid-cols-4, .grid-cols-5 { grid-template-columns: 1fr; }
  .field input, .field select, .field textarea, input[type="search"], input[type="date"] { font-size: 16px; } /* keeps iOS Safari from auto-zooming on focus */
  /* On phones, hide the route crumb and brand wordmark so the bar fits
     entirely on-screen: logo + Navigator + "+New" + (install) + avatar
     all stay visible without any horizontal scrolling. */
  #crumb { display: none; }
  .brand b { display: none; }
}

/* ---- printable customs forms (formDoc.js) ---- */
.form-toolbar { background: var(--card); border-bottom: 1px solid var(--line); padding: 9px 16px; display: flex; align-items: center; gap: 12px; }
.form-sheet { background: #fff; max-width: 820px; margin: 18px auto 40px; padding: 30px 34px; border: 1px solid var(--line); border-radius: 4px; font-size: 12.5px; color: var(--ink); }
.form-letterhead { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 8px; }
.form-subtitle { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: 13px; font-weight: 600; }
.form-section { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1px solid var(--line-soft); padding-bottom: 4px; margin: 16px 0 8px; }
.form-grid { display: grid; gap: 1px; background: #C6CCD3; border: 1px solid #C6CCD3; }
.form-cell { background: #fff; padding: 6px 9px; }
.form-label { display: block; font-size: 9px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 2px; }
.form-value { font-size: 12.5px; font-weight: 600; word-break: break-word; }
.form-table { border-collapse: collapse; width: 100%; font-size: 11.5px; margin-bottom: 4px; }
.form-table th { background: var(--head); border: 1px solid #C6CCD3; padding: 5px 8px; text-align: left; font-size: 9.5px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-2); }
.form-table td { border: 1px solid #DDE1E6; padding: 5px 8px; }
.form-callout { border: 1px solid var(--ink-3); border-left: 4px solid var(--ink); background: var(--head); padding: 10px 12px; font-size: 12px; line-height: 1.5; margin: 10px 0; }
.form-foot { margin-top: 22px; padding-top: 10px; border-top: 1px solid var(--line-soft); font-size: 10.5px; color: var(--ink-2); line-height: 1.5; }

@media print {
  .topbar, #nav-host, .form-toolbar { display: none !important; }
  body, .app { background: #fff !important; }
  .form-sheet { margin: 0 auto; border: none; box-shadow: none; max-width: none; }
}

/* ---- client-facing routes with no broker chrome (login.js) ---- */
.app.chromeless .topbar, .app.chromeless #nav-host { display: none; }
.app.chromeless #view { min-height: 100vh; }

/* ---- client portal login (login.js) ---- */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}
.login-promo {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 34px;
  padding: 56px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(720px 420px at 18% 14%, rgba(217, 169, 60, 0.16), transparent 60%),
    radial-gradient(640px 500px at 88% 86%, var(--neon-blue-glow) 0%, transparent 55%),
    linear-gradient(125deg, #000000 0%, #10151A 40%, #1B242C 75%, #070A0C 100%);
  border-right: 1px solid rgba(217, 169, 60, 0.3);
}
.login-promo-logo {
  width: min(340px, 65%);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(217, 169, 60, 0.25);
}
.login-promo-copy h1 {
  margin: 0 0 12px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.login-promo-copy h1 span { color: var(--gold-bright); text-shadow: 0 0 16px rgba(233, 197, 95, 0.5); }
.login-promo-copy p { margin: 0 0 18px; font-size: 14.5px; line-height: 1.6; color: #D7DCE2; max-width: 46ch; }
.login-promo-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.login-promo-points li {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: #E8EBEE;
}
.login-promo-points li::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: var(--neon-blue); box-shadow: 0 0 10px var(--neon-blue-glow);
}
.login-form-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px; background: var(--bg);
}
.login-form-card {
  width: 100%; max-width: 380px; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 32px 30px; box-shadow: 0 20px 50px rgba(20, 30, 40, 0.1);
}
.login-form-head { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.login-form-head img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--line); }
.login-form-head b { font-size: 17px; font-weight: 800; color: var(--ink); }
.login-form-head b span { color: var(--gold-ink); }
.login-form-card h2 { margin: 0 0 4px; font-size: 19px; }
.login-form-card form { display: flex; flex-direction: column; gap: 14px; }
.login-error {
  background: var(--bad-bg); color: var(--bad-ink); border: 1px solid #E5B8B2;
  border-radius: 8px; padding: 9px 12px; font-size: 12.5px; margin-bottom: 14px;
}
.btn.login-submit {
  margin-top: 4px; padding: 11px 14px; font-size: 13.5px;
  background: linear-gradient(120deg, var(--gold-ink), var(--gold-bright));
  color: #241A05; border: none;
}
.btn.login-submit:hover { filter: brightness(1.05); }
.login-demo-hint {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px;
}
.login-demo-hint .btn { padding: 5px 9px; font-size: 11px; font-family: var(--mono); }
.login-internal-link { display: block; margin-top: 14px; font-size: 11.5px; color: var(--ink-3); }
.login-internal-link:hover { color: var(--link); }

@media (max-width: 860px) {
  .login-page { grid-template-columns: 1fr; }
  .login-promo { padding: 40px 28px; border-right: none; border-bottom: 1px solid rgba(217, 169, 60, 0.3); }
  .login-promo-copy p { max-width: none; }
}

/* Pre-transmit validation: one compact chip with red / amber / green flags and a built-in dropdown */
.vchip-card { padding-top: 10px; padding-bottom: 10px; }
.vchip-head { margin-bottom: 6px; }
.vchip { display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line-soft); background: var(--head); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; text-align: left; }
.vchip.ok { background: var(--ok-bg); color: var(--ok-ink); border-color: #BBD9C6; }
.vchip.warn { background: var(--warn-bg); color: var(--warn-ink); border-color: #EAD3A0; }
.vchip.bad { background: var(--bad-bg); color: var(--bad-ink); border-color: #EBB9B3; }
.vchip:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.vchip-flags { display: inline-flex; gap: 3px; flex-shrink: 0; }
.vflag { min-width: 20px; height: 20px; padding: 0 4px; box-sizing: border-box; border-radius: 5px; color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.vflag.bad { background: var(--bad); } .vflag.warn { background: var(--warn); } .vflag.ok { background: var(--ok); }
.vflag.zero { opacity: .28; }
.vchip-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vchip-caret { font-size: 12px; flex-shrink: 0; }
.vchip-panel { margin-top: 6px; max-height: 260px; overflow-y: auto; border: 1px solid var(--line-soft); border-radius: 8px; padding: 8px 9px 2px; }
.vchip-item { display: flex; gap: 8px; font-size: 12px; line-height: 1.4; margin-bottom: 8px; }
.vchip-item .vchip-dot { margin-top: 4px; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--ok); }
.vchip-item.bad .vchip-dot { background: var(--bad); } .vchip-item.warn .vchip-dot { background: var(--warn); }
.vchip-item.bad b { color: var(--bad-ink); } .vchip-item.warn b { color: var(--warn-ink); } .vchip-item.ok { color: var(--ok-ink); }
