:root {
  /* Core palette */
  --bg-950: #050b17;
  --bg-900: #0b1526;
  --bg-850: #102033;
  --bg: var(--bg-900);
  --surface-900: #111f33;
  --surface-800: #14253d;
  --surface-700: rgba(20, 34, 58, 0.72);
  --surface-glass: rgba(18, 30, 49, 0.68);

  --card: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(7, 17, 36, 0.3));
  --card-solid: #111f33;

  --text-primary: #e8f0ff;
  --text-strong: #f8fbff;
  --muted: #9fb3ce;
  --muted-soft: #7f93b0;
  --muted-strong: #bac8de;

  --accent: #4c8dff;
  --accent-soft: rgba(76, 141, 255, 0.16);
  --accent-2: #22d3a6;
  --accent-2-soft: rgba(34, 211, 166, 0.16);

  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.18);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.2);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.18);

  /* Active unit tables (inventory + recon) */
  --table-card-bg: #fdfefe;
  --table-card-border: #cfe2dc;
  --table-card-shadow: 0 12px 28px rgba(13, 78, 72, 0.12);
  --table-head-bg: linear-gradient(180deg, #f3faf8 0%, #edf7f4 100%);
  --table-head-border: #d7e9e3;
  --table-heading-text: #16353c;
  --table-meta-text: #5b7680;
  --table-th-bg: #f2f8f6;
  --table-th-text: #1a3a44;
  --table-th-border: #dcebe6;
  --table-th-hover-bg: #e7f3ef;
  --table-th-sorted-bg: #dff1ec;
  --table-th-sorted-text: #0f3d44;
  --table-cell-text: #1e3740;
  --table-cell-border: #e5f1ee;
  --table-row-even-bg: #f9fcfb;
  --table-row-hover-bg: #edf8f5;

  /* Typography */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.85rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.15rem;
  --font-size-xl: 1.45rem;
  --font-size-2xl: 1.9rem;
  --line-height-tight: 1.2;
  --line-height-base: 1.55;

  /* Spacing scale */
  --space-2: 4px;
  --space-3: 6px;
  --space-4: 8px;
  --space-5: 10px;
  --space-6: 12px;
  --space-7: 14px;
  --space-8: 16px;
  --space-9: 18px;
  --space-10: 20px;
  --space-12: 24px;
  --space-14: 28px;

  /* Radii & shadows */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-soft: 0 10px 28px rgba(5, 15, 35, 0.55), 0 2px 10px rgba(3, 8, 22, 0.4);
  --shadow-hover: 0 18px 36px rgba(5, 15, 35, 0.6), 0 10px 26px rgba(3, 8, 22, 0.45);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  background: radial-gradient(circle at top left, rgba(76, 141, 255, 0.08), transparent 45%), var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  /* Improve native control rendering in dark mode */
  color-scheme: dark;
}

body.dashboard-neo,
body.auth-shell,
body.vdp-shell,
body.vdp-light {
  margin: 0;
  background: radial-gradient(1200px 600px at 75% -10%, #f0f6ff 0%, #ffffff 45%, #f8fafc 100%);
  color: #0f172a;
  font-family: Inter, "Segoe UI", sans-serif;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  min-height: 100vh;
}

.lp-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: linear-gradient(180deg, #102c45 0%, #163a58 100%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  color: #dbe8f4;
  box-shadow: inset -1px 0 rgba(255, 255, 255, 0.05);
  z-index: 20;
}

.lp-brand {
  height: 70px;
  display: grid;
  place-items: center;
  background: #020b12;
  border-right: 1px solid rgba(148, 196, 255, 0.18);
  box-shadow: inset 0 -1px 0 rgba(12, 58, 112, 0.28);
  padding: 0 8px;
}

.lp-brand-mark {
  display: block;
  width: 132px;
  height: auto;
  max-height: 38px;
  filter: drop-shadow(0 0 12px rgba(15, 132, 255, 0.26));
}

.lp-brand strong {
  font-size: 22px;
  letter-spacing: -1px;
  color: #15243a;
}

.lp-brand strong span {
  color: #0b63f6;
}

.lp-nav {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lp-nav li {
  margin: 0;
}

.lp-nav a {
  height: 82px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  color: #d6e4ef;
  font-size: 12px;
  border-left: 3px solid transparent;
  transition: 0.18s ease;
}

.lp-nav a:hover,
.lp-nav a.active {
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
  border-left-color: #4aa3ff;
}

.nav-icon {
  font-size: 22px;
  line-height: 1;
}

.lp-sidebar-foot {
  margin-top: auto;
  padding: 18px 8px;
  text-align: center;
  font-size: 11px;
  color: #9eb4c6;
}

.lp-main,
.auth-main,
.router-main,
.vdp-main {
  padding: 0 18px 28px;
  min-width: 0;
}

.lp-top-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  margin-right: 8px;
}

.lp-top-brand img {
  display: block;
  width: 170px;
  height: auto;
  max-height: 42px;
}

.auth-main,
.router-main {
  display: flex;
  flex-direction: column;
}

.lp-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 12px;
}

.dealer-pill,
.ghost-btn {
  border: 1px solid #dbe5f6;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  padding: 7px 10px;
  font-weight: 600;
  font-size: 0.78rem;
}

.audit-dead-btn {
  position: relative;
  outline: 2px dashed rgba(248, 113, 113, 0.9);
  outline-offset: 2px;
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.15), 0 0 0 4px rgba(248, 113, 113, 0.08);
}

.audit-dead-btn::after {
  content: 'inactive';
  position: absolute;
  top: -10px;
  right: -8px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(127, 29, 29, 0.95);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
}

.dealer-pill-dropdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.dealer-pill-dropdown .dealer-pill-label {
  display: inline-flex;
  align-items: center;
}

.dealer-pill-dropdown .dealer-pill-caret {
  font-size: 0.72rem;
  opacity: 0.75;
}

.dealer-pill-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid #dbe5f6;
  background: #ffffff;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
  z-index: 40;
}

.dealer-pill-menu.is-open {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dealer-pill-option {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1e293b;
  text-align: left;
  padding: 8px 10px;
  font: inherit;
  cursor: pointer;
}

.dealer-pill-option:hover,
.dealer-pill-option:focus-visible {
  background: #eff6ff;
  outline: none;
}

.range-pill-dropdown {
  cursor: pointer;
  position: relative;
}

.range-pill-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid #dbe5f6;
  background: #ffffff;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
  z-index: 50;
}

