/* ================================
   Global Style System
   ================================ */
/* ================================
   Global Style System
   ================================ */
:root {
  --primary: #222A35;       /* Hauptfarbe (dunkelblau/grau) */
  --secondary: #F6B16B;   /*linear-gradient(135deg,#00D5C0,#2ee6d6)*/
  --accent: #2D9CDB;        /* Zusatzfarbe (hellblau) */
  --light-bg: #f9fafb;      /* Hintergrund hell */
  --mid-light-bg: #f0f0f0;      /* Hintergrund hell */
  --dark-bg: #111827;       /* Hintergrund dunkel */
  --text: #333;
  --text-light: #f5f5f5;
  --brand-primary: #222A35;
  --brand-primary-dark: #15181d;
  --brand-primary-light: #414851;
  --brand-secondary: #F6B16B;
  --brand-accent: #b87430; /*11879a*/
  --bs-primary-rgb: 34, 42, 53; /* nur Zahlen, ohne rgb() */


  --shadow: 0 4px 12px rgba(0,0,0,0.08);

    /* Neutral Palette */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --gray-950: #030712;
  
  /* Semantic Colors */
  --color-success: #10b981;
  --color-success-light: #d1fae5;
  --color-warning: #f59e0b;
  --color-warning-light: #fef3c7;
  --color-error: #ef4444;
  --color-error-light: #fee2e2;
  --color-info: #3b82f6;
  --color-info-light: #dbeafe;
  

  
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  
  /* Spacing System */
  --space-px: 1px;
  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  
  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
  
  /* Border Radius */
  --radius-none: 0;
  --radius-sm: 0.125rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-3xl: 1.5rem;
  --radius-full: 9999px;
  --radius: 8px;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slower: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Z-Index Scale */
  --z-0: 0;
  --z-10: 10;
  --z-20: 20;
  --z-30: 30;
  --z-40: 40;
  --z-50: 50;
  --z-modal: 1000;
  --z-popover: 1100;
  --z-tooltip: 1200;
  --z-notification: 1300;
}

  .progress{height:12px; border-radius:6px; overflow:hidden;}
  .progress-bar{transition:width 0.3s ease-in-out;}
  .badges{display:flex; flex-wrap:wrap; gap:.15rem;}
  .badge{text-align: center;border-radius:10px; color:#fff;height: 25px;padding:5px 10px 0px 10px;margin-left:5px;font-weight:500; letter-spacing:.2px}
  .badge.total{background:#b5b5b5; color:#fff; border:1px solid #e5e7eb}
  .badge.done{background:linear-gradient(135deg,#34d399,#10b981); color:#fff}
  .badge.errors{background:linear-gradient(135deg,#f87171,#ef4444); color:#fff}
  .badge.running{background:linear-gradient(135deg,#4e90fa,#3b82f6); color:#f5f9ff}
  .badge.queued{background:linear-gradient(135deg,#fde68a,#f59e0b); color:#3b2f04}
  .badge.default{background:#e5e7eb;}
  a{text-decoration:none; color:#0f172a;}

/* ================================
   Design Tokens & Variables
   ================================ */

/* ================================
   Global Base
   ================================ */
* {
  box-sizing: border-box;
}

/* html {
  overflow-y: scroll; 
} */

html {
  scrollbar-gutter: stable;
}

body { 
  font-family: Tahoma, sans-serif;
  margin: 0;
  background-color: var(--light-bg);
  color: var(--text);
  line-height: 1.1rem;
}

/* ================================
   Header
   ================================ */
header {
  background: var(--primary);
  color: var(--text-light);
  padding: 0.75rem 1.5rem;
  box-shadow: var(--shadow);
  margin-top:20px;

}

/* header {
  background: #fffbf4; 
  color: #2e2e2e; 
  padding: 0.75rem 1.5rem;
  box-shadow: var(--shadow);
} */

header .navbar-brand img {
  max-height: 45px;
}

.navbar-nav .nav-link {
  color: var(--text-light) !important;
  font-weight: 600;transition: color 0.2s;
}


.navbar-nav .nav-link:hover {
  color: var(--secondary) !important;
}

  @media (prefers-reduced-motion: no-preference){
    .hero{background-size:200% 200%; animation: heroPan 14s ease infinite}
    @keyframes heroPan{0%{background-position:0% 50%}50%{background-position:100% 50%}100%{background-position:0% 50%}}
  }

.hero{font-size: 20px ;position:relative; border-top-left-radius: var(--radius-2xl);border-top-right-radius: var(--radius-2xl); padding: 0; color:#fff; overflow:hidden; box-shadow: var(--shadow-xl);}
.hero::before{content:""; position:absolute; inset:0; 
  background: var(--primary);
  border-bottom:8px double #ffffff;
  /* background: linear-gradient(145deg, var(--brand-primary), var(--brand-primary-dark) 40%, var(--brand-accent)); */
}
.hero > *{position:relative}
.hero p{font-size: 0.85rem;color:#fff;margin:20px;margin-bottom: 8px;}
.hero h1{font-size: larger;margin:0 0 .25rem 0.80rem; font-weight:500; letter-spacing:.8px;min-width: 200px}
/* .hero p{opacity:.80} */
.hero-actions{display:flex; gap:.6rem; flex-wrap:wrap} 

  /* CARD (glass) */
  .card--glass{position:relative; background: rgba(255,255,255,.88); backdrop-filter: blur(6px); border:1px solid var(--gray-200); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg)}


  /*Story Batch List*/

    /* PROGRESS */
  .progress{height: 14px; border-radius: 999px; background: #eef2f7; border:1px solid #e5e7eb; overflow:hidden}
  .progress-premium .progress-bar{height:100%; border-radius: 999px; transition: width .35s ease}
  .progress-premium .progress-bar.bg-success{background: linear-gradient(90deg,#34d399,#10b981)}
  .progress-premium .progress-bar.bg-info{background: linear-gradient(90deg,#60a5fa,#2e7eff)}
  .progress-premium .progress-bar.bg-danger{background: linear-gradient(90deg,#fb7185,#ef4444)}
  .progress-premium .progress-bar.bg-secondary{background: linear-gradient(90deg,#cbd5e1,#94a3b8)}
  .progress-val{min-width: 52px; display:inline-block; text-align:right; font-weight:700}

  /* ================================
   Sidebar
   ================================ */
#sidebar {
  --sidebar-width:230px;
  --sidebar-collapsed-width:72px; /* genug für Icons */
  background: var(--primary);
  color: var(--text-light);
  padding-top: 1.5rem;
  box-shadow: 2px 0 8px rgba(0,0,0,0.1);
  width:var(--sidebar-width);
  min-height:100vh;
  color:#fff;
  transition:all .3s ease;
  overflow:hidden;
  white-space:nowrap;
  box-shadow:2px 0 8px rgba(0,0,0,.1);
}

#sidebar a {
  border-radius: var(--radius);
  margin: 0.2rem 0;
  display: block;
  transition: background 0.3s, padding-left 0.5s;
  color:#fff; text-decoration:none;
  display:flex; align-items:center; gap:10px;
  padding:10px 10px; 
  font-size:15px;
}

#sidebar a:hover {
  background:rgba(255,255,255,.1); 
  padding-left:14px;
  font-size:14px; 
}


#sidebar ul{ padding-left:0; margin:0; }
#sidebar li{ list-style:none; }

#wrapper.collapsed #sidebar a {
  text-align: center;
  padding: 0.6rem;
}

#wrapper{ display:flex; min-height:100vh; }
#wrapper > .flex-grow-1{ min-width:0; width:100%; }  /* ← wichtig */


  /* Toggle-Button (floating) */
  #menu-toggle{
    position:fixed; top:38px; left:4px; z-index:2000;
    width:35px; height:35px; cursor:pointer;
  }
  #menu-toggle svg{ width:250px; height:auto; transition:transform .4s ease; }
  #wrapper.toggled #menu-toggle svg,
  #wrapper.collapsed #menu-toggle svg{ transform:rotate(10deg); }

  
  #wrapper.collapsed #sidebar{
    width:var(--sidebar-collapsed-width);
    padding:20px 8px;
  }

  /* Links: Icon + Label als getrennte Spans */
  #sidebar a .label{ white-space:nowrap; }

  /* Collapsed: nur Icon zeigen */
  #wrapper.collapsed #sidebar a .label{ display:none; }
  #wrapper.collapsed #sidebar a{ justify-content:center; gap:0; padding:10px 6px; }

  /* Logo */
  #sidebar-logo{ transition:width .3s ease, opacity .3s ease; margin:0px 0px 0px 10px; }
  #wrapper.collapsed #sidebar-logo{ width:0; opacity:0; }

  /* User submenu (eigene Collapse-Styles ohne Bootstrap) */
  .collapse{ display:none; }
  .collapse.show{ display:block; }
  .dropdown-toggle{ cursor:pointer; }
  
  /* Mobile Off-canvas */
  @media (max-width:768px){
    #sidebar{ position:fixed; left:0; top:0; margin-left:-260px; z-index:1050; height:100%; }
    #wrapper.toggled #sidebar{ margin-left:0; }
    #wrapper.collapsed #sidebar{ margin-left:-260px; }
  }

/* ================================
   Footer
   ================================ */
footer {
  background: var(--primary);
  color: var(--text-light);
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}

footer a {
  color: var(--text-light);
  text-align: center;
  padding-left: 0.3rem;
  font-size: 0.8rem;
}

footer img {
  max-height: 30px;
  margin-left: 0.5rem;
}

/*=============================
    TEAM SELECT
================================ */

  .team-select-container {
    max-width: 500px;
    margin: 80px auto;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  }
  .team-select-container h2 {
    margin-bottom: 25px;
    text-align: center;
    color: #343a40;
  }

/* ================================
   Buttons
   ================================ */
/* button, .btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s, transform 0.2s;
} */

button:hover, .btn:hover {
  background: var(--secondary);
  transform: translateY(-1px);
  color: var(--primary);
  
}

.btn-secondary {
  background: var(--accent);
}
.btn-secondary:hover {
  background: var(--secondary);
}

.btn-outline {
  background: var(--mid-light-bg);
}


.btn-outline:hover {
  background: var(--secondary);
}

/* ================================
   Tabs
   ================================ */
.tab {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--primary);
  margin-bottom: 1rem;
}

.tab button {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--primary);
  font-weight: 600;
  padding: 0.8rem 1rem;
  cursor: pointer;
  transition: background 0.3s;
}

.tab button.active {
  border-bottom: 3px solid var(--secondary);
  color: var(--secondary);
}

.tab button:hover {
  background: rgba(0,0,0,0.05);
}

/* ================================
   Tables
   ================================ */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5rem 0;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

table th, table td {
  padding: 0.75rem 1rem;
  text-align: left;
}

table th {
  background: var(--light-bg);
  color: var(--gray-600);
  position: sticky;
  top: 0;
}

table tr:nth-child(even) {
  background: #f3f4f6;
}

table tr:hover {
  background: rgba(0,0,0,0.05);
}

/* ================================
   Cards / Containers
   ================================ */
.card {
  background: white;
  border-bottom-left-radius:  var(--radius);
  border-bottom-right-radius:  var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.container-lg {
  min-width: 1200px;
  margin: auto;
  /* padding: 1rem; */
}


/* ===== Flex-Basics (ersetzen, was früher Bootstrap lieferte) ===== */
.d-flex{display:flex;}
.flex-column{flex-direction:column;}
.flex-grow-1{flex:1 1 auto !important;}
.align-items-center{align-items:center;} 
.justify-content-between{justify-content:space-between;}
/* .text-center{text-align:center;}  */

/* Punkte-Animation (kann bleiben) */
.dots span { animation: blink 1.4s infinite both; margin-left: 2px; }
.dots span:nth-child(1) { animation-delay: 0s; }
.dots span:nth-child(2) { animation-delay: 0.2s; }
.dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%,80%,100% {opacity:0} 40% {opacity:1} }


/* === Loader-Overlay: standardmäßig versteckt === */
#loading{ display:none; position:fixed; inset:0; background:rgba(255,255,255,.9); z-index:9999; text-align:center;
  flex-direction:column; justify-content:center; align-items:center; }

  /* #loading{
  display:inline; position:fixed; inset:0; ;
  background:rgba(255,255,255,.9); text-align:center;
} */

/* #loading.is-active{ display:flex; } */
#loading.is-active{
  display:flex; flex-direction:column; justify-content:center; align-items:center;
}


/* Punkte-Animation */
.dots span { animation: blink 1.4s infinite both; margin-left: 2px; }
.dots span:nth-child(1) { animation-delay: 0s; }
.dots span:nth-child(2) { animation-delay: 0.2s; }
.dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%,80%,100% {opacity:0} 40% {opacity:1} }


/* ================================
   Wizard (Assistant) Styles
   ================================ */
  .card{background:#fff;box-shadow:0 4px 14px rgba(0,0,0,.06)}
  .help{color:#6b7280;margin:10px 10px 10px 2px;font-size:0.8rem;}
  .error{background:#fee2e2;color:#991b1b;padding:.6rem .8rem;border-radius:.5rem;margin:.5rem 0}
  #assistantOutput{white-space:pre-wrap;word-wrap:break-word;overflow:auto;min-height:180px;border:1px solid #ddd;padding:10px;border-radius:8px}
  .quick-reply-button{margin:6px 8px 0 0;padding:6px 12px;border:none;border-radius:20px;cursor:pointer;display:inline-block}
  .quick-reply-button:hover{background:#ddd}

  /* AI recommendation card */
  .ai-reco{display:none;font-size: small;border:1px solid #dbeafe;background:#eff6ff;color:#1e3a8a;border-radius:10px;padding:12px;margin:14px 0}
  .ai-reco .badge{padding:.2rem .5rem;;font-weight:600;margin-right:.5rem}
  .ai-reco .badge-continue{background:#e0f2fe;color:#075985;border:1px solid #bae6fd}
  .ai-reco .badge-stories{background:#dcfce7;color:#065f46;border:1px solid #bbf7d0}
  .ai-reco .why{margin-top:.35rem;color:#334155;padding:10px}
  .ai-reco .hint{margin-top:.25rem;color:#64748b;font-size:.9rem}
  /* Button emphasis when AI suggests one path */
  .emphasize{box-shadow:0 0 0 3px rgba(14,165,233,.25)}

  #loadingIndicator { pointer-events: none; }


/* ================================
   Main Content Area
   ================================ */
/* main {
  flex: 1;
  padding: var(--space-8);
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
} */

.container {
  width: 100%;
  padding: 0 var(--space-6);
  margin: 0 auto;
}

.container-lg {
  max-width: 1200px;
}

.container-xl {
  max-width: 1400px;
}

/* ================================
   Cards & Panels
   ================================ */
/* .card {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  margin-bottom: var(--space-6);
  transition: all var(--transition-fast);
} */

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}

.card-header {
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--gray-100);
}

.card-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--gray-900);
}

.card-body {
  padding: var(--space-4) 0;
}

.card-footer {
  padding-top: var(--space-4);
  margin-top: var(--space-4);
  border-top: 1px solid var(--gray-100);
}

.card label{
  font-weight: 500;
  color: var(--gray-700); 
  margin-bottom: 20px;
}

/* ================================
   Buttons
   ================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  margin: var(--space-2) 0px var(--space-3) 0px;
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.5;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: white;
  color: var(--gray-700);
  border-color: var(--gray-300);
}

.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

.btn-success {
  background: var(--color-success);
  color: white;
  border-color: var(--color-success);
}


.btn-danger {
  background: var(--color-error);
  color: white;
  border-color: var(--color-error);
}

.btn-lg {
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
}

.btn-sm {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-full);
}

/* ================================
   Forms
   ================================ */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: var(--space-2);
}

.form-control {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--gray-900);
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-control:disabled {
  background: var(--gray-100);
  color: var(--gray-500);
  cursor: not-allowed;
}

textarea.form-control {
  min-height: 50px;
  font-size: 14px;
  resize: vertical;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-10);
}

.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.form-check-input {
  width: 25px;
  height: 25px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.form-check-input:checked {
  background: var(--secondary);
  color: var(--primaryt);
  width: 25px;
  height: 25px;
  transform: rotate(45deg);
  border-radius: 15px;
  border-color: var(--primary);
}

.form-check-input[type="checkbox"]:checked::after {
            content: "";
            position: absolute;
            left: 7px;
            top: 3px;
            width: 6px;
            height: 12px;
            border-width: 0 3px 3px 0;
            border-color: white;
            border-style: solid;
        }

.form-text {
  font-size: var(--text-sm);
  color: var(--gray-500);
  margin-top: var(--space-1);
}

.form-error {
  font-size: var(--text-sm);
  color: var(--color-error);
  margin-top: var(--space-1);
}
   