/* css/styles.css */

:root {
  --bg: #0f172a;
  --bg2: #1e293b;
  --card: #1e293b;
  --border: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --blue: #38bdf8;
  --green: #4ade80;
  --red: #f87171;
  --gold: #fbbf24;
  --purple: #c084fc;
  --orange: #fb923c;
  --pink: #f472b6;
  --cyan: #22d3ee;
  --corp: #a78bfa;
  --drinks: #fb923c;
  --ops: #64748b;
  scrollbar-color: #9589F9 #12243A; /* 1. Farbe: Schieber, 2. Farbe: Hintergrund */
  scrollbar-width: thin;            /* Optional: macht den Scrollbalken schmaler */
}



{ box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
    padding: 0px;
}

/* Header */
.topbar {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-bottom: 1px solid var(--border);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar h1 {
  font-size: 1.35rem;
  font-weight: 800;
  background: linear-gradient(135deg, #38bdf8, #818cf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.topbar .badge {
  font-size: 0.7rem;
  background: rgba(56,189,248,0.15);
  color: var(--blue);
  border: 1px solid rgba(56,189,248,0.3);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
}

/* Layout */
.app {
  display: grid;
  grid-template-columns: 350px 1fr;
  flex: 1;
  margin-top: 0px;
}
.sidebar {
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 16px;
  overflow-y: auto;
  max-height: 100vh;
}
.sidebar-mobile-toggle {
  display: none; /* nur mobil sichtbar */
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 0;
  background: #192335;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, border-radius 0.2s;
}
.sidebar-mobile-toggle:hover {
  background: #1e293b;
}
.sidebar-mobile-toggle-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-mobile-toggle-chevron {
  flex-shrink: 0;
  font-size: 0.7rem;
  color: var(--muted);
  transition: transform 0.25s ease;
}
.sidebar-body {
  /* Desktop: normal sichtbar */
}
.main {
  padding: 15px;
  overflow-y: scroll;
  height: 90vh;
}

/* Mobile / Tablet: Sidebar stapelt und ist einklappbar (nach oben) */
@media (max-width: 1100px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    max-height: none;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 12px;
  }
  .sidebar-mobile-toggle {
    display: flex;
  }
  /* Desktop-Seiten-Toggle ausblenden, wenn mobil gestapelt */
  .sidebar-toggle-btn {
    display: none !important;
  }
  .sidebar-body {
    overflow: hidden;
    max-height: 55vh;
    opacity: 1;
    margin-top: 8px;
    padding-top: 4px;
    transition:
      max-height 0.32s ease,
      opacity 0.22s ease,
      margin 0.32s ease,
      padding 0.32s ease;
  }
  .sidebar.sidebar-mobile-collapsed .sidebar-body {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    padding-top: 0;
    pointer-events: none;
  }
  .sidebar.sidebar-mobile-collapsed .sidebar-mobile-toggle {
    border-radius: 8px;
  }
  .sidebar:not(.sidebar-mobile-collapsed) .sidebar-mobile-toggle {
    border-radius: 8px 8px 0 0;
  }
  .sidebar:not(.sidebar-mobile-collapsed) .sidebar-mobile-toggle-chevron {
    transform: rotate(0deg); /* ▲ = nach oben zuklappen */
  }
  .sidebar.sidebar-mobile-collapsed .sidebar-mobile-toggle-chevron {
    transform: rotate(180deg); /* ▼ = aufklappen */
  }
  /* Wenn aufgeklappt: Inhalt scrollbar */
  .sidebar:not(.sidebar-mobile-collapsed) .sidebar-body {
    overflow-y: auto;
  }
}




.sidebar .card h3.card-toggle-title .chevron {

    right: 2px !important;
}

/* Tabs */
.tabs-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  flex: 1 1 auto;
}
.tabs-toggle {
  display: none; /* nur mobil sichtbar */
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: #192335;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, border-radius 0.2s;
}
.tabs-toggle:hover {
  background: #1e293b;
}
.tabs-toggle-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tabs-toggle-chevron {
  flex-shrink: 0;
  font-size: 0.7rem;
  color: var(--muted);
  transition: transform 0.25s ease;
}
.tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 6px;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: #192335;
    justify-content: space-between;
}
.tab-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 8px 14px;
  font-weight: 600;
  font-size: 0.82rem;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s;
}
.tab-btn:hover { color: var(--text); background: rgba(51,65,85,0.5); }
.tab-btn.active {
  background: var(--blue);
  color: #0f172a;
  font-weight: 700;
}
.panel { display: none; }
.panel.active { display: block; }