.range-pill-menu.is-open {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.range-pill-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.range-pill-custom {
  margin-top: 4px;
  padding: 8px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.range-pill-custom-title {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.range-pill-custom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.range-pill-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #475569;
  font-size: 0.7rem;
  font-weight: 700;
}

.range-pill-input {
  width: 100%;
  border: 1px solid #dbe5f6;
  border-radius: 8px;
  padding: 6px 8px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 0.74rem;
}

.range-pill-input:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
}

.range-pill-actions {
  display: flex;
  justify-content: flex-end;
}

.range-pill-apply {
  border: 1px solid #2563eb;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  padding: 7px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.range-pill-apply:hover,
.range-pill-apply:focus-visible {
  background: #1d4ed8;
  outline: none;
}

.range-pill-option {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1e293b;
  text-align: left;
  padding: 8px 10px;
  font: inherit;
  cursor: pointer;
}

.range-pill-option:hover,
.range-pill-option:focus-visible {
  background: #eff6ff;
  outline: none;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Shared light component system */
.lp-table-card {
  background: var(--table-card-bg);
  border: 1px solid var(--table-card-border);
  border-radius: 12px;
  box-shadow: var(--table-card-shadow);
  overflow: hidden;
}

.lp-table-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 11px;
  border-bottom: 1px solid var(--table-head-border);
  background: var(--table-head-bg);
}

.lp-table-head h3 {
  margin: 0;
  font-size: 0.84rem;
  color: var(--table-heading-text);
}

.lp-table-head .meta-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.lp-table-head .meta {
  color: var(--table-meta-text);
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.lp-table-head .meta-sub {
  color: var(--table-meta-text);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.lp-table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border-top: 1px solid var(--table-head-border);
  background: var(--table-head-bg);
  flex-wrap: wrap;
}

.lp-table-footer .left,
.lp-table-footer .right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--table-th-text);
  font-size: 0.73rem;
  font-weight: 700;
}

.lp-table-footer .left {
  gap: 12px;
  flex-wrap: wrap;
}

.lp-table-footer select {
  border: 1px solid var(--table-th-border);
  border-radius: 8px;
  padding: 5px 8px;
  background: #f7fcfa;
  color: var(--table-heading-text);
  font-weight: 700;
  font-size: 0.73rem;
}

.lp-range {
  color: var(--table-meta-text);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

body.vdp-light .detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #dbe5f6;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

body.vdp-light .tab-chip {
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
}

body.vdp-light .tab-chip.active {
  color: #2563eb;
  border-color: #2563eb;
}

body.vdp-light .hero-identifiers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.vdp-light .pill-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fbff;
  font-size: 0.72rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

body.vdp-light .pill-label strong {
  color: #2563eb;
  text-transform: none;
  letter-spacing: 0;
}

body.vdp-light .spec-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 16px;
}

body.vdp-light .spec-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

body.vdp-light .spec-label {
  font-size: 0.68rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
}

body.vdp-light .spec-item strong {
  font-size: 0.88rem;
  color: #0f172a;
  line-height: 1.2;
  font-weight: 700;
}

body.vdp-light .hero-metrics-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

body.vdp-light .metric-panel {
  min-height: 92px;
  padding: 12px 14px;
  border-right: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

body.vdp-light .metric-panel:nth-child(2n) {
  border-right: 0;
}

body.vdp-light .metric-panel:nth-last-child(-n+2) {
  border-bottom: 0;
}

body.vdp-light .metric-heading {
  font-size: 0.62rem;
  color: #94a3b8;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

body.vdp-light .metric-panel strong {
  font-size: 1.18rem;
  line-height: 1.1;
  color: #0f172a;
  font-weight: 800;
}

body.vdp-light .metric-sub {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
}

/* Shared simple page/card form styles for login/profile */
.lp-simple-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.lp-simple-card {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border: 1px solid #dbe5f6;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  padding: 24px;
  color: #0f172a;
}

.lp-simple-card.lp-simple-card--wide {
  max-width: 680px;
}

.lp-simple-title {
  margin: 0 0 6px;
  color: #0f172a;
  font-size: 1.45rem;
}

.lp-simple-subtitle {
  margin: 0 0 14px;
  color: #64748b;
  font-size: 0.92rem;
}

.lp-form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.lp-form-row label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  font-weight: 700;
}

.lp-text-input,
.lp-select-input {
  width: 100%;
  background: #fff;
  border: 1px solid #dbe5f6;
  color: #0f172a;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
}

.lp-text-input:focus,
.lp-select-input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.lp-button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lp-button-row .btn,
.lp-form-actions .btn {
  min-height: 38px;
}

.lp-inline-panel {
  margin-top: 14px;
  padding: 12px;
  background: #f8fbff;
  border: 1px solid #dbe5f6;
  border-radius: 10px;
}

.lp-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.lp-message {
  margin-top: 12px;
  min-height: 18px;
  color: #64748b;
  font-size: 0.84rem;
}

@media (max-width: 960px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .lp-sidebar {
    display: none;
  }

  .lp-main,
  .auth-main,
  .router-main,
  .vdp-main {
    padding: 12px;
  }

  .lp-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-right {
    justify-content: space-between;
  }
}

.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.92), rgba(8, 17, 41, 0.96));
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: inherit;
  font-weight: 700;
  color: var(--text-strong);
  margin: 0 0 var(--space-6);
  letter-spacing: 0.2px;
  line-height: var(--line-height-tight);
}

h1 {
  font-size: var(--font-size-2xl);
  letter-spacing: 0.4px;
}

h2 {
  font-size: 1.6rem;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.1rem;
}

p {
  margin-block: 0 var(--space-6);
  color: var(--muted);
}

small,
.muted {
  color: var(--muted);
  font-size: var(--font-size-sm);
}

/* legacy .nav container support if a page wraps nav in a .nav element */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, rgba(9, 21, 39, 0.95), rgba(9, 14, 32, 0.92));
  padding: 14px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

button {
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(13, 25, 44, 0.9);
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s ease, border 0.2s ease, transform 0.2s ease;
}

button.primary {
  background: linear-gradient(120deg, rgba(76, 141, 255, 0.28), rgba(76, 141, 255, 0.16));
  border-color: rgba(76, 141, 255, 0.32);
  color: var(--text-strong);
}

button.ghost {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.24);
  color: var(--muted-strong);
}

button:hover {
  transform: translateY(-1px);
  border-color: rgba(76, 141, 255, 0.4);
  background: rgba(18, 36, 62, 0.92);
}

button:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(76, 141, 255, 0.35);
}

.nav-logo {
  height: 32px;
  width: auto;
}

nav h1 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.6px
}

nav ul {
  list-style: none;
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
  align-items: center
}

nav ul li {
  margin: 0
}

nav ul li a {
  color: var(--muted-strong);
  text-decoration: none;
  font-weight: 600;
  opacity: 0.95;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, color 0.2s ease;
}

nav ul li a.active,
nav ul li a:hover {
  color: var(--text-strong);
  background: rgba(76, 141, 255, 0.12);
  opacity: 1
}

/* small badge in nav (Action Items count) */
.nav-badge,
#actionItemsBadge {
  display: inline-block;
  min-width: 20px;
  padding: 2px 7px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

