/* ═══════════════════════════════════════════════════════
   LANEIFY AI — Design System v4.0
   Dark glass morphism · Professional · Fast
═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ─── TOKENS ─── */
:root {
  /* Enterprise dark: a calm navy-black ground, hairline borders, and accents
     pulled back from neon toward a professional register. */
  --bg-base:     #0c1019;
  --bg-surface:  #141a24;
  --bg-elevated: #1a212e;
  --bg-hover:    #1a2130;
  --bg-active:   #212a3a;
  --glass:        rgba(255,255,255,0.02);
  --glass-md:     rgba(255,255,255,0.04);
  --glass-hover:  rgba(255,255,255,0.055);
  --glass-border: rgba(255,255,255,0.09);
  --glass-border-hover: rgba(255,255,255,0.15);
  --blue:    #4d8ff0;
  --green:   #2ecb8f;
  --orange:  #f0912e;
  --purple:  #a78bfa;
  --cyan:    #35b6d6;
  --yellow:  #f0c04d;
  --red:     #f26060;
  --pink:    #ec74a8;
  --blue-dim:   rgba(77,143,240,0.13);
  --green-dim:  rgba(46,203,143,0.13);
  --orange-dim: rgba(240,145,46,0.13);
  --purple-dim: rgba(167,139,250,0.13);
  --cyan-dim:   rgba(53,182,214,0.13);
  --yellow-dim: rgba(240,192,77,0.13);
  --red-dim:    rgba(242,96,96,0.13);
  --blue-border:   rgba(77,143,240,0.28);
  --green-border:  rgba(46,203,143,0.28);
  --orange-border: rgba(240,145,46,0.28);
  --purple-border: rgba(167,139,250,0.28);
  --cyan-border:   rgba(53,182,214,0.28);
  --yellow-border: rgba(240,192,77,0.28);
  --red-border:    rgba(242,96,96,0.28);
  /* Semantic roles — prefer these over raw color names in new UI.
     One primary + three status colors carry all interface meaning:
       primary   = brand / interactive        (blue)
       on-time   = healthy / delivered / ok    (green)
       at-risk   = warning / amber / attention (orange)
       exception = failure / breach / error    (red)
     cyan / purple / pink are demoted to data-visualization only (charts,
     multi-series). Don't reach for them to signal UI state. */
  --primary:        var(--blue);
  --primary-dim:    var(--blue-dim);
  --primary-border: var(--blue-border);
  --on-time:        var(--green);
  --on-time-dim:    var(--green-dim);
  --at-risk:        var(--orange);
  --at-risk-dim:    var(--orange-dim);
  --exception:      var(--red);
  --exception-dim:  var(--red-dim);
  --text-primary:   #eaf0f7;
  --text-secondary: #93a3ba;
  --text-muted:     #5c6b81;
  --text-disabled:  #3a4757;
  --border:        rgba(255,255,255,0.08);
  --border-md:     rgba(255,255,255,0.13);
  --border-active: rgba(77,143,240,0.5);
  /* Flat elevation, not drama — enterprise surfaces sit close to the page. */
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.3);
  --shadow-md:  0 4px 14px rgba(0,0,0,0.35);
  --shadow-lg:  0 16px 40px rgba(0,0,0,0.5);
  /* "Glow" tokens kept for compatibility but reduced to a soft elevation so
     nothing on the page actually glows anymore. */
  --shadow-glow-blue:   0 2px 10px rgba(77,143,240,0.16);
  --shadow-glow-green:  0 2px 10px rgba(46,203,143,0.16);
  --shadow-glow-purple: 0 2px 10px rgba(167,139,250,0.16);
  --radius-sm:  5px;
  --radius-md:  8px;
  --radius-lg:  11px;
  --radius-xl:  16px;
  --radius-full: 9999px;
  --transition-fast: 0.12s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.35s ease;
  --topbar-height: 52px;
  --sidebar-width: 56px;
  --drawer-width:  480px;
  color-scheme: dark;
}

/* ─── LIGHT THEME ───
   Chrome tokens flip (surfaces, text, borders, glass, shadows) and the accents
   deepen for contrast on white — a neon blue that pops on near-black is illegible
   as a link on white, so light adopts SAP Fiori's deeper blue. Applied by theme-init.js setting
   data-theme="light" on <html> before first paint (CSP blocks an inline script,
   so it is a served file loaded in <head>). */
:root[data-theme="light"] {
  color-scheme: light;
  --bg-base:     #f4f6fa;
  --bg-surface:  #ffffff;
  --bg-elevated: #ffffff;
  --bg-hover:    #eef2f8;
  --bg-active:   #e4ebf4;
  --glass:        rgba(20,34,58,0.02);
  --glass-md:     rgba(20,34,58,0.035);
  --glass-hover:  rgba(20,34,58,0.05);
  --glass-border: rgba(20,34,58,0.10);
  --glass-border-hover: rgba(20,34,58,0.17);
  --text-primary:   #172333;
  --text-secondary: #4a5a70;
  --text-muted:     #7688a0;
  --text-disabled:  #aab7c6;
  --border:        rgba(20,34,58,0.10);
  --border-md:     rgba(20,34,58,0.15);
  --border-active: rgba(10,110,209,0.5);
  --shadow-sm:  0 1px 2px rgba(20,34,58,0.08);
  --shadow-md:  0 4px 14px rgba(20,34,58,0.09);
  --shadow-lg:  0 16px 40px rgba(20,34,58,0.16);
  /* Deepen accents for contrast on white — SAP Fiori's blue leads. Their -dim/
     -border tints are re-based to match so badges/pills read cleanly on light. */
  --blue:   #0a6ed1;  --blue-dim:   rgba(10,110,209,0.09);  --blue-border:   rgba(10,110,209,0.22);
  --green:  #197e4e;  --green-dim:  rgba(25,126,78,0.10);   --green-border:  rgba(25,126,78,0.24);
  --orange: #a86412;  --orange-dim: rgba(168,100,18,0.11);  --orange-border: rgba(168,100,18,0.26);
  --purple: #6d47c9;  --purple-dim: rgba(109,71,201,0.10);  --purple-border: rgba(109,71,201,0.24);
  --cyan:   #0a7ea3;  --cyan-dim:   rgba(10,126,163,0.10);  --cyan-border:   rgba(10,126,163,0.24);
  --yellow: #9a7b12;  --yellow-dim: rgba(154,123,18,0.11);  --yellow-border: rgba(154,123,18,0.26);
  --red:    #c0392b;  --red-dim:    rgba(192,57,43,0.10);   --red-border:    rgba(192,57,43,0.24);
}
/* The one hardcoded structural surface that can't ride a token. */
:root[data-theme="light"] .ln-topbar { background: rgba(255,255,255,0.88); }
:root[data-theme="light"] .ln-grid { display: none; }  /* white-on-white lines add nothing */

/* ─── RESET ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 14px; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── GLOBAL BACKGROUND ─── */
.ln-bg {
  /* A single, barely-there tint at the top rather than a neon light show —
     enough to keep the ground from being flat black, not a gradient feature. */
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 90% 45% at 20% -5%, rgba(77,143,240,0.05) 0%, transparent 60%);
}
.ln-grid { display: none; }   /* the blueprint grid read as consumer, not enterprise */

/* ─── TOP NAV BAR ─── */
.ln-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--topbar-height);
  display: flex; align-items: center; gap: 0;
  background: rgba(12,16,25,0.9);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.ln-topbar-logo {
  display: flex; align-items: center; gap: 8px;
  padding: 0 16px; height: 100%;
  text-decoration: none; flex-shrink: 0;
  border-right: 1px solid var(--border);
  min-width: 148px;
}
.ln-logo-mark {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ln-logo-mark svg { width: 28px; height: 28px; }
.ln-logo-text { display: flex; flex-direction: column; line-height: 1; }
.ln-logo-name { font-size: 13px; font-weight: 700; letter-spacing: -0.3px; color: var(--text-primary); }
.ln-logo-ver { font-size: 9px; color: var(--blue); font-weight: 600; margin-top: 2px; }

.ln-topbar-nav {
  display: flex; align-items: center; height: 100%; flex: 1;
}

/* ─── NAV ITEMS ─── */
.ln-nav-item {
  display: flex; align-items: center; gap: 6px;
  height: 100%; padding: 0 16px;
  font-size: 13px; font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
  cursor: pointer; border-top: none; border-left: none; border-right: none;
  background: transparent; font-family: inherit;
}
.ln-nav-item:hover { color: var(--text-primary); background: var(--glass); }
/* Active nav carries the product signature: a lane-line — the dashed marker
   painted down the middle of a road — animating along the bottom edge, as if the
   current section is the road you're driving. Not a static underline. */
.ln-nav-item.active { color: var(--primary); border-bottom-color: transparent; background: var(--primary-dim); position: relative; }
.ln-nav-item.active::after {
  content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px;
  background-image: repeating-linear-gradient(90deg, var(--primary) 0 9px, transparent 9px 16px);
  background-size: 16px 2px;
  animation: ln-lane-line 0.55s linear infinite;
}
@keyframes ln-lane-line { to { background-position: 16px 0; } }

/* Copilot reads as THE AI assistant, not just another tab: a persistent primary
   tint (so it stands apart from plain nav items) and a small "AI" pill. */
.ln-copilot-btn { color: var(--primary); }
.ln-copilot-btn .ln-icon { color: var(--primary); }
.ln-copilot-btn:hover { background: var(--primary-dim); color: var(--primary); }
.ln-copilot-btn.active { color: var(--primary); background: var(--primary-dim); }
.ln-ai-pill {
  font-size: 8.5px; font-weight: 800; letter-spacing: 0.5px;
  padding: 1px 5px; border-radius: var(--radius-full);
  background: var(--primary); color: #fff; line-height: 1.4;
  vertical-align: middle;
}

/* Freddy special button */
.ln-freddy-btn { color: #ff9d00 !important; }
.ln-freddy-btn:hover { background: rgba(255,157,0,0.08) !important; color: #ffb733 !important; }
.ln-freddy-btn.active { border-bottom-color: #ff9d00 !important; background: rgba(255,157,0,0.08) !important; }

/* ─── DROPDOWNS ─── */
.ln-dropdown { position: relative; height: 100%; display: flex; align-items: center; }
.ln-dropdown-trigger { display: flex; align-items: center; gap: 5px; }
.ln-dropdown-arrow { font-size: 9px; opacity: 0.5; transition: transform var(--transition-fast); }

.ln-dropdown-menu {
  display: none;
  position: absolute; top: calc(100% + 1px); left: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 210px;
  z-index: 400;
  overflow: hidden;
  padding: 4px;
}
.ln-dropdown-menu.open {
  display: block;
  animation: ln-dropdown-in 0.15s ease;
}
.ln-dropdown-menu.ln-menu-right { left: auto; right: 0; min-width: 232px; }
.ln-menu-header { padding: 10px 12px 8px; }
.ln-menu-header-name { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.ln-menu-header-email { font-size: 11px; color: var(--text-muted); margin-top: 2px; word-break: break-all; }
.ln-menu-header-role { display: inline-block; margin-top: 6px; font-size: 10px; font-weight: 600; color: var(--text-secondary); background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-full); padding: 2px 8px; }
.ln-dropdown-item.ln-item-danger { color: var(--red); }
.ln-dropdown-item.ln-item-danger:hover { background: var(--red-dim, rgba(239,68,68,0.10)); color: var(--red); }
.ln-account-trigger { background: none; border: 1px solid transparent; cursor: pointer; }
.ln-account-trigger:hover { border-color: var(--border-md); }
@keyframes ln-dropdown-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ln-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-md);
  font-size: 13px; font-weight: 500;
  color: var(--text-secondary); text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.ln-dropdown-item:hover { background: var(--glass-hover); color: var(--text-primary); }
.ln-dropdown-item.active { background: var(--blue-dim); color: var(--blue); }
.ln-dropdown-item-icon { font-size: 14px; width: 20px; text-align: center; flex-shrink: 0; }

.ln-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 8px;
}

/* Section sub-label inside a long dropdown — groups items so the menu scans. */
.ln-dropdown-header {
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 12px 4px;
}
.ln-dropdown-header:first-child { padding-top: 4px; }

/* Collapsible section group inside a long menu — click the header to expand its
   items. Groups open short (only the active group is expanded by default) so the
   Warehouse/Operations menus scan instead of scrolling. */
.ln-nav-group-header {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; box-sizing: border-box;
  background: none; border: 0; cursor: pointer; font-family: inherit;
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 12px; border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}
.ln-nav-group-header:hover { color: var(--text-primary); background: var(--glass-hover); }
.ln-nav-group-arrow { font-size: 9px; opacity: 0.7; transition: transform 0.15s ease; }
.ln-nav-group.open > .ln-nav-group-header .ln-nav-group-arrow { transform: rotate(180deg); }
.ln-nav-group-items { display: none; }
.ln-nav-group.open > .ln-nav-group-items { display: block; }

.ln-topbar-divider { width: 1px; height: 28px; background: var(--border); flex-shrink: 0; }

.ln-topbar-right {
  display: flex; align-items: center; gap: 6px;
  padding: 0 12px; flex-shrink: 0;
}

/* Command palette trigger */
.ln-cmd-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: var(--radius-md);
  background: var(--glass); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 12px;
  cursor: pointer; font-family: inherit; transition: all var(--transition-fast);
  white-space: nowrap;
}
.ln-cmd-btn:hover { border-color: var(--border-md); color: var(--text-primary); }
.ln-cmd-shortcut {
  font-size: 10px; padding: 1px 5px; border-radius: 4px;
  background: var(--bg-elevated); color: var(--text-muted);
  border: 1px solid var(--border); font-family: monospace;
}

/* Notification bell */
.ln-notif-btn {
  width: 32px; height: 32px; border-radius: var(--radius-md);
  background: var(--glass); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary);
  transition: all var(--transition-fast); position: relative;
  font-size: 14px;
}
.ln-notif-btn:hover { border-color: var(--border-md); color: var(--text-primary); }
.ln-notif-dot {
  position: absolute; top: 5px; right: 5px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red); border: 1px solid var(--bg-base);
}
.ln-notif-count {
  position: absolute; top: 0; right: 0;
  min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 8px; background: var(--red); color: #fff;
  font-size: 9px; font-weight: 700; line-height: 15px; text-align: center;
  border: 1.5px solid var(--bg-base); box-sizing: border-box;
}

