:root {
  /* Command-Center Redesign — Light (Design-Brief). */
  --bg: #F6F8F8;
  --surface: #FFFFFF;
  --surface-2: #F0F4F4;
  --elevated: rgba(255,255,255,0.78);
  --card: #FFFFFF;
  --mist: #F1F5F5;
  --border: rgba(10,20,25,0.08);
  --border-strong: rgba(10,20,25,0.14);
  --ink: #071114;
  --text: #14242B;
  --muted: #65757D;
  --text-3: #97A4AB;
  --teal: #16B79A;
  --teal-dark: #0E8E78;
  --teal-light: #A8E7DA;
  --teal-pale: #E4F6F1;
  --dark: #0f171b;
  --dark-2: #182228;
  --primary: var(--teal);
  --primary-dark: var(--teal-dark);
  --accent: var(--teal);
  --accent-2: #3E93F0;
  --danger: #F0466A;
  --warn: #D9A413;
  --ok: #2FB77E;
  --high: var(--danger);
  --medium: var(--warn);
  --low: var(--ok);
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(10, 20, 25, .04), 0 12px 34px -18px rgba(10, 20, 25, .22);
  --shadow-lift: 0 2px 4px rgba(10, 20, 25, .05), 0 22px 50px -24px rgba(10, 20, 25, .30);
  --glow: rgba(160,120,255,.30);
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
}
[data-theme="dark"] {
  /* Command-Center Redesign — Dark (Design-Brief), eigenständiges Premium-Design. */
  --bg: #070B0F;
  --surface: #0D141A;
  --surface-2: #101820;
  --elevated: rgba(255,255,255,0.06);
  --card: #101820;
  --mist: #0D141A;
  --border: rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.16);
  --ink: #F4F7FA;
  --text: #E7EDF2;
  --muted: #8A98A5;
  --text-3: #5E6C77;
  --teal: #2EF2C5;
  --teal-dark: #16C9A3;
  --teal-light: rgba(46,242,197,0.45);
  --teal-pale: rgba(46,242,197,0.12);
  --accent: var(--teal);
  --accent-2: #4EA8FF;
  --danger: #FF5C7A;
  --warn: #F5C542;
  --ok: #46E6A6;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 24px 60px -30px rgba(0,0,0,.8);
  --shadow-lift: 0 1px 0 rgba(255,255,255,.05) inset, 0 30px 70px -28px rgba(0,0,0,.85);
  color-scheme: dark;
}
body { transition: background .5s ease, color .4s ease; }
/* dark-mode ambient wash */
body::before {
  content:""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0;
  background:
    radial-gradient(60% 45% at 82% -5%, rgba(46,242,197,.08), transparent 60%),
    radial-gradient(50% 40% at 6% 108%, rgba(78,168,255,.07), transparent 60%);
  transition: opacity .6s ease;
}
[data-theme="dark"] body::before { opacity: 1; }
[data-theme="dark"] .layout, [data-theme="dark"] .main-col { position: relative; z-index: 1; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: var(--teal-dark); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3 { font-weight: 800; letter-spacing: -.01em; color: var(--ink); }

/* Eyebrow labels ("01 · SECTION NAME") ------------------------------------ */
.eyebrow {
  display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; color: var(--teal-dark); margin-bottom: 10px;
}
.eyebrow .num { color: var(--teal); }
.eyebrow.on-dark { color: var(--teal-light); }

/* Site header: brand bar + module/page nav --------------------------------- */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--surface); box-shadow: 0 1px 0 var(--border); }
.topbar-brand { display: flex; align-items: center; justify-content: space-between; padding: 13px 24px; border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px var(--teal-pale); flex: 0 0 auto; }
.brand-text { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.brand-text .sep { color: var(--muted); font-weight: 600; margin: 0 8px; }
.brand-text .sub { color: var(--muted); font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.user-switcher { padding: 7px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); font-size: 13px; background: var(--surface-2); color: var(--text); }
.bell { position: relative; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-size: 16px;
  width: 36px; height: 36px; border-radius: 50%; }
.badge { position: absolute; top: -4px; right: -4px; background: var(--danger); color: #fff;
  font-size: 11px; border-radius: 10px; padding: 1px 5px; }

.navbar { display: flex; align-items: center; gap: 6px; background: var(--mist); padding: 9px 24px; overflow-x: auto; }
.module-switch { display: flex; align-items: center; gap: 6px; }
.nav-sep { width: 1px; align-self: stretch; background: var(--border); margin: 2px 10px; flex: 0 0 auto; }
.navpill {
  padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted);
  white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; transition: background .1s ease, color .1s ease;
}
.navpill:hover { background: #fff; color: var(--text); }
.navpill.active { background: var(--ink); color: #fff; }
.navpill.module.active { background: var(--teal-dark); color: #fff; }

/* Layout */
.view { max-width: 1120px; margin: 0 auto; padding: 0 20px 60px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 18px; gap: 12px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; margin: 0; }
.muted { color: var(--muted); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* Hero sections (light + dark variants) ------------------------------------ */
.hero { padding: 34px 0 26px; }
.hero h1 { font-size: 32px; margin: 6px 0 10px; line-height: 1.15; }
.hero p.lead { font-size: 15px; color: var(--muted); max-width: 640px; line-height: 1.6; margin: 0; }

.hero-dark {
  background: radial-gradient(circle at 15% 0%, #1c2c30 0%, var(--dark) 55%);
  color: #fff; border-radius: 24px; padding: 36px 32px; margin: 24px 0 28px;
}
.hero-dark .eyebrow { color: var(--teal-light); }
.hero-dark h2 { color: #fff; font-size: 26px; margin: 10px 0 12px; letter-spacing: -.01em; }
.hero-dark p { color: #aebcbf; font-size: 14px; line-height: 1.65; max-width: 620px; margin: 0; }
.hero-dark .sub-label {
  display: block; color: var(--teal-light); font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; font-size: 12px; margin-top: 18px;
}
.hero-dark .audience { color: #7c8e91; font-size: 12.5px; margin-top: 10px; }

/* Circular "orbit" highlight badge ------------------------------------------ */
.orbit-wrap { display: flex; justify-content: center; margin-top: 26px; }
.orbit-badge {
  width: 176px; height: 176px; border-radius: 50%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  background: radial-gradient(circle at 50% 38%, rgba(31, 143, 134, .38), rgba(15, 23, 27, 0) 72%);
  border: 1px solid rgba(191, 232, 226, .35); position: relative;
}
.orbit-badge::before, .orbit-badge::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.orbit-badge::before { inset: -14px; border: 1px solid rgba(191, 232, 226, .18); }
.orbit-badge::after { inset: -30px; border: 1px solid rgba(191, 232, 226, .08); }
.orbit-badge .kicker { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #93a5a8; font-weight: 800; }
.orbit-badge .num { font-size: 32px; font-weight: 800; color: #fff; margin-top: 6px; }
.orbit-badge .num em { color: var(--teal-light); font-style: normal; }

/* Controls */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
select, input[type=text], input[type=email], input[type=password], input[type=number], textarea {
  padding: 8px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; background: #fff; color: var(--text);
}
textarea { width: 100%; resize: vertical; font-family: inherit; }
label.field { display: block; margin: 10px 0; font-size: 13px; font-weight: 700; }
label.field span { display: block; margin-bottom: 4px; }
label.field input, label.field select, label.field textarea { width: 100%; font-weight: 400; }

.btn { background: var(--teal); color: #fff; border: none; padding: 9px 17px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.btn:hover { background: var(--teal-dark); }
.btn.secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn.secondary:hover { background: #e2ebe9; }
.btn.ghost { background: transparent; color: var(--teal-dark); padding: 6px 10px; }
.btn.danger { background: var(--danger); }
.btn.small { padding: 5px 12px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Cards / feed */
.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 10px;
  transition: transform .08s ease, box-shadow .12s ease;
}
.card.clickable:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(10, 20, 20, .12); cursor: pointer; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card h3 { margin: 0; font-size: 15px; line-height: 1.35; font-weight: 800; }
.card .desc { font-size: 13px; color: var(--muted); line-height: 1.5; }
.icon-badge {
  width: 40px; height: 40px; border-radius: 12px; background: var(--teal-pale); color: var(--teal-dark);
  display: flex; align-items: center; justify-content: center; font-size: 18px; flex: 0 0 auto;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 10.5px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.tag.product { background: var(--teal-pale); color: var(--teal-dark); }
.tag.country { background: #eef2fb; color: #3a53a8; }
.tag.brand { background: #f5edfb; color: #7e3ec0; }
.tag.cat { background: #fdf1e3; color: #a8650c; }
.card-meta { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; align-items: center; }
.card-meta b { color: var(--text); }

.statusbadge { font-size: 10.5px; padding: 4px 10px; border-radius: 999px; font-weight: 800; white-space: nowrap; letter-spacing: .02em; text-transform: uppercase; }
.s-new { background: #eef2f3; color: #4c5a5d; }
.s-analysis,.s-question_open { background: #fdf1e3; color: #a8650c; }
.s-ready_for_rating,.s-rating { background: var(--teal-pale); color: var(--teal-dark); }
.s-prioritized,.s-planned,.s-in_progress { background: #e6f4ed; color: #1f7a43; }
.s-done { background: #dff2ec; color: var(--teal-dark); }
.s-rejected,.s-duplicate { background: #fde8e6; color: #b3372c; }
.s-deferred { background: #f1eef9; color: #6b46c1; }

.prio { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; }
.prio .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.prio-high .dot { background: var(--high); } .prio-high { color: var(--high); }
.prio-medium .dot { background: var(--medium); } .prio-medium { color: var(--medium); }
.prio-low .dot { background: var(--low); } .prio-low { color: var(--low); }
.prio-unrated .dot { background: #cbd5d4; } .prio-unrated { color: var(--muted); }

/* Detail */
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 860px) { .detail-grid { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.panel h2 { margin: 0 0 12px; font-size: 15px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 7px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.comment { border-top: 1px solid var(--border); padding: 10px 0; font-size: 13px; }
.comment:first-child { border-top: none; }
.comment .who { font-weight: 700; }
.comment .ctype { font-size: 10.5px; background: var(--surface-2); color: var(--muted); padding: 2px 8px; border-radius: 999px; margin-left: 6px; text-transform: uppercase; letter-spacing: .03em; }
.history-item { font-size: 12px; color: var(--muted); padding: 5px 0; border-left: 2px solid var(--teal-light); padding-left: 10px; margin-left: 4px; }

.openq { background: #fdf6e8; border: 1px solid #f0dfae; border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; }
.openq li { margin: 3px 0; }

.rating-grid { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; font-size: 13px; }
.rating-grid .scale { display: flex; gap: 4px; }
.scale button { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: #fff; font-size: 12px; font-weight: 700; }
.scale button.sel { background: var(--teal); color: #fff; border-color: var(--teal); }

.dimbar { background: var(--surface-2); border-radius: 6px; height: 8px; overflow: hidden; }
.dimbar > div { background: var(--teal); height: 100%; }

/* Requirement journey / funnel ---------------------------------------------- */
.journey { margin: 20px 0 30px; }
.journey-legend { display: flex; gap: 18px; flex-wrap: wrap; margin: 8px 0 18px; font-size: 12px; color: var(--muted); }
.journey-legend .sw { width: 12px; height: 12px; border-radius: 4px; display: inline-block; margin-right: 6px; vertical-align: -1px; }
.journey-legend .sw.progressed { background: var(--teal-dark); }
.journey-legend .sw.active { background: var(--teal-light); }
.journey-legend .sw.rejected { background: #dfe6e5; }
.journey-stage {
  display: flex; align-items: center; gap: 14px; border-radius: 14px; padding: 13px 18px; margin-bottom: 8px;
  color: #fff; background: linear-gradient(90deg, var(--teal-dark), var(--teal)); cursor: pointer; border: none; width: 100%; text-align: left;
}
.journey-stage .num-badge {
  width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, .25); display: flex;
  align-items: center; justify-content: center; font-size: 12px; font-weight: 800; flex: 0 0 auto;
}
.journey-stage .name { font-weight: 800; font-size: 14px; flex: 1; }
.journey-stage .count { font-weight: 800; font-size: 15px; }
.journey-stage.rejected-row { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.journey-stage.rejected-row .num-badge { background: #fff; color: var(--muted); }
.journey-caption { font-size: 12px; color: var(--muted); margin: -3px 4px 12px; }

/* Board */
.board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 14px; }
.board-col { min-width: 280px; flex: 0 0 280px; background: var(--surface-2); border-radius: var(--radius); padding: 10px; }
.board-col h3 { margin: 4px 6px 10px; font-size: 13px; display: flex; justify-content: space-between; }
.board-col .count { color: var(--muted); }
.mini-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; margin-bottom: 9px; font-size: 13px; cursor: pointer; }
.mini-card:hover { border-color: var(--teal); }
.mini-card .mt { font-weight: 700; margin-bottom: 5px; }

/* Inbox */
.inbox-list { display: flex; flex-direction: column; gap: 10px; }
.email-row { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px; box-shadow: var(--shadow); }
.email-row.imported { opacity: .65; }
.email-from { font-weight: 700; font-size: 14px; }
.email-subj { font-size: 13px; margin: 4px 0; }
.email-body-preview { font-size: 12px; color: var(--muted); white-space: pre-wrap; max-height: 60px; overflow: hidden; }
.pill { font-size: 10.5px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 700; }
.pill.sensitive { background: #fde8e6; color: #b3372c; }
.pill.new { background: var(--teal-pale); color: var(--teal-dark); }
.pill-outline {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--teal-light); color: var(--teal-dark);
  background: var(--teal-pale); padding: 5px 14px; border-radius: 999px; font-size: 11px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
}

/* Reports */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stat .num { font-size: 28px; font-weight: 800; color: var(--teal-dark); }
.stat .lbl { font-size: 12px; color: var(--muted); margin-top: 4px; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 160px 1fr 40px; gap: 10px; align-items: center; font-size: 13px; }
.bar-track { background: var(--surface-2); border-radius: 6px; height: 16px; overflow: hidden; }
.bar-fill { background: var(--teal); height: 100%; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; }
/* The [hidden] attribute must win over the display:flex above, otherwise the
   invisible modal backdrop intercepts all clicks on the page. */
[hidden] { display: none !important; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10, 18, 20, .5); }
.modal-box { position: relative; background: #fff; border-radius: var(--radius); max-width: 720px; width: 92%;
  max-height: 88vh; overflow: auto; padding: 24px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }
.modal-box h2 { margin-top: 0; }

/* Notifications panel */
.notif-panel { position: fixed; right: 18px; top: 66px; width: 340px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 16px 40px rgba(10, 20, 20, .18); z-index: 40; max-height: 70vh; overflow: auto; }
.notif-item { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
.notif-item.unread { background: var(--teal-pale); }
.notif-item .nt { color: var(--muted); font-size: 11px; margin-top: 3px; }

/* Toast */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 11px 20px; border-radius: 999px; font-size: 13px; z-index: 60; box-shadow: var(--shadow); }
.toast.err { background: var(--danger); }

.empty { text-align: center; color: var(--muted); padding: 50px 0; }
.loading { text-align: center; color: var(--muted); padding: 40px; }
hr.sep { border: none; border-top: 1px solid var(--border); margin: 14px 0; }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.dup-warn { background: #fdf6e8; border: 1px solid #f0dfae; border-radius: var(--radius-sm); padding: 11px 14px; font-size: 13px; margin: 10px 0; }

/* Status stepper on the requirement detail page (T6) ------------------------- */
.stepper { display: flex; align-items: center; gap: 0; flex-wrap: wrap; margin: 4px 0 18px; }
.stepper .step {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800;
  letter-spacing: .03em; text-transform: uppercase; color: var(--muted); padding: 5px 10px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border);
}
.stepper .step.done { background: var(--teal-pale); color: var(--teal-dark); border-color: var(--teal-light); }
.stepper .step.current { background: var(--teal-dark); color: #fff; border-color: var(--teal-dark); }
.stepper .step-arrow { color: var(--border); margin: 0 4px; font-size: 12px; }
.next-step { background: var(--teal-pale); border: 1px solid var(--teal-light); border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 13px; margin-bottom: 18px; color: var(--teal-dark); }

/* Completeness score bar (T5) ------------------------------------------------- */
.completeness { margin: 12px 0 4px; }
.completeness .spread { font-size: 13px; }
.completeness .bar-track { height: 10px; margin-top: 6px; }
.completeness.low .bar-fill { background: var(--danger); }
.completeness.mid .bar-fill { background: var(--warn); }

/* Role-based home dashboard (T7) ---------------------------------------------- */
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.home-grid .panel { margin-bottom: 0; }
.home-item { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 9px 0; border-top: 1px solid var(--border); font-size: 13px; cursor: pointer; }
.home-item:first-of-type { border-top: none; }
.home-item:hover .hi-title { color: var(--teal-dark); }
.home-item .hi-title { font-weight: 700; }
.home-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }

/* GroupIT Orb (Vision §4) — grün, um sich vom passiven Teal-Chrome abzuheben -- */
:root { --orb: #2fae4e; --orb-dark: #1f7a37; --orb-pale: #e7f7ec; --orb-light: #b9e8c6; }
.orb-btn {
  position: fixed; right: 20px; bottom: 20px; z-index: 45; width: 92px; height: 92px;
  border: none; background: transparent; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center; transition: transform .2s ease;
}
.orb-btn:hover { transform: scale(1.06); }
/* Plasma orb canvas mount (public/ui/plasma-orb.js). */
.orb-live { display: inline-block; line-height: 0; flex: 0 0 auto; }
.orb-live canvas { display: block; }

/* Immersive voice overlay — big plasma orb centre-stage, direct speech. */
body.ov-open { overflow: hidden; }
.orb-voice {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px; padding: 24px; text-align: center;
  /* Dunkler, neutraler Grund, damit die additive B2-Aura (WebGL) farbig leuchtet. */
  background: radial-gradient(130% 100% at 50% 0%, #0c1222 0%, #05070d 62%);
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  animation: ov-fade .18s ease-out;
}
.orb-voice[hidden] { display: none; }
/* B2-Aura: vollflächiger WebGL-Rahmen-Glow als Hintergrund; Inhalt liegt darüber. */
.ov-aura { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.orb-voice > :not(.ov-aura) { position: relative; z-index: 1; }
@keyframes ov-fade { from { opacity: 0; } to { opacity: 1; } }
.ov-close {
  position: absolute; top: 18px; right: 20px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06);
  color: #fff; font-size: 18px; cursor: pointer;
}
.ov-close:hover { background: rgba(255, 255, 255, .14); }
.ov-header { position: absolute; top: 22px; left: 0; right: 0; text-align: center; color: rgba(223, 247, 232, .72); font-size: 13px; font-weight: 600; letter-spacing: .05em; }
.ov-spark { color: #7ef7cf; margin-right: 5px; }
/* Weicher Brand-Glow hinter dem Orb — KEIN schwarzer Kreis, blendet aus. */
.ov-orb { line-height: 0; position: relative; isolation: isolate; }
.ov-orb::before { content: ''; position: absolute; inset: -16%; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(78, 168, 255, .18), rgba(78, 168, 255, 0) 68%); }
/* Orb = Push-to-Talk (Mikrofon-Button entfällt). */
.ov-orb[role="button"] { cursor: pointer; border-radius: 50%; outline: none; }
.ov-orb[role="button"]:focus-visible { box-shadow: 0 0 0 3px rgba(139, 159, 255, .55); }
.ov-orb.listening::after { content: ''; position: absolute; inset: -6%; border-radius: 50%;
  border: 2px solid rgba(139, 159, 255, .6); animation: ov-listen 1.3s ease-out infinite; pointer-events: none; }
@keyframes ov-listen { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.2); opacity: 0; } }
.ov-status { color: #dff7e8; font-weight: 600; font-size: 16px; min-height: 22px; }
.ov-greet { color: #eafff2; font-size: 19px; font-weight: 600; letter-spacing: -.01em; max-width: 560px; text-wrap: balance; min-height: 26px; }
.ov-text { color: #eafff2; max-width: 620px; font-size: 15px; line-height: 1.5; max-height: 28vh; overflow: auto; }
.ov-you { opacity: .78; font-weight: 600; margin-bottom: 8px; }
.ov-bot {
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px; padding: 12px 14px; white-space: pre-wrap; text-align: left;
}
.ov-bot.blocked { color: #ffe0a8; }
/* Bearbeitbares Transkript (Text geht sofort ans LLM, bleibt aber korrigierbar). */
.ov-edit { width: min(620px, 90vw); resize: none; overflow: hidden; background: none; border: none;
  outline: none; color: #eef3ff; font: inherit; font-size: 18px; line-height: 1.45; text-align: center;
  padding: 6px 4px; min-height: 26px; caret-color: #8d9fff;
  border-bottom: 1px dashed rgba(255, 255, 255, .18); transition: border-color .15s; }
.ov-edit::placeholder { color: rgba(223, 232, 255, .45); }
.ov-edit:focus { border-bottom-color: rgba(139, 159, 255, .7); }
/* Antwort des Assistenten (nur Lesen). */
.ov-answer { color: #eafff2; width: min(620px, 90vw); font-size: 15px; line-height: 1.5; max-height: 26vh; overflow: auto; }
.ov-hint { color: rgba(223, 247, 232, .6); font-size: 13px; }
.orb-core { width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .92);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .25); animation: orb-pulse 2.6s ease-in-out infinite; }
.orb-core.small { width: 16px; height: 16px; background: var(--orb); box-shadow: 0 0 0 5px var(--orb-pale); animation: orb-pulse 2.6s ease-in-out infinite; flex: 0 0 auto; }
@keyframes orb-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.orb-btn.orb-thinking .orb-core { animation: orb-pulse .7s ease-in-out infinite; }
.orb-btn.orb-listening { box-shadow: 0 0 0 8px rgba(47, 174, 78, .25), 0 6px 22px rgba(31, 122, 55, .45); }
.orb-btn.orb-blocked { background: radial-gradient(circle at 35% 30%, #d99a2b, #a8650c); }

.orb-panel {
  position: fixed; right: 22px; bottom: 92px; z-index: 44; width: 400px; max-width: calc(100vw - 44px);
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(10, 20, 20, .25); padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.orb-head { display: flex; align-items: center; gap: 10px; }
.orb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.intent-chip { border: 1px solid var(--orb-light); background: var(--orb-pale); color: var(--orb-dark); cursor: pointer; }
.intent-chip:hover { background: var(--orb-light); }
.orb-history { max-height: 320px; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.orb-msg .orb-q { background: var(--surface-2); border-radius: 12px 12px 12px 4px; padding: 8px 12px; font-size: 13px; font-weight: 600; }
.orb-msg .orb-a { background: var(--orb-pale); border: 1px solid var(--orb-light); border-radius: 12px 12px 4px 12px; padding: 10px 12px; font-size: 13px; margin-top: 6px; }
.orb-msg .orb-a.blocked { background: #fdf6e8; border-color: #f0dfae; }
.orb-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.orb-input { display: flex; gap: 6px; }
.orb-input input { flex: 1; }
.btn.orb-green { background: var(--orb); }
.btn.orb-green:hover { background: var(--orb-dark); }
.orb-tts { border: none; background: transparent; font-size: 13px; }
.orb-hero { border: 1px solid var(--orb-light); background: linear-gradient(180deg, var(--orb-pale), #fff); }
.orb-hero-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.orb-hero-head h2 { margin: 0; }

/* Model picker (segmented control) + routing/confidence badges (Vision §5/§8) - */
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.segmented button { border: none; background: transparent; padding: 6px 12px; font-size: 12px; font-weight: 700; color: var(--muted); }
.segmented button.sel { background: var(--ink); color: #fff; }
.routing-badge { font-size: 10.5px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 800; letter-spacing: .03em; }
.conf-pill { font-size: 10.5px; padding: 4px 10px; border-radius: 999px; font-weight: 800; letter-spacing: .03em; }
.conf-high { background: #e6f4ed; color: #1f7a43; }
.conf-medium { background: #fdf1e3; color: #a8650c; }
.conf-low { background: #fde8e6; color: #b3372c; }
.source-chip { text-decoration: none; cursor: pointer; }
.source-chip:hover { background: var(--teal-pale); color: var(--teal-dark); }

/* Content release workflow statuses (Vision §3) -------------------------------- */
.cs-draft { background: #eef2f3; color: #4c5a5d; }
.cs-in_review { background: #fdf1e3; color: #a8650c; }
.cs-approved { background: #e6f4ed; color: #1f7a43; }
.cs-published { background: var(--teal-pale); color: var(--teal-dark); }

/* Roadmap panel (Admin) ------------------------------------------------------ */
.roadmap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 14px; }
.roadmap-item { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; background: var(--mist); }
.roadmap-item.active { border-color: var(--teal-light); background: var(--teal-pale); }
.roadmap-item .rm-title { font-weight: 800; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.roadmap-item .rm-desc { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5; }

/* ============================================================================
   UX-Redesign (docs/UX-UI-KONZEPT.md): Tokens, Sidebar-Layout, Shell, Chips,
   Side Panel, Stepper, Skeleton/Empty States, Chat, Matrix, Systemlandschaft.
   ========================================================================== */

:root {
  --radius-lg: 22px;
  --shadow-hover: 0 2px 6px rgba(10,20,20,.06), 0 18px 44px rgba(10,20,20,.10);
  --space-1: 8px;  --space-2: 12px; --space-3: 16px;
  --space-4: 24px; --space-5: 32px; --space-6: 48px;
  --text-xs: 12px; --text-sm: 13.5px; --text-base: 15px;
  --text-lg: 17px; --text-xl: 22px;  --text-2xl: 28px;
  --sidebar-w: 232px; --sidebar-w-collapsed: 64px;
  --transition: 160ms cubic-bezier(.4,0,.2,1);
}

/* Ruhigere Typo-Hierarchie (B): Titel 700 statt 800 */
h1 { font-weight: 700; }
h2, h3 { font-weight: 650; }

/* --- Layout: Sidebar + Main (Q1) ------------------------------------------- */
.layout { display: flex; min-height: 100vh; }
#sidebar {
  width: var(--sidebar-w); flex: 0 0 auto; background: var(--surface);
  border-right: 1px solid var(--border); position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; transition: width var(--transition); z-index: 35;
}
body.nav-collapsed #sidebar { width: var(--sidebar-w-collapsed); }
body.nav-collapsed .nav-label { display: none; }
body.nav-collapsed .sb-brand .brand-text2 { display: none; }
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px 14px; }
.brand-text2 { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); flex: 1; }
.sb-collapse { border: none; background: transparent; color: var(--muted); font-size: 13px; padding: 4px 6px; border-radius: 8px; }
.sb-collapse:hover { background: var(--surface-2); }
body.nav-collapsed .sb-collapse { transform: rotate(180deg); }
.sb-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 12px;
  font-size: 13.5px; font-weight: 600; color: var(--muted); transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.nav-item:hover { background: var(--mist); color: var(--text); }
.nav-item.active { background: var(--teal-pale); color: var(--teal-dark); font-weight: 700; }
.nav-icon { width: 20px; text-align: center; font-size: 15px; flex: 0 0 auto; }
.sb-sep { height: 1px; background: var(--border); margin: 10px 6px; }
.sb-foot { padding: 10px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.sb-orb {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--orb-light);
  background: var(--orb-pale); color: var(--orb-dark); font-weight: 700; font-size: 13px;
  padding: 9px 12px; border-radius: 12px; white-space: nowrap;
}
.sb-orb:hover { background: var(--orb-light); }
.sb-user .user-switcher { width: 100%; font-size: 12px; }
body.nav-collapsed .sb-user { display: none; }

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding: 12px 28px; position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(8px);
}
.topbar .searchbtn {
  display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-size: 12.5px; padding: 7px 12px; border-radius: 999px; min-width: 200px;
}
.topbar .searchbtn:hover { border-color: var(--teal-light); color: var(--text); }
.topbar .searchbtn kbd { margin-left: auto; font-family: inherit; font-size: 10.5px; background: var(--surface-2); border-radius: 5px; padding: 1px 6px; color: var(--muted); }
.view { max-width: 1180px; width: 100%; margin: 0 auto; padding: 0 28px 72px; }

@media (max-width: 860px) {
  #sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w-collapsed); }
  body:not(.nav-collapsed) #sidebar { width: var(--sidebar-w); box-shadow: var(--shadow-hover); }
  .main-col { margin-left: var(--sidebar-w-collapsed); }
  .view { padding: 0 16px 72px; }
}

/* --- Seitenkopf & Abschnitte (Q2) ------------------------------------------- */
.page-head2 { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 18px 0 22px; flex-wrap: wrap; }
.page-head2 h1 { font-size: var(--text-2xl); margin: 0; letter-spacing: -.015em; }
.page-head2 .ph-sub { color: var(--muted); font-size: var(--text-sm); margin: 6px 0 0; max-width: 620px; line-height: 1.55; }
.ph-actions { display: flex; gap: 8px; align-items: center; }
.sect { margin: 26px 0; }
.sect-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.sect-head h2 { font-size: var(--text-lg); margin: 0; }
.sect-meta { font-size: var(--text-xs); }

/* --- Tabs -------------------------------------------------------------------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 4px 0 20px; overflow-x: auto; }
.tab {
  border: none; background: transparent; padding: 9px 14px; font-size: 13.5px; font-weight: 600;
  color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--teal-dark); border-bottom-color: var(--teal); font-weight: 700; }
.tab-badge { background: var(--surface-2); color: var(--muted); font-size: 10.5px; font-weight: 800; border-radius: 999px; padding: 1px 7px; }
.tab.active .tab-badge { background: var(--teal-pale); color: var(--teal-dark); }

/* --- Chips (Q3) ---------------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; letter-spacing: .01em; white-space: nowrap;
}
.chip-ok { background: #e6f4ed; color: #1f7a43; }
.chip-warn { background: #fdf1e3; color: #a8650c; }
.chip-danger { background: #fde8e6; color: #b3372c; }
.chip-neutral { background: var(--surface-2); color: var(--muted); }
.chip-draft { background: #eef2f3; color: #4c5a5d; }
.chip-info { background: var(--teal-pale); color: var(--teal-dark); }
.chip-ki { background: #f3eefb; color: #6b46c1; }
.src-status { opacity: .7; }

/* --- Ampel-Zeile (Q6/M2) --------------------------------------------------------- */
.ampel-row { display: flex; gap: 10px; flex-wrap: wrap; }
.ampel { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.ampel-dot { width: 9px; height: 9px; border-radius: 50%; background: #cbd5d4; flex: 0 0 auto; }
.ampel-ok .ampel-dot { background: #2c9a5b; }
.ampel-warn .ampel-dot { background: var(--warn); }
.ampel-danger .ampel-dot { background: var(--danger); }
.ampel-off .ampel-dot { background: #cbd5d4; }

/* --- Karten ruhiger (B): Border statt Dauerschatten ------------------------------ */
.card { box-shadow: none; padding: 20px; }
.card.clickable:hover { box-shadow: var(--shadow-hover); border-color: var(--teal-light); }
.panel { box-shadow: none; }

/* --- Side Panel (M1) -------------------------------------------------------------- */
#sidepanel { position: fixed; inset: 0; z-index: 55; }
.sp-backdrop { position: absolute; inset: 0; background: rgba(10, 18, 20, .38); }
.sp-box {
  position: absolute; top: 0; right: 0; bottom: 0; width: 480px; max-width: 100vw;
  background: var(--surface); box-shadow: -18px 0 50px rgba(10,20,20,.18);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  animation: sp-in .22s cubic-bezier(.3,.9,.4,1);
}
.sp-box.wide { width: 680px; }
@keyframes sp-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sp-close { position: absolute; top: 14px; right: 16px; border: none; background: var(--surface-2); color: var(--muted); width: 30px; height: 30px; border-radius: 50%; font-size: 13px; z-index: 2; }
.sp-close:hover { background: var(--border); color: var(--text); }
.sp-content { height: 100%; overflow-y: auto; padding: 26px 26px 32px; }
.sp-content h2 { margin-top: 0; font-size: var(--text-xl); padding-right: 36px; }
@media (max-width: 720px) { .sp-box, .sp-box.wide { width: 100vw; border-radius: 0; } }

/* --- Stepper (M4) -------------------------------------------------------------------- */
.sp-title { font-size: var(--text-xl); margin: 0 0 6px; }
.sp-intro { margin: 0 0 14px; font-size: var(--text-sm); line-height: 1.55; }
.step-progress { list-style: none; display: flex; gap: 4px; padding: 0; margin: 14px 0 22px; flex-wrap: wrap; }
.step-progress li { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); padding: 5px 10px 5px 6px; border-radius: 999px; background: var(--surface-2); }
.step-progress li.current { background: var(--teal-pale); color: var(--teal-dark); font-weight: 700; }
.step-progress li.done { color: var(--teal-dark); }
.step-progress .sp-num { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 800; }
.step-progress li.current .sp-num { background: var(--teal); color: #fff; border-color: var(--teal); }
.step-progress li.done .sp-num { background: var(--teal-pale); color: var(--teal-dark); border-color: var(--teal-light); }
.step-body { min-height: 120px; }
.step-hint { background: var(--teal-pale); border: 1px solid var(--teal-light); color: var(--teal-dark); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 12.5px; margin-top: 14px; }
.step-error { background: #fde8e6; border: 1px solid #f3b4ad; color: #b3372c; border-radius: var(--radius-sm); padding: 10px 14px; font-size: 12.5px; margin-top: 12px; }
.step-footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }

/* --- Skeleton & Empty States (Q4) ------------------------------------------------------ */
.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin: 8px 0; }
.skel-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.skel-line { height: 12px; border-radius: 6px; margin: 10px 0; background: linear-gradient(90deg, var(--surface-2) 25%, #f7faf9 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: skel 1.4s ease infinite; }
.skel-line.w40 { width: 40%; } .skel-line.w60 { width: 60%; } .skel-line.w90 { width: 90%; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.empty2 { text-align: center; padding: 54px 20px; color: var(--muted); }
.empty2-icon { font-size: 34px; margin-bottom: 10px; opacity: .5; }
.empty2 p { font-size: var(--text-sm); margin: 0 0 14px; }

/* --- Chat (M3): eine Engine für Orb + Assistant Hub -------------------------------------- */
.chat { display: flex; flex-direction: column; gap: 12px; }
.chat-history { display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.chat:not(.compact) .chat-history { min-height: 200px; max-height: calc(100vh - 380px); }
.chat.compact .chat-history { max-height: 300px; }
.chat-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 22px 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.chat-empty p { margin: 0; max-width: 420px; line-height: 1.55; }
.chat-entry { display: flex; flex-direction: column; gap: 8px; }
.chat-q { display: flex; justify-content: flex-end; }
.chat-q span { background: var(--ink); color: #fff; border-radius: 16px 16px 4px 16px; padding: 9px 14px; font-size: 13.5px; max-width: 85%; }
.chat-a { background: var(--surface); border: 1px solid var(--border); border-radius: 16px 16px 16px 4px; padding: 13px 16px; font-size: 13.5px; max-width: 92%; }
.chat-a.blocked { background: #fdf6e8; border-color: #f0dfae; }
.chat-text { white-space: pre-wrap; line-height: 1.55; }
.chat-meta { display: flex; align-items: center; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.chat-sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.chat-tts { border: none; background: transparent; font-size: 12px; opacity: .7; }
.chat-tts:hover { opacity: 1; }
.chat-composer { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.chat.listening .chat-composer { border-color: var(--orb); box-shadow: 0 0 0 3px var(--orb-pale); }
.chat.thinking .chat-send { animation: orb-pulse .8s ease-in-out infinite; }
.chat-context { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ctx-chip { border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font-size: 11.5px; font-weight: 600; padding: 4px 11px; border-radius: 999px; }
.ctx-chip:hover { border-color: var(--teal-light); color: var(--teal-dark); }
.ctx-chip.active { background: var(--teal-pale); border-color: var(--teal-light); color: var(--teal-dark); font-weight: 700; }
.ctx-product { font-size: 11.5px; padding: 4px 8px; border-radius: 999px; max-width: 150px; }
.chat-inputrow { display: flex; gap: 8px; align-items: flex-end; }
.chat-input { flex: 1; border: none; resize: none; font-size: 14px; padding: 8px 4px; background: transparent; outline: none; }
.chat-send { width: 34px; height: 34px; border-radius: 50%; padding: 0; font-size: 15px; flex: 0 0 auto; }
.chat-mic { border: none; background: var(--surface-2); width: 34px; height: 34px; border-radius: 50%; font-size: 14px; flex: 0 0 auto; }
.chat-underrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.chat-hint { font-size: 11px; }
.segmented.small button { padding: 4px 10px; font-size: 11px; }
.assistant-page { max-width: 780px; margin: 0 auto; }

/* Orb-Overlay auf Chat-Engine */
.orb-panel { width: 420px; padding: 16px; gap: 12px; border-radius: var(--radius-lg); }
.orb-head-text { display: flex; flex-direction: column; flex: 1; }
.orb-head-text .muted { font-size: 11px; }
.orb-expand { font-size: 15px; padding: 2px 6px; }
/* .orb-btn animation is handled by the plasma canvas itself. */
@keyframes orb-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.orb-core.thinking { animation: orb-pulse .7s ease-in-out infinite; }

/* Orb-Hero auf der Startseite (D/R6) */
.orb-hero2 {
  border: 1px solid var(--orb-light); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--orb-pale), var(--surface)); padding: 28px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 22px;
}
.orb-hero2 .orb-core { width: 34px; height: 34px; background: var(--orb); box-shadow: 0 0 0 10px rgba(47,174,78,.12); }
.orb-hero2 h2 { margin: 0; font-size: var(--text-xl); }
.orb-hero2 .oh-input { display: flex; gap: 8px; width: 100%; max-width: 560px; }
.orb-hero2 .oh-input input { flex: 1; border-radius: 999px; padding: 11px 18px; font-size: 14px; }
.orb-hero2 .muted { font-size: 12.5px; max-width: 480px; }

/* --- Home (M6) ---------------------------------------------------------------------------- */
.home-greet { margin: 22px 0 6px; }
.home-greet h1 { font-size: var(--text-2xl); margin: 0; }
.home-greet p { color: var(--muted); font-size: var(--text-sm); margin: 6px 0 0; }
.home-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-top: 18px; }
.home-cards .panel { margin-bottom: 0; }
.status-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); cursor: pointer; }
.status-line:first-of-type { border-top: none; }
.status-line:hover .sl-name { color: var(--teal-dark); }
.sl-name { font-weight: 650; font-size: 13.5px; }
.next-hint { font-size: 11.5px; color: var(--teal-dark); background: var(--teal-pale); border-radius: 999px; padding: 3px 10px; }

/* --- Produkte & Systeme (M2) ---------------------------------------------------------------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.product-card { position: relative; overflow: hidden; }
.product-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--border); }
.product-card.crit-high::before { background: var(--warn); }
.product-card.crit-business_critical::before { background: var(--danger); }
.product-card.crit-medium::before, .product-card.crit-low::before { background: var(--teal-light); }
.owner-ava { width: 26px; height: 26px; border-radius: 50%; background: var(--teal-pale); color: var(--teal-dark); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; flex: 0 0 auto; }
.flag-row { display: flex; gap: 4px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }

/* --- Compliance-Matrix (M5) ------------------------------------------------------------------- */
.matrix-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.matrix { border-collapse: collapse; width: 100%; font-size: 13px; }
.matrix th, .matrix td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.matrix thead th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--mist); font-weight: 700; }
.matrix tbody tr:last-child td { border-bottom: none; }
.matrix .m-cell { cursor: pointer; }
.matrix .m-cell:hover { background: var(--mist); }
.matrix .m-product { font-weight: 650; white-space: nowrap; }

/* --- Systemlandschaft (M8) --------------------------------------------------------------------- */
.landscape { position: relative; }
.ls-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; position: relative; z-index: 2; }
.ls-col-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; margin-bottom: 10px; }
.ls-node { margin-bottom: 12px; cursor: pointer; transition: opacity var(--transition), border-color var(--transition); }
.landscape.has-selection .ls-node:not(.selected):not(.related) { opacity: .3; }
.ls-node.selected { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-pale); }
.ls-node.related { border-color: var(--teal-light); }
.ls-node.external { background: var(--mist); border-style: dashed; }
.ls-svg { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.ls-svg path { stroke: var(--teal); stroke-width: 1.5; fill: none; opacity: .55; }

/* --- Fortschrittsring (Training) ------------------------------------------------------------------ */
.ring { position: relative; width: 40px; height: 40px; flex: 0 0 auto; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-bg { stroke: var(--surface-2); }
.ring .ring-fg { stroke: var(--teal); stroke-linecap: round; transition: stroke-dashoffset .4s ease; }
.ring .ring-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--teal-dark); }

/* --- Verwaltung: Unternavigation ------------------------------------------------------------------ */
.admin-layout { display: grid; grid-template-columns: 200px 1fr; gap: 26px; align-items: start; }
@media (max-width: 860px) { .admin-layout { grid-template-columns: 1fr; } }
.subnav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 70px; }
.subnav button { text-align: left; border: none; background: transparent; padding: 9px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.subnav button:hover { background: var(--mist); color: var(--text); }
.subnav button.active { background: var(--teal-pale); color: var(--teal-dark); font-weight: 700; }

/* --- Vertrauenszeile Knowledge (F) ----------------------------------------------------------------- */
.trust-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.trust-line .t-sep { opacity: .4; }
.searchbar { display: flex; gap: 8px; margin: 4px 0 14px; }
.searchbar input { flex: 1; border-radius: 999px; padding: 11px 18px; font-size: 14px; }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }

/* Timeline (Priority, „Meine Anfragen") */
.tl { display: flex; align-items: center; gap: 0; flex-wrap: wrap; margin: 8px 0 2px; }
.tl-step { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; color: var(--muted); }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); }
.tl-step.done .tl-dot { background: var(--teal); border-color: var(--teal); }
.tl-step.current { color: var(--teal-dark); }
.tl-step.current .tl-dot { background: #fff; border: 2px solid var(--teal); }
.tl-line { width: 18px; height: 1px; background: var(--border); margin: 0 4px; }
.tl-step.done + .tl-line { background: var(--teal-light); }

/* ============================================================================
   COMMAND-CENTER REDESIGN — Shell (Icon-Rail), Topbar, ⌘K-Palette, Orb, Home
   ============================================================================ */
.layout { display: block; }
.main-col { margin-left: 66px; min-width: 0; }
#sidebar {
  position: fixed; left: 0; top: 0; height: 100vh; width: 66px; z-index: 50;
  display: flex; flex-direction: column; gap: 2px; padding: 14px 12px;
  background: var(--surface); border-right: 1px solid var(--border);
  overflow: hidden; transition: width .28s cubic-bezier(.4,.8,.2,1);
}
#sidebar:hover, #sidebar:focus-within { width: 248px; box-shadow: var(--shadow-lift); }
#sidebar .sb-brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 16px; border: none; }
#sidebar .brand-dot { width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  background: radial-gradient(circle at 36% 30%, #EAF3FF, #4EA8FF 55%, #123B5E 100%);
  box-shadow: 0 0 14px rgba(78,168,255,.5); }
#sidebar .brand-text2, #sidebar .nav-label { white-space: nowrap; opacity: 0; transform: translateX(-6px); transition: opacity .2s, transform .2s; }
#sidebar:hover .brand-text2, #sidebar:hover .nav-label, #sidebar:focus-within .nav-label { opacity: 1; transform: none; }
#sidebar .sb-collapse { display: none; }
#sidebar .sb-nav { display: flex; flex-direction: column; gap: 2px; }
#sidebar .nav-item { display: flex; align-items: center; gap: 13px; padding: 9px 10px; border-radius: 11px;
  color: var(--muted); border: none; background: none; text-decoration: none; }
#sidebar .nav-item .nav-icon { width: 22px; height: 20px; display: grid; place-items: center; flex: 0 0 auto; color: currentColor; }
#sidebar .nav-item .nav-icon svg { width: 20px; height: 20px; }
#sidebar .nav-item:hover { background: var(--elevated); color: var(--text); }
#sidebar .nav-item.active { background: var(--teal-pale); color: var(--ink); }
#sidebar .nav-item.active .nav-icon { color: var(--teal); }
#sidebar .sb-sep { height: 1px; background: var(--border); margin: 8px 6px; }
#sidebar .sb-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
#sidebar .sb-orb { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 11px; border: none; background: none; color: var(--muted); cursor: pointer; }
#sidebar .sb-orb:hover { background: var(--elevated); color: var(--text); }
#sidebar .user-switcher { width: 100%; opacity: 0; transition: opacity .2s; background: var(--elevated); color: var(--text); border: 1px solid var(--border); border-radius: 9px; padding: 5px; }
#sidebar:hover .user-switcher, #sidebar:focus-within .user-switcher { opacity: 1; }

/* Topbar */
.topbar { position: sticky; top: 0; z-index: 30; height: 60px; display: flex; align-items: center; gap: 12px;
  padding: 0 24px; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(1.4) blur(20px); -webkit-backdrop-filter: saturate(1.4) blur(20px); }
.topbar .searchbtn { flex: 1; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 12px 0 14px; border-radius: 12px; color: var(--text-3);
  background: var(--elevated); border: 1px solid var(--border); cursor: text; font: inherit; font-size: 14px; }
.topbar .searchbtn:hover { border-color: var(--border-strong); }
.topbar .searchbtn kbd { margin-left: auto; font-family: ui-monospace, "SF Mono", monospace; font-size: 11px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--border); color: var(--text-3); background: var(--surface); }
.topbar .bell, .topbar .icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: none; border: 1px solid transparent; color: var(--muted); cursor: pointer; font-size: 16px; }
.topbar .bell:hover, .topbar .icon-btn:hover { background: var(--elevated); color: var(--text); }
.topbar .icon-btn svg { width: 18px; height: 18px; }

/* ⌘K command palette */
.cmdk { position: fixed; inset: 0; z-index: 100; display: none; }
.cmdk.open { display: block; }
.cmdk-back { position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 55%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: cmdk-fade .16s; }
@keyframes cmdk-fade { from { opacity: 0; } to { opacity: 1; } }
.cmdk-box { position: absolute; left: 50%; top: 84px; transform: translateX(-50%); width: 640px; max-width: calc(100vw - 32px);
  border-radius: 18px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lift); overflow: hidden; animation: cmdk-pop .2s cubic-bezier(.2,.8,.2,1); }
@keyframes cmdk-pop { from { opacity: 0; transform: translateX(-50%) translateY(-8px); } to { opacity: 1; transform: translateX(-50%); } }
.cmdk-in { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.cmdk-in input { flex: 1; border: none; background: none; color: var(--text); font: inherit; font-size: 17px; outline: none; }
.cmdk-list { max-height: 56vh; overflow: auto; padding: 8px; }
.cmdk-sec { padding: 12px 12px 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: var(--text); font-size: 14px; cursor: pointer; border: none; background: none; width: 100%; text-align: left; }
.cmdk-item .ci { width: 20px; text-align: center; color: var(--muted); flex: 0 0 auto; }
.cmdk-item:hover, .cmdk-item.sel { background: var(--teal-pale); }
.cmdk-item .hint { margin-left: auto; font-size: 11px; color: var(--text-3); font-family: ui-monospace, monospace; }

/* Orb — squircle so the B2 edge-glow reads */
#orbBtn { position: fixed; right: 22px; bottom: 22px; z-index: 60; width: auto; height: auto; border: none; background: none; padding: 0; cursor: pointer; filter: drop-shadow(0 8px 24px rgba(78,168,255,.4)); transition: transform .2s; }
#orbBtn:hover { transform: scale(1.06); }
/* Weicher, ausblendender Halo für Kontrast auf hellem Grund — kein harter schwarzer Kreis. */
#orbBtn::before { content: ''; position: absolute; inset: -8%; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle at 50% 46%, rgba(38,96,165,.72) 0 30%, rgba(78,168,255,.34) 54%, rgba(78,168,255,0) 74%); }
.orb-live { display: inline-block; line-height: 0; }
canvas.orb-canvas { border-radius: 50%; display: block; }
/* Kleine Orbs (Sidebar, Chat-Panel) auf hellem Grund: gleicher weicher Halo. */
.sb-orb .orb-live, .orb-head .orb-live { position: relative; isolation: isolate; }
.sb-orb .orb-live::before, .orb-head .orb-live::before { content: ''; position: absolute; inset: -12%; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle at 50% 46%, rgba(38,96,165,.62) 0 34%, rgba(78,168,255,0) 74%); }

/* Command Center — home */
.cc-hero { margin-bottom: 8px; }
.cc-eyebrow { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); font-weight: 600; }
.cc-greet { font-size: clamp(28px, 4vw, 40px); font-weight: 640; letter-spacing: -.03em; margin-top: 10px; color: var(--ink); }
.cc-sub { color: var(--muted); font-size: 16px; margin-top: 9px; max-width: 60ch; }
.cc-cmd { margin-top: 22px; display: flex; align-items: center; gap: 13px; padding: 7px 7px 7px 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); cursor: text; transition: border-color .2s, box-shadow .2s; }
.cc-cmd:hover { border-color: var(--border-strong); }
.cc-cmd .cc-ph { flex: 1; color: var(--text-3); font-size: 16.5px; }
.cc-cmd kbd { font-family: ui-monospace, "SF Mono", monospace; font-size: 11px; padding: 3px 7px; border-radius: 7px; border: 1px solid var(--border); color: var(--text-3); }
.cc-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.cc-chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--elevated); color: var(--muted); font-size: 13px; cursor: pointer; transition: color .18s, border-color .18s; }
.cc-chip:hover { color: var(--text); border-color: var(--border-strong); }
.cc-label { font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 34px 0 14px; }
.cc-pulse { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 12px; }
.cc-metric { padding: 15px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); }
.cc-metric .k { font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.cc-metric .v { font-size: 24px; font-weight: 640; margin-top: 8px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.cc-metric .v small { font-size: 13px; color: var(--text-3); font-weight: 500; }
.cc-metric.warn .v { color: var(--warn); }
.cc-metric.risk .v { color: var(--danger); }
.cc-modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cc-mod { padding: 22px 20px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s; }
.cc-mod:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-lift); }
.cc-mod .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--teal-pale); color: var(--teal); margin-bottom: 14px; }
.cc-mod .ic svg { width: 21px; height: 21px; }
.cc-mod h3 { font-size: 17px; color: var(--ink); }
.cc-mod p { color: var(--muted); font-size: 13.5px; margin-top: 7px; min-height: 38px; }
.cc-mod .cc-acts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; font-size: 13px; color: var(--muted); }

@media (max-width: 900px) {
  #sidebar { width: 0; padding-left: 0; padding-right: 0; border: none; }
  #sidebar:hover, #sidebar:focus-within { width: 248px; padding: 14px 12px; }
  .main-col { margin-left: 0; }
  .cc-modules { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