/* right-side nav controls area (date selectors / refresh) */
.nav-controls {
  display: flex;
  gap: 10px;
  align-items: center
}

.nav-controls .date-select select {
  background: rgba(15, 27, 45, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--muted-strong);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: border 0.2s ease;
}

.nav-controls button {
  background: rgba(15, 27, 45, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--muted-strong);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border 0.2s ease, color 0.2s ease;
}

.nav-controls button:hover,
.nav-controls .date-select select:focus {
  border-color: rgba(76, 141, 255, 0.5);
  color: var(--text-strong);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  background: linear-gradient(90deg, #071029, #091125);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.brand {
  font-weight: 700;
  color: var(--accent);
  font-size: 1.2rem
}

.controls {
  display: flex;
  gap: 10px;
  align-items: center
}

.date-select select {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  padding: 6px 8px;
  border-radius: 8px
}

.controls button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer
}


.container {
  max-width: 1240px;
  margin: var(--space-14) auto var(--space-14);
  padding: 0 var(--space-10);
}

/* VDP header and panel refinements */
.vdp-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px
}

.vdp-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(90deg, #163a5a, #0f2a3c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px
}

.vdp-title {
  flex: 1
}

.vdp-actions {
  display: flex;
  gap: 8px
}

/* stronger visual separation for VDP panels */
.panel {
  background: var(--surface-glass);
  border-radius: var(--radius-md);
  padding: var(--space-10);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  transition: transform 0.25s ease, box-shadow 0.3s ease, border 0.2s ease;
}

.panel:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(148, 163, 184, 0.24);
}

.snapshot {
  padding: 14px
}

.work-section {
  padding: 14px
}

.cost-summary {
  padding: 14px
}

.panel .label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px
}

.cost-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0
}

/* Goals card specific tweaks */
#goalsCard input.search-bar {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 8px;
  border-radius: 8px;
  color: inherit
}

#goalsCard .muted {
  margin-bottom: 8px
}

/* Goals input validation */
.input-error {
  border-color: var(--danger) !important;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.06);
}

.error-text {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 6px
}

/* small target badge inside KPI pills */
.kpi-pill .target-badge {
  display: inline-block;
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.8rem
}

/* subtle divider between columns on wide screens */
@media(min-width:900px) {
  .grid>aside.panel:first-child {
    border-right: 1px solid rgba(255, 255, 255, 0.02);
    padding-right: 18px
  }

  .grid>aside.panel.cost-summary {
    border-left: 1px solid rgba(255, 255, 255, 0.02);
    padding-left: 18px
  }
}

/* VDP (Vehicle Detail Page) grid: left snapshot, center details, right summary */
.grid {
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  gap: 18px;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto
}

.snapshot .thumb {
  width: 100%;
  height: 200px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  margin-bottom: 10px
}

.small-photos img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 6px
}

/* Pulse bar */
.pulse-bar {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 20px
}

.kpi-pill {
  background: radial-gradient(circle at top, rgba(76, 141, 255, 0.18), rgba(14, 22, 38, 0.92));
  padding: var(--space-8) var(--space-10);
  border-radius: var(--radius-md);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 120px;
  border: 1px solid rgba(76, 141, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 28px rgba(6, 18, 38, 0.55);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.3s ease, border 0.2s ease;
}

.kpi-pill::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.kpi-pill:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(4, 14, 32, 0.6);
  border-color: rgba(76, 141, 255, 0.3);
}

.kpi-pill:hover::after {
  opacity: 1;
}

.kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-strong);
}

.kpi-label {
  font-size: var(--font-size-sm);
  color: var(--muted);
  margin-top: var(--space-4);
}