/* User avatar */
.ln-user-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px; border-radius: var(--radius-md);
  background: var(--glass); border: 1px solid var(--border);
  cursor: pointer; transition: all var(--transition-fast);
}
.ln-user-btn:hover { border-color: var(--border-md); }
.ln-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--blue-dim); border: 1px solid var(--blue-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--blue); flex-shrink: 0;
}
.ln-user-info { display: flex; flex-direction: column; line-height: 1; }
.ln-user-name { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.ln-user-role { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

/* ─── MAIN LAYOUT ─── */
.ln-layout { padding-top: var(--topbar-height); min-height: 100vh; position: relative; z-index: 1; }
.ln-page { max-width: 1400px; margin: 0 auto; padding: 24px; }
.ln-page-full { padding: 0; max-width: none; }

/* ─── PAGE HEADER ─── */
.ln-page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.ln-page-header-left { display: flex; flex-direction: column; gap: 4px; }
.ln-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-muted); margin-bottom: 2px;
}
.ln-breadcrumb a { color: var(--text-muted); text-decoration: none; transition: color var(--transition-fast); }
.ln-breadcrumb a:hover { color: var(--text-secondary); }
.ln-breadcrumb-sep { opacity: 0.4; }
.ln-page-title { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; color: var(--text-primary); }
/* Sleekified page-title icon (see sleekifyIcons in laneify.js): sized to the text,
   tinted with the primary so headers read as one uniform system across pages. */
.ln-page-title .ln-icon { width: 20px; height: 20px; vertical-align: -3px; color: var(--primary); margin-right: 4px; }
.ln-page-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.ln-page-header-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ─── KPI CARDS ─── */
.ln-kpi-grid { display: grid; gap: 12px; margin-bottom: 20px; }
.ln-kpi-grid-4 { grid-template-columns: repeat(4, 1fr); }
.ln-kpi-grid-3 { grid-template-columns: repeat(3, 1fr); }
.ln-kpi-grid-2 { grid-template-columns: repeat(2, 1fr); }

.ln-kpi {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 15px 16px 15px 18px;
  transition: border-color var(--transition-base); position: relative; overflow: hidden;
}
/* A colored left rail carries the metric's hue instead of tinting the whole
   card or the number — restraint reads as enterprise. */
