/* ================================================================
   Fahrrad XXL - Montage Dashboard
   Professional UI/UX, dark sidebar + red/pink accent
   ================================================================ */

:root{
  /* Brand */
  --brand-red:       #E30613;
  --brand-red-dark:  #B80510;
  --brand-red-soft:  #FFE7E9;
  --brand-pink:      #F43F5E;
  --brand-accent:    #EF4444;

  /* Neutrals */
  --bg:              #F5F6FA;
  --bg-elev:         #FFFFFF;
  --surface-soft:    #FAFAFC;
  --border:          #E5E7EB;
  --border-strong:   #D1D5DB;

  /* Text */
  --text:            #111827;
  --text-muted:      #6B7280;
  --text-soft:       #9CA3AF;
  --text-invert:     #FFFFFF;

  /* Status */
  --success:         #16A34A;
  --warning:         #F59E0B;
  --info:            #3B82F6;
  --danger:          #DC2626;

  /* Sidebar */
  --side-bg:         #101826;
  --side-bg-2:       #0B111C;
  --side-border:     #1F2937;
  --side-text:       #CBD5E1;
  --side-muted:      #64748B;
  --side-active-bg:  rgba(239,68,68,.14);
  --side-active-line:#EF4444;

  /* Shadows */
  --shadow-sm:       0 1px 2px rgba(16,24,38,.05);
  --shadow:          0 4px 14px rgba(16,24,38,.06);
  --shadow-lg:       0 20px 40px rgba(16,24,38,.12);

  /* Radii */
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 16px;
  --r-xl: 24px;

  /* Sizes */
  --side-w: 280px;
  --top-h:  72px;
}

*{ box-sizing: border-box; }
html,body{ margin:0; padding:0; }
body{
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}
button{ font-family: inherit; cursor: pointer; }
input, select, textarea, button { font-family: inherit; }
a{ color: var(--brand-red); text-decoration: none; }
a:hover{ text-decoration: underline; }

code{
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .85em;
  background: #F3F4F6;
  padding: 2px 6px;
  border-radius: 4px;
}

.hidden{ display: none !important; }

/* ================================================================
   LOGIN
   ================================================================ */
