/*
  HVB Operations Center — Design System v2.1
  Light/Dark Dual-Theme
  Fonts: Outfit + JetBrains Mono
*/

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

/* =============================================
   LIGHT THEME TOKENS (default)
============================================= */
:root {
  /* Surfaces */
  --hvb-bg:           #eef0f6;
  --hvb-surface:      #ffffff;
  --hvb-surface-2:    #f6f7fb;
  --hvb-surface-3:    #edf0f7;
  --hvb-surface-hover:#eef1fa;
  --hvb-sidebar-bg:   #ffffff;

  /* Borders */
  --hvb-border:       rgba(15,23,42,0.08);
  --hvb-border-md:    rgba(15,23,42,0.14);
  --hvb-border-focus: #4158e8;

  /* Text */
  --hvb-text:         #0f172a;
  --hvb-text-2:       #475569;
  --hvb-text-3:       #94a3b8;
  --hvb-text-inv:     #ffffff;

  /* Accent */
  --hvb-accent:       #4158e8;
  --hvb-accent-2:     #3148d4;
  --hvb-accent-dim:   rgba(65,88,232,0.10);
  --hvb-accent-glow:  rgba(65,88,232,0.25);

  /* Status — darker shades for light-bg readability */
  --s-pending:          #b45309;
  --s-pending-bg:       rgba(180,83,9,0.09);
  --s-pending-border:   rgba(180,83,9,0.22);
  --s-confirmed:        #047857;
  --s-confirmed-bg:     rgba(4,120,87,0.09);
  --s-confirmed-border: rgba(4,120,87,0.22);
  --s-inplace:          #3148d4;
  --s-inplace-bg:       rgba(49,72,212,0.09);
  --s-inplace-border:   rgba(49,72,212,0.22);
  --s-cancelled:        #b91c1c;
  --s-cancelled-bg:     rgba(185,28,28,0.09);
  --s-cancelled-border: rgba(185,28,28,0.22);
  --s-updated:          #6d28d9;
  --s-updated-bg:       rgba(109,40,217,0.09);
  --s-updated-border:   rgba(109,40,217,0.22);

  /* Layout */
  --sidebar-w:     230px;
  --sidebar-w-sm:  64px;
  --topbar-h:      56px;

  /* Radii */
  --r-sm: 5px;
  --r:    9px;
  --r-lg: 14px;
  --r-xl: 20px;

  /* Shadows — subtle for light */
  --shadow-sm:     0 1px 3px rgba(15,23,42,0.07), 0 1px 2px rgba(15,23,42,0.05);
  --shadow-md:     0 4px 16px rgba(15,23,42,0.10), 0 2px 6px rgba(15,23,42,0.06);
  --shadow-lg:     0 10px 30px rgba(15,23,42,0.12), 0 4px 10px rgba(15,23,42,0.06);
  --shadow-accent: 0 0 0 3px var(--hvb-accent-dim);

  /* Badges */
  --badge-success:      #28a745;

  /* Motion */
  --ease:   cubic-bezier(0.25,0.46,0.45,0.94);
  --t:      0.15s;
  --t-md:   0.26s;
}

/* =============================================
   DARK THEME TOKENS — improved contrast
============================================= */
[data-theme="dark"] {
  --hvb-bg:           #0c0f1c;
  --hvb-surface:      #141728;
  --hvb-surface-2:    #1a1e30;
  --hvb-surface-3:    #222640;
  --hvb-surface-hover:#272b42;
  --hvb-sidebar-bg:   #0e1020;

  --hvb-border:       rgba(255,255,255,0.09);
  --hvb-border-md:    rgba(255,255,255,0.15);
  --hvb-border-focus: #5b7aff;

  /* improved contrast vs v2.0 */
  --hvb-text:         #f0f2fc;
  --hvb-text-2:       #a8b2d0;
  --hvb-text-3:       #606880;
  --hvb-text-inv:     #0c0f1c;

  --hvb-accent:       #5b7aff;
  --hvb-accent-2:     #7a96ff;
  --hvb-accent-dim:   rgba(91,122,255,0.18);
  --hvb-accent-glow:  rgba(91,122,255,0.35);

  /* brighter status colors for dark bg readability */
  --s-pending:          #fbbf24;
  --s-pending-bg:       rgba(251,191,36,0.13);
  --s-pending-border:   rgba(251,191,36,0.28);
  --s-confirmed:        #34d978;
  --s-confirmed-bg:     rgba(52,217,120,0.13);
  --s-confirmed-border: rgba(52,217,120,0.28);
  --s-inplace:          #7a96ff;
  --s-inplace-bg:       rgba(122,150,255,0.13);
  --s-inplace-border:   rgba(122,150,255,0.28);
  --s-cancelled:        #f87171;
  --s-cancelled-bg:     rgba(248,113,113,0.13);
  --s-cancelled-border: rgba(248,113,113,0.28);
  --s-updated:          #c084fc;
  --s-updated-bg:       rgba(192,132,252,0.13);
  --s-updated-border:   rgba(192,132,252,0.28);

  /* Badges */
  --badge-success:      #34d978;

  --shadow-sm:     0 1px 4px rgba(0,0,0,0.5);
  --shadow-md:     0 4px 20px rgba(0,0,0,0.6);
  --shadow-lg:     0 8px 40px rgba(0,0,0,0.7);
}