/* KPI status coloring */
.kpi-pill.good {
  border-color: rgba(52, 211, 153, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 14px 30px rgba(34, 197, 94, 0.32);
}

.kpi-pill.warn {
  border-color: rgba(251, 191, 36, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 30px rgba(251, 191, 36, 0.28);
}

.kpi-pill.bad {
  border-color: rgba(248, 113, 113, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 30px rgba(248, 113, 113, 0.32);
}

/* Traction-color KPI highlighting */
.kpi-pill.status-ahead {
  border-color: rgba(52, 211, 153, 0.35);
}

.kpi-pill.status-ontrack {
  border-color: rgba(14, 165, 233, 0.35);
}

.kpi-pill.status-behind {
  border-color: rgba(248, 113, 113, 0.4);
}

.kpi-card.status-ahead {
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.2), inset 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.kpi-card.status-ontrack {
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.2), inset 0 0 0 2px rgba(14, 165, 233, 0.25);
}

.kpi-card.status-behind {
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.25), inset 0 0 0 2px rgba(239, 68, 68, 0.3);
}

/* Tabs */
.tabbar {
  display: flex;
  gap: 8px;
  margin: 8px 0 16px;
}

.tab-btn {
  background: rgba(12, 25, 44, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--muted-strong);
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: border .2s ease, color .2s ease, background .2s ease, transform .12s ease;
}

.tab-btn:hover {
  border-color: rgba(76, 141, 255, 0.5);
  color: var(--text-strong);
  background: rgba(30, 64, 175, 0.22);
  transform: translateY(-1px);
}

.tab-btn.active {
  border-color: rgba(76, 141, 255, 0.6);
  color: #e6eef8;
  background: rgba(30, 64, 175, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Status chip - neon-style semi-transparent badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: capitalize;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.15),
    0 1px 4px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.status-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

/* Neon-style status colors with semi-transparent backgrounds */
.status-badge[data-status*="available"] {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(5, 150, 105, 0.05));
  border-color: rgba(16, 185, 129, 0.25);
  box-shadow:
    0 2px 8px rgba(16, 185, 129, 0.15),
    0 1px 4px rgba(16, 185, 129, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.status-badge[data-status*="transit"] {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(29, 78, 216, 0.05));
  border-color: rgba(59, 130, 246, 0.25);
  box-shadow:
    0 2px 8px rgba(59, 130, 246, 0.15),
    0 1px 4px rgba(59, 130, 246, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.status-badge[data-status*="inspection"] {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(217, 119, 6, 0.05));
  border-color: rgba(245, 158, 11, 0.25);
  box-shadow:
    0 2px 8px rgba(245, 158, 11, 0.15),
    0 1px 4px rgba(245, 158, 11, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.status-badge[data-status*="approval"] {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(220, 38, 38, 0.05));
  border-color: rgba(239, 68, 68, 0.25);
  box-shadow:
    0 2px 8px rgba(239, 68, 68, 0.15),
    0 1px 4px rgba(239, 68, 68, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.status-badge[data-status*="waiting"] {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(124, 58, 237, 0.05));
  border-color: rgba(139, 92, 246, 0.25);
  box-shadow:
    0 2px 8px rgba(139, 92, 246, 0.15),
    0 1px 4px rgba(139, 92, 246, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.status-badge[data-status*="repair"] {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.08), rgba(234, 88, 12, 0.05));
  border-color: rgba(249, 115, 22, 0.25);
  box-shadow:
    0 2px 8px rgba(249, 115, 22, 0.15),
    0 1px 4px rgba(249, 115, 22, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.status-badge[data-status*="sublet"] {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08), rgba(8, 145, 178, 0.05));
  border-color: rgba(6, 182, 212, 0.25);
  box-shadow:
    0 2px 8px rgba(6, 182, 212, 0.15),
    0 1px 4px rgba(6, 182, 212, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.status-badge[data-status*="detail"] {
  background: linear-gradient(135deg, rgba(132, 204, 22, 0.08), rgba(101, 163, 13, 0.05));
  border-color: rgba(132, 204, 22, 0.25);
  box-shadow:
    0 2px 8px rgba(132, 204, 22, 0.15),
    0 1px 4px rgba(132, 204, 22, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.status-badge[data-status*="photos"] {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(79, 70, 229, 0.05));
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow:
    0 2px 8px rgba(99, 102, 241, 0.15),
    0 1px 4px rgba(99, 102, 241, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.status-badge[data-status*="sold"] {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.08), rgba(4, 120, 87, 0.05));
  border-color: rgba(5, 150, 105, 0.25);
  box-shadow:
    0 2px 8px rgba(5, 150, 105, 0.15),
    0 1px 4px rgba(5, 150, 105, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.status-badge[data-status*="hold"] {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(220, 38, 38, 0.05));
  border-color: rgba(239, 68, 68, 0.25);
  box-shadow:
    0 2px 8px rgba(239, 68, 68, 0.15),
    0 1px 4px rgba(239, 68, 68, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.status-badge[data-status*="pending"] {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(217, 119, 6, 0.05));
  border-color: rgba(245, 158, 11, 0.25);
  box-shadow:
    0 2px 8px rgba(245, 158, 11, 0.15),
    0 1px 4px rgba(245, 158, 11, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.status-badge[data-status*="wholesale"] {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(124, 58, 237, 0.05));
  border-color: rgba(139, 92, 246, 0.25);
  box-shadow:
    0 2px 8px rgba(139, 92, 246, 0.15),
    0 1px 4px rgba(139, 92, 246, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Status-specific icons */
.status-badge[data-status*="available"]::before,
.status-badge[data-status*="sold"]::before {
  content: '✓';
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: 10px;
  font-weight: bold;
}

.status-badge[data-status*="transit"]::before {
  content: '🚛';
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: 10px;
}

.status-badge[data-status*="inspection"]::before,
.status-badge[data-status*="approval"]::before {
  content: '🔍';
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: 10px;
}

.status-badge[data-status*="waiting"]::before,
.status-badge[data-status*="repair"]::before {
  content: '⏳';
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: 10px;
}

.status-badge[data-status*="sublet"]::before {
  content: '🔧';
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: 10px;
}

.status-badge[data-status*="detail"]::before {
  content: '✨';
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: 10px;
}

.status-badge[data-status*="photos"]::before {
  content: '📷';
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: 10px;
}

.status-badge[data-status*="hold"]::before,
.status-badge[data-status*="pending"]::before {
  content: '⏸️';
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: 10px;
}

.status-badge[data-status*="wholesale"]::before {
  content: '🏪';
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: 10px;
}

.status-badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.6s ease;
}

.status-badge:hover {
  transform: translateY(-1px) scale(1.01);
  filter: brightness(1.05) saturate(1.1);
}

.status-badge:hover::after {
  left: 100%;
}

.status-badge:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.8);
  outline-offset: 2px;
}

.status-badge.small {
  padding: 4px 8px;
  font-size: 10px;
  border-radius: 12px;
}

.status-badge.small::before {
  width: 5px;
  height: 5px;
}

/* Traction pill - ahead/ontrack/behind */
.traction-pill {
  --pill-color: #0ea5e9;
  /* default ontrack */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 9999px;
  border: 1px solid color-mix(in oklab, var(--pill-color), white 20%);
  background: linear-gradient(180deg,
      color-mix(in oklab, var(--pill-color), white 10%),
      color-mix(in oklab, var(--pill-color), black 10%));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: 0 4px 14px color-mix(in oklab, var(--pill-color), black 75%);
  cursor: pointer;
  user-select: none;
  transition: transform 120ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.traction-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--pill-color), transparent 65%);
}

.traction-pill:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.traction-pill:active {
  transform: translateY(0);
  filter: brightness(.98);
}

.traction-pill:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--pill-color), white 25%);
  outline-offset: 2px;
}

.traction-pill .label {
  position: relative;
  top: .25px;
}

.traction-pill.ahead {
  --pill-color: #10b981;
}

.traction-pill.ontrack {
  --pill-color: #0ea5e9;
}

.traction-pill.behind {
  --pill-color: #ef4444;
}

/* attention/action cards */
.attention-card {
  background: #081124;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: space-between;
  align-items: center
}

.attention-card .desc {
  color: var(--muted);
  font-size: 0.95rem
}

.attention-card .cta {
  display: flex;
  gap: 8px
}

.attention-card .cta button {
  padding: 6px 8px
}

/* Panels */
.panels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.panel-header h3 {
  font-size: 1.15rem;
  letter-spacing: 0.4px;
}

.panel-label {
  font-size: var(--font-size-xs);
  color: var(--muted);
  margin-right: var(--space-3);
  font-weight: 600;
}

.panel-actions button {
  background: rgba(12, 25, 44, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--muted-strong);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  margin-left: var(--space-4);
  cursor: pointer;
  transition: border 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.panel-actions button:hover {
  border-color: rgba(76, 141, 255, 0.5);
  color: var(--text-strong);
  background: rgba(30, 64, 175, 0.22);
}

.panel-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.department-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--space-8);
  align-items: stretch;
}

.department-card {
  background: rgba(14, 26, 45, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius-md);
  padding: var(--space-8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.department-card .kpi-grid {
  margin: 0;
}

.department-chart {
  justify-content: center;
}

.department-chart canvas {
  width: 100%;
  height: auto;
}

.inventory-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  max-height: 240px;
  overflow: auto;
  padding-right: var(--space-3);
}

.inventory-summary {
  display: flex;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.inv-stat {
  background: rgba(14, 26, 45, 0.7);
  padding: var(--space-8) var(--space-10);
  border-radius: var(--radius-md);
  flex: 1;
  text-align: center;
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.inv-number {
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--text-strong);
}

.inv-label {
  font-size: var(--font-size-sm);
  color: var(--muted);
  margin-top: var(--space-3);
}

.inventory-row {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-7) var(--space-8);
  border-radius: var(--radius-sm);
  background: rgba(14, 26, 45, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: border 0.2s ease, background 0.2s ease;
}

.inventory-row:hover {
  border-color: rgba(76, 141, 255, 0.28);
  background: rgba(18, 34, 58, 0.75);
}

.inv-thumb {
  width: 64px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover
}

.inv-meta {
  flex: 1;
  display: flex;
  flex-direction: column
}

.inv-title {
  font-weight: 600;
  color: var(--text-strong);
}

.inv-sub {
  font-size: var(--font-size-sm);
  color: var(--muted);
}

.badge,
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  text-transform: uppercase;
}

.badge.ready,
.status-chip.good {
  background: var(--accent-2-soft);
  border-color: rgba(34, 211, 166, 0.32);
  color: var(--text-strong);
}

.badge.recon,
.status-chip.warn {
  background: var(--warn-soft);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fde68a;
}

.badge.sold,
.status-chip.danger {
  background: var(--danger-soft);
  border-color: rgba(248, 113, 113, 0.5);
  color: #fecaca;
}

.status-chip.info {
  background: rgba(76, 141, 255, 0.18);
  border-color: rgba(76, 141, 255, 0.32);
  color: #bfd7ff;
}

/* recon */
.recon-body {
  display: flex;
  gap: var(--space-10);
  align-items: center;
  flex-wrap: wrap;
}

.recon-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 160px
}

.recon-stats div {
  font-size: var(--font-size-sm);
  color: var(--muted-strong);
}

.recon-funnel {
  flex: 1
}

.sales-chart {
  margin-top: 8px
}

/* action center */
.action-center {
  background: transparent;
  margin-bottom: 20px
}

.sales-stats {
  display: flex;
  gap: var(--space-8);
  flex-wrap: wrap;
}

.sales-stats div {
  background: rgba(255, 255, 255, 0.02);
  padding: 10px;
  border-radius: 8px;
  flex: 1;
  text-align: center;
}

.action-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px
}

.actions-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px
}

.action-card {
  background: #081124;
  border-radius: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 8px
}

.action-card h4 {
  margin: 0;
  font-size: 0.99rem
}

.action-meta {
  color: var(--muted);
  font-size: 0.85rem
}

.action-question {
  margin-top: var(--space-3);
  color: var(--text-strong);
}

#actionsList {
  margin-top: var(--space-4);
}

.action-cta {
  margin-top: 8px;
  display: flex;
  gap: 8px
}

.action-cta button {
  padding: 8px 10px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: white;
  cursor: pointer
}

.action-cta button.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted)
}