.login-body{
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 10% -10%, #FFE5E8 0%, transparent 60%),
    radial-gradient(900px 600px at 110% 110%, #FFEDE3 0%, transparent 60%),
    linear-gradient(135deg, #FAFAFC 0%, #F5F6FA 100%);
}
.login-bg{
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.login-bg .blob{
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .55;
  animation: blobFloat 18s ease-in-out infinite;
}
.blob-1{ width: 520px; height: 520px; top: -120px; left: -120px; background: #FFB4B8; }
.blob-2{ width: 480px; height: 480px; bottom: -140px; right: -100px; background: #FECACA; animation-delay: -6s;}
.blob-3{ width: 360px; height: 360px; top: 35%; left: 55%; background: #FED7AA; animation-delay: -12s; opacity: .35;}

@keyframes blobFloat{
  0%,100%{ transform: translate(0,0) scale(1); }
  50%    { transform: translate(30px,-40px) scale(1.07); }
}

.login-shell{
  position: relative; z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
}

/* Brand (left) */
.login-brand{
  background: linear-gradient(160deg, #0B111C 0%, #16213A 60%, #1F2B4A 100%);
  color: #fff;
  padding: 52px 56px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-brand::before{
  content:"";
  position: absolute; inset: 0;
  background:
    radial-gradient(700px 400px at 0% 100%, rgba(239,68,68,.25), transparent 60%),
    radial-gradient(500px 400px at 100% 0%, rgba(244,63,94,.22), transparent 60%);
  pointer-events: none;
}
.brand-top{ position: relative; z-index:1; }
.brand-logo{ display:flex; align-items:center; gap:14px; }
.brand-mark{
  width: 44px; height: 44px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-pink) 100%);
  display: grid; place-items: center;
  font-weight: 800; letter-spacing: .5px;
  font-size: 14px; color: #fff;
  box-shadow: 0 6px 20px rgba(239,68,68,.35);
}
.brand-name{ display:flex; flex-direction:column; line-height:1.1; }
.brand-name strong{ font-size: 17px; font-weight: 700; }
.brand-name span { font-size: 12px; color: #94A3B8; letter-spacing:.5px; text-transform: uppercase;}

.brand-hero{ position: relative; z-index:1; }
.brand-hero h1{
  font-size: 44px; line-height:1.08; margin: 0 0 16px; letter-spacing:-.02em;
  font-weight: 800;
  background: linear-gradient(90deg, #fff 0%, #E2E8F0 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.brand-hero p{
  color: #CBD5E1; font-size: 16px; max-width: 440px; margin: 0 0 28px;
}
.brand-features{
  list-style:none; padding:0; margin:0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px;
}
.brand-features li{
  display: flex; align-items: center; gap: 8px;
  color: #E2E8F0; font-size: 14px;
}
.brand-features svg{
  width: 18px; height: 18px; fill:none; stroke: #EF4444;
  stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  flex: 0 0 18px;
}
.brand-bottom{ position: relative; z-index:1; color: #64748B; font-size: 12px; }

/* Form (right) */
.login-form-wrap{
  display: grid; place-items: center;
  padding: 40px;
}
.login-card{
  width: 100%; max-width: 420px;
  background: #fff;
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: 0 30px 80px -20px rgba(16,24,38,.15), 0 2px 6px rgba(16,24,38,.05);
  border: 1px solid var(--border);
  animation: riseIn .5s cubic-bezier(.16,1,.3,1) both;
}
@keyframes riseIn{
  from{ opacity: 0; transform: translateY(18px) scale(.98); }
  to  { opacity: 1; transform: translateY(0)    scale(1); }
}
.login-card-head{ margin-bottom: 24px; }
.login-card-head h2{
  margin: 0 0 4px; font-size: 26px; letter-spacing: -.01em; color: var(--text);
}
.login-card-head p{ margin: 0; color: var(--text-muted); }

.form-group{ margin-bottom: 16px; }
.form-group label{
  display:block; font-weight:600; font-size: 13px; color: var(--text); margin-bottom:6px;
}
.input-wrap{
  position: relative;
  display: flex; align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #fff;
  transition: all .15s ease;
}
.input-wrap:focus-within{
  border-color: var(--brand-red);
  box-shadow: 0 0 0 4px rgba(227,6,19,.08);
}
.input-wrap svg{
  width: 18px; height: 18px; margin: 0 10px; fill: var(--text-soft); flex: 0 0 18px;
}
.input-wrap input{
  flex: 1; border: 0; outline: 0; padding: 12px 10px 12px 0;
  font-size: 14px; color: var(--text); background: transparent;
}
.toggle-pw{
  background: none; border: 0; padding: 8px 10px; display: grid; place-items: center;
}
.toggle-pw svg{ width:18px; height:18px; fill: var(--text-soft); margin:0; }
.toggle-pw:hover svg{ fill: var(--text); }

.select-static{
  display:flex; align-items:center; gap: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: linear-gradient(180deg, #FAFAFC 0%, #fff 100%);
}
.select-static svg{ width:18px; height:18px; fill: var(--brand-red); }
.select-static span{ font-weight:600; color: var(--text); }
.pill{
  margin-left:auto; font-style: normal;
  background: var(--brand-red-soft); color: var(--brand-red);
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  letter-spacing:.3px;
}

.form-row{
  display:flex; align-items:center; justify-content: space-between;
  margin: 10px 0 20px;
}
.checkbox{ display:inline-flex; align-items:center; gap:8px; color: var(--text-muted); cursor:pointer; font-size: 13px;}
.checkbox input{ accent-color: var(--brand-red); width: 16px; height: 16px; }
.link-muted{ color: var(--text-muted); font-size: 13px; }
.link-muted:hover{ color: var(--brand-red); }

.btn{
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  border: 0; outline: 0;
  padding: 10px 16px; border-radius: 10px;
  font-weight: 600; font-size: 14px;
  transition: all .15s ease;
  position: relative; overflow: hidden;
  text-decoration: none;
}
.btn svg{ width:16px; height:16px; fill: currentColor;}
.btn-lg{ padding: 14px 18px; font-size: 15px; width: 100%; border-radius: 12px;}
.btn-sm{ padding: 8px 12px; font-size: 13px; }
.btn-primary{
  background: linear-gradient(135deg, var(--brand-red) 0%, #FF4C5A 100%);
  color: #fff;
  box-shadow: 0 8px 24px -6px rgba(227,6,19,.45), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-primary:hover{ transform: translateY(-1px); box-shadow: 0 12px 28px -8px rgba(227,6,19,.55);}
.btn-primary:active{ transform: translateY(0); }
.btn-primary:disabled{ opacity: .7; cursor: not-allowed; transform: none; }
.btn-ghost{
  background: #F3F4F6; color: var(--text);
}
.btn-ghost:hover{ background: #E5E7EB; }

.btn-arrow{ transition: transform .2s ease; stroke: currentColor; fill:none; stroke-width:2.5; stroke-linecap:round; stroke-linejoin:round; }
.btn-primary:hover .btn-arrow{ transform: translateX(3px); }
.btn-spinner{
  width: 16px; height: 16px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  display: none;
  animation: spin .7s linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg); } }
.btn.is-loading .btn-label,
.btn.is-loading .btn-arrow { opacity: 0; }
.btn.is-loading .btn-spinner{ display:block; position:absolute; }
.btn.is-success{
  background: linear-gradient(135deg, #16A34A 0%, #22C55E 100%);
}

.alert{
  display:flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  margin-top: 14px;
  font-size: 13px;
}
.alert svg{ width: 18px; height: 18px; flex: 0 0 18px; }
.alert-error{
  background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA;
}
.alert-error svg{ fill: #DC2626; }

.login-footer{
  margin-top: 22px; padding-top: 18px;
  border-top: 1px dashed var(--border);
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-muted);
}
.dot-online{
  width:8px; height:8px; border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 3px rgba(34,197,94,.2);
}

/* Responsive login */
@media (max-width: 980px){
  .login-shell{ grid-template-columns: 1fr; }
  .login-brand{ padding: 32px; }
  .brand-hero h1{ font-size: 32px; }
  .brand-features{ grid-template-columns: 1fr; }
}

/* ================================================================
   APP SHELL
   ================================================================ */
.app-body{
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--side-w) 1fr;
}

/* ---------- Sidebar ---------- */
.sidebar{
  background: linear-gradient(180deg, var(--side-bg) 0%, var(--side-bg-2) 100%);
  color: var(--side-text);
  display: flex; flex-direction: column;
  min-height: 100vh;
  position: sticky; top: 0;
  max-height: 100vh;
  border-right: 1px solid var(--side-border);
}
.sidebar-brand{
  padding: 20px 20px 16px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--side-border);
}
.sidebar-brand .brand-text{ display:flex; flex-direction:column; line-height:1.1;}
.sidebar-brand .brand-text strong{ color:#fff; font-size:15px;}
.sidebar-brand .brand-text span{ color: var(--side-muted); font-size: 11px; letter-spacing: .8px; text-transform: uppercase;}

.sidebar-nav{
  padding: 10px 10px 20px; overflow-y: auto; flex: 1;
}
.sidebar-nav::-webkit-scrollbar{ width: 6px;}
.sidebar-nav::-webkit-scrollbar-thumb{ background: #243046; border-radius: 999px; }

.nav-group-title{
  color: var(--side-muted);
  font-size: 10px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase;
  padding: 14px 12px 6px;
}
.nav-item{
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin-bottom: 2px;
  background: none; color: var(--side-text);
  border: 0; border-radius: 10px;
  font-size: 14px; font-weight: 500;
  text-align: left;
  position: relative;
  transition: all .15s ease;
}
.nav-item svg{ width: 18px; height: 18px; fill: currentColor; opacity: .8;}
.nav-item:hover{ background: #1A2436; color: #fff; }
.nav-item.active{
  background: var(--side-active-bg);
  color: #fff;
}
.nav-item.active::before{
  content:""; position: absolute; left: -10px; top: 10px; bottom: 10px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--side-active-line);
}
.nav-badge{
  font-style: normal;
  margin-left: auto;
  background: #1F2937;
  color: #CBD5E1;
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
}
.nav-item.active .nav-badge{
  background: var(--brand-red); color: #fff;
}

/* Settings block */
.settings-block{
  padding: 8px 10px 6px;
  margin-top: 8px;
}
.lbl{
  display:block; color: var(--side-muted);
  font-size: 11px; font-weight: 600; letter-spacing:.5px; text-transform: uppercase;
  margin: 14px 0 6px;
}

.num-stepper{
  display:flex; align-items:stretch;
  background: #0F1624;
  border: 1px solid #1F2A3E;
  border-radius: 8px; overflow: hidden;
  height: 36px;
}
.num-stepper button{
  width: 32px; background: #17213A; color: #CBD5E1; border: 0;
  font-size: 16px; font-weight: 700;
  transition: background .15s ease;
}
.num-stepper button:hover{ background: #1F2B4A; color:#fff; }
.num-stepper input{
  flex: 1; background: transparent; border: 0; outline: 0;
  text-align: center;
  color: #fff; font-weight: 600; font-size: 14px;
  -moz-appearance: textfield;
}
.num-stepper input::-webkit-outer-spin-button,
.num-stepper input::-webkit-inner-spin-button{ -webkit-appearance: none; margin: 0; }

.day-picker{
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.day-picker label{
  display:grid; place-items: center;
  background: #0F1624;
  border: 1px solid #1F2A3E;
  border-radius: 6px;
  padding: 6px 0;
  font-size: 11px; color: var(--side-text);
  cursor: pointer;
  transition: all .15s ease;
}
.day-picker label input{ display:none; }
.day-picker label span{ font-weight: 600; }
.day-picker label:has(input:checked){
  background: linear-gradient(135deg, var(--brand-red) 0%, #FF4C5A 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 3px 10px -2px rgba(239,68,68,.45);
}

.capacity-readout{
  margin-top: 14px;
  background: #0F1624;
  border: 1px solid #1F2A3E;
  border-radius: 10px;
  padding: 12px;
  display: grid; gap: 8px;
}
.capacity-readout > div{
  display: flex; justify-content: space-between; align-items: baseline;
}
.capacity-readout span{ color: var(--side-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.capacity-readout strong{ color: #fff; font-size: 14px;}

/* Sidebar footer */
.sidebar-footer{
  padding: 12px;
  border-top: 1px solid var(--side-border);
}
.user-chip{
  display:flex; align-items:center; gap: 10px;
  padding: 8px; border-radius: 10px;
  background: #0F1624;
}
.avatar{
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-pink) 100%);
  color: #fff; font-weight: 700; display: grid; place-items: center;
  font-size: 13px;
}
.user-meta{ flex: 1; display:flex; flex-direction:column; line-height:1.1; overflow: hidden;}
.user-meta strong{ color: #fff; font-size:13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.user-meta span{ color: var(--side-muted); font-size: 11px; }

.icon-btn{
  width: 34px; height: 34px; border-radius: 8px;
  background: transparent; border: 0;
  display: grid; place-items: center;
  color: var(--side-muted);
  transition: all .15s ease;
}
.icon-btn svg{ width: 18px; height: 18px; fill: currentColor; stroke: currentColor; fill: currentColor;}
.icon-btn:hover{ background: #1A2436; color: #fff; }

/* ---------- Main ---------- */
.main{
  display: flex; flex-direction: column;
  min-width: 0;
}

/* Topbar */
.topbar{
  height: var(--top-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,.85);
}
.topbar-left{ display:flex; align-items:center; gap: 14px;}
.topbar-right{ display:flex; align-items:center; gap: 12px;}
.page-title{
  margin: 0; font-size: 20px; font-weight: 700; color: var(--text);
  letter-spacing: -.01em;
}
.page-sub{ margin: 2px 0 0; font-size: 13px; color: var(--text-muted); }

.menu-toggle{ color: var(--text-muted); }
.menu-toggle svg{ fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.menu-toggle:hover{ background: #F3F4F6; color: var(--text); }

.topbar .icon-btn{ color: var(--text-muted); }
.topbar .icon-btn:hover{ background: #F3F4F6; color: var(--text); }

.clock{
  padding: 8px 14px;
  background: #F3F4F6;
  border-radius: 999px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* Filter bar */
.filter-bar{
  padding: 18px 28px 0;
  display: flex; flex-direction: column; gap: 10px;
}
.filter-chips{
  display: flex; flex-wrap: wrap; gap: 8px;
}
.chip{
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .15s ease;
}
.chip svg{ width:14px; height:14px; fill: currentColor;}
.chip:hover{ border-color: var(--border-strong); }
.chip.chip-active{
  background: var(--text);
  color: #fff; border-color: var(--text);
}
.chip-custom{ border-style: dashed; }

.filter-custom{
  display:flex; flex-wrap:wrap; align-items:flex-end; gap: 10px;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 14px;
}
.filter-custom label{
  font-size: 12px; color: var(--text-muted);
  display: flex; flex-direction: column; gap: 4px;
}
.filter-custom input[type="date"]{
  border: 1px solid var(--border); padding: 8px 10px;
  border-radius: 8px; font-size: 13px;
  min-width: 150px;
  background: #fff; color: var(--text);
}
.filter-custom input[type="date"]:focus{ outline: 2px solid rgba(227,6,19,.2); border-color: var(--brand-red);}

.filter-meta{
  font-size: 12px; color: var(--text-muted);
  display: flex; gap: 8px; align-items: center;
}
.filter-meta .sep{ color: var(--text-soft); }

/* ---------- Tabs ---------- */
.tab-panel{
  display: none;
  padding: 20px 28px 40px;
  animation: fadeSlide .35s cubic-bezier(.2,.8,.2,1);
}
.tab-panel.active{ display: block; }
@keyframes fadeSlide{
  from{ opacity: 0; transform: translateY(6px); }
  to  { opacity: 1; transform: translateY(0);   }
}

/* ---------- Cards ---------- */
.card{
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover{ box-shadow: var(--shadow); }
.card-head{
  padding: 16px 18px 6px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.card-head h3{ margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -.01em;}
.card-sub{ font-size: 12px; color: var(--text-muted);}
.card-tools{ display:flex; align-items:center; gap: 8px;}

/* KPI */
.kpi-grid{
  display: grid; gap: 16px;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 16px;
}
.kpi{
  padding: 16px 18px;
  display: flex; align-items: center; gap: 14px;
  position: relative; overflow: hidden;
}
.kpi::before{
  content:"";
  position: absolute; right: -40px; top: -40px;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(227,6,19,.06), transparent);
  pointer-events: none;
}
.kpi-icon{
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  color: #fff;
  flex: 0 0 46px;
}
.kpi-icon svg{ width: 22px; height: 22px; fill: currentColor;}
.kpi-icon.red    { background: linear-gradient(135deg, #E30613, #FF4C5A); }
.kpi-icon.orange { background: linear-gradient(135deg, #F97316, #FDBA74); }
.kpi-icon.green  { background: linear-gradient(135deg, #16A34A, #4ADE80); }
.kpi-icon.blue   { background: linear-gradient(135deg, #2563EB, #60A5FA); }
.kpi-body{ display:flex; flex-direction:column; gap:2px; min-width:0;}
.kpi-label{ font-size: 12px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing:.4px; }
.kpi-value{
  font-size: 26px; font-weight: 800; color: var(--text);
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.kpi-sub{ font-size: 12px; color: var(--text-muted);}

/* Grid layouts */
.grid-2-1{
  display: grid; gap: 16px;
  grid-template-columns: 2fr 1fr;
  margin-bottom: 16px;
}
@media (max-width: 1100px){
  .kpi-grid{ grid-template-columns: repeat(2, 1fr); }
  .grid-2-1{ grid-template-columns: 1fr; }
}

/* Charts */
.chart-card{ display: flex; flex-direction: column;}
.chart-wrap{
  position: relative;
  padding: 12px 18px 18px;
  height: 300px;
}
.gauge-wrap{ display: grid; place-items: center; position: relative;}
.gauge-center{
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; pointer-events: none;
  padding-top: 10px;
}
.gauge-center strong{ font-size: 34px; font-weight: 800; letter-spacing:-.02em; color: var(--text);}
.gauge-center span{ font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px;}

.donut-wrap{ padding: 12px 18px 18px; height: 300px; }

/* Tables */
.table-card{ overflow: hidden; }
.table-wrap{
  overflow-x: auto;
  border-top: 1px solid var(--border);
}
.data-table{
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: 13px;
}
.data-table thead th{
  position: sticky; top: 0;
  background: #FAFAFC;
  color: var(--text-muted);
  font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: .6px;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table th.num, .data-table td.num{ text-align: right; font-variant-numeric: tabular-nums;}
.data-table tbody td{
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.data-table tbody tr{ transition: background .12s ease; }
.data-table tbody tr:hover{ background: #FAFAFC; }
.data-table.compact td, .data-table.compact th{ padding: 8px 12px; }

.table-footer{
  padding: 10px 14px;
  font-size: 12px; color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: #FAFAFC;
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; flex-wrap: wrap;
}

/* Status badges */
.badge{
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .3px;
}
.badge::before{
  content:""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.badge.ok      { color: var(--success); background: #DCFCE7;}
.badge.warn    { color: #B45309;       background: #FEF3C7;}
.badge.err     { color: var(--danger); background: #FEE2E2;}
.badge.info    { color: #1D4ED8;       background: #DBEAFE;}
.badge.muted   { color: #4B5563;       background: #E5E7EB;}
/* Leasing-Badge - Lila-Akzent, damit Leasing-Bestellungen sofort sichtbar sind */
.badge-leasing {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .3px;
  color: #6D28D9;
  background: #EDE9FE;
  border: 1px solid #C4B5FD;
}
/* E-Bike-Badge - kleiner Stromsymbol-Indikator hinter Artikelnummer */
.badge-ebike {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  background: #FEF3C7;
  color: #92400E;
  margin-left: 4px;
  vertical-align: middle;
}
/* Mono-Spalten für LP / Rahmen-Nummer */
td.mono, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
td.small, .small { font-size: 11px; }
td.mono.small { letter-spacing: -.2px; }
.muted { color: #6B7280; }

/* Search */
.search-wrap{
  display:flex; align-items:center;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  min-width: 240px;
}
.search-wrap:focus-within{ border-color: var(--brand-red); box-shadow: 0 0 0 3px rgba(227,6,19,.08);}
.search-wrap svg{ width:16px; height:16px; fill: var(--text-soft); }
.search-wrap input{
  border: 0; outline: 0; padding: 8px; width: 100%; font-size: 13px;
}

/* Toasts */
.toast-stack{
  position: fixed; bottom: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  max-width: 360px;
}
.toast{
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand-red);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  animation: toastIn .3s cubic-bezier(.16,1,.3,1);
  display: flex; gap: 10px; align-items: flex-start;
}
.toast.ok    { border-left-color: var(--success); }
.toast.warn  { border-left-color: var(--warning); }
.toast.err   { border-left-color: var(--danger); }
.toast strong{ display:block; margin-bottom: 2px; }
.toast span  { color: var(--text-muted); }
@keyframes toastIn{
  from{ transform: translateX(30px); opacity: 0; }
  to  { transform: translateX(0);    opacity: 1; }
}
.toast.leaving{ animation: toastOut .25s forwards ease; }
@keyframes toastOut{
  to{ transform: translateX(30px); opacity: 0; }
}

/* Loading overlay */
.loading-overlay{
  position: fixed; inset: 0;
  background: rgba(17,24,39,.35);
  backdrop-filter: blur(3px);
  z-index: 9998;
  display: none;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; color: #fff; font-weight: 500;
}
.loading-overlay.show{ display: flex; animation: fadeIn .2s;}
@keyframes fadeIn{ from{opacity:0} to{opacity:1}}
.spinner{
  width: 46px; height: 46px; border-radius: 50%;
  border: 4px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  animation: spin .8s linear infinite;
}

/* Responsive sidebar collapse */
@media (max-width: 900px){
  .app-body{ grid-template-columns: 1fr; }
  .sidebar{
    position: fixed; inset: 0 auto 0 0; z-index: 50;
    width: var(--side-w);
    transform: translateX(-100%);
    transition: transform .25s ease;
  }
  .sidebar.open{ transform: translateX(0); box-shadow: var(--shadow-lg);}
  .menu-toggle{ display: grid; }
  .topbar{ padding: 0 16px; }
  .tab-panel, .filter-bar { padding-left: 16px; padding-right: 16px; }
}

/* Subtle staggered row reveal */
.data-table tbody tr{
  animation: rowIn .25s ease both;
}
.data-table tbody tr:nth-child(1) { animation-delay: .02s;}
.data-table tbody tr:nth-child(2) { animation-delay: .04s;}
.data-table tbody tr:nth-child(3) { animation-delay: .06s;}
.data-table tbody tr:nth-child(4) { animation-delay: .08s;}
.data-table tbody tr:nth-child(5) { animation-delay: .10s;}
.data-table tbody tr:nth-child(6) { animation-delay: .12s;}
.data-table tbody tr:nth-child(7) { animation-delay: .14s;}
.data-table tbody tr:nth-child(8) { animation-delay: .16s;}
@keyframes rowIn{ from{opacity:0; transform: translateY(4px);} to{opacity:1; transform: translateY(0);}}

/* Empty state */
.empty{
  padding: 40px 20px; text-align: center; color: var(--text-muted);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.empty svg{ width: 42px; height: 42px; fill: var(--text-soft);}
.empty strong{ color: var(--text); font-weight: 600; }

/* Number highlight */
.num-pos{ color: var(--success); font-weight: 700; }
.num-neg{ color: var(--danger);  font-weight: 700; }

/* ================================================================
   FILTER DROPDOWNS (Marke / Kategorie)
   ================================================================ */
.filter-dropdowns{
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px;
}
.filter-dropdowns .dd{
  display: flex; flex-direction: column; gap: 4px;
}
.filter-dropdowns .dd > span{
  font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .6px; font-weight: 600;
}
.filter-dropdowns select{
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 32px 8px 12px;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%236B7280'><path d='M7 10l5 5 5-5z'/></svg>") no-repeat right 10px center;
  font-size: 13px; color: var(--text);
  min-width: 180px;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s ease;
}
.filter-dropdowns select:hover{ border-color: var(--border-strong); }
.filter-dropdowns select:focus{
  outline: 0; border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(227,6,19,.08);
}
#resetFilters{ margin-left: 4px; align-self: center; }

/* ================================================================
   SORTABLE TABLE HEADERS
   ================================================================ */
.data-table.sortable thead th{
  cursor: pointer;
  user-select: none;
  position: sticky; top: 0;
  padding-right: 26px;
}
.data-table.sortable thead th::after{
  content: "";
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 10px; height: 14px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='14' viewBox='0 0 10 14' fill='none'><path d='M5 0l3 5H2L5 0z' fill='%23CBD5E1'/><path d='M5 14l-3-5h6l-3 5z' fill='%23CBD5E1'/></svg>") no-repeat center;
}
.data-table.sortable thead th.sort-asc::after{
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='14' viewBox='0 0 10 14' fill='none'><path d='M5 0l3 5H2L5 0z' fill='%23E30613'/><path d='M5 14l-3-5h6l-3 5z' fill='%23E5E7EB'/></svg>") no-repeat center;
}
.data-table.sortable thead th.sort-desc::after{
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='14' viewBox='0 0 10 14' fill='none'><path d='M5 0l3 5H2L5 0z' fill='%23E5E7EB'/><path d='M5 14l-3-5h6l-3 5z' fill='%23E30613'/></svg>") no-repeat center;
}
.data-table.sortable thead th:hover{ color: var(--text); background: #F1F5F9; }

/* ================================================================
   PAGINATION
   ================================================================ */
.pager{
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--text-muted);
}
.pager label{
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-muted);
}
.pager .page-size{
  appearance: none; -webkit-appearance: none;
  border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 22px 4px 8px;
  font-size: 12px;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='%236B7280'><path d='M7 10l5 5 5-5z'/></svg>") no-repeat right 6px center;
  cursor: pointer;
}
.pager .page-prev, .pager .page-next{
  width: 26px; height: 26px; border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff; color: var(--text);
  font-size: 16px; font-weight: 700;
  display: grid; place-items: center;
  transition: all .15s ease;
}
.pager .page-prev:hover:not(:disabled),
.pager .page-next:hover:not(:disabled){
  border-color: var(--brand-red); color: var(--brand-red);
}
.pager .page-prev:disabled, .pager .page-next:disabled{
  opacity: .35; cursor: not-allowed;
}
.pager .page-info{
  font-variant-numeric: tabular-nums;
  min-width: 60px; text-align: center;
}

/* ================================================================
   GRID-4 OVERVIEW (Kategorien | Marken | Auslastung | Älteste 10)
   ================================================================ */
.grid-4{
  display: grid; gap: 16px;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 16px;
}
@media (max-width: 1400px){
  .grid-4{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px){
  .grid-4{ grid-template-columns: 1fr; }
}

.mini-card{
  padding: 0;
  display: flex; flex-direction: column;
  min-height: 280px;
}
.mini-card .card-head{
  padding: 14px 16px 8px;
  flex: 0 0 auto;
}
.mini-card .card-head h3{ font-size: 14px; }

/* Mini bar list (Kategorien / Marken) */
.mini-list{
  list-style: none;
  margin: 0;
  padding: 4px 16px 14px;
  display: flex; flex-direction: column; gap: 10px;
  overflow-y: auto;
  flex: 1 1 auto;
}
.mini-list li{
  display: flex; flex-direction: column; gap: 4px;
}
.mini-top{
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px;
}
.mini-label{
  font-size: 13px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0; flex: 1;
}
.mini-val{
  font-variant-numeric: tabular-nums;
  color: var(--text); font-weight: 700; font-size: 13px;
}
.mini-bar{
  height: 6px; background: #F1F2F5; border-radius: 99px; overflow: hidden;
}
.mini-bar > span{
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--brand-red) 0%, var(--brand-pink) 100%);
  border-radius: 99px;
  transition: width .5s cubic-bezier(.16,1,.3,1);
}
.mini-bar.mini-bar-alt > span{
  background: linear-gradient(90deg, #3B82F6 0%, #60A5FA 100%);
}
.mini-empty{
  color: var(--text-muted); font-size: 13px;
  padding: 24px 0; text-align: center;
}

/* Gauge card footer (offen / verfügbar) */
.mini-card .gauge-wrap{
  height: 180px;
  padding: 6px 10px 4px;
}
.mini-card .gauge-center{ padding-top: 4px; }
.mini-card .gauge-center strong{ font-size: 26px; }
.mini-card .gauge-center span{ font-size: 11px; }
.gauge-foot{
  display: flex; justify-content: space-around;
  padding: 10px 14px 14px;
  border-top: 1px dashed var(--border);
  margin-top: auto;
  font-size: 12px; color: var(--text-muted);
}
.gauge-foot em{
  font-style: normal; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Älteste offene Aufträge (Top 10 list) */
.age-list{
  list-style: none;
  margin: 0;
  padding: 4px 16px 14px;
  display: flex; flex-direction: column; gap: 8px;
  overflow-y: auto;
  flex: 1 1 auto;
}
.age-item{
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: background .12s ease, transform .12s ease;
}
.age-item:hover{ background: #F3F4F6; transform: translateX(2px); }
.age-left{
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0; flex: 1;
}
.age-order{
  font-size: 13px; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.age-item-name{
  font-size: 11px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Scrollbar styling for mini/age lists */
.mini-list::-webkit-scrollbar,
.age-list::-webkit-scrollbar{ width: 6px; }
.mini-list::-webkit-scrollbar-thumb,
.age-list::-webkit-scrollbar-thumb{ background: #E5E7EB; border-radius: 999px; }
.mini-list::-webkit-scrollbar-thumb:hover,
.age-list::-webkit-scrollbar-thumb:hover{ background: #D1D5DB; }


/* ---------- Lagerort-Dropdown im Login ---------- */
.select-wrap{
  position: relative;
}
.select-wrap select{
  flex: 1; border: 0; outline: 0; padding: 12px 34px 12px 0;
  font-size: 14px; color: var(--text); background: transparent;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}
.select-wrap select:disabled{ color: var(--text-soft); cursor: default; }
.select-chevron{
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; fill: none; stroke: var(--text-soft);
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  pointer-events: none;
}
.select-wrap optgroup{
  font-weight: 700;
  color: var(--text);
  font-style: normal;
}
.select-wrap option{
  padding: 6px;
  color: var(--text);
}

/* === Pickstatus / Stationen ============================================== */
.station-badge{
  margin: 1px 2px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  display: inline-block;
  cursor: help;
}
.stations-col{
  max-width: 320px;
  white-space: normal;
  line-height: 1.6;
}
.pickstatus-grid{
  margin-top: 12px;
}
/* Pickstatus-Badge: kleine visuelle Andeutung, dass Hover Infos zeigt */
td .badge[title]{
  cursor: help;
}

/* === Detail-Drawer (Übersicht "Eye-Click") ============================= */
.drawer-backdrop{
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .55);
  display: flex; justify-content: flex-end;
  z-index: 9000;
  animation: fadeBd .18s ease-out;
}
.drawer-backdrop.hidden{ display: none; }
@keyframes fadeBd { from { opacity: 0; } to { opacity: 1; } }
.drawer-panel{
  width: min(880px, 96vw);
  height: 100vh;
  background: var(--bg, #fff);
  box-shadow: -10px 0 30px rgba(0,0,0,.18);
  display: flex; flex-direction: column;
  animation: slideIn .2s ease-out;
}
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.drawer-head{
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border, #e5e7eb);
}
.drawer-head h3{ margin: 0 0 2px; }
.drawer-body{
  padding: 18px 22px; overflow-y: auto; flex: 1;
}
.drawer-body h4{
  margin: 18px 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: .5px;
}
.drawer-body h4:first-child{ margin-top: 0; }

/* Filterleiste: Toggle-Selects bekommen schmaler Breite */
.filter-dropdowns .dd.toggle-dd select{
  min-width: 150px;
}

/* Snapshot-Status-Chip (zeigt das Alter des Daily-Snapshots) */
.snapshot-chip{
  margin-left: 12px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.snapshot-chip a{
  color: inherit;
  text-decoration: underline;
  margin-left: 6px;
  font-weight: 500;
}

/* ============================================================
   HEUTE WORKFLOW - intelligenter Tagesplan
   ============================================================ */
.hw-header { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.hw-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.hw-kpi {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.hw-kpi-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: #6B7280; }
.hw-kpi-val { font-size: 24px; font-weight: 800; color: #111827; margin: 4px 0 2px; }
.hw-kpi-sub { font-size: 11px; color: #9CA3AF; }
.hw-kpi-warn .hw-kpi-val { color: #B45309; }
.hw-kpi-info .hw-kpi-val { color: #6D28D9; }
.hw-kpi-ok   .hw-kpi-val { color: #047857; }

.hw-capbar { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; }
.hw-capbar-track {
  position: relative; height: 12px; background: #F3F4F6; border-radius: 999px; overflow: visible; margin-bottom: 8px;
}
.hw-capbar-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, #34D399, #FBBF24 60%, #EF4444);
  border-radius: 999px; transition: width .3s ease;
}
.hw-capbar-cutoff {
  position: absolute; top: -4px; bottom: -4px; width: 3px; background: #1F2937;
  border-radius: 2px;
}
.hw-capbar-cutoff::after {
  content: "Tageskapazität"; position: absolute; left: 6px; top: -4px;
  background: #1F2937; color: #fff; padding: 2px 6px; border-radius: 4px;
  font-size: 10px; white-space: nowrap;
}
.hw-capbar-label { font-size: 12px; color: #4B5563; }

.hw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 1280px) { .hw-grid { grid-template-columns: 1fr; } }

.hw-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 0; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.hw-card header {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #FAFAFC, #F3F4F6);
  font-weight: 700; font-size: 14px;
}
.hw-card .hw-icon { font-size: 18px; }
.hw-card .hw-sub  { font-size: 11px; color: #6B7280; font-weight: 500; margin-left: 6px; }
.hw-card .hw-count {
  margin-left: auto; background: #111827; color: #fff;
  padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.hw-eilig header { background: linear-gradient(180deg, #FEF2F2, #FEE2E2); }
.hw-eilig .hw-count { background: #DC2626; }
.hw-pick header   { background: linear-gradient(180deg, #ECFDF5, #D1FAE5); }
.hw-ebike header  { background: linear-gradient(180deg, #FFFBEB, #FEF3C7); }
.hw-montage header{ background: linear-gradient(180deg, #EFF6FF, #DBEAFE); }
.hw-versand header{ background: linear-gradient(180deg, #F5F3FF, #EDE9FE); }
.hw-qs header     { background: linear-gradient(180deg, #FEF3F2, #FFE4E1); }
.hw-qs .hw-count  { background: #B45309; }

.hw-cardbody { padding: 8px 12px 14px; overflow-y: auto; max-height: 520px; }
.hw-empty { padding: 28px 12px; color: #9CA3AF; text-align: center; font-size: 13px; }

/* Heute Workflow - Listen */
.hw-list { display: flex; flex-direction: column; gap: 4px; }
.hw-li {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(160px, 1.5fr) auto;
  gap: 12px; align-items: center;
  padding: 7px 10px; border-radius: 8px; font-size: 12px;
  border: 1px solid transparent;
}
.hw-li:hover { background: #F9FAFB; border-color: var(--border); }
.hw-li-left  { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hw-li-left strong { font-size: 12px; }
.hw-li-art  { color: #6B7280; font-family: ui-monospace, monospace; font-size: 11px; }
.hw-li-mid  { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hw-li-model { font-weight: 600; color: #1F2937; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hw-li-marke { font-size: 11px; color: #6B7280; }
.hw-li-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hw-age {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-weight: 700; font-size: 11px;
}
.hw-age.age1 { color: #047857; background: #D1FAE5; }
.hw-age.age2 { color: #B45309; background: #FEF3C7; }
.hw-age.age3 { color: #B91C1C; background: #FECACA; }
.hw-age.ageX { color: #fff;    background: #B91C1C; }
.hw-shelf { font-size: 11px; color: #4B5563; }
.hw-min   { font-size: 11px; color: #6B7280; font-weight: 500; }
.hw-qs-flag { font-size: 11px; color: #B45309; }

/* Picker-Tour Karten */
.hw-shelves { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.hw-shelf-card {
  border: 1px solid var(--border); border-radius: 10px;
  background: #fff; padding: 10px 12px;
}
.hw-shelf-card header {
  display: flex; align-items: baseline; gap: 8px;
  border: 0 !important; background: transparent !important; padding: 0 0 6px;
  font-size: 13px;
}
.hw-stop {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  background: #047857; color: #fff; border-radius: 4px;
  font-size: 11px; font-weight: 800;
}
.hw-shelf-card em { color: #6B7280; font-style: normal; font-size: 11px; margin-left: auto; }
.hw-shelf-items { display: flex; flex-direction: column; gap: 3px; padding-top: 4px;
                  border-top: 1px dashed var(--border); }
.hw-shelf-item {
  display: grid; grid-template-columns: 88px 100px 1fr; gap: 6px;
  font-size: 11px; padding: 2px 0;
}
.hw-shelf-item strong { font-weight: 700; }
.hw-shelf-item .muted { font-size: 11px; color: #6B7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hw-shelf-more { font-size: 11px; color: #6B7280; font-style: italic; padding-top: 4px; }

/* Montage-Plan Batches */
.hw-batches { display: flex; flex-direction: column; gap: 10px; }
.hw-batch {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; background: #fff;
}
.hw-batch.hw-batch-over { background: #FAFBFC; opacity: .8; border-style: dashed; }
.hw-batch header {
  display: flex; align-items: center; gap: 10px;
  border: 0 !important; background: transparent !important; padding: 0 0 8px;
  flex-wrap: wrap;
}
.hw-batch-title strong { font-size: 13px; }
.hw-batch-title em { color: #6B7280; font-style: normal; font-size: 11px; margin-left: 6px; }
.hw-batch-meta { margin-left: auto; display: flex; gap: 10px; font-size: 11px; color: #4B5563; align-items: center; }
.hw-batch-total { font-weight: 700; color: #111827; }
.hw-batch-tag {
  padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 700;
  background: #FEF3C7; color: #B45309;
}
.hw-batch-tag.hw-batch-ok { background: #D1FAE5; color: #047857; }
.hw-batch-bikes { display: flex; flex-wrap: wrap; gap: 4px; }
.hw-batch-bike {
  padding: 3px 8px; background: #F3F4F6; border-radius: 6px;
  font-size: 11px; font-family: ui-monospace, monospace;
  border: 1px solid #E5E7EB;
}
.hw-batch-bike.hw-more { background: #fff; color: #6B7280; font-style: italic; }

/* ============================================================
   IN DER MONTAGE - Drawer-Tabelle (eye-drawer)
   ============================================================ */
#tableInMontage tbody tr.drawer-row { cursor: pointer; }
#tableInMontage tbody tr.drawer-row:hover { background: #F9FAFB; }
.drawer-toggle {
  width: 28px; text-align: center; color: #6B7280; font-size: 10px;
  user-select: none;
}
tr.drawer-detail > td { background: #FAFBFC; padding: 0 !important; }
.drawer-content { padding: 8px 12px 16px; }
.drawer-table { font-size: 12px; }
.drawer-table thead th { background: transparent; font-size: 11px; color: #6B7280; }

/* ============================================================
   VERSAND-BEREIT - Tagesgruppen
   ============================================================ */
.versand-day { margin-bottom: 16px; padding: 14px; }
.versand-day-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 12px; }
.versand-day-header h3 { margin: 0; font-size: 16px; color: #111827; }
.versand-day-stats { display: flex; gap: 14px; font-size: 12px; color: #4B5563; }
.versand-day-stats strong { color: #111827; }
.empty-card { padding: 40px; text-align: center; color: #9CA3AF; }

/* ============================================================
   AUFBAUQUOTE
   ============================================================ */
.aq-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.aq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .aq-grid { grid-template-columns: 1fr; } }
.aq-block { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.aq-block header { padding: 12px 16px; border-bottom: 1px solid var(--border); background: #FAFAFC; }
.aq-block header h3 { margin: 0; font-size: 14px; }
.aq-quote {
  display: flex; align-items: center; gap: 8px; justify-content: flex-end;
}
.aq-quote-val { font-weight: 700; min-width: 42px; text-align: right; }
.aq-quote-val.ok   { color: #047857; }
.aq-quote-val.warn { color: #B45309; }
.aq-quote-val.err  { color: #B91C1C; }
.aq-quote-bar { width: 90px; height: 8px; background: #F3F4F6; border-radius: 999px; overflow: hidden; }
.aq-quote-fill { height: 100%; transition: width .3s ease; }
.aq-quote-fill.ok   { background: #10B981; }
.aq-quote-fill.warn { background: #F59E0B; }
.aq-quote-fill.err  { background: #EF4444; }

/* Hot Badge in Navigation (Heute Workflow) */
.nav-badge-hot { background: #DC2626 !important; color: #fff !important; animation: pulse-hot 2s ease-in-out infinite; }
@keyframes pulse-hot {
  0%,100% { box-shadow: 0 0 0 0 rgba(220,38,38,.4); }
  50%     { box-shadow: 0 0 0 6px rgba(220,38,38,0); }
}

/* Legend / Hint in Tab-Headers */
.legend {
  margin-left: auto; display: flex; align-items: center;
  font-size: 12px; color: #6B7280; gap: 8px;
}
.legend strong { color: #111827; }

/* ============================================================
   EYE-ICON inline + DETAIL-POPUP
   ============================================================ */
.eye-btn {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 18px; height: 18px;
  margin-left: 4px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: #9CA3AF;
  cursor: pointer;
  vertical-align: middle;
  transition: all .12s ease;
}
.eye-btn:hover {
  background: #EFF6FF;
  color: #1D4ED8;
  transform: scale(1.15);
}
.eye-btn svg { fill: currentColor; }

/* Popup-Overlay */
.detail-popup-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(2px);
  z-index: 9000;
  display: none;
  align-items: flex-start; justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  animation: dpFadeIn .15s ease;
}
.detail-popup-overlay.show { display: flex; }
@keyframes dpFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Popup-Karte */
.detail-popup {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 920px;
  max-height: calc(100vh - 80px);
  box-shadow: 0 30px 80px -10px rgba(0,0,0,.4);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: dpPop .2s cubic-bezier(.16,1,.3,1);
}
@keyframes dpPop {
  from { opacity: 0; transform: translateY(20px) scale(.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.dp-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #FAFAFC, #fff);
  display: flex; align-items: flex-start; gap: 12px;
}
.dp-titlewrap { flex: 1; }
.dp-header h2 { margin: 0 0 4px; font-size: 20px; color: #0F172A; }
.dp-header p  { margin: 0; color: #64748B; font-size: 13px; }
.dp-close {
  background: transparent; border: 0; padding: 6px;
  border-radius: 8px; cursor: pointer; color: #64748B;
  display: flex; align-items: center; justify-content: center;
}
.dp-close:hover { background: #F1F5F9; color: #0F172A; }
.dp-close svg { fill: currentColor; }

/* Stats-Leiste oben im Popup */
.dp-stats {
  display: flex; flex-wrap: wrap; gap: 6px 8px;
  padding: 10px 24px; border-bottom: 1px solid var(--border);
  background: #FAFAFC; font-size: 12px;
}
.dp-stat {
  padding: 4px 10px; background: #fff;
  border: 1px solid var(--border); border-radius: 999px;
  color: #475569;
}
.dp-stat strong { color: #0F172A; }
.dp-stat-warn { color: #92400E; border-color: #FED7AA; background: #FFFBEB; }
.dp-stat-info { color: #6D28D9; border-color: #C4B5FD; background: #F5F3FF; }
.dp-stat-ok   { color: #047857; border-color: #6EE7B7; background: #ECFDF5; }

/* Body */
.dp-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}
.dp-row {
  background: #FAFBFC;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden;
}
.dp-row:last-child { margin-bottom: 0; }
.dp-row-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px;
}
.dp-row-id strong { font-size: 14px; }
.dp-row-flags { display: flex; gap: 4px; align-items: center; }

.dp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px 16px;
  padding: 14px 16px;
}
.dp-field {
  display: flex; flex-direction: column;
}
.dp-field-lbl {
  font-size: 11px; text-transform: uppercase; letter-spacing: .4px;
  color: #94A3B8; font-weight: 600;
}
.dp-field-val {
  font-size: 13px; color: #0F172A;
  margin-top: 2px;
  word-break: break-all;
}
.dp-field-val.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.dp-section {
  padding: 0 16px 14px;
  border-top: 1px dashed var(--border);
  margin-top: 4px;
}
.dp-section h4 {
  margin: 12px 0 8px;
  font-size: 12px; text-transform: uppercase; letter-spacing: .5px;
  color: #64748B; font-weight: 700;
}
.dp-section .dp-grid {
  padding: 0;
}
.dp-pickstatus { margin-bottom: 6px; }
.dp-stations {
  display: flex; flex-wrap: wrap; gap: 4px;
  font-size: 12px;
}
.dp-empty {
  padding: 40px; text-align: center; color: #94A3B8;
}

/* ============================================================
   HEUTE WORKFLOW v2 - Vereinfacht (3 Sektionen)
   ============================================================ */
.hw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.hw-grid .hw-card-wide {
  grid-column: 1 / -1;   /* Montage-Plan ueber volle Breite */
}
@media (max-width: 1100px) { .hw-grid { grid-template-columns: 1fr; } }

/* Nächste-Station-Spalte */
.hw-nextstep {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.nextstep-kommissionierung { background: #DBEAFE; color: #1D4ED8; }
.nextstep-vormontage       { background: #FEF3C7; color: #92400E; }
.nextstep-montage          { background: #FED7AA; color: #9A3412; }
.nextstep-verpackung       { background: #EDE9FE; color: #6D28D9; }
.nextstep-warenausgang     { background: #DCFCE7; color: #047857; }
.nextstep-keine            { background: #F3F4F6; color: #4B5563; }
.nextstep-fertig           { background: #DCFCE7; color: #047857; }
.nextstep-unbekannt        { background: #F3F4F6; color: #4B5563; }

.hw-li-right { gap: 10px; }

/* ============================================================
   AUFBAUQUOTE v2 - 3 Bloecke untereinander statt 2 nebeneinander
   ============================================================ */
.aq-block { margin-bottom: 22px; }
.aq-block header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.aq-legend { font-size: 12px; color: #6B7280; }
.aq-block table th small { display: block; font-weight: 400; opacity: .7; font-size: 10px; }

/* AQ-Tabellen: Bestand-Spalte hervorheben */
#tableAufbauMarke td:nth-child(2) strong,
#tableAufbauKategorie td:nth-child(2) strong,
#tableAufbauModelle td:nth-child(4) strong {
  color: #0F172A;
  font-size: 14px;
}