.ln-kpi::before {
  content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--kpi-color, transparent); pointer-events: none;
}
.ln-kpi:hover { border-color: var(--border-md); box-shadow: var(--shadow-sm); }
/* Status-only color: a KPI is NEUTRAL by default (no rail — the number carries no
   hue, so a row of plain facts reads calm and uniform). Color appears only when a
   metric is a STATUS, via one of three semantic modifiers. This is the whole
   discipline: if every card is colored, none of them mean anything.
     .is-good → healthy   (fill rate, on-time %, success)   green
     .is-warn → attention (low stock, pending, open)        amber
     .is-bad  → problem   (failed, out of stock, breaches)  red
   Both themes ride the semantic tokens, so the register is identical on light. */
.ln-kpi.is-good { --kpi-color: var(--on-time); }
.ln-kpi.is-warn { --kpi-color: var(--at-risk); }
.ln-kpi.is-bad  { --kpi-color: var(--exception); }
/* A status KPI earns a hair more emphasis than a plain fact: its number picks up
   the status hue so the eye lands on it first in an otherwise-neutral row. */
.ln-kpi.is-good .ln-kpi-val { color: var(--on-time); }
.ln-kpi.is-warn .ln-kpi-val { color: var(--at-risk); }
.ln-kpi.is-bad  .ln-kpi-val { color: var(--exception); }
.ln-kpi-val { font-size: 24px; font-weight: 650; letter-spacing: -0.5px; color: var(--text-primary); margin-bottom: 4px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.ln-kpi-label { font-size: 11px; color: var(--text-secondary); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.ln-kpi-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.ln-kpi-trend { font-size: 11px; font-weight: 600; margin-top: 6px; display: flex; align-items: center; gap: 3px; }
.ln-kpi-trend.up { color: var(--green); }
.ln-kpi-trend.down { color: var(--red); }

/* ─── PACKAGE LIFECYCLE PIPELINE ─── */
.ln-pipeline { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 4px 2px 8px; }
.ln-stage {
  position: relative; flex: 1 1 0; min-width: 132px;
  display: flex; flex-direction: column; gap: 3px;
  padding: 14px 14px 13px; text-decoration: none;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--glass); transition: all var(--transition-fast);
}
.ln-stage:not(:last-child) { margin-right: 18px; }
/* Flow connector between stages */
.ln-stage:not(:last-child)::after {
  content: '▸'; position: absolute; right: -14px; top: 50%; transform: translateY(-50%);
  font-size: 13px; color: var(--text-muted); opacity: 0.6; z-index: 1;
}
.ln-stage::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: var(--stage, var(--text-muted));
}
.ln-stage:hover { border-color: var(--border-md); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.ln-stage-top { display: flex; align-items: center; justify-content: space-between; }
.ln-stage-icon { font-size: 16px; }
.ln-stage-count { font-size: 24px; font-weight: 800; color: var(--text-primary); line-height: 1; font-variant-numeric: tabular-nums; }
.ln-stage-label { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); }
.ln-stage-sub { font-size: 10.5px; color: var(--text-muted); }
.ln-stage.is-empty .ln-stage-count { color: var(--text-muted); }
@media (max-width: 720px) {
  .ln-stage { min-width: 128px; }
}

/* ─── CARDS ─── */
.ln-card { background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 16px; }
.ln-bulkbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 9px 14px; margin-bottom: 12px; background: var(--glass); border: 1px solid var(--border-active); border-radius: var(--radius-lg); }
.ln-bulkbar-count { font-size: 13px; color: var(--text-secondary); }
.ln-bulkbar-count strong { color: var(--text-primary); }
.ln-bulkbar-actions { display: flex; align-items: center; gap: 6px; }
.ln-table tr.ln-row-sel td { background: rgba(77,143,240,0.10); }
.ln-card-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); gap: 12px; flex-wrap: wrap; }
.ln-card-title { font-size: 13px; font-weight: 600; color: var(--text-primary); letter-spacing: -0.2px; }
.ln-card-actions { display: flex; align-items: center; gap: 6px; }
.ln-card-body { padding: 16px; }
.ln-card-body-flush { padding: 0; }

/* ─── DATA TABLE ─── */
.ln-table-wrap { overflow-x: auto; }
.ln-table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.ln-table th {
  text-align: left; padding: 10px 14px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.6px;
  text-transform: uppercase; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap; cursor: pointer;
  user-select: none; transition: color var(--transition-fast);
}
.ln-table th:hover { color: var(--text-secondary); }
.ln-table th.sort-asc::after { content: ' ↑'; color: var(--blue); }
.ln-table th.sort-desc::after { content: ' ↓'; color: var(--blue); }
.ln-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); color: var(--text-secondary); vertical-align: middle; }
.ln-table tr:last-child td { border-bottom: none; }
.ln-table tr { transition: background var(--transition-fast); cursor: pointer; }
.ln-table tr:hover td { background: var(--glass-hover); color: var(--text-primary); }
.ln-table tr.selected td { background: var(--blue-dim); }
.ln-table td.primary { font-weight: 600; color: var(--text-primary); }
.ln-table td.mono { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 11px; }