/* =============================================
   BASE
============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--hvb-bg);
  color: var(--hvb-text);
  font-family: 'Outfit', -apple-system, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--t-md) var(--ease), color var(--t-md) var(--ease);
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--hvb-surface-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--hvb-text-3); }

h1,h2,h3,h4,h5,h6 { font-family: 'Outfit', sans-serif; font-weight: 600; line-height: 1.3; color: var(--hvb-text); }

a { color: var(--hvb-accent); text-decoration: none; transition: color var(--t) var(--ease); }
a:hover { color: var(--hvb-accent-2); }

.mono, code { font-family: 'JetBrains Mono', monospace; font-size: 0.88em; letter-spacing: -0.02em; }

/* =============================================
   LAYOUT — SIDEBAR
============================================= */
.hvb-sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--hvb-sidebar-bg);
  border-right: 1px solid var(--hvb-border);
  display: flex; flex-direction: column;
  z-index: 1000;
  transition: width var(--t-md) var(--ease), background var(--t-md) var(--ease), border-color var(--t-md) var(--ease);
  overflow: hidden;
}
.hvb-sidebar.collapsed { width: var(--sidebar-w-sm); }

.sidebar-logo {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--hvb-border);
  min-height: calc(var(--topbar-h) + 1px);
  text-decoration: none; flex-shrink: 0;
}
.sidebar-logo-icon {
  width: 32px; height: 32px;
  background: var(--hvb-accent);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace; font-weight: 800; font-size: 12px;
  color: white;
  box-shadow: 0 2px 8px var(--hvb-accent-glow);
  flex-shrink: 0;
}
.sidebar-logo-text {
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 15px;
  color: var(--hvb-text); letter-spacing: -0.03em; white-space: nowrap;
  transition: opacity var(--t-md) var(--ease);
}
.sidebar-logo-text span { color: var(--hvb-accent); }
.hvb-sidebar.collapsed .sidebar-logo-text { opacity: 0; }

.sidebar-nav { flex: 1; padding: 10px 0; overflow-y: auto; overflow-x: hidden; }

.sidebar-section-label {
  font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--hvb-text-3); padding: 14px 17px 4px;
  white-space: nowrap; overflow: hidden;
  transition: opacity var(--t) var(--ease);
}
.hvb-sidebar.collapsed .sidebar-section-label { opacity: 0; }

.sidebar-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 15px; margin: 1px 7px;
  border-radius: var(--r-sm);
  color: var(--hvb-text-2);
  text-decoration: none; font-size: 13.5px; font-weight: 500;
  position: relative;
  transition: all var(--t) var(--ease);
  white-space: nowrap; cursor: pointer;
  border: none; background: none;
  width: calc(100% - 14px); text-align: left;
}
.sidebar-nav-item:hover { background: var(--hvb-surface-hover); color: var(--hvb-text); text-decoration: none; }
.sidebar-nav-item.active { background: var(--hvb-accent-dim); color: var(--hvb-accent); }
.sidebar-nav-item.active::before {
  content: '';
  position: absolute; left: -7px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 65%;
  background: var(--hvb-accent);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px var(--hvb-accent-glow);
}
.sidebar-nav-item .nav-icon {
  width: 17px; height: 17px; flex-shrink: 0;
  font-size: 15px; display: flex; align-items: center; justify-content: center;
}
.sidebar-nav-item .nav-label {
  flex: 1; overflow: hidden; text-overflow: ellipsis;
  transition: opacity var(--t-md) var(--ease);
}
.hvb-sidebar.collapsed .nav-label,
.hvb-sidebar.collapsed .sidebar-badge { opacity: 0; pointer-events: none; }

.sidebar-badge {
  background: var(--s-pending); color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 0 6px;
  border-radius: 10px; min-width: 18px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  transition: opacity var(--t) var(--ease);
}
.sidebar-badge.badge-success {
  background: var(--badge-success);
}
[data-theme="dark"] .sidebar-badge { color: #000; }

.sidebar-divider { height: 1px; background: var(--hvb-border); margin: 6px 10px; }

.sidebar-footer { padding: 10px 7px; border-top: 1px solid var(--hvb-border); flex-shrink: 0; }

.sidebar-toggle-btn {
  position: fixed;
  left: calc(var(--sidebar-w) - 12px);
  top: calc(var(--topbar-h) / 2 - 12px);
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--hvb-surface);
  border: 1px solid var(--hvb-border-md);
  color: var(--hvb-text-2); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 11px;
  z-index: 1100;
  transition: left var(--t-md) var(--ease), background var(--t) var(--ease), color var(--t) var(--ease);
  box-shadow: var(--shadow-md);
}
.sidebar-toggle-btn.sidebar-collapsed { left: calc(var(--sidebar-w-sm) - 12px); }
.sidebar-toggle-btn:hover { background: var(--hvb-surface-3); color: var(--hvb-text); }

/* =============================================
   LAYOUT — TOPBAR
============================================= */
.hvb-topbar {
  position: fixed; top: 0; left: var(--sidebar-w); right: 0; height: var(--topbar-h);
  background: var(--hvb-surface);
  border-bottom: 1px solid var(--hvb-border);
  display: flex; align-items: center; padding: 0 20px; gap: 12px;
  z-index: 999;
  transition: left var(--t-md) var(--ease), background var(--t-md) var(--ease);
  box-shadow: var(--shadow-sm);
}
.hvb-topbar.sidebar-collapsed { left: var(--sidebar-w-sm); }

.topbar-search { flex: 1; max-width: 340px; position: relative; }
.topbar-search input {
  width: 100%; background: var(--hvb-surface-2);
  border: 1px solid var(--hvb-border); color: var(--hvb-text);
  border-radius: var(--r);
  padding: 7px 12px 7px 34px;
  font-size: 13px; font-family: 'Outfit', sans-serif;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease); outline: none;
}
.topbar-search input:focus {
  border-color: var(--hvb-border-focus); box-shadow: var(--shadow-accent);
  background: var(--hvb-surface);
}
.topbar-search input::placeholder { color: var(--hvb-text-3); }
.topbar-search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--hvb-text-3); font-size: 14px; pointer-events: none; }

