/* NEONEX E2E IT & Architecture – Stylesheet (Stufe 1, Referenzprojekte).
 * Gerüst (Seitenleiste, Kopfzeile, Projekt-Tabs) wie bisher; Inhalt neu.
 * Statuswerte tragen immer auch Text, Farbe allein ist keine Bedeutung (WEB_DESIGN_STANDARD.md). */
:root {
  --ink: #17365d; --navy: #18345f; --navy-deep: #10294b; --coral: #e36b57; --coral-soft: #fff0ec;
  --muted: #66778b; --line: #d5dee8; --soft: #f2f5f8; --green: #27765f; --amber: #a96d13; --red: #b64b4b;
  --shadow: 0 10px 28px rgba(22, 47, 89, .07); --sidebar: 268px; --topbar: 78px;
}
* { box-sizing: border-box; }
html { font-family: "soleil", "Avenir Next", Avenir, "Segoe UI", Arial, sans-serif; background: #edf2f6; color: var(--ink); font-size: 16px; }
body { margin: 0; min-width: 0; overflow-x: hidden; background: #edf2f6; color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }

/* Seitenleiste */
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; flex-direction: column; width: var(--sidebar); height: 100vh; background: var(--navy); color: #fff; }
.sidebar nav { display: grid; align-content: start; padding-top: 18px; }
.sidebar nav button { width: 100%; min-height: 60px; padding: 11px 18px; border: 0; border-left: 4px solid transparent; background: transparent; color: #e5ebf3; display: flex; align-items: center; gap: 12px; text-align: left; font-size: 14px; font-weight: 700; }
.sidebar nav button:hover { background: #21416e; }
.sidebar nav button.active { background: #274a79; border-left-color: var(--coral); color: #fff; }
.sidebar .nav-icon { flex: 0 0 24px; color: var(--coral); font-size: 18px; font-weight: 800; text-align: center; }
.sidebar-foot { margin-top: auto; padding: 20px; border-top: 1px solid #31507b; display: grid; gap: 5px; }
.sidebar-foot img { display: block; width: 150px; height: auto; margin-bottom: 8px; }
.sidebar-foot strong { font-size: 14px; }
.sidebar-foot small { color: #aebdd0; line-height: 1.35; }

/* Kopfzeile mit Projekt-Tabs */
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar); min-height: var(--topbar); margin-left: var(--sidebar); width: calc(100vw - var(--sidebar)); max-width: calc(100vw - var(--sidebar)); padding: 0 18px; gap: 12px; background: #fff; border-bottom: 1px solid #c6d0dc; box-shadow: 0 3px 12px #102d5812; display: flex; align-items: center; }
.topbar .brand { display: flex; align-items: center; justify-content: center; flex: 0 0 178px; width: 178px; height: 54px; padding: 10px 16px; overflow: hidden; border: 0; background: var(--navy); }
.topbar .brand img { display: block; width: 146px; max-width: 146px; }
.topbar-spacer { flex: 1 1 auto; min-width: 12px; }
.project-nav { display: flex; align-items: stretch; gap: 2px; min-width: 0; max-width: 62%; height: 58px; overflow-x: auto; scrollbar-width: thin; }
.project-nav[hidden] { display: none; }
.project-nav button { border: 0; border-bottom: 4px solid transparent; background: transparent; padding: 8px 12px; color: var(--ink); font-size: 12px; font-weight: 700; white-space: nowrap; }
.project-nav button:hover, .project-nav button.active { background: #f0f4f8; border-bottom-color: var(--coral); }
.save-status { color: var(--muted); font-size: 12px; white-space: nowrap; }
.project-badge { display: grid; gap: 2px; min-width: 160px; max-width: 235px; padding-left: 12px; border-left: 1px solid var(--line); }
.project-badge span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.project-badge strong { font-size: 12px; line-height: 1.2; overflow-wrap: anywhere; }

/* Inhalt */
main { margin-left: var(--sidebar); width: calc(100vw - var(--sidebar)); max-width: calc(100vw - var(--sidebar)); min-width: 0; }
.view { display: none; min-height: calc(100vh - var(--topbar)); }
.view.active { display: block; }
.page-shell { width: min(1480px, 100%); min-width: 0; margin: 0 auto; padding: 34px clamp(20px, 3vw, 52px) 72px; }
.page-heading { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; margin-bottom: 28px; }
.page-heading h1 { margin: 7px 0 8px; color: var(--ink); font-size: clamp(28px, 3.2vw, 44px); line-height: 1.03; letter-spacing: -.035em; }
.page-heading p { max-width: 760px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.eyebrow, .panel-label { display: block; color: var(--coral); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.primary { min-height: 40px; border-radius: 3px; border: 1px solid var(--coral); background: var(--coral); color: #fff; padding: 9px 16px; font-weight: 700; }
.primary:hover { background: #ce5948; }

.content-grid { display: grid; gap: 18px; margin-bottom: 18px; }
.two-column { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.panel { min-width: 0; margin-bottom: 18px; padding: 24px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.content-grid > .panel { margin-bottom: 0; }
.panel-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.panel h2 { margin: 6px 0 10px; font-size: 22px; line-height: 1.15; }
.panel h3 { margin: 6px 0 8px; }
.panel p { color: var(--muted); line-height: 1.5; }
.panel-intro { max-width: 900px; margin-top: -4px; margin-bottom: 18px; }
.draft-notice { margin: 0 0 18px; padding: 12px 16px; border-left: 4px solid var(--amber); background: #fff7e8; color: var(--ink); font-size: 14px; line-height: 1.5; }
.empty-state { margin: 0; padding: 22px; background: #fafbfd; border: 1px dashed #b7c3d0; color: var(--muted); }

/* Referenzprojekte (globale Seite) */
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
.project-card { display: flex; flex-direction: column; min-width: 0; padding: 26px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--navy); box-shadow: var(--shadow); }
.project-card h2 { margin: 10px 0 8px; font-size: 26px; line-height: 1.1; }
.project-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.project-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 18px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.tag { display: inline-flex; max-width: 100%; padding: 5px 8px; background: var(--soft); color: var(--ink); font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }

/* Projektrahmen */
.bullet-list { margin: 0; padding-left: 20px; color: var(--ink); line-height: 1.6; font-size: 14px; }
.bullet-list li + li { margin-top: 6px; }
.task-list { margin: 0; padding: 0; list-style: none; }
.task-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.task-list li:first-child { border-top: 0; }
.milestones { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.milestones li { display: grid; gap: 6px; padding: 14px; background: #f7f9fb; border-top: 3px solid var(--coral); font-size: 13px; }
.milestones b { color: var(--coral); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }

/* Best Practice */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.mini-card { display: grid; align-content: start; gap: 6px; padding: 16px; background: #f8fafc; border: 1px solid var(--line); border-top: 3px solid var(--navy); }
.mini-card strong { font-size: 15px; }
.mini-card p { margin: 0; font-size: 13px; }
.mini-card .tag-list { margin: 4px 0 0; }

/* Status, Empfehlung */
.status-badge { display: inline-flex; padding: 5px 8px; background: #edf2f8; color: #4c6890; font-size: 11px; font-weight: 800; white-space: nowrap; }
.status-badge.ok, .status-badge.status-aligned, .status-badge.rec-keep { background: #e4f1ec; color: var(--green); }
.status-badge.warn, .status-badge.status-partial, .status-badge.rec-extend { background: #fff3df; color: var(--amber); }
.status-badge.status-gap, .status-badge.rec-retire { background: #fde9e6; color: var(--red); }
.status-badge.status-exception { background: #f1eafe; color: #7658a9; }
.status-badge.rec-new { background: #e6eefb; color: #2f5da6; }

/* Abgleich */
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.filter-bar label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.filter-bar select { padding: 7px 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 12px; }
.count-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.count-chip { padding: 7px 10px; background: var(--soft); color: var(--muted); font-size: 12px; }
.count-chip b { color: var(--ink); }
.table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { background: #f4f7fa; color: var(--muted); font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
.gap-table { min-width: 960px; }
.gap-table td strong { display: block; }
.gap-table td small { display: block; margin-top: 4px; color: var(--muted); font-weight: 400; }

/* Capability-Matrix */
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; font-size: 12px; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.maturity { display: inline-block; width: 14px; height: 14px; border: 1px solid rgba(0, 0, 0, .12); }
.m0 { background: #f6d5d0; } .m1 { background: #fbe3c4; } .m2 { background: #fdf3c7; } .m3 { background: #d9ecd2; } .m4 { background: #b9dcc9; }
.family-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; align-items: start; }
.family h3 { margin: 0 0 10px; padding-bottom: 8px; border-bottom: 3px solid var(--navy); font-size: 14px; }
.tile { display: grid; gap: 4px; width: 100%; margin-bottom: 8px; padding: 10px 12px; border: 1px solid rgba(0, 0, 0, .1); border-left: 5px solid var(--navy); color: var(--ink); text-align: left; }
.tile strong { font-size: 13px; }
.tile span { color: #44566c; font-size: 11px; }
.tile.is-selected { outline: 3px solid var(--coral); outline-offset: 1px; }
.detail-list { display: grid; border-top: 1px solid var(--line); }
.detail-list > div { display: grid; grid-template-columns: 200px 1fr; gap: 15px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.detail-list span { color: var(--muted); font-size: 12px; }
.detail-list strong { font-size: 13px; }

/* Roadmap */
.wave-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: stretch; }
.wave { display: flex; flex-direction: column; gap: 4px; padding: 18px; background: #f8fafc; border: 1px solid var(--line); border-top: 4px solid var(--coral); }
.wave h3 { margin: 4px 0 8px; font-size: 18px; }
.track h4 { margin: 12px 0 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.wave-facts { display: grid; gap: 8px; margin: auto 0 0; padding-top: 16px; }
.wave-facts div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; font-size: 12px; }
.wave-facts dt { color: var(--muted); font-weight: 700; }
.wave-facts dd { margin: 0; }

/* Schmale Fenster */
@media (max-width: 900px) {
  :root { --sidebar: 72px; }
  .sidebar-foot { display: none; }
  .sidebar nav button { justify-content: center; padding: 10px; }
  .sidebar nav button span:not(.nav-icon) { display: none; }
  .topbar, main { margin-left: 0; width: 100%; max-width: 100vw; }
  .topbar .brand { flex-basis: 132px; width: 132px; }
  .topbar .brand img { width: 108px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .two-column { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .topbar { height: auto; min-height: 78px; flex-wrap: wrap; padding: 8px 10px; }
  .topbar .project-nav { order: 5; flex: 1 0 100%; width: 100%; max-width: 100%; min-height: 44px; }
  .topbar .project-nav button { min-height: 42px; }
  .topbar .project-badge { min-width: 0; max-width: 39vw; }
  .topbar .save-status { max-width: 30vw; overflow: hidden; text-overflow: ellipsis; }
  .page-shell { padding: 24px 14px 48px; }
  .panel { padding: 18px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card-foot { flex-direction: column; align-items: flex-start; }
  .detail-list > div { grid-template-columns: 1fr; gap: 4px; }
  .task-list li { flex-direction: column; align-items: flex-start; gap: 6px; }
}