/* Table toolbar */
.ln-table-toolbar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ln-search { display: flex; align-items: center; gap: 8px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 7px 12px; flex: 1; min-width: 180px; max-width: 300px; transition: border-color var(--transition-fast); }
.ln-search:focus-within { border-color: var(--border-active); }
.ln-search-icon { color: var(--text-muted); font-size: 12px; flex-shrink: 0; display: inline-flex; }
.ln-search-icon .ln-icon { width: 14px; height: 14px; }
.ln-search input { background: none; border: none; outline: none; color: var(--text-primary); font-size: 12px; font-family: inherit; width: 100%; min-width: 0; }
.ln-search input::placeholder { color: var(--text-muted); }
.ln-table-count { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* Bulk action bar */
.ln-bulk-bar { display: none; align-items: center; gap: 8px; padding: 10px 16px; background: var(--blue-dim); border-bottom: 1px solid var(--blue-border); }
.ln-bulk-bar.visible { display: flex; }
.ln-bulk-count { font-size: 12px; font-weight: 600; color: var(--blue); }

/* ─── FILTER CHIPS ─── */
.ln-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.ln-filter { display: flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: var(--radius-full); background: var(--glass); border: 1px solid var(--border); font-size: 11px; font-weight: 500; color: var(--text-secondary); cursor: pointer; transition: all var(--transition-fast); white-space: nowrap; font-family: inherit; }
.ln-filter:hover { border-color: var(--border-md); color: var(--text-primary); }
.ln-filter.active { background: var(--blue-dim); border-color: var(--blue-border); color: var(--blue); }
.ln-filter-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* ─── SELECT ─── */
.ln-select { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 7px 10px; color: var(--text-primary); font-size: 12px; outline: none; font-family: inherit; cursor: pointer; transition: border-color var(--transition-fast); }
.ln-select:focus { border-color: var(--border-active); }
.ln-select option { background: var(--bg-elevated); }

/* ─── BADGES ─── */
.ln-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--radius-full); font-size: 10px; font-weight: 700; white-space: nowrap; line-height: 16px; }
.ln-badge-blue   { background: var(--blue-dim);   color: var(--blue);   border: 1px solid var(--blue-border); }
.ln-badge-green  { background: var(--green-dim);  color: var(--green);  border: 1px solid var(--green-border); }
.ln-badge-orange { background: var(--orange-dim); color: var(--orange); border: 1px solid var(--orange-border); }
.ln-badge-purple { background: var(--purple-dim); color: var(--purple); border: 1px solid var(--purple-border); }
.ln-badge-cyan   { background: var(--cyan-dim);   color: var(--cyan);   border: 1px solid var(--cyan-border); }
.ln-badge-yellow { background: var(--yellow-dim); color: var(--yellow); border: 1px solid var(--yellow-border); }
.ln-badge-red    { background: var(--red-dim);    color: var(--red);    border: 1px solid var(--red-border); }
.ln-badge-gray   { background: var(--glass);      color: var(--text-muted); border: 1px solid var(--border); }

/* Status dots */
.ln-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.ln-dot-blue   { background: var(--blue); box-shadow: 0 0 6px var(--blue); }
.ln-dot-green  { background: var(--green); box-shadow: 0 0 6px var(--green); }
.ln-dot-orange { background: var(--orange); }
.ln-dot-red    { background: var(--red); box-shadow: 0 0 6px var(--red); }
.ln-dot-yellow { background: var(--yellow); }
.ln-dot-gray   { background: var(--text-muted); }
@keyframes ln-pulse { 0%,100%{opacity:1}50%{opacity:0.3} }
.ln-dot-pulse { animation: ln-pulse 2s infinite; }