.topbar-search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--hvb-surface);
  border: 1px solid var(--hvb-border-md);
  border-radius: var(--r); box-shadow: var(--shadow-lg); z-index: 200; overflow: hidden;
}
.search-result-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 13px; cursor: pointer;
  border-bottom: 1px solid var(--hvb-border);
  transition: background var(--t) var(--ease);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--hvb-surface-hover); }
.search-result-item .ref { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; font-weight: 600; color: var(--hvb-accent); white-space: nowrap; }
.search-result-item .meta { font-size: 12px; color: var(--hvb-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.topbar-spacer { flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }

.topbar-icon-btn {
  width: 32px; height: 32px; border-radius: var(--r-sm);
  background: transparent; border: none;
  color: var(--hvb-text-2); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  transition: all var(--t) var(--ease); text-decoration: none;
}
.topbar-icon-btn:hover { background: var(--hvb-surface-2); color: var(--hvb-text); }

.topbar-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--hvb-accent); color: white;
  font-weight: 700; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; letter-spacing: -0.02em;
  box-shadow: 0 0 0 2px var(--hvb-accent-dim);
  font-family: 'Outfit', sans-serif;
}

/* =============================================
   LAYOUT — MAIN CONTENT
============================================= */
.hvb-content {
  margin-left: var(--sidebar-w); margin-top: var(--topbar-h);
  min-height: calc(100vh - var(--topbar-h));
  padding: 22px;
  transition: margin-left var(--t-md) var(--ease);
}
.hvb-content.sidebar-collapsed { margin-left: var(--sidebar-w-sm); }

/* =============================================
   COMPONENTS — shared, theme-agnostic
============================================= */

/* PAGE HEADER */
.hvb-page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.hvb-page-title { font-size: 19px; font-weight: 700; color: var(--hvb-text); letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.hvb-count-tag {
  display: inline-flex; align-items: center;
  padding: 1px 8px; background: var(--hvb-surface-2);
  border: 1px solid var(--hvb-border-md); border-radius: 20px;
  font-size: 11px; font-weight: 600; color: var(--hvb-text-2);
  font-family: 'JetBrains Mono', monospace;
}

/* FLASH */
.hvb-flash {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; border-radius: var(--r); margin-bottom: 14px;
  font-size: 13px; font-weight: 500; border: 1px solid transparent;
  animation: slideDown 0.25s var(--ease) both;
}
.hvb-flash-success { background: var(--s-confirmed-bg); color: var(--s-confirmed); border-color: var(--s-confirmed-border); }
.hvb-flash-error   { background: var(--s-cancelled-bg); color: var(--s-cancelled); border-color: var(--s-cancelled-border); }
@keyframes slideDown { from { opacity:0; transform: translateY(-6px); } to { opacity:1; transform: translateY(0); } }

/* STATUS BADGES */
.hvb-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  border: 1px solid transparent; white-space: nowrap;
}
.hvb-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }

.hvb-badge-pending   { color: var(--s-pending);   background: var(--s-pending-bg);   border-color: var(--s-pending-border); }
.hvb-badge-confirmed { color: var(--s-confirmed); background: var(--s-confirmed-bg); border-color: var(--s-confirmed-border); }
.hvb-badge-inplace   { color: var(--s-inplace);   background: var(--s-inplace-bg);   border-color: var(--s-inplace-border); }
.hvb-badge-cancelled { color: var(--s-cancelled); background: var(--s-cancelled-bg); border-color: var(--s-cancelled-border); }
.hvb-badge-updated   { color: var(--s-updated);   background: var(--s-updated-bg);   border-color: var(--s-updated-border); }

.hvb-badge-pending::before { background: var(--s-pending); animation: pulse-pending 2.2s ease infinite; }
.hvb-badge-confirmed::before { background: var(--s-confirmed); }
.hvb-badge-inplace::before   { background: var(--s-inplace); }
.hvb-badge-cancelled::before { background: var(--s-cancelled); }
.hvb-badge-updated::before   { background: var(--s-updated); }
@keyframes pulse-pending {
  0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--s-pending) 40%, transparent); }
  50%      { box-shadow: 0 0 0 3px transparent; }
}

/* CARDS */
.hvb-card {
  background: var(--hvb-surface);
  border: 1px solid var(--hvb-border);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.hvb-card:hover { border-color: var(--hvb-border-md); box-shadow: var(--shadow-md); }
.hvb-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; border-bottom: 1px solid var(--hvb-border);
}
.hvb-card-title { font-size: 12.5px; font-weight: 600; color: var(--hvb-text); display: flex; align-items: center; gap: 7px; }
.hvb-card-body { padding: 14px 16px; }

/* KPI CARDS */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi-card {
  background: var(--hvb-surface); border: 1px solid var(--hvb-border);
  border-radius: var(--r); padding: 18px;
  position: relative; overflow: hidden;
  transition: all var(--t-md) var(--ease);
  box-shadow: var(--shadow-sm);
}
.kpi-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--kpi-color, var(--hvb-accent)); }
.kpi-card:hover { border-color: var(--hvb-border-md); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.kpi-number { font-size: 30px; font-weight: 800; color: var(--hvb-text); line-height: 1; letter-spacing: -0.04em; margin-bottom: 4px; font-family: 'JetBrains Mono', monospace; }
.kpi-label { font-size: 11px; font-weight: 600; color: var(--hvb-text-2); text-transform: uppercase; letter-spacing: 0.06em; }
.kpi-icon { position: absolute; top: 14px; right: 16px; font-size: 22px; opacity: 0.10; }
.kpi-trend { font-size: 11px; color: var(--hvb-text-3); margin-top: 5px; }

/* TABLE */
.hvb-table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--hvb-border); box-shadow: var(--shadow-sm); background: var(--hvb-surface); }
.hvb-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hvb-table thead th {
  padding: 10px 13px; text-align: left;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--hvb-text-2);
  background: var(--hvb-surface-2);
  border-bottom: 1px solid var(--hvb-border); white-space: nowrap;
}
/* Tablesort: alle th in thead sind klickbar */
thead th { cursor: pointer; user-select: none; white-space: nowrap; }
thead th[data-sort-method="none"] { cursor: default; }