/* rocks */
.rocks {
  background: transparent;
  padding-bottom: 28px
}

.rocks-list {
  display: flex;
  flex-direction: column;
  gap: 10px
}

.rock-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #081124;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.03)
}

.rock-info {
  flex: 1
}

.rock-title {
  font-weight: 600
}

.progress-wrap {
  width: 200px;
  height: 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  overflow: hidden
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  width: 0%
}

/* footer */
.footer {
  text-align: center;
  color: var(--muted);
  padding: 22px 0;
  font-size: 0.9rem
}

/* responsive */
@media (max-width:1000px) {
  .panels {
    grid-template-columns: 1fr;
    align-items: stretch
  }

  .recon-body {
    flex-direction: column
  }

  .department-layout {
    grid-template-columns: 1fr;
  }
}

/* Compatibility styles: restore components used across other pages */
.dashboard-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.006));
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 18px;
  border-radius: 12px;
  margin-bottom: 18px;
}

.dashboard-offset {
  margin-top: var(--space-7);
}

/* Goal Navigator hero */
.dashboard-hero {
  display: grid;
  grid-template-columns: 1fr 420px 320px;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px
}

.hero-composer {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), transparent);
  padding: 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.03)
}

.hero-composer .hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 8px
}

.hero-kpis {
  display: flex;
  gap: 10px;
  align-items: center
}

.hero-kpi {
  background: rgba(255, 255, 255, 0.02);
  padding: 10px 12px;
  border-radius: 10px;
  text-align: center;
  min-width: 110px
}

.hero-kpi .value {
  font-weight: 700;
  font-size: 1.2rem
}

.hero-pipeline {
  background: rgba(255, 255, 255, 0.02);
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.02)
}

.attention-list {
  display: flex;
  flex-direction: column;
  gap: 8px
}

.attention-item {
  background: rgba(0, 0, 0, 0.18);
  padding: 10px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center
}

/* Compact mode for Goal Navigator: reduce visual noise */
.compact-mode .dashboard-hero {
  display: none !important
}

.compact-mode #right-panel,
.compact-mode #left-panel {
  padding: 6px
}

.compact-mode #mainGrid {
  grid-template-columns: 1fr 360px;
  gap: 12px
}

.compact-mode .kpi-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 8px
}

h2 {
  margin-bottom: 12px;
  color: var(--accent);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.kpi-grid.is-centered {
  align-items: center;
}

.recon-financial-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.recon-financial-kpis > div {
  min-width: 0;
  padding: 10px 8px;
  border: 1px solid #dbe5f6;
  border-radius: 7px;
  background: #f8fbff;
}

.recon-financial-kpis span {
  display: block;
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-transform: uppercase;
}

.recon-financial-kpis strong {
  display: block;
  overflow: hidden;
  color: #0f172a;
  font-size: 0.94rem;
  margin-top: 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .recon-financial-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .recon-financial-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.kpi-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), transparent);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  box-shadow:
    0 6px 18px rgba(2, 6, 23, 0.45),
    0 2px 8px rgba(0, 100, 150, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: perspective(1000px) rotateX(2deg) translateZ(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transition: left 0.6s ease;
  z-index: 1;
}

.kpi-card:hover {
  transform: perspective(1000px) rotateX(-1deg) translateY(-2px) translateZ(10px);
  box-shadow:
    0 12px 32px rgba(2, 6, 23, 0.6),
    0 4px 16px rgba(0, 100, 150, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.kpi-card:hover::before {
  left: 100%;
}

.kpi-card h3 {
  margin: 0;
  font-size: 1.4rem
}

.kpi-card p {
  color: var(--muted);
  margin-top: 6px
}

.scorecard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.scorecard-item {
  background: rgba(255, 255, 255, 0.01);
  padding: 12px;
  border-radius: 10px;
}

.score-label {
  color: var(--muted);
  font-size: 0.85rem
}

.score-value {
  font-weight: 700;
  font-size: 1.15rem
}

.funnel-card {
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.5);
}

.funnel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--muted-strong)
}

/* Compact funnel in Recon page */
.funnel-step {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer
}

.funnel-step:hover {
  background: rgba(255, 255, 255, 0.03)
}

.funnel-step .label {
  color: var(--muted);
  font-size: 0.9rem
}

.funnel-step .count {
  font-weight: 700
}

/* ensure recon canvas has adequate height for labels (scoped to recon page) */
.recon-flex #reconChart {
  display: block
}