/* ─── BUTTONS ─── */
.ln-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; font-family: inherit; cursor: pointer; transition: background var(--transition-fast), border-color var(--transition-fast), filter var(--transition-fast); border: 1px solid transparent; white-space: nowrap; text-decoration: none; line-height: 1; }
.ln-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ln-btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; }
/* Solid fills, no gradients or glow — enterprise buttons are flat and legible. */
.ln-btn-primary { background: var(--blue); color: #fff; }
.ln-btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.ln-btn-secondary { background: var(--glass); border: 1px solid var(--border-md); color: var(--text-primary); }
.ln-btn-secondary:hover:not(:disabled) { border-color: var(--border-md); color: var(--text-primary); background: var(--glass-hover); }
.ln-btn-green { background: var(--green); color: #06231a; }
.ln-btn-green:hover:not(:disabled) { filter: brightness(1.08); }
.ln-btn-orange { background: var(--orange); color: #241304; }
.ln-btn-orange:hover:not(:disabled) { filter: brightness(1.08); }
.ln-btn-purple { background: var(--purple); color: #fff; }
.ln-btn-purple:hover:not(:disabled) { filter: brightness(1.08); }
.ln-btn-danger { background: var(--red-dim); border: 1px solid var(--red-border); color: var(--red); }
.ln-btn-danger:hover:not(:disabled) { background: var(--red); color: #fff; }
.ln-btn-ghost { background: none; border: none; color: var(--text-secondary); }
.ln-btn-ghost:hover { color: var(--text-primary); background: var(--glass); }

/* FAB */
.ln-fab { position: fixed; bottom: 24px; right: 24px; z-index: 100; width: 48px; height: 48px; border-radius: 50%; background: var(--blue); border: none; cursor: pointer; font-size: 20px; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); transition: all var(--transition-base); color: #fff; }
.ln-fab:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(77,166,255,0.55); }
.ln-fab .ln-icon { width: 22px; height: 22px; }

/* ─── FORMS ─── */
.ln-form { display: flex; flex-direction: column; gap: 12px; }
.ln-form-row { display: grid; gap: 10px; }
.ln-form-row-2 { grid-template-columns: 1fr 1fr; }
.ln-form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.ln-form-row-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.ln-field { display: flex; flex-direction: column; gap: 5px; }
.ln-label { font-size: 11px; font-weight: 500; color: var(--text-secondary); letter-spacing: 0.2px; }
.ln-label span { color: var(--red); margin-left: 2px; }
.ln-input, .ln-select-field, .ln-textarea { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 8px 12px; color: var(--text-primary); font-size: 13px; font-family: inherit; outline: none; width: 100%; transition: all var(--transition-fast); line-height: 1.4; }
.ln-input::placeholder { color: var(--text-muted); }
.ln-input:focus, .ln-select-field:focus, .ln-textarea:focus { border-color: var(--border-active); background: var(--bg-hover); box-shadow: 0 0 0 3px rgba(77,166,255,0.08); }
.ln-input:hover:not(:focus), .ln-select-field:hover:not(:focus) { border-color: var(--border-md); }
.ln-select-field option { background: var(--bg-elevated); }
.ln-textarea { resize: vertical; min-height: 80px; }
.ln-input-wrap { position: relative; }
.ln-input-wrap .ln-input { padding-left: 36px; }
.ln-input-wrap .ln-input-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 13px; pointer-events: none; }
.ln-input-wrap .ln-input-action { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.ln-scan-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); padding: 4px 8px; border-radius: var(--radius-sm); background: var(--blue-dim); border: 1px solid var(--blue-border); color: var(--blue); font-size: 11px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all var(--transition-fast); display: flex; align-items: center; gap: 4px; }
.ln-scan-btn:hover { background: rgba(77,166,255,0.15); }

/* ─── SLIDE-OUT DRAWER ─── */
.ln-drawer-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,0.6); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity var(--transition-base); }
.ln-drawer-overlay.open { opacity: 1; pointer-events: all; }
.ln-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 301; width: var(--drawer-width); max-width: 100vw; background: var(--bg-surface); border-left: 1px solid var(--border); display: flex; flex-direction: column; transform: translateX(100%); transition: transform var(--transition-slow); box-shadow: var(--shadow-lg); }
.ln-drawer.open { transform: translateX(0); }
.ln-drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.ln-drawer-title { font-size: 15px; font-weight: 700; letter-spacing: -0.3px; }
.ln-drawer-close { width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--glass); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-secondary); font-size: 16px; transition: all var(--transition-fast); }
.ln-drawer-close:hover { color: var(--text-primary); border-color: var(--border-md); }
.ln-drawer-body { flex: 1; overflow-y: auto; padding: 20px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.ln-drawer-footer { padding: 16px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; flex-shrink: 0; }
.ln-drawer-footer .ln-btn { flex: 1; justify-content: center; }

/* ─── COMMAND PALETTE ─── */
.ln-cmd-overlay { position: fixed; inset: 0; z-index: 500; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); display: none; align-items: flex-start; justify-content: center; padding-top: 120px; }
.ln-cmd-overlay.open { display: flex; }
.ln-cmd-palette { background: var(--bg-elevated); border: 1px solid var(--border-md); border-radius: var(--radius-xl); width: 560px; max-width: calc(100vw - 32px); box-shadow: var(--shadow-lg); overflow: hidden; }
.ln-cmd-input-wrap { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.ln-cmd-input-icon { color: var(--text-muted); font-size: 15px; flex-shrink: 0; }
.ln-cmd-input { flex: 1; background: none; border: none; outline: none; font-size: 15px; color: var(--text-primary); font-family: inherit; }
.ln-cmd-input::placeholder { color: var(--text-muted); }
.ln-cmd-esc { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: var(--glass); border: 1px solid var(--border); color: var(--text-muted); font-family: monospace; }
.ln-cmd-results { max-height: 380px; overflow-y: auto; padding: 6px; }
.ln-cmd-section-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); padding: 8px 10px 4px; }
.ln-cmd-item { display: flex; align-items: center; gap: 10px; padding: 10px 10px; border-radius: var(--radius-md); cursor: pointer; transition: background var(--transition-fast); color: var(--text-secondary); }
.ln-cmd-item:hover, .ln-cmd-item.selected { background: var(--blue-dim); color: var(--text-primary); }
.ln-cmd-item-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
/* Inline SVG nav/palette icons — inherit text color, stay optically centered on
   the baseline next to their label, and never squash in a flex row. */
.ln-icon { display: inline-block; vertical-align: -3px; flex-shrink: 0; }
.ln-cmd-item-icon .ln-icon, .ln-dropdown-item-icon .ln-icon { vertical-align: middle; }
.ln-cmd-item-text { flex: 1; }
.ln-cmd-item-label { font-size: 13px; font-weight: 500; }
.ln-cmd-item-desc { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* ─── TOAST NOTIFICATIONS ─── */
.ln-toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 600; display: flex; flex-direction: column-reverse; gap: 8px; pointer-events: none; }
.ln-toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius-lg); background: var(--bg-elevated); border: 1px solid var(--border-md); box-shadow: var(--shadow-lg); font-size: 13px; color: var(--text-primary); pointer-events: all; min-width: 280px; max-width: 480px; animation: ln-toast-in 0.3s ease; }
.ln-toast.out { animation: ln-toast-out 0.3s ease forwards; }
@keyframes ln-toast-in { from { opacity: 0; transform: translateY(20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes ln-toast-out { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(10px) scale(0.95); } }
.ln-toast-icon { font-size: 16px; flex-shrink: 0; }
.ln-toast-text { flex: 1; font-weight: 500; }
.ln-toast-close { color: var(--text-muted); cursor: pointer; font-size: 16px; flex-shrink: 0; }
.ln-toast-close:hover { color: var(--text-primary); }
.ln-toast-success { border-color: var(--green-border); }
.ln-toast-success .ln-toast-icon { color: var(--green); }
.ln-toast-error { border-color: var(--red-border); }
.ln-toast-error .ln-toast-icon { color: var(--red); }
.ln-toast-warning { border-color: var(--yellow-border); }
.ln-toast-warning .ln-toast-icon { color: var(--yellow); }
.ln-toast-info { border-color: var(--blue-border); }
.ln-toast-info .ln-toast-icon { color: var(--blue); }

/* ─── BARCODE SCANNER ─── */
.ln-scanner-overlay { position: fixed; inset: 0; z-index: 400; background: rgba(0,0,0,0.9); display: none; align-items: center; justify-content: center; flex-direction: column; gap: 16px; }
.ln-scanner-overlay.open { display: flex; }
.ln-scanner-box { position: relative; width: 300px; height: 240px; border-radius: var(--radius-lg); overflow: hidden; border: 2px solid var(--blue); box-shadow: 0 0 0 4px rgba(77,166,255,0.15), var(--shadow-lg); }
.ln-scanner-box video { width: 100%; height: 100%; object-fit: cover; }
.ln-scanner-line { position: absolute; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--blue), transparent); animation: ln-scan 2s ease-in-out infinite; box-shadow: 0 0 8px var(--blue); }
@keyframes ln-scan { 0% { top: 10%; } 50% { top: 85%; } 100% { top: 10%; } }
.ln-scanner-corner-tl { position: absolute; top: 6px; left: 6px; width: 20px; height: 20px; border-top: 3px solid var(--blue); border-left: 3px solid var(--blue); border-radius: 3px 0 0 0; }
.ln-scanner-corner-tr { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-top: 3px solid var(--blue); border-right: 3px solid var(--blue); border-radius: 0 3px 0 0; }
.ln-scanner-corner-bl { position: absolute; bottom: 6px; left: 6px; width: 20px; height: 20px; border-bottom: 3px solid var(--blue); border-left: 3px solid var(--blue); border-radius: 0 0 0 3px; }
.ln-scanner-corner-br { position: absolute; bottom: 6px; right: 6px; width: 20px; height: 20px; border-bottom: 3px solid var(--blue); border-right: 3px solid var(--blue); border-radius: 0 0 3px 0; }
.ln-scanner-label { font-size: 13px; color: var(--text-secondary); text-align: center; }
.ln-scanner-result { font-size: 15px; font-weight: 700; color: var(--green); font-family: monospace; }