thead th::after {
  content: '';
  display: inline-block;
  width: 0; height: 0;
  margin-left: 6px;
  vertical-align: middle;
  opacity: 0.3;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 5px solid currentColor;
  transition: opacity var(--t) var(--ease);
}
thead th[aria-sort="ascending"]::after {
  opacity: 1;
  border-bottom: 5px solid currentColor;
  border-top: none;
}
thead th[aria-sort="descending"]::after {
  opacity: 1;
  border-top: 5px solid currentColor;
  border-bottom: none;
}
thead th:hover::after { opacity: 0.6; }

.hvb-table thead th[data-sort] { cursor: pointer; user-select: none; }
.hvb-table thead th[data-sort]:hover { color: var(--hvb-text); }
.hvb-table tbody tr { border-bottom: 1px solid var(--hvb-border); transition: background var(--t) var(--ease); }
.hvb-table tbody tr:last-child { border-bottom: none; }
.hvb-table tbody tr:hover { background: var(--hvb-surface-hover); }
.hvb-table td { padding: 10px 13px; color: var(--hvb-text); vertical-align: middle; background: transparent !important; }

.hvb-table tbody tr.row-confirmed { background: var(--s-confirmed-bg); }
.hvb-table tbody tr.row-inplace   { background: var(--s-inplace-bg); }
.hvb-table tbody tr.row-cancelled { background: var(--s-cancelled-bg); }

.cell-ref { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 600; color: var(--hvb-accent); }
.cell-ref a { color: var(--hvb-accent); }
.cell-ref a:hover { color: var(--hvb-accent-2); }
.cell-muted { color: var(--hvb-text-2); font-size: 12px; }
.cell-new-indicator { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--s-pending); box-shadow: 0 0 6px var(--s-pending); margin-right: 6px; vertical-align: middle; }

/* BUTTONS */
.hvb-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: var(--r-sm);
  font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all var(--t) var(--ease);
  border: 1px solid transparent; text-decoration: none; white-space: nowrap; line-height: 1.4;
}
.hvb-btn-primary { background: var(--hvb-accent); color: white; border-color: var(--hvb-accent); }
.hvb-btn-primary:hover { filter: brightness(1.08); color: white; box-shadow: 0 2px 10px var(--hvb-accent-glow); }
.hvb-btn-ghost { background: transparent; color: var(--hvb-text-2); border-color: var(--hvb-border-md); }
.hvb-btn-ghost:hover { background: var(--hvb-surface-2); color: var(--hvb-text); border-color: var(--hvb-border-md); }
.hvb-btn-success { background: var(--s-confirmed-bg); color: var(--s-confirmed); border-color: var(--s-confirmed-border); }
.hvb-btn-success:hover { filter: brightness(0.92); }
.hvb-btn-danger  { background: var(--s-cancelled-bg); color: var(--s-cancelled); border-color: var(--s-cancelled-border); }
.hvb-btn-danger:hover  { filter: brightness(0.92); }
.hvb-btn-sm { padding: 4px 10px; font-size: 12px; }

/* DETAIL ROW */
.detail-row { display: flex; align-items: flex-start; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--hvb-border); font-size: 13px; }
.detail-row:last-child { border-bottom: none; }
.detail-icon { color: var(--hvb-text-3); flex-shrink: 0; margin-top: 2px; }
.detail-label { font-size: 10.5px; color: var(--hvb-text-3); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1px; }
.detail-value { color: var(--hvb-text); font-weight: 500; }

/* TIMELINE */
.hvb-timeline-wrap { position: relative; }

.hvb-timeline-item {
  display: flex; align-items: flex-start; gap: 0;
  padding: 11px 16px;
  border-bottom: 1px solid var(--hvb-border);
  background: transparent;
  transition: background var(--t) var(--ease);
  position: relative;
}
.hvb-timeline-item:last-child { border-bottom: none; }
.hvb-timeline-item:hover { background: var(--hvb-surface-hover); }
.hvb-timeline-item.is-reminder { background: var(--s-pending-bg); }
.hvb-timeline-item.nextDay { border-top: 2px solid var(--hvb-border-md); }

.hvb-timeline-date {
  width: 50px; min-width: 50px;
  text-align: right;
  font-size: 11px; color: var(--hvb-text-3);
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.4;
  padding-right: 12px;
  margin-top: 3px;
  flex-shrink: 0;
}