/* Mobile: Tabs einklappbar, nach oben zuklappen */
@media (max-width: 900px) {
  .tabs-toggle {
    display: flex;
  }
  .tabs-wrap {
    width: 100%;
    order: 10;
  }
  .tabs {
    overflow: hidden;
    max-height: 320px;
    opacity: 1;
    margin-top: 0;
    border-top: none;
    border-radius: 0 0 7px 7px;
    transition:
      max-height 0.28s ease,
      opacity 0.2s ease,
      padding 0.28s ease,
      border-width 0.2s ease,
      margin 0.28s ease;
  }
  .tabs-wrap.tabs-collapsed .tabs {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
    margin: 0;
    pointer-events: none;
  }
  .tabs-wrap.tabs-collapsed .tabs-toggle {
    border-radius: 7px;
  }
  .tabs-wrap:not(.tabs-collapsed) .tabs-toggle {
    border-radius: 7px 7px 0 0;
    border-bottom-color: transparent;
  }
  .tabs-wrap:not(.tabs-collapsed) .tabs-toggle-chevron {
    transform: rotate(0deg);
  }
  .tabs-wrap.tabs-collapsed .tabs-toggle-chevron {
    transform: rotate(180deg);
  }
  .topbar {
    align-items: flex-start;
  }
}

/* Cards & controls */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
  position: relative;
}
.card h3 {
  font-size: 0.95rem;
  color: var(--blue);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 28px;
}
.card.corp h3 { color: var(--corp); }
.card.drinks h3 { color: var(--drinks); }
.card.ops h3 { color: var(--ops); }
.card-reset {
  position: absolute;
  top: 12px;
  right: 34px; /* links vom Chevron */
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(15,23,42,0.6);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: none; /* nur bei ausgeklappter Card sichtbar */
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.15s;
  z-index: 2;
}
.card.open .card-reset {
  display: flex;
}
.card-reset:hover {
  background: rgba(248,113,113,0.25);
  border-color: var(--red);
  color: var(--red);
}
.field input:disabled, .field select:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.field input, .field select {
  width: 80%;
  padding: 8px 10px;
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
}
.field input[readonly] {
  background: #1e293b;
  color: var(--muted);
  cursor: not-allowed;
}
.field input[type="range"] {
  padding: 4px;
  accent-color: var(--blue);
  cursor: pointer;
  color: red;
}


input#p_inflation {
    width: 40px;
}

#inflationsbox {
    color: white !important;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid grey;
}



.slider-val {
  font-weight: 800;
  color: var(--green);
  font-size: 0.9rem;
}