/* honor [hidden] even if display was set elsewhere */
#reconChart[hidden],
canvas[hidden],
.funnel-card[hidden] {
  display: none !important
}

/* resize recon funnel: reduce size and avoid wrapping */
.recon-flex {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap
}

.recon-flex .funnel-card {
  flex: 0 1 720px;
  max-width: 720px;
  align-self: center;
  position: static;
  height: 300px;
  overflow: hidden
}

.recon-flex>.panel {
  flex: 1 1 680px;
  max-width: 90%;
}

canvas {
  max-width: 100%
}

/* Fix: ensure trajectory chart on Goal Navigator reserves vertical space and doesn't overlap KPIs */
#center-panel {
  position: relative;
}

#center-panel>div:first-child {
  /* the inline wrapper around the canvas */
  min-height: 220px;
  /* reserve space for the chart */
  margin-bottom: 14px;
  /* gap between chart and KPI grid */
}

#trajectoryChart {
  display: block;
  width: 100% !important;
  height: 200px !important;
  max-height: 320px;
}

#center-panel .kpi-grid {
  margin-top: 6px;
}

/* Inputs and dropdowns readability in dark theme */
input.search-bar,
select.search-bar {
  background: rgba(255, 255, 255, 0.06);
  color: #eaf2fb;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 10px;
  border-radius: 8px;
}

input.search.bar::placeholder {
  color: #a8bad1;
}

select.search-bar:focus,
input.search-bar:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
}

/* Improve options contrast in dropdown menus */
select.search-bar option {
  background-color: #0b1220;
  color: #e6eef8;
}

/* Compact style specifically for dashboard period dropdowns */
select.period-select {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  min-width: 110px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

/* Slightly different hover/focus to distinguish from regular inputs */
select.period-select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

/* Tables and lists */
.table-wrap {
  margin-top: 18px;
  padding: 18px 20px 22px;
  background: rgba(11, 22, 38, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.vehicle-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 8px 24px rgba(2, 6, 23, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.02);
  transform: perspective(1000px) rotateX(1deg) translateZ(0);
  transition: all 0.3s ease;
}

.vehicle-table:hover {
  transform: perspective(1000px) rotateX(-0.5deg) translateZ(3px);
  box-shadow:
    0 12px 32px rgba(2, 6, 23, 0.6),
    0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.assignment-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.assignment-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
  font-size: 11px;
}

/* Auth page */
.auth-page {
  width: 100%;
  max-width: 420px;
  padding: 24px;
}

.auth-card {
  background: var(--surface-glass);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.auth-brand {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-logo {
  width: 68px;
  height: auto;
  margin: 0 auto;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-form h2 {
  margin-bottom: 6px;
  text-align: left;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
}

.auth-form input,
.auth-form select {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 0.95rem;
}

.auth-form input:focus,
.auth-form select:focus {
  outline: none;
  border-color: rgba(76, 141, 255, 0.6);
  box-shadow: 0 0 0 2px rgba(76, 141, 255, 0.2);
}

.auth-message {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.9rem;
}

.auth-message.info {
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.32);
}

.auth-message.success {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.32);
}

.auth-message.error {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.35);
}

.auth-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.9rem;
}

.auth-card .btn.primary {
  margin-top: 4px;
}

@media (max-width: 600px) {
  .auth-card {
    padding: 24px;
  }
}

.vehicle-table th,
.vehicle-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: all 0.2s ease;
}

.vehicle-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
  transform: translateX(2px);
}

.vehicle-table thead th {
  background: rgba(255, 255, 255, 0.02);
  color: #93c5fd;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Sortable column headers */
.vehicle-table thead th.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: all 0.2s ease;
}

.vehicle-table thead th.sortable:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
}

.vehicle-table thead th.sortable.sorted-asc,
.vehicle-table thead th.sortable.sorted-desc {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.sort-icon {
  font-size: 12px;
  margin-left: 4px;
  opacity: 0.6;
  transition: all 0.2s ease;
}

.vehicle-table thead th.sortable:hover .sort-icon {
  opacity: 1;
}

.vehicle-table thead th.sortable.sorted-asc .sort-icon {
  opacity: 1;
  color: #3b82f6;
}

.vehicle-table thead th.sortable.sorted-desc .sort-icon {
  opacity: 1;
  color: #3b82f6;
}

#reconTableWrap {
  display: block;
  margin-top: 14px;
}

.recon-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 14px;
  margin-top: 14px;
  padding-bottom: 8px;
  overflow-x: auto;
  align-items: start;
}

.recon-board-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 260px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(8, 16, 30, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: var(--shadow-soft);
}

.recon-board-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.recon-board-column-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.recon-board-column-title strong {
  color: var(--text-strong);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.recon-board-column-title span {
  color: var(--muted);
  font-size: 0.78rem;
}

.recon-board-column-count {
  min-width: 32px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(76, 141, 255, 0.14);
  border: 1px solid rgba(76, 141, 255, 0.22);
  color: var(--text-strong);
  font-weight: 700;
  font-size: 0.8rem;
  text-align: center;
}

.recon-board-column-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 160px;
}

.recon-board-empty {
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.recon-vehicle-card {
  --stage-accent: var(--accent);
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #d8e0ea;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}

.recon-vehicle-card.is-stale {
  border-color: #fca5a5;
  box-shadow: 0 8px 22px rgba(220, 38, 38, 0.12);
}

.recon-card-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 8px;
}

.recon-card-stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 7px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--stage-accent) 24%, #fff);
  color: #172033;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.recon-card-stage-pill > span {
  color: var(--stage-accent);
  font-size: 0.92rem;
}

.recon-card-status-age {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.recon-card-vehicle {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px 14px 12px;
}

.recon-card-photo {
  width: 112px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: #e2e8f0;
}

.recon-card-identity {
  min-width: 0;
}

.recon-card-identity > strong {
  display: block;
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.2;
}

.recon-card-identity > span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 0.78rem;
}