.hvb-timeline-node {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9.5px; font-weight: 700; color: white; text-transform: uppercase;
  flex-shrink: 0; margin-right: 12px;
  background: var(--hvb-accent);
}
.hvb-timeline-node.status    { background: var(--hvb-text-2); }
.hvb-timeline-node.intern    { background: var(--hvb-accent); }
.hvb-timeline-node.amt       { background: var(--s-cancelled); }
.hvb-timeline-node.aufsteller{ background: #ca8a04; color: #fff; }
.hvb-timeline-node.kunde     { background: var(--s-confirmed); color: #fff; }

.hvb-timeline-content { flex: 1; min-width: 0; }
.hvb-timeline-title { font-size: 13px; font-weight: 700; color: var(--hvb-text); margin-bottom: 2px; }
.hvb-timeline-title.edit { cursor: pointer; }
.hvb-timeline-title.edit:hover { color: var(--hvb-accent); }
.hvb-timeline-body-wrap { position: relative; }
.hvb-timeline-body {
  font-size: 13px; color: var(--hvb-text-2); line-height: 1.6;
  max-height: 72px; overflow: hidden;
  transition: max-height .3s ease;
}
.hvb-timeline-body.expanded { max-height: 2000px; }
.hvb-timeline-body p { margin-bottom: 4px; }
.hvb-timeline-body p:last-child { margin-bottom: 0; }
.hvb-timeline-expand {
  display: none; background: none; border: none; padding: 0;
  cursor: pointer; color: var(--hvb-accent); font-size: 11px;
  margin-top: 2px; line-height: 1;
}
.hvb-timeline-expand i { transition: transform .2s ease; display: block; }
.hvb-timeline-expand[aria-expanded="true"] i { transform: rotate(180deg); }
.hvb-timeline-body-wrap.overflows .hvb-timeline-expand { display: inline-block; }
.hvb-timeline-actions { flex-shrink: 0; margin-left: 12px; display: flex; align-items: center; }

/* Reminder-Toggle */
.hvb-reminder-toggle {
  display: inline-flex; align-items: center;
  cursor: pointer; user-select: none;
}
.hvb-reminder-toggle input { display: none; }
.hvb-reminder-switch {
  display: inline-block;
  width: 36px; height: 20px;
  background: var(--s-pending);
  border-radius: 10px;
  position: relative;
  transition: background var(--t-md) var(--ease);
  flex-shrink: 0;
}
.hvb-reminder-switch::after {
  content: '';
  position: absolute; top: 3px; left: 18px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff;
  transition: left var(--t-md) var(--ease);
}
.hvb-reminder-toggle:hover .hvb-reminder-switch { background: var(--s-pending-border); }

/* FLAG BAR */
.hvb-flagbar { display: flex; flex-wrap: wrap; gap: 6px; }
.hvb-flag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: var(--r-sm); border: 1px solid var(--hvb-border-md); background: var(--hvb-surface-2); font-size: 11px; font-weight: 500; color: var(--hvb-text-2); transition: all var(--t) var(--ease); }
.hvb-flag.checked { background: var(--s-confirmed-bg); border-color: var(--s-confirmed-border); color: var(--s-confirmed); }

/* DROPZONE */
.hvb-dropzone { border: 2px dashed var(--hvb-border-md); border-radius: var(--r); padding: 20px 14px; text-align: center; background: var(--hvb-surface-2); color: var(--hvb-text-3); font-size: 12px; transition: all var(--t-md) var(--ease); cursor: pointer; }
.hvb-dropzone:hover, .hvb-dropzone.dz-drag-hover { border-color: var(--hvb-accent); background: var(--hvb-accent-dim); color: var(--hvb-accent); }

/* ACTION PANEL */
.action-btn-group { display: flex; flex-direction: column; gap: 6px; }
.action-section-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--hvb-text-3); margin-bottom: 4px; margin-top: 10px; }
.action-section-title:first-child { margin-top: 0; }

/* THEME TOGGLE BUTTON */
.theme-toggle-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; font-size: 13px; color: var(--hvb-text-2);
  cursor: pointer; border-radius: var(--r-sm);
  transition: all var(--t) var(--ease);
  border: none; background: none; width: 100%;
}
.theme-toggle-item:hover { background: var(--hvb-surface-hover); color: var(--hvb-text); }
.theme-switch {
  width: 34px; height: 18px; background: var(--hvb-surface-3);
  border-radius: 9px; position: relative;
  transition: background var(--t-md) var(--ease);
  border: 1px solid var(--hvb-border-md);
  flex-shrink: 0;
}
.theme-switch::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--hvb-text-3);
  transition: transform var(--t-md) var(--ease), background var(--t-md) var(--ease);
}
[data-theme="dark"] .theme-switch { background: var(--hvb-accent); border-color: var(--hvb-accent); }
[data-theme="dark"] .theme-switch::after { transform: translateX(16px); background: white; }

/* =============================================
   ORDER EDIT MODAL
============================================= */
.oef-tabs {
  display: flex; gap: 2px;
  padding: 14px 20px 0;
  border-bottom: 1px solid var(--hvb-border);
  background: var(--hvb-surface-2);
}
.oef-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border: none; background: transparent;
  font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 500;
  color: var(--hvb-text-2); cursor: pointer; border-radius: var(--r-sm) var(--r-sm) 0 0;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all var(--t) var(--ease);
}
.oef-tab:hover { color: var(--hvb-text); background: var(--hvb-surface-hover); }
.oef-tab.active { color: var(--hvb-accent); border-bottom-color: var(--hvb-accent); background: var(--hvb-surface); }

.oef-panel { display: none; padding: 20px; flex-direction: column; gap: 14px; }
.oef-panel.active { display: flex; }

.oef-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.oef-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

.oef-field { display: flex; flex-direction: column; gap: 5px; }
.oef-field > label {
  font-size: 10.5px; font-weight: 600; color: var(--hvb-text-2);
  text-transform: uppercase; letter-spacing: 0.05em;
}