/* KPIs */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  border-left: 4px solid var(--blue);
}
.kpi.green { border-left-color: var(--green); }
.kpi.red { border-left-color: var(--red); }
.kpi.gold { border-left-color: var(--gold); }
.kpi.purple { border-left-color: var(--purple); }
.kpi.cyan { border-left-color: var(--cyan); }
.kpi.pink { border-left-color: var(--pink); }
.kpi small {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.kpi .value {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 6px 0 2px;
}

/* Capacity table traffic-light colors */
.cap-prev-ok { color: var(--green); font-weight: 700; }
.cap-prev-warn { color: var(--gold); font-weight: 700; }
.cap-prev-over { color: var(--red); font-weight: 800; }
.cap-eff-ok { color: var(--green); font-weight: 700; }
.cap-eff-mid { color: var(--blue); font-weight: 700; }
.cap-eff-high { color: var(--gold); font-weight: 700; }
.cap-status-ok { color: var(--green); font-weight: 700; }
.cap-status-mid { color: var(--blue); font-weight: 700; }
.cap-status-high { color: var(--gold); font-weight: 700; }
.cap-bar-wrap {
  width: 100%;
  background: #0f172a;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}
.cap-bar {
  height: 100%;
  border-radius: 999px;
  max-width: 100%;
}
.cap-bar-ok { background: var(--green); }
.cap-bar-mid { background: var(--blue); }
.cap-bar-high { background: var(--gold); }
.cap-eff-cell { text-align: right; }
.cap-eff-cell .pct { font-weight: 700; }
.cap-eff-cell .kap { display: block; font-size: 0.7rem; color: var(--muted); font-weight: 400; margin-top: 2px; }
.kpi .sub { font-size: 0.72rem; color: var(--muted); }

/* Tables */

.tablewrap {
    overflow-x: auto;
    margin-top: 15px;
}


table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 900px;
}
th, td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  white-space: nowrap;
}
th {
  background: #0f172a;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  position: sticky;
  top: 0;
}
td:first-child, th:first-child { text-align: left; }
.in { background: rgba(56,189,248,0.12); font-weight: 700; }
.out { background: rgba(248,113,113,0.12); color: #fca5a5; font-weight: 700; }
.end { background: rgba(74,222,128,0.12); font-weight: 700; }
.negative { color: var(--red); font-weight: 700; }

/* Charts */
.charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.chart-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  height: 300px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chart-box h3 {
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: var(--text);
  flex-shrink: 0;
}
.chart-box canvas {
  flex: 1 1 auto;
  width: 100% !important;
  max-height: 100%;
  min-height: 0;
}

/* Summary */
.summary {
  background: rgba(56,189,248,0.08);
  border-left: 4px solid var(--blue);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 16px;
}
.summary strong { color: var(--text); }

/* Actions */
.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    align-items: center;
}

button.action {
  border: 0;
  border-radius: 7px;
  padding: 8px 14px;
  background: var(--blue);
  color: #0f172a;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}
button.action.secondary { background: #475569; color: white; }
button.action:hover { filter: brightness(1.1); }

/* Heatmap */
.heat-neg-3 { background: rgba(239,68,68,0.35); color: #fca5a5; font-weight: 700; }
.heat-neg-2 { background: rgba(239,68,68,0.2); color: #fca5a5; }
.heat-neg-1 { background: rgba(245,158,11,0.15); color: #fde047; }
.heat-pos-1 { background: rgba(74,222,128,0.15); color: #86efac; }
.heat-pos-2 { background: rgba(74,222,128,0.3); color: #4ade80; font-weight: 700; }
.heat-pos-3 { background: rgba(74,222,128,0.45); color: #fff; font-weight: 800; }
.note { font-size: 0.78rem; color: var(--muted); line-height: 1.5; margin-top: 10px; }
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

/* Shift schedule */
.schedule-day { font-size: 0.8rem; }
.role-name { font-weight: 700; color: var(--purple); }

/* Assumptions box & staff docs */
.assumptions-box {
  background: rgba(167,139,250,0.08);
  border: 1px solid rgba(167,139,250,0.35);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 20px;
}
.assumptions-box summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--corp);
  font-size: 0.92rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}
.assumptions-box summary::-webkit-details-marker { display: none; }
.assumptions-box summary::before {
  content: '▶';
  font-size: 0.7rem;
  transition: transform 0.15s;
}
.assumptions-box[open] summary::before { transform: rotate(90deg); }
.assumptions-box .assumptions-body { margin-top: 12px; }
.assumptions-box ul { margin: 6px 0 10px 18px; }
.assumptions-box li { margin-bottom: 4px; }
.assumptions-box strong { color: var(--text); }

.staff-stages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.staff-stage {
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-size: 0.8rem;
  line-height: 1.45;
}
.staff-stage h4 {
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: var(--purple);
}
.staff-stage .hours { color: var(--cyan); font-weight: 600; }

.save-status {
  font-size: 0.72rem;
  color: var(--muted);
  margin-left: 8px;
  transition: color 0.3s;
}
.save-status.saved { color: var(--green); }

/* Zusätzliche Klassen für die Wareneinsatz-Box (Hähnchen-Döner-Card),
   vorher inline im Original, jetzt als eigene Klassen ausgelagert */
.chicken-total-box {
  background: rgba(74,222,128,0.10);
  border: 1px solid rgba(74,222,128,0.35);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 12px;
}
.chicken-total-label {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
}
.chicken-total-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--green);
  margin-top: 4px;
}

#tornadoPctControl {   
 display: flex;
    align-items: center;
    gap: 8px;
    background: #0f172a;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);}
	
#p_tornadoPct::-webkit-slider-runnable-track {
    background: #4E5D73; /* Hier die Farbe des Balkens ändern */
    border: white;
    border-radius: 4px;
	border-width: 2px;
}

#p_sensColStep::-webkit-slider-runnable-track  {
    background: #4E5D73; /* Hier die Farbe des Balkens ändern */
    border: white;
    border-radius: 4px;
}

#p_sensStep::-webkit-slider-runnable-track  {
    background: #4E5D73; /* Hier die Farbe des Balkens ändern */
    border: white;
    border-radius: 4px;
}


#sensStepControl,#sensColStepControl {
    background: #0F172A;
    padding: 5px 10px;
    border-radius: 5px;
}