.recon-card-identifiers {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
  color: #475569;
  font-size: 0.66rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.recon-card-status-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
  align-items: center;
  min-width: 0;
  margin: 0 14px 14px;
  padding: 9px 11px;
  border: 1px solid color-mix(in srgb, var(--stage-accent) 75%, #cbd5e1);
  border-radius: 10px;
  background: #fff;
}

.recon-card-status-caption {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.recon-card-status-icon {
  color: var(--stage-accent);
  font-size: 1rem;
}

.recon-card-status-select {
  width: 100%;
  min-height: 28px;
  padding: 3px 24px 3px 0;
  border: 0;
  border-radius: 0;
  background-color: #fff;
  color: #172033;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.recon-card-status-select:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--stage-accent) 65%, #fff);
  outline-offset: 2px;
}

.recon-card-status-select.is-saving {
  cursor: wait;
  opacity: 0.65;
}

.recon-card-status-select.has-error {
  color: #dc2626;
}

.recon-card-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 14px;
  padding: 13px 14px;
  border-top: 1px solid #e2e8f0;
}

.recon-card-facts > div {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  column-gap: 7px;
  align-items: center;
  min-width: 0;
}

.recon-card-facts > div > span {
  grid-row: 1 / 3;
  color: #64748b;
  font-size: 0.9rem;
}

.recon-card-facts small {
  color: #64748b;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.recon-card-facts strong {
  overflow: hidden;
  color: #334155;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recon-card-notes {
  min-height: 74px;
  padding: 12px 14px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.recon-card-notes-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #64748b;
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
}

.recon-card-notes p {
  display: -webkit-box;
  margin: 7px 0 0;
  overflow: hidden;
  color: #334155;
  font-size: 0.74rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.recon-vehicle-card .traction-pill {
  width: 30px;
  height: 30px;
  padding: 0;
  justify-content: center;
}

.recon-vehicle-card .traction-pill .dot {
  width: 8px;
  height: 8px;
}

.recon-vehicle-card .traction-pill .label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.recon-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recon-card-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 600;
}

.recon-card-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  text-decoration: none;
}

.recon-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recon-card-title {
  color: var(--text-strong);
  font-weight: 700;
  line-height: 1.25;
}

.recon-card-subtitle {
  color: var(--muted);
  font-size: 0.88rem;
}

.recon-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.recon-card-view-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #2563eb;
  font-size: 0.7rem;
  font-weight: 800;
  text-decoration: none;
}

.recon-card-view-link:hover {
  color: #1d4ed8;
}

.recon-card-metric {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(76, 141, 255, 0.12);
  border: 1px solid rgba(76, 141, 255, 0.18);
  color: var(--text-strong);
  font-size: 0.82rem;
  font-weight: 700;
}

.recon-card-metric.is-stale {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.2);
}

body.recon-view-board #reconTableWrap {
  display: none;
}

body.recon-view-board #reconCards {
  display: grid;
}

body.recon-view-table #reconCards {
  display: none;
}

body.recon-view-table #reconTableWrap {
  display: block;
}

/* Toolbar and search/filter styles */
.toolbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 0;
}

.user-context-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 260px;
  background: var(--surface-glass);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.user-context-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-chip-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(76, 141, 255, 0.16);
  border: 1px solid rgba(76, 141, 255, 0.32);
  color: var(--text-strong);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.user-chip-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-chip-role {
  font-size: var(--font-size-xs);
  color: var(--muted);
}

.btn-compact {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 6px;
}

.filter-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(17, 31, 51, 0.8);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(24, 42, 68, 0.92);
  color: var(--text-strong);
}

.filter-pill.active {
  border-color: rgba(76, 141, 255, 0.6);
  background: linear-gradient(120deg, rgba(76, 141, 255, 0.32), rgba(59, 130, 246, 0.24));
  color: var(--text-strong);
  box-shadow: 0 0 0 1px rgba(76, 141, 255, 0.35);
}

.filter-pill:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.user-context-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pill-select {
  min-width: 160px;
  padding: 4px 26px 4px 10px;
  font-size: var(--font-size-xs);
}

.small-text {
  font-size: var(--font-size-xs);
}

.user-filter-helper {
  display: none;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px dashed rgba(148, 163, 184, 0.24);
  background: rgba(17, 31, 51, 0.6);
}

.search-filters {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-bar {
  width: 160px;
  padding: 6px 32px 6px 10px;
  /* Extra right padding for icon */
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #eaf2fb;
  font-size: 13px;
}

.search-icon {
  position: absolute;
  right: 8px;
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;
}

.search-bar::placeholder {
  color: var(--muted);
}

.search-bar:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.18);
}

.search-bar:focus+.search-icon {
  color: #60a5fa;
}

.filter-select {
  width: 80px;
  padding: 6px 24px 6px 6px;
  /* Extra right padding for arrow */
  border-radius: 6px;
  background: rgba(20, 25, 35, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 12px;
  appearance: none;
  /* Remove default arrow */
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 12px;
  cursor: pointer;
}

.filter-select:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.18);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
}

.reset-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 6px;
  background: rgba(20, 25, 35, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.reset-btn:hover {
  background: rgba(30, 35, 45, 0.9);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.reset-btn:active {
  transform: scale(0.95);
}

.filter-select:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.18);
}

.toolbar-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.view-toggle-group {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 3px;
  border-radius: 999px;
  background: rgba(8, 16, 30, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.view-toggle-group .view-toggle {
  border-radius: 999px;
  border: 0;
  background: transparent;
  padding: 7px 14px;
  color: var(--muted-strong);
}

.view-toggle-group .view-toggle:hover {
  transform: none;
  background: rgba(76, 141, 255, 0.12);
  color: var(--text-strong);
}

.view-toggle-group .view-toggle.active {
  background: linear-gradient(120deg, rgba(76, 141, 255, 0.28), rgba(76, 141, 255, 0.16));
  color: var(--text-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.toolbar-actions .btn {
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 6px;
}

/* Compact page header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px 0;
}

.page-header h2 {
  margin: 0;
  font-size: 1.4rem;
}

/* Responsive adjustments for toolbar */
@media (max-width: 768px) {
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 6px 0;
  }

  .search-filters {
    justify-content: space-between;
    gap: 4px;
  }

  .user-context-card {
    width: 100%;
  }

  .filter-pill-group {
    gap: 6px;
  }

  .user-context-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .search-bar {
    width: 120px;
  }

  .filter-select {
    width: 70px;
  }

  .reset-btn {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .toolbar-actions {
    justify-content: center;
    margin-top: 4px;
    gap: 4px;
  }
}

/* Fix: ensure inventory table content is visible by default
   Some environments showed rows invisible until hovered due to
   subtle background/contrast rules. Force readable text color
   and full opacity for table cells while preserving the hover
   highlight behavior. */
.vehicle-table th {
  color: var(--table-th-text) !important;
  opacity: 1 !important;
}

.vehicle-table td {
  color: var(--table-cell-text) !important;
  opacity: 1 !important;
}

.vehicle-table tbody tr {
  background: rgba(255, 255, 255, 0.01);
}

.search-bar {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.02);
  color: #fff
}

.search-bar::placeholder {
  color: var(--muted)
}

/* Generic buttons */
.btn {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  color: #e6eef8;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow:
    0 3px 8px rgba(2, 6, 23, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transition: left 0.5s ease;
}

.btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 6px 16px rgba(2, 6, 23, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  filter: brightness(1.05);
}

.btn:hover::before {
  left: 100%;
}

.btn:active {
  transform: translateY(0);
  box-shadow:
    0 2px 4px rgba(2, 6, 23, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.02),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.btn.primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border-color: rgba(59, 130, 246, 0.3);
  color: white;
}

.btn.primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow:
    0 6px 16px rgba(59, 130, 246, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn.secondary {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.btn.secondary:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  border-color: rgba(255, 255, 255, 0.25);
}

.btn:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.8);
  outline-offset: 2px;
}

/* Action buttons for Quick Actions card */
.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.005));
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  min-height: 80px;
  justify-content: center;
}