.oef-input {
  width: 100%;
  background: var(--hvb-surface-2);
  border: 1px solid var(--hvb-border-md);
  color: var(--hvb-text);
  border-radius: var(--r-sm);
  padding: 8px 11px;
  font-family: 'Outfit', sans-serif; font-size: 13.5px;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
  outline: none;
}
.oef-input:focus {
  border-color: var(--hvb-border-focus);
  box-shadow: var(--shadow-accent);
  background: var(--hvb-surface);
}
.oef-input[readonly] { opacity: 0.55; cursor: default; }
.oef-input::placeholder { color: var(--hvb-text-3); }
.oef-textarea { resize: vertical; min-height: 72px; }
.oef-mono { font-family: 'JetBrains Mono', monospace; font-size: 12px; }

/* Select */
select.oef-input { cursor: pointer; }

/* Checkbox */
.oef-checkbox-field { justify-content: center; }
.oef-checkbox {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; font-size: 13px; color: var(--hvb-text-2);
  padding: 8px 12px; border-radius: var(--r-sm);
  border: 1px solid var(--hvb-border);
  background: var(--hvb-surface-2);
  transition: all var(--t) var(--ease);
  user-select: none;
}
.oef-checkbox:hover { border-color: var(--hvb-border-md); color: var(--hvb-text); }
.oef-checkbox input[type="checkbox"] {
  width: 15px; height: 15px; accent-color: var(--hvb-accent);
  cursor: pointer; flex-shrink: 0;
}

/* Modal footer */
.oef-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--hvb-border);
  background: var(--hvb-surface-2);
  gap: 10px;
}
.oef-error-msg { font-size: 12px; color: var(--s-cancelled); display: none; }

/* Vehicle picker */
.oef-vehicle-picker {
  display: flex; gap: 8px;
}
.oef-vehicle-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 10px 6px;
  background: var(--hvb-surface-2); border: 1.5px solid var(--hvb-border);
  border-radius: var(--r-md); cursor: pointer; transition: border-color var(--t-sm), background var(--t-sm);
  color: var(--hvb-text-2);
}
.oef-vehicle-btn:hover { border-color: var(--hvb-accent); background: var(--hvb-surface); }
.oef-vehicle-btn.active {
  border-color: var(--hvb-accent); background: color-mix(in srgb, var(--hvb-accent) 12%, transparent);
  color: var(--hvb-accent);
}
.oef-vehicle-icon { width: 28px; height: 28px; flex-shrink: 0; font-size: 22px; line-height: 1; }
.oef-vehicle-label { font-size: 12px; font-weight: 600; line-height: 1; }
.oef-vehicle-sub { font-size: 10px; color: var(--hvb-text-3); line-height: 1; }
.oef-vehicle-btn.active .oef-vehicle-sub { color: var(--hvb-accent); opacity: 0.75; }

/* Gender picker */
.oef-gender-picker { display: flex; gap: 6px; }
.oef-gender-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 7px 10px; font-size: 12px; font-weight: 600;
  background: var(--hvb-surface-2); border: 1.5px solid var(--hvb-border);
  border-radius: var(--r-md); cursor: pointer; transition: border-color var(--t-sm), background var(--t-sm);
  color: var(--hvb-text-2);
}
.oef-gender-btn:hover { border-color: var(--hvb-accent); background: var(--hvb-surface); }
.oef-gender-btn.active {
  border-color: var(--hvb-accent); background: color-mix(in srgb, var(--hvb-accent) 12%, transparent);
  color: var(--hvb-accent);
}

/* Payment status picker */
.oef-payment-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.oef-payment-btn {
  flex: 1 1 auto; min-width: 80px; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 7px 10px; font-size: 12px; font-weight: 600;
  background: var(--hvb-surface-2); border: 1.5px solid var(--hvb-border);
  border-radius: var(--r-md); cursor: pointer; transition: border-color var(--t-sm), background var(--t-sm);
  color: var(--hvb-text-2);
}
.oef-payment-btn:hover { border-color: var(--hvb-accent); background: var(--hvb-surface); }
.oef-payment-btn.active {
  border-color: var(--hvb-accent); background: color-mix(in srgb, var(--hvb-accent) 12%, transparent);
  color: var(--hvb-accent);
}

/* =============================================
   COMMAND PALETTE
============================================= */
.cp-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px);
  z-index: 9000;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 14vh;
  animation: cpFadeIn 0.15s var(--ease) both;
}
@keyframes cpFadeIn { from { opacity: 0; } to { opacity: 1; } }

.cp-box {
  width: 100%; max-width: 580px;
  background: var(--hvb-surface);
  border: 1px solid var(--hvb-border-md);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: cpSlideIn 0.18s var(--ease) both;
}
@keyframes cpSlideIn { from { opacity: 0; transform: translateY(-12px) scale(0.98); } to { opacity: 1; transform: none; } }

.cp-input-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--hvb-border);
}
.cp-input-wrap i { color: var(--hvb-text-3); font-size: 16px; flex-shrink: 0; }
.cp-input {
  flex: 1; border: none; outline: none; background: transparent;
  font-family: 'Outfit', sans-serif; font-size: 15px; color: var(--hvb-text);
}
.cp-input::placeholder { color: var(--hvb-text-3); }
.cp-kbd {
  font-size: 10px; color: var(--hvb-text-3);
  background: var(--hvb-surface-2); border: 1px solid var(--hvb-border-md);
  border-radius: 4px; padding: 2px 6px;
  font-family: 'JetBrains Mono', monospace; flex-shrink: 0;
}

.cp-section-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--hvb-text-3); padding: 10px 16px 4px;
}

.cp-results { max-height: 380px; overflow-y: auto; padding-bottom: 6px; }

.cp-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 16px; cursor: pointer;
  transition: background var(--t) var(--ease);
  border-radius: 0;
}
.cp-item:hover, .cp-item.active {
  background: var(--hvb-accent-dim);
}
.cp-item.active .cp-item-title { color: var(--hvb-accent); }