/* ─── STATUS PIPELINE ─── */
.ln-pipeline { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; }
.ln-pipeline::-webkit-scrollbar { display: none; }
.ln-pipeline-stage { flex: 1; min-width: 100px; padding: 12px 10px; text-align: center; cursor: pointer; border: 1px solid var(--border); border-right: none; background: var(--glass); transition: all var(--transition-fast); }
.ln-pipeline-stage:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.ln-pipeline-stage:last-child { border-right: 1px solid var(--border); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.ln-pipeline-stage:hover { background: var(--glass-hover); }
.ln-pipeline-stage.active { background: var(--blue-dim); border-color: var(--blue-border); }
.ln-pipeline-count { font-size: 22px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.ln-pipeline-label { font-size: 10px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }

/* ─── EMPTY STATE ─── */
.ln-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 24px; text-align: center; }
.ln-empty-icon { font-size: 36px; opacity: 0.4; }
.ln-empty-title { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.ln-empty-sub { font-size: 12px; color: var(--text-muted); max-width: 320px; }
.ln-empty-action { margin-top: 6px; }
/* Error is an empty state that failed — same layout, exception-colored, and it
   always offers a way back (a retry), so a data view never dead-ends on a blank. */
.ln-error .ln-empty-icon { opacity: 0.9; }
.ln-error .ln-empty-title { color: var(--exception); }

/* ─── LOADING ─── */
.ln-loading { display: flex; align-items: center; gap: 8px; padding: 24px; justify-content: center; color: var(--text-muted); font-size: 12px; }
.ln-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--blue); animation: ln-spin 0.7s linear infinite; }
@keyframes ln-spin { to { transform: rotate(360deg); } }

