/* ==========================================================================
   KI-Workshop Plattform - Manage-Now-Style Stylesheet
   Farbpalette:
   - Dunkelblau:  #0A1D4A   (Hauptmarke, Headlines, dunkle Sektionen)
   - Eisblau:     #D5DCE6   (sekundäre Flächen, Card-Hintergründe)
   - Grün:        #83EA00   (Akzent, CTAs, Highlights)
   ========================================================================== */

:root {
  --navy:        #0A1D4A;
  --navy-light:  #1B2F5E;
  --ice:         #D5DCE6;
  --ice-soft:    #EBEEF3;
  --green:       #83EA00;
  --green-dark:  #6BC700;
  --white:       #FFFFFF;
  --gray-50:     #FAFBFC;
  --gray-100:    #F2F4F7;
  --gray-300:    #D0D5DD;
  --gray-500:    #667085;
  --gray-700:    #344054;
  --gray-900:    #101828;
  --danger:      #B42318;
  --danger-bg:   #FEE4E2;

  --radius:      4px;
  --radius-lg:   8px;
  --shadow-sm:   0 1px 2px rgba(10, 29, 74, 0.05);
  --shadow:      0 4px 12px rgba(10, 29, 74, 0.08);
  --shadow-lg:   0 12px 32px rgba(10, 29, 74, 0.12);

  --font-body:   "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-head:   "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--gray-900);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--green-dark); }

/* === HEADER (top nav, Manage-Now-Style) === */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--ice);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 32px;
  height: 32px;
  background: var(--navy);
  border-radius: var(--radius);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-mark::after {
  content: "";
  width: 12px;
  height: 12px;
  background: var(--green);
  border-radius: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.site-nav a {
  color: var(--gray-700);
  padding: 6px 12px;
  border-radius: var(--radius);
}

.site-nav a:hover {
  background: var(--ice-soft);
  color: var(--navy);
}

.site-nav .pill {
  background: var(--ice);
  color: var(--navy);
  padding: 6px 12px;
  border-radius: 999px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

/* === HERO === */
.hero {
  background: var(--navy);
  color: var(--white);
  padding: 80px 32px 96px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: var(--green);
  opacity: 0.1;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-block;
  color: var(--green);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 800px;
  margin-bottom: 20px;
  color: var(--white);
}

.hero h1 .accent { color: var(--green); }

.hero-sub {
  font-size: 19px;
  line-height: 1.5;
  color: var(--ice);
  max-width: 640px;
  margin-bottom: 32px;
}

/* === MAIN CONTAINER === */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px;
}

.section {
  padding: 64px 32px;
}

.section-narrow {
  max-width: 720px;
  margin: 0 auto;
}

.section-eyebrow {
  display: inline-block;
  color: var(--green-dark);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 12px;
}

h1 { font-family: var(--font-head); color: var(--navy); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
h2 { font-family: var(--font-head); color: var(--navy); font-weight: 700; font-size: 32px; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 16px; }
h3 { font-family: var(--font-head); color: var(--navy); font-weight: 600; font-size: 18px; line-height: 1.3; margin-bottom: 8px; }
h4 { font-family: var(--font-head); color: var(--navy); font-weight: 600; font-size: 15px; margin-bottom: 6px; }

p { color: var(--gray-700); margin-bottom: 12px; }
.lead { font-size: 18px; color: var(--gray-700); line-height: 1.55; }
.muted { color: var(--gray-500); font-size: 13px; }

ul { padding-left: 22px; }
ul li { margin-bottom: 4px; color: var(--gray-700); }

code {
  font-family: "SFMono-Regular", Consolas, monospace;
  background: var(--ice-soft);
  color: var(--navy);
  padding: 2px 7px;
  border-radius: var(--radius);
  font-size: 12px;
}

/* === FORMS === */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--ice);
  border-radius: var(--radius);
  background: var(--white);
  font-family: inherit;
  font-size: 15px;
  color: var(--gray-900);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(10, 29, 74, 0.1);
}

textarea {
  resize: vertical;
  min-height: 90px;
  font-family: inherit;
  line-height: 1.5;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 14px;
  color: var(--gray-700);
}

/* === BUTTONS === */
.btn,
button {
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--navy);
  color: var(--white);
  border: none;
  padding: 12px 22px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.15s;
  line-height: 1;
}