.cp-item-icon {
  width: 30px; height: 30px; border-radius: var(--r-sm);
  background: var(--hvb-surface-2); border: 1px solid var(--hvb-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--hvb-text-2); flex-shrink: 0;
}
.cp-item.active .cp-item-icon { background: var(--hvb-accent-dim); border-color: var(--hvb-accent-dim); color: var(--hvb-accent); }

.cp-item-body { flex: 1; min-width: 0; }
.cp-item-title { font-size: 13px; font-weight: 500; color: var(--hvb-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-item-meta { font-size: 11px; color: var(--hvb-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-item-ref { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 600; color: var(--hvb-accent); flex-shrink: 0; }
.cp-item-past { opacity: 0.65; }
.cp-item-past:hover, .cp-item-past.active { opacity: 1; }

.cp-footer {
  display: flex; align-items: center; gap: 14px;
  padding: 8px 16px; border-top: 1px solid var(--hvb-border);
  background: var(--hvb-surface-2);
}
.cp-footer-hint { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--hvb-text-3); }
.cp-footer-hint kbd {
  font-size: 10px; background: var(--hvb-surface-3); border: 1px solid var(--hvb-border-md);
  border-radius: 3px; padding: 1px 5px; font-family: 'JetBrains Mono', monospace;
  color: var(--hvb-text-2);
}

/* =============================================
   LOGIN PAGE
============================================= */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--hvb-bg); position: relative; overflow: hidden; }
.login-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 80% at 15% 20%, color-mix(in srgb, var(--hvb-accent) 15%, transparent) 0%, transparent 55%),
    radial-gradient(ellipse 60% 60% at 85% 80%, color-mix(in srgb, var(--s-updated) 10%, transparent) 0%, transparent 55%);
}
.login-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--hvb-border) 1px, transparent 1px), linear-gradient(90deg, var(--hvb-border) 1px, transparent 1px); background-size: 44px 44px; opacity: 0.5; }
.login-card { position: relative; z-index: 1; width: 100%; max-width: 380px; background: var(--hvb-surface); border: 1px solid var(--hvb-border-md); border-radius: var(--r-xl); padding: 38px; box-shadow: var(--shadow-lg); animation: loginEntrance 0.5s var(--ease) both; }
@keyframes loginEntrance { from { opacity:0; transform: translateY(18px) scale(0.97); } to { opacity:1; transform: translateY(0) scale(1); } }
.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; }
.login-logo-mark { width: 42px; height: 42px; background: var(--hvb-accent); border-radius: var(--r); display: flex; align-items: center; justify-content: center; font-family: 'JetBrains Mono', monospace; font-weight: 800; font-size: 14px; color: white; box-shadow: 0 4px 16px var(--hvb-accent-glow); }
.login-logo-title { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 17px; letter-spacing: -0.03em; color: var(--hvb-text); }
.login-logo-sub { font-size: 10.5px; color: var(--hvb-text-3); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 1px; }
.login-title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 5px; }
.login-subtitle { font-size: 13px; color: var(--hvb-text-2); margin-bottom: 26px; }
.login-field { margin-bottom: 14px; }
.login-field label { display: block; font-size: 11px; font-weight: 600; color: var(--hvb-text-2); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.06em; }
.login-input { width: 100%; background: var(--hvb-surface-2); border: 1px solid var(--hvb-border-md); color: var(--hvb-text); border-radius: var(--r-sm); padding: 9px 12px; font-family: 'Outfit', sans-serif; font-size: 14px; transition: all var(--t) var(--ease); outline: none; }
.login-input:focus { border-color: var(--hvb-border-focus); box-shadow: var(--shadow-accent); background: var(--hvb-surface); }
.login-input::placeholder { color: var(--hvb-text-3); }
.login-btn { width: 100%; padding: 11px; background: var(--hvb-accent); color: white; border: none; border-radius: var(--r-sm); font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 600; cursor: pointer; transition: all var(--t) var(--ease); margin-top: 6px; }
.login-btn:hover { filter: brightness(1.08); box-shadow: 0 4px 16px var(--hvb-accent-glow); transform: translateY(-1px); }

/* =============================================
   BOOTSTRAP OVERRIDES — shared (both themes)
============================================= */
.card { background: var(--hvb-surface) !important; border: 1px solid var(--hvb-border) !important; border-radius: var(--r) !important; color: var(--hvb-text) !important; box-shadow: var(--shadow-sm) !important; }
.card-body { background: transparent !important; }
.card-title { color: var(--hvb-text) !important; font-size: 13px !important; }

.dropdown-menu { background: var(--hvb-surface) !important; border: 1px solid var(--hvb-border-md) !important; border-radius: var(--r) !important; box-shadow: var(--shadow-lg) !important; padding: 5px !important; }
.dropdown-item { color: var(--hvb-text-2) !important; border-radius: var(--r-sm) !important; padding: 7px 11px !important; font-size: 13px !important; transition: all var(--t) var(--ease) !important; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--hvb-surface-hover) !important; color: var(--hvb-text) !important; }
.dropdown-divider { border-color: var(--hvb-border) !important; margin: 4px 0 !important; }
.dropdown-item-text { color: var(--hvb-text-3) !important; font-size: 11px !important; padding: 5px 11px !important; }

.table { color: var(--hvb-text) !important; border-color: var(--hvb-border) !important; }
.table > :not(caption) > * > * { background: transparent !important; color: var(--hvb-text) !important; border-color: var(--hvb-border) !important; padding: 9px 13px !important; }
.table > thead > * > * { background: var(--hvb-surface-2) !important; color: var(--hvb-text-2) !important; font-size: 10.5px !important; font-weight: 700 !important; text-transform: uppercase !important; letter-spacing: 0.07em !important; }
td { background: inherit !important; }