.action-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.5);
}

.action-btn.primary {
  background: linear-gradient(145deg, rgba(76, 141, 255, 0.15), rgba(76, 141, 255, 0.08));
  border-color: rgba(76, 141, 255, 0.25);
}

.action-btn.primary:hover {
  background: linear-gradient(145deg, rgba(76, 141, 255, 0.2), rgba(76, 141, 255, 0.12));
  border-color: rgba(76, 141, 255, 0.35);
}

.action-btn.secondary {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.005));
}

.action-btn.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.04);
  opacity: 0.7;
}

.action-btn.ghost:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.02);
}

.btn-icon {
  font-size: 24px;
  line-height: 1;
}

.btn-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.actions-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.actions-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-strong);
  margin: 0;
}

.actions-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  font-weight: 500;
}

/* Modal system */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 12, 24, 0.7);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: linear-gradient(180deg, #0f1720 0%, #071018 100%);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  width: 100%;
  max-width: 1400px;
  max-height: 95vh;
  overflow: hidden;
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Loading state for buttons */
.loading {
  opacity: 0.7;
  cursor: not-allowed;
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  margin: auto;
  border: 2px solid transparent;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}


/* Recon Analytics Modal Styles */
.analytics-modal-content {
  max-width: 1200px;
  width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
}

.analytics-modal-content .modal-body {
  padding: 24px;
}

.analytics-modal-content .analytics-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  justify-content: space-between;
}

.analytics-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.stage-analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.analytics-card {
  background: var(--card);
  border-radius: 10px;
  padding: 20px;
  box-shadow:
    0 6px 18px rgba(2, 6, 23, 0.45),
    0 2px 8px rgba(0, 100, 150, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.analytics-card h4 {
  margin: 0 0 16px 0;
  color: var(--text-primary);
  font-size: var(--font-size-lg);
  font-weight: 600;
}

.stage-timing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.stage-timing-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 20px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 4px 12px rgba(2, 6, 23, 0.15),
    0 1px 4px rgba(0, 100, 150, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 120px;
}

.stage-timing-card:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  box-shadow:
    0 8px 24px rgba(2, 6, 23, 0.2),
    0 2px 8px rgba(0, 100, 150, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.stage-timing-card.bottleneck {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.08) 0%, rgba(248, 113, 113, 0.04) 100%);
  border-color: rgba(248, 113, 113, 0.2);
  box-shadow:
    0 4px 12px rgba(248, 113, 113, 0.15),
    0 1px 4px rgba(248, 113, 113, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.stage-timing-card.bottleneck:hover {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.12) 0%, rgba(248, 113, 113, 0.06) 100%);
  border-color: rgba(248, 113, 113, 0.3);
  box-shadow:
    0 8px 24px rgba(248, 113, 113, 0.2),
    0 2px 8px rgba(248, 113, 113, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.stage-timing-card.bottleneck::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f87171 0%, #ef4444 50%, #dc2626 100%);
  border-radius: 10px 10px 0 0;
}

.stage-card-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.stage-card-name::before {
  content: '⏱️';
  font-size: 16px;
  opacity: 0.8;
}

.stage-timing-card.bottleneck .stage-card-name::before {
  content: '⚠️';
}

.stage-card-time {
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 4px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.stage-timing-card.bottleneck .stage-card-time {
  color: #f87171;
}

.stage-card-count {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.bottleneck-chart {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.performance-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.metric-card {
  background: var(--card);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  box-shadow:
    0 4px 12px rgba(2, 6, 23, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.metric-card h4 {
  margin: 0 0 4px 0;
  color: var(--text-primary);
  font-size: var(--font-size-lg);
  font-weight: 700;
}

.metric-card p {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  .analytics-modal-content .analytics-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .analytics-controls {
    justify-content: space-between;
  }

  .stage-analytics-grid {
    grid-template-columns: 1fr;
  }
}

/* Inventory Report Modal Styles */
.report-section {
  margin-bottom: 32px;
}

.report-section h4 {
  color: #00d4ff;
  font-size: 1.2rem;
  margin-bottom: 16px;
  font-weight: 600;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
}

.report-item {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.report-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  border-color: rgba(0, 212, 255, 0.3);
}

.report-value {
  font-size: 2rem;
  font-weight: 700;
  color: #00d4ff;
  margin-bottom: 8px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.report-label {
  font-size: 0.9rem;
  color: var(--muted-strong);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 90vh;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
}

.modal-header h3 {
  margin: 0;
  color: #00d4ff;
  font-size: 1.5rem;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #9aa6b2;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
  line-height: 1;
}

.modal-close:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  transform: scale(1.1);
}

.modal-close:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.modal-body {
  padding: 32px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 24px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.02) 100%);
}

/* Form styling for modal */
.form-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: #00d4ff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #e6f0f6;
  font-size: 14px;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #00d4ff;
  background: rgba(0, 212, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-group input[readonly] {
  background: rgba(255, 255, 255, 0.02);
  color: #9aa6b2;
  cursor: not-allowed;
}

/* Enhanced button styling for modal */
.modal-footer .btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-footer .btn.outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e6f0f6;
}

.modal-footer .btn.outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.modal-footer .btn.primary {
  background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
  border: none;
  color: #0f1720;
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.modal-footer .btn.primary:hover {
  background: linear-gradient(135deg, #33e0ff 0%, #00aad4 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

/* Form validation styling */
.form-group input:invalid,
.form-group select:invalid {
  border-color: #ef4444;
}

.form-group input:invalid:focus,
.form-group select:invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Loading state for save button */
#confirmEditBtn.loading {
  opacity: 0.7;
  cursor: not-allowed;
  position: relative;
}

#confirmEditBtn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  margin: auto;
  border: 2px solid transparent;
  border-top-color: #0f1720;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Dashboard priority deep-link notice */
.queue-filter-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-left: 4px solid #2563eb;
  border-radius: 9px;
  background: rgba(239, 246, 255, 0.92);
  color: #1e3a5f;
}
.queue-filter-notice span { display: flex; flex-direction: column; gap: 2px; }
.queue-filter-notice small { font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #2563eb; }
.queue-filter-notice strong { font-size: 13px; }
.queue-filter-notice a { color: #1d4ed8; font-size: 11px; font-weight: 750; text-decoration: none; white-space: nowrap; }
@media (max-width: 640px) {
  .queue-filter-notice { align-items: flex-start; flex-direction: column; }
}