.btn:hover,
button:hover {
  background: var(--navy-light);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn:disabled,
button:disabled {
  background: var(--gray-300);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: var(--green);
  color: var(--navy);
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--green-dark);
  color: var(--navy);
}

.btn-secondary {
  background: var(--ice);
  color: var(--navy);
}

.btn-secondary:hover {
  background: var(--ice-soft);
  color: var(--navy);
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--ice);
}

.btn-ghost:hover {
  background: var(--ice-soft);
  color: var(--navy);
  border-color: var(--navy);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

.btn-block { width: 100%; }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* === LOGIN BOX === */
.login-page {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy) 50%, var(--ice-soft) 50%, var(--ice-soft) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.login-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 48px;
  max-width: 460px;
  width: 100%;
}

.login-box .brand-mark {
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
}

.login-box .brand-mark::after {
  width: 18px;
  height: 18px;
}

.login-box h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.login-box .lead {
  margin-bottom: 28px;
  color: var(--gray-500);
  font-size: 15px;
}

.error {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 14px;
}

.code-input {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 18px;
  text-align: center;
  font-family: "SFMono-Regular", Consolas, monospace;
}

/* === SCENARIO GRID === */
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.scenario-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1.5px solid var(--ice);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: all 0.2s;
  overflow: hidden;
}

.scenario-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  height: 4px;
  width: 100%;
  background: var(--green);
  transform: translateY(-4px);
  transition: transform 0.2s;
}

.scenario-card:hover {
  border-color: var(--navy);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.scenario-card:hover::before {
  transform: translateY(0);
}

.scenario-tag {
  display: inline-block;
  background: var(--ice-soft);
  color: var(--navy);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
  align-self: flex-start;
}

.scenario-card h3 { color: var(--navy); margin-bottom: 10px; }
.scenario-card p { font-size: 14px; color: var(--gray-500); flex-grow: 1; }

.scenario-card .meta {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--ice);
  font-size: 12px;
  color: var(--gray-500);
}

.scenario-card .meta strong { color: var(--navy); font-weight: 600; }

.scenario-card .arrow {
  position: absolute;
  top: 24px; right: 24px;
  color: var(--gray-300);
  transition: all 0.2s;
}

.scenario-card:hover .arrow {
  color: var(--green-dark);
  transform: translateX(4px);
}

/* === EDITOR === */
.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 20px;
  margin-top: 24px;
}

.panel {
  background: var(--white);
  border: 1.5px solid var(--ice);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.panel-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green);
  color: var(--navy);
  font-weight: 700;
  font-size: 13px;
}

.panel h3 {
  margin-bottom: 0;
  font-size: 16px;
  color: var(--navy);
}

.panel-output { background: var(--ice-soft); border-color: var(--ice); }

.example-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--ice-soft);
  color: var(--gray-900);
  padding: 10px 14px;
  border: 1px solid var(--ice);
  border-radius: var(--radius);
  margin-bottom: 8px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 400;
  line-height: 1.4;
  transition: all 0.15s;
}

.example-btn:hover {
  background: var(--white);
  border-color: var(--navy);
  color: var(--navy);
  transform: none;
  box-shadow: none;
}

.output-box {
  background: var(--white);
  border: 1.5px solid var(--ice);
  border-radius: var(--radius);
  padding: 18px;
  min-height: 380px;
  max-height: 700px;
  overflow-y: auto;
  font-size: 14px;
  white-space: pre-wrap;
  line-height: 1.6;
}

.output-box .empty {
  color: var(--gray-500);
  font-style: italic;
  text-align: center;
  padding: 40px 0;
}

.tool-event {
  background: var(--ice-soft);
  border-left: 3px solid var(--navy);
  padding: 10px 14px;
  margin: 10px 0;
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--navy);
}

.tool-event.result {
  background: rgba(131, 234, 0, 0.1);
  border-left-color: var(--green-dark);
  color: var(--gray-900);
}

.tool-event code {
  font-size: 12px;
  background: var(--white);
}

.status-event {
  color: var(--gray-500);
  font-style: italic;
  font-size: 13px;
  margin: 6px 0;
}

.status-event.success { color: var(--green-dark); }

.error-event {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 10px;
  border-radius: var(--radius);
  margin: 8px 0;
}