tr.total-row {
    background: #56b0cd4d !important;
}

div#headerStatus {
    width: 180px;

}



@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

button#sidebarToggleBtn, button.action.secondary, #shiftTabsContainer button.action, .panel.active .action  {

    
    /* NEU: Ein großer Farbverlauf und die Animation */
    background: linear-gradient(270deg, #4BB9EF, #3b82f6, #8b5cf6, #4BB9EF);
    background-size: 300% 300%;
    animation: gradientAnimation 6s ease infinite;

   
    color: var(--text, #f8fafc);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    /* WICHTIG: transition für background entfernt/angepasst, 
       damit es sich nicht mit der Animation bei Hover beißt */
    transition: left 0.3s ease, box-shadow 0.2s;
}

/* Falls du beim Hovern z.B. einen Glow-Effekt willst */
.sidebar-toggle-btn:hover {
    box-shadow: 0 0 12px rgba(75, 185, 239, 0.6);
}



.tab-btn.active {

    
    /* NEU: Ein großer Farbverlauf und die Animation */
    background: linear-gradient(270deg, #4BB9EF, #3b82f6, #8b5cf6, #4BB9EF);
    background-size: 300% 300%;
    animation: gradientAnimation 6s ease infinite;

   
    color: var(--text, #f8fafc);
    cursor: pointer;
    z-index: 1000;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    /* WICHTIG: transition für background entfernt/angepasst, 
       damit es sich nicht mit der Animation bei Hover beißt */
    transition: left 0.3s ease, box-shadow 0.2s;
}

/* Falls du beim Hovern z.B. einen Glow-Effekt willst */
.tab-btn.active:hover {
    box-shadow: 0 0 12px rgba(75, 185, 239, 0.6);
}



#shiftTabsContainer button.action.secondary, .panel.active .action.secondary {background: #4E5D73;}


/*Schieberegler stylen*/

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.field input[type="range"] {
    -webkit-appearance: none; /* Standard-Styling für Webkit-Browser entfernen */
    appearance: none;
   
    height: 1px; /* Höhe des Balkens */
    border-radius: 4px;
    
    /* Dein animierter Farbverlauf */
    background: linear-gradient(270deg, #4BB9EF, #3b82f6, #8b5cf6, #4BB9EF);
    background-size: 300% 300%;
    animation: gradientAnimation 6s ease infinite;
    
    cursor: pointer;
    outline: none;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.2s;
}

/* Styling für den Schiebe-Knopf (Thumb) bei Webkit (Chrome, Edge, Safari) */
.field input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.field input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

/* Styling für den Schiebe-Knopf bei Firefox */
.field input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.field input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.1);
}




.sidebar .card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;

    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar .card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -100%;
    width: 60%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.12),
        transparent
    );
    transform: rotate(20deg);
    transition: left 0.6s ease;
}