.accordion-item { background: var(--hvb-surface) !important; border-color: var(--hvb-border) !important; border-radius: var(--r) !important; overflow: hidden; margin-bottom: 6px; box-shadow: var(--shadow-sm); }
.accordion-button { background: var(--hvb-surface-2) !important; color: var(--hvb-text) !important; box-shadow: none !important; font-family: 'Outfit', sans-serif !important; font-size: 13.5px !important; border: none !important; }
.accordion-button:not(.collapsed) { background: var(--hvb-surface-3) !important; color: var(--hvb-text) !important; }
.accordion-body { background: var(--hvb-surface) !important; color: var(--hvb-text) !important; }

.form-control, .form-select { background: var(--hvb-surface-2) !important; border-color: var(--hvb-border-md) !important; color: var(--hvb-text) !important; border-radius: var(--r-sm) !important; font-family: 'Outfit', sans-serif !important; font-size: 13px !important; }
.form-control:focus, .form-select:focus { border-color: var(--hvb-border-focus) !important; box-shadow: var(--shadow-accent) !important; background: var(--hvb-surface) !important; color: var(--hvb-text) !important; }
.form-control::placeholder { color: var(--hvb-text-3) !important; }

.alert { border-radius: var(--r) !important; font-size: 13px !important; }
.alert-success { background: var(--s-confirmed-bg) !important; border-color: var(--s-confirmed-border) !important; color: var(--s-confirmed) !important; }
.alert-danger  { background: var(--s-cancelled-bg) !important; border-color: var(--s-cancelled-border) !important; color: var(--s-cancelled) !important; }

.list-group-item { background: var(--hvb-surface-2) !important; border-color: var(--hvb-border) !important; color: var(--hvb-text) !important; font-size: 13px !important; }
.list-group-item-action:hover { background: var(--hvb-surface-hover) !important; color: var(--hvb-text) !important; }

.modal-content { background: var(--hvb-surface) !important; border: 1px solid var(--hvb-border-md) !important; border-radius: var(--r-lg) !important; color: var(--hvb-text) !important; }
.modal-header { border-bottom-color: var(--hvb-border) !important; padding: 15px 18px !important; }
.modal-body { padding: 18px !important; }
.offcanvas { background: var(--hvb-surface) !important; border-color: var(--hvb-border-md) !important; color: var(--hvb-text) !important; }

/* Dark mode: invert btn-close */
[data-theme="dark"] .btn-close { filter: invert(0.8) !important; }

.nav-tabs { border-color: var(--hvb-border) !important; }
.nav-tabs .nav-link { color: var(--hvb-text-2); border: none; border-bottom: 2px solid transparent; background: transparent; padding: 7px 14px; font-size: 13px; font-weight: 500; transition: all var(--t) var(--ease); }
.nav-tabs .nav-link:hover { color: var(--hvb-text); border-color: transparent; }
.nav-tabs .nav-link.active { color: var(--hvb-accent); background: transparent; border-bottom-color: var(--hvb-accent); }

.form-check-input { background-color: var(--hvb-surface-3) !important; border-color: var(--hvb-border-md) !important; }
.form-check-input:checked { background-color: var(--hvb-accent) !important; border-color: var(--hvb-accent) !important; }

.badge { background: var(--hvb-accent) !important; font-family: 'JetBrains Mono', monospace; font-size: 9.5px; }

/* Accordion arrow tint */
[data-theme="dark"] .accordion-button::after { filter: invert(0.6); }

/* =============================================
   LEGACY STATUS ROWS (Bootstrap table compat)
============================================= */
tr.Pending, tr.pending { background: transparent !important; color: var(--hvb-text) !important; }
tr.Confirmed, tr.confirmed { background: var(--s-confirmed-bg) !important; color: var(--hvb-text) !important; }
tr.Placed, tr.placed, tr.inplace { background: var(--s-inplace-bg) !important; color: var(--hvb-text) !important; }
tr.Cancelled, tr.cancelled { background: var(--s-cancelled-bg) !important; color: var(--hvb-text) !important; }
tr.Updated, tr.updated { background: var(--s-updated-bg) !important; color: var(--hvb-text) !important; }
tr a { text-decoration: none; color: var(--hvb-accent); }
tr a:hover { color: var(--hvb-accent-2); }

.statusMsg.confirmed, .confirmed { color: var(--s-confirmed) !important; }
.statusMsg.placed, .statusMsg.inplace { color: var(--s-inplace) !important; }
.statusMsg.cancelled { color: var(--s-cancelled) !important; }
.statusMsg.updated { color: var(--s-updated) !important; }
.statusMsg.pending { color: var(--s-pending) !important; }

/* =============================================
   MISC
============================================= */
.tox-tinymce { border-color: var(--hvb-border-md) !important; border-radius: var(--r-sm) !important; }
.dropzone { background: var(--hvb-surface-2) !important; border-color: var(--hvb-border-md) !important; color: var(--hvb-text-2) !important; border-radius: var(--r) !important; }
.dz-message { color: var(--hvb-text-3) !important; }
a.anchor { display: block; position: relative; top: calc(-1 * var(--topbar-h) - 10px); visibility: hidden; }
a.isNew { text-decoration: none; }

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 900px) {
  .hvb-sidebar { transform: translateX(calc(-1 * var(--sidebar-w))); width: var(--sidebar-w) !important; transition: transform var(--t-md) var(--ease); }
  .hvb-sidebar.mobile-open { transform: translateX(0); }
  .hvb-topbar, .hvb-content { left: 0 !important; margin-left: 0 !important; }
  .hvb-content { padding: 14px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .login-card { margin: 16px; padding: 28px; }
}