.agent-text {
  margin-top: 12px;
  background: var(--white);
  padding: 16px;
  border-radius: var(--radius);
  border: 1.5px solid var(--green);
  white-space: pre-wrap;
  line-height: 1.6;
}

/* === FILE UPLOADS === */
.upload-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--ice);
}

.upload-section h4 {
  font-size: 13px;
  color: var(--gray-700);
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.upload-area {
  border: 2px dashed var(--ice);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  transition: all 0.15s;
  cursor: pointer;
  background: var(--ice-soft);
}

.upload-area:hover, .upload-area.drag-over {
  border-color: var(--green-dark);
  background: rgba(131, 234, 0, 0.06);
}

.upload-area input[type="file"] { display: none; }

.upload-area .upload-label {
  font-size: 13px;
  color: var(--gray-700);
}

.upload-area .upload-label strong { color: var(--navy); }

.file-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--white);
  border: 1px solid var(--ice);
  border-radius: var(--radius);
  margin-bottom: 6px;
  font-size: 13px;
}

.file-list li.user-upload {
  background: rgba(131, 234, 0, 0.06);
  border-color: var(--green);
}

.file-tag {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  margin-right: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.file-tag.spreadsheet { background: var(--green-dark); color: var(--navy); }

.file-info { flex-grow: 1; overflow: hidden; text-overflow: ellipsis; }
.file-info code { font-size: 12px; background: transparent; padding: 0; color: var(--gray-700); }

.file-delete {
  background: transparent;
  color: var(--gray-500);
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 12px;
  border-radius: var(--radius);
}

.file-delete:hover {
  color: var(--danger);
  background: var(--danger-bg);
  transform: none;
  box-shadow: none;
}

.upload-progress {
  margin-top: 8px;
  font-size: 12px;
  color: var(--gray-500);
}

/* === HEADER-BAR (page-level) === */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.page-header h1 { font-size: 36px; }

/* === ADMIN === */
.admin-section { background: var(--ice-soft); min-height: 100vh; }
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.admin-grid .panel { background: var(--white); }

.codes-list {
  list-style: none;
  padding: 0;
  font-size: 13px;
}

.codes-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--ice);
}

.codes-list code {
  font-size: 14px;
  font-weight: 600;
  margin-right: 12px;
}

/* === FOOTER === */
.site-footer {
  background: var(--navy);
  color: var(--ice);
  padding: 32px;
  margin-top: 64px;
  font-size: 14px;
}

.site-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer .brand { color: var(--white); }
.site-footer .muted { color: var(--ice); opacity: 0.7; }

/* === RESPONSIVE === */
@media (max-width: 1100px) {
  .editor-grid { grid-template-columns: 1fr 1fr; }
  .panel-output { grid-column: 1 / -1; }
  .admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .editor-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 24px; }
  .hero h1 { font-size: 32px; }
  .container, .section { padding: 24px; }
  .login-box { padding: 32px 24px; }
  .site-header-inner { flex-direction: column; align-items: flex-start; }
}

@media print {
  body { background: white; }
  .btn, button { display: none; }
  .site-header, .site-footer { display: none; }
}


/* ==========================================================================
   v3 Extensions
   ========================================================================== */

/* === MODE NAV (horizontal tabs between pages) === */
.mode-nav {
  background: var(--white);
  border-bottom: 1px solid var(--ice);
  overflow-x: auto;
  white-space: nowrap;
}

.mode-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  gap: 0;
}

.mode-nav a {
  display: inline-block;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  border-bottom: 2px solid transparent;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}

.mode-nav a:hover {
  color: var(--navy);
  background: var(--ice-soft);
  border-bottom-color: var(--ice);
}

.mode-nav a.active {
  color: var(--navy);
  border-bottom-color: var(--green);
  font-weight: 600;
}