.sidebar .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.sidebar .card:hover::before {
    left: 140%;
}


.tab-btn {
    background: var(--card);
    position: relative;
    overflow: hidden;

    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tab-btn::before  {
    content: "";
    position: absolute;
    top: -50%;
    left: -100%;
    width: 60%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.12),
        transparent
    );
    transform: rotate(20deg);
    transition: left 0.6s ease;
}

.tab-btn:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.tab-btn:hover::before {
    left: 140%;
}




/*DARKMODE SWITCH*/

/* --- Light Mode Overrides --- */
body.light-mode {
  --bg: #f1f5f9;
  --bg2: #ffffff;
  --card: #ffffff;
  --border: #cbd5e1;
  --text: #0f172a;
  --muted: #64748b;
}

body.light-mode .topbar {
  background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
}

body.light-mode .field input, 
body.light-mode .field select {
  background: #f8fafc;
  color: var(--text);
}

body.light-mode .field input[readonly] {
  background: #e2e8f0;
  color: var(--muted);
}

body.light-mode .sidebar-mobile-toggle,
body.light-mode .tabs-toggle,
body.light-mode .tabs {
  background: #f1f5f9;
}

body.light-mode th {
  background: #e2e8f0;
  color: var(--muted);
}

body.light-mode .staff-stage {
  background: #f8fafc;
}

body.light-mode #tornadoPctControl,
body.light-mode #sensStepControl,
body.light-mode #sensColStepControl {
  background: #f8fafc;
}


/* --- Entry Animation für Sidebar-Cards --- */
@keyframes slideUpCard {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.sidebar .card {
  animation: slideUpCard 2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Gestaffelte Verzögerung (Stagger Effect) für nacheinander einfliegende Karten */
.sidebar .card:nth-child(1) { animation-delay: 0.20s; }
.sidebar .card:nth-child(2) { animation-delay: 0.45s; }
.sidebar .card:nth-child(3) { animation-delay: 0.70s; }
.sidebar .card:nth-child(4) { animation-delay: 0.95s; }
.sidebar .card:nth-child(5) { animation-delay: 1.20s; }
.sidebar .card:nth-child(6) { animation-delay: 1.45s; }
.sidebar .card:nth-child(7) { animation-delay: 1.50s; }
.sidebar .card:nth-child(8) { animation-delay: 1.75s; }
.sidebar .card:nth-child(9) { animation-delay: 2s; }
.sidebar .card:nth-child(10) { animation-delay: 2.25s; }


/* --- Entry Animation für Tabs (.tab-btn) von rechts nach links --- */
@keyframes slideInTab {
  0% {
    opacity: 0;
    transform: translateX(30px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.tabs .tab-btn {
  animation: slideInTab 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Gestaffelte Verzögerung (Stagger Effect) für nacheinander einfliegende Tabs */
.tabs .tab-btn:nth-child(1) { animation-delay: 0.05s; }
.tabs .tab-btn:nth-child(2) { animation-delay: 0.10s; }
.tabs .tab-btn:nth-child(3) { animation-delay: 0.15s; }
.tabs .tab-btn:nth-child(4) { animation-delay: 0.20s; }
.tabs .tab-btn:nth-child(5) { animation-delay: 0.25s; }
.tabs .tab-btn:nth-child(6) { animation-delay: 0.30s; }
.tabs .tab-btn:nth-child(7) { animation-delay: 0.35s; }
.tabs .tab-btn:nth-child(8) { animation-delay: 0.40s; }


}

/* Der Hauptbereich scrollt nicht mehr separat, sondern treibt die Seite an */
.main {
  padding: 15px;
  overflow-y: visible; /* Ändere das von 'scroll' auf 'visible' oder 'auto' */
  height: auto;        /* Nimm die feste 90vh-Höhe weg */
}