/* ─── SKELETON (content placeholder while data loads) ─── */
.ln-skeleton {
  background: linear-gradient(90deg, var(--glass) 25%, var(--glass-md) 50%, var(--glass) 75%);
  background-size: 200% 100%;
  animation: ln-shimmer 1.3s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
.ln-skeleton-line { height: 14px; margin-bottom: 10px; }
.ln-skeleton-line:last-child { margin-bottom: 0; }
@keyframes ln-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ─── ALERTS ─── */
.ln-alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-md); font-size: 13px; margin-bottom: 12px; }
.ln-alert-icon { flex-shrink: 0; font-size: 14px; margin-top: 1px; }
.ln-alert-text { flex: 1; line-height: 1.5; }
.ln-alert-success { background: var(--green-dim); border: 1px solid var(--green-border); color: #6ee7b7; }
.ln-alert-error   { background: var(--red-dim);   border: 1px solid var(--red-border);   color: #fca5a5; }
.ln-alert-warning { background: var(--yellow-dim); border: 1px solid var(--yellow-border); color: var(--yellow); }
.ln-alert-info    { background: var(--blue-dim);  border: 1px solid var(--blue-border);  color: #93c5fd; }

/* ─── TABS ─── */
.ln-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.ln-tabs::-webkit-scrollbar { display: none; }
.ln-tab { padding: 10px 16px; font-size: 12px; font-weight: 600; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; transition: all var(--transition-fast); background: none; border-top: none; border-left: none; border-right: none; font-family: inherit; }
.ln-tab:hover { color: var(--text-secondary); }
.ln-tab.active { color: var(--blue); border-bottom-color: var(--blue); }
.ln-tab-panel { display: none; }
.ln-tab-panel.active { display: block; }

/* ─── DETAIL ROW ─── */
.ln-detail-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.ln-detail-item { display: flex; flex-direction: column; gap: 3px; }
.ln-detail-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.ln-detail-value { font-size: 13px; font-weight: 500; color: var(--text-primary); }

/* ─── STEP PROGRESS ─── */
.ln-steps { display: flex; align-items: center; margin-bottom: 20px; }
.ln-step { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; }
.ln-step-dot { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; z-index: 1; border: 2px solid var(--border); background: var(--bg-base); color: var(--text-muted); transition: all var(--transition-base); }
.ln-step.done .ln-step-dot { background: var(--green); border-color: var(--green); color: #fff; }
.ln-step.current .ln-step-dot { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 0 12px rgba(77,166,255,0.4); }
.ln-step-label { font-size: 10px; color: var(--text-muted); margin-top: 5px; font-weight: 600; text-align: center; white-space: nowrap; }
.ln-step.done .ln-step-label, .ln-step.current .ln-step-label { color: var(--text-secondary); }
.ln-step-line { flex: 1; height: 2px; background: var(--border); margin-top: -12px; }
.ln-step-line.done { background: var(--green); }

/* ─── BAR CHART ─── */
.ln-bar-chart { display: flex; flex-direction: column; gap: 8px; }
.ln-bar-row { display: flex; align-items: center; gap: 10px; }
.ln-bar-label { font-size: 11px; color: var(--text-secondary); width: 130px; flex-shrink: 0; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ln-bar-track { flex: 1; height: 6px; background: var(--glass-border); border-radius: var(--radius-full); overflow: hidden; }
.ln-bar-fill { height: 100%; border-radius: var(--radius-full); transition: width 0.6s ease; }
.ln-bar-val { font-size: 11px; color: var(--text-secondary); width: 50px; flex-shrink: 0; }

/* ─── MINI CHART ─── */
.ln-trend { display: flex; align-items: flex-end; gap: 2px; height: 48px; }
.ln-trend-bar { flex: 1; border-radius: 2px 2px 0 0; min-width: 4px; transition: height 0.4s ease; opacity: 0.8; cursor: pointer; }
.ln-trend-bar:hover { opacity: 1; }

/* ─── SECTION DIVIDER ─── */
.ln-divider { height: 1px; background: var(--border); margin: 16px 0; }
.ln-divider-label { display: flex; align-items: center; gap: 10px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin: 16px 0; }
.ln-divider-label::before, .ln-divider-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--glass-border-hover); }

/* ─── HAMBURGER (hidden on desktop) ─── */
.ln-hamburger {
  display: none;
  flex-direction: column; justify-content: center; gap: 4px;
  width: 40px; height: 100%; padding: 0 12px;
  background: transparent; border: none; cursor: pointer;
  border-right: 1px solid var(--border); flex-shrink: 0;
}
.ln-hamburger span {
  display: block; width: 18px; height: 2px; border-radius: 2px;
  background: var(--text-secondary);
  transition: transform var(--transition-base), opacity var(--transition-fast), background var(--transition-fast);
}
.ln-hamburger:hover span { background: var(--text-primary); }
.ln-hamburger.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); background: var(--blue); }
.ln-hamburger.active span:nth-child(2) { opacity: 0; }
.ln-hamburger.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); background: var(--blue); }

.ln-nav-scrim {
  position: fixed; inset: 0; z-index: 190;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity var(--transition-base);
}
.ln-nav-scrim.open { opacity: 1; pointer-events: auto; }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .ln-hamburger { display: flex; }

  /* The topbar's backdrop-filter makes it the containing block for any fixed
     descendant, which would trap the slide-in drawer inside the topbar's own box.
     Drop it here (the 90%-opaque background already reads solid) so the drawer's
     position:fixed resolves against the viewport and actually slides in. */
  .ln-topbar { backdrop-filter: none; -webkit-backdrop-filter: none; }

  /* Nav collapses into a left slide-in drawer. */
  .ln-topbar-nav {
    position: fixed; top: var(--topbar-height); left: 0; bottom: 0; z-index: 195;
    width: min(84vw, 320px);
    flex-direction: column; align-items: stretch; height: auto;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 8px 0; overflow-y: auto;
    transform: translateX(-100%);
    transition: transform var(--transition-base);
  }
  .ln-topbar-nav.open { transform: translateX(0); }

  .ln-dropdown { flex-direction: column; align-items: stretch; height: auto; }
  .ln-dropdown-trigger { width: 100%; height: 46px; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--border); }
  .ln-nav-item { height: 46px; }

  /* Dropdown flyouts become inline accordion sections. */
  .ln-dropdown-menu {
    position: static; min-width: 0; width: 100%;
    box-shadow: none; border: none; border-radius: 0;
    background: var(--bg-base);
    display: none; padding: 4px 0;
  }
  .ln-dropdown-menu.open { display: block; animation: none; }
  .ln-dropdown-item { padding: 12px 20px 12px 28px; }
  .ln-freddy-btn { justify-content: flex-start; padding: 0 20px; height: 46px; border-bottom: 1px solid var(--border); }

  .ln-topbar-logo { min-width: 0; }
  .ln-logo-ver { display: none; }
  .ln-cmd-btn .ln-cmd-shortcut, .ln-cmd-btn { font-size: 0; }
  .ln-cmd-btn::before { content: '⌘'; font-size: 15px; }
  .ln-user-info { display: none; }

  .ln-kpi-grid-4, .ln-kpi-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .ln-form-row-3, .ln-form-row-4 { grid-template-columns: 1fr 1fr; }
  .ln-detail-grid { grid-template-columns: 1fr 1fr; }
  .ln-page { padding: 16px; }
  .ln-drawer { width: 100vw; }
}
@media (max-width: 480px) {
  .ln-kpi-grid-4, .ln-kpi-grid-3, .ln-kpi-grid-2 { grid-template-columns: 1fr 1fr; }
  .ln-form-row-2, .ln-form-row-3, .ln-form-row-4 { grid-template-columns: 1fr; }
  .ln-topbar-divider { display: none; }
}
/* ─── KEYBOARD FOCUS ─── keyboard users get a clear ring; mouse users don't */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.ln-nav-item:focus-visible, .ln-dropdown-item:focus-visible { outline-offset: -2px; }

@media (prefers-reduced-motion: reduce) {
  .ln-topbar-nav, .ln-nav-scrim, .ln-hamburger span { transition: none; }
  .ln-skeleton, .ln-spinner { animation: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