/* === PIPELINE BUILDER === */
.pipeline-builder {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

@media (max-width: 900px) {
  .pipeline-builder { grid-template-columns: 1fr; }
}

.pipeline-chain {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding: 12px 0;
  flex-wrap: wrap;
  gap: 6px;
}

.pipeline-node {
  position: relative;
  background: var(--white);
  border: 2px solid var(--ice);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  min-width: 120px;
  max-width: 160px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.pipeline-node:hover {
  border-color: var(--navy);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.pipeline-node.active {
  border-color: var(--green);
  background: rgba(131, 234, 0, 0.08);
  box-shadow: 0 0 0 3px rgba(131, 234, 0, 0.2);
}

.pipeline-node.done {
  border-color: var(--green-dark);
  background: rgba(131, 234, 0, 0.05);
}

.pipeline-node-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.pipeline-node.active .pipeline-node-num {
  background: var(--green);
  color: var(--navy);
}

.pipeline-node-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  display: block;
  margin-bottom: 2px;
}

.pipeline-node-role {
  font-size: 11px;
  color: var(--gray-500);
}

.pipeline-node-connector {
  font-size: 18px;
  color: var(--gray-300);
  padding: 0 4px;
  flex-shrink: 0;
}

/* === PIPELINE OUTPUT === */
.pipeline-output-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.agent-step {
  border: 1.5px solid var(--ice);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.agent-step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.agent-step-header .step-num {
  background: var(--green);
  color: var(--navy);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.agent-step-header .step-status {
  margin-left: auto;
  font-size: 12px;
  opacity: 0.8;
}

.agent-step-body {
  padding: 16px;
  background: var(--white);
  min-height: 60px;
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.6;
  max-height: 400px;
  overflow-y: auto;
}

.agent-step-body.collapsed {
  display: none;
}

/* === NEWS GRID === */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.news-card {
  background: var(--white);
  border: 1.5px solid var(--ice);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.news-card:hover {
  border-color: var(--navy);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.news-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.news-badge {
  display: inline-block;
  background: var(--ice);
  color: var(--navy);
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.news-badge.de { background: rgba(0, 0, 200, 0.1); color: var(--navy); }
.news-badge.en { background: rgba(200, 0, 0, 0.08); color: #8B0000; }

.news-flag {
  font-size: 16px;
}

.news-card h4 {
  font-size: 15px;
  line-height: 1.35;
  margin-bottom: 0;
}

.news-card h4 a {
  color: var(--navy);
  text-decoration: none;
}

.news-card h4 a:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

.news-card p {
  font-size: 13px;
  color: var(--gray-500);
  flex-grow: 1;
  margin: 0;
  line-height: 1.5;
}

.news-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--ice);
  font-size: 12px;
}

.news-card-footer a {
  color: var(--green-dark);
  font-weight: 600;
  text-decoration: none;
}

.news-card-footer a:hover { text-decoration: underline; }

/* === FILTER PILLS === */
.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.filter-pill {
  display: inline-block;
  padding: 6px 14px;
  border: 1.5px solid var(--ice);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  background: var(--white);
  transition: all 0.15s;
}

.filter-pill:hover {
  border-color: var(--navy);
  color: var(--navy);
}

.filter-pill.active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* === N8N PAGE === */
.n8n-steps {
  counter-reset: step-counter;
  list-style: none;
  padding: 0;
}

.n8n-steps li {
  counter-increment: step-counter;
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: flex-start;
}

.n8n-steps li::before {
  content: counter(step-counter);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--green);
  color: var(--navy);
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

.n8n-step-content h4 {
  margin-bottom: 4px;
  font-size: 15px;
}

.n8n-step-content p {
  font-size: 14px;
  margin: 0;
}

.n8n-code-block {
  background: var(--gray-900);
  color: #e2e8f0;
  padding: 20px;
  border-radius: var(--radius-lg);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  position: relative;
  margin: 16px 0;
}

.n8n-code-block .copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.1);
  color: #e2e8f0;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 4px 10px;
  font-size: 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
}

.n8n-code-block .copy-btn:hover {
  background: rgba(255,255,255,0.2);
  transform: none;
  box-shadow: none;
}

.n8n-workflow-diagram {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px;
  background: var(--ice-soft);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--ice);
  overflow-x: auto;
  flex-wrap: wrap;
}

.n8n-node {
  background: var(--white);
  border: 2px solid var(--navy);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  text-align: center;
  min-width: 120px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}

.n8n-node.highlight {
  background: var(--green);
  border-color: var(--green-dark);
}

.n8n-arrow {
  font-size: 20px;
  color: var(--gray-500);
}

/* === SCHEDULER TABLE === */
.scheduler-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 16px;
}

.scheduler-table th {
  background: var(--navy);
  color: var(--white);
  padding: 10px 14px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.scheduler-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--ice);
  vertical-align: middle;
}

.scheduler-table tr:last-child td { border-bottom: none; }

.scheduler-table tr:hover td {
  background: var(--ice-soft);
}

.scheduler-table .actions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

/* === STATUS BADGES === */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-badge.active {
  background: rgba(131, 234, 0, 0.15);
  color: var(--green-dark);
}

.status-badge.paused {
  background: var(--ice-soft);
  color: var(--gray-500);
}

.status-badge.running {
  background: rgba(10, 29, 74, 0.08);
  color: var(--navy);
  animation: pulse-badge 1.5s infinite;
}

.status-badge.success { background: rgba(131, 234, 0, 0.15); color: var(--green-dark); }
.status-badge.error { background: var(--danger-bg); color: var(--danger); }

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* === MODAL === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 29, 74, 0.5);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
}

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

.modal-close {
  background: transparent;
  border: none;
  color: var(--gray-500);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: var(--radius);
}

.modal-close:hover {
  background: var(--ice-soft);
  color: var(--navy);
  transform: none;
  box-shadow: none;
}

/* === AGENT EDIT PANEL (in pipeline builder) === */
.agent-edit-panel {
  background: var(--ice-soft);
  border: 1.5px solid var(--ice);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 12px;
}

.agent-edit-panel h4 {
  margin-bottom: 12px;
  color: var(--navy);
  font-size: 14px;
}

/* === LOADING SPINNER === */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--ice);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-state {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 40px;
  justify-content: center;
  color: var(--gray-500);
}

/* === ICON BADGE (scenario icon) === */
.scenario-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 10px;
}

/* Checkbox group for tools */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
  font-size: 13px;
  cursor: pointer;
  margin: 0;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  cursor: pointer;
}

/* ─── Praxisbezug (real-world use-case context) ─────────────────────────── */
.real-world-box {
  margin-top: 18px;
  max-width: 800px;
  background: #F4F8EC;
  border: 1px solid var(--green);
  border-left: 4px solid var(--green-dark);
  border-radius: 8px;
  padding: 14px 18px;
}
.real-world-eyebrow {
  display: block;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--navy);
  margin-bottom: 6px;
}
.real-world-box p { margin: 0; color: #243; line-height: 1.55; font-size: 14.5px; }
.real-world-source { margin-top: 8px !important; font-size: 12.5px; color: #567; }
.real-world-source a { color: var(--green-dark); font-weight: 600; }
.scenario-realworld {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green-dark);
}

/* ─── n8n Studio ────────────────────────────────────────────────────────── */
.studio-status {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; border-radius: 8px; font-weight: 600;
}
.studio-status .studio-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.studio-dot { width: 12px; height: 12px; border-radius: 50%; background: #bbb; flex: 0 0 auto; }
.studio-status--idle    { background: #F2F4F8; color: var(--navy); }
.studio-status--idle    .studio-dot { background: #9aa6bd; }
.studio-status--starting{ background: #FFF7E6; color: #8a5a00; }
.studio-status--starting .studio-dot { background: #f0a800; animation: studio-pulse 1s infinite; }
.studio-status--running { background: #F4F8EC; color: #2c5d00; }
.studio-status--running .studio-dot { background: var(--green-dark); }
.studio-status--error   { background: #FDECEC; color: #a12; }
.studio-status--error   .studio-dot { background: #d33; }
@keyframes studio-pulse { 0%,100%{opacity:1;} 50%{opacity:.35;} }
.studio-frame-wrap {
  border: 1px solid #d8dde6; border-radius: 10px; overflow: hidden;
  box-shadow: 0 6px 22px rgba(10,29,74,.08); background: #fff;
}
.studio-frame { width: 100%; height: 78vh; min-height: 560px; border: 0; display: block; }

/* ─── n8n Studio: Login-Box ─────────────────────────────────────────────── */
.studio-login {
  margin-top: 16px; padding: 16px 18px; border-radius: 8px;
  background: #F2F4F8; border: 1px solid #d8dde6;
}
.studio-login h4 { margin: 0; color: var(--navy); }
.cred-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.cred-label { width: 70px; font-size: 13px; color: #567; font-weight: 600; }
.cred-row code {
  background: #fff; border: 1px solid #d8dde6; border-radius: 6px;
  padding: 6px 10px; font-size: 14px; color: var(--navy); min-width: 200px;
}
