/*
 * NetzCloud Hosting – Admin-Konsole
 * Eigenständiges Design-System: Sidebar-Layout, Karten, Tabellen, Formulare,
 * Assistent, Diagramme. Hell/Dunkel, voll responsiv (Tabellen werden mobil zu Karten).
 */
:root {
  --brand: #2563eb; --brand-ink: #1d4ed8; --brand-soft: #eef3ff; --on-brand: #fff;
  --bg: #f5f6f9; --side: #fbfbfd; --surface: #fff; --surface-2: #f8f9fb; --hover: #f2f4f8;
  --line: #e3e6ed; --line-2: #eef0f4; --text: #101828; --text-2: #4a5468; --text-3: #8a93a6;
  --ok: #16a34a; --ok-ink: #15803d; --warn: #d99a06; --warn-ink: #8a6205; --partial: #ea6c0c; --partial-ink: #b4530a;
  --down: #dc2626; --down-ink: #b91c1c; --maint: #2563eb; --maint-ink: #1d4ed8; --none: #9aa3b5; --none-ink: #7a8397;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05); --shadow-2: 0 12px 32px -12px rgba(16, 24, 40, .22);
  --r: 10px; --r-sm: 7px; --side-w: 244px;
}
.dark {
  --brand: #4f8bff; --brand-ink: #7aa7ff; --brand-soft: #142039; --on-brand: #fff;
  --bg: #0b0e14; --side: #0e121a; --surface: #131923; --surface-2: #171e2a; --hover: #1a2230;
  --line: #232c3b; --line-2: #1c2431; --text: #e6eaf2; --text-2: #a3acbd; --text-3: #6b7588;
  --ok: #22c55e; --ok-ink: #4ade80; --warn: #eab308; --warn-ink: #facc15; --partial: #f97316; --partial-ink: #fb923c;
  --down: #ef4444; --down-ink: #f87171; --maint: #4f8bff; --maint-ink: #7aa7ff; --none: #4b5569; --none-ink: #7a8397;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35); --shadow-2: 0 16px 40px -14px rgba(0, 0, 0, .8);
}
.t-ok { --tone: var(--ok); --tone-ink: var(--ok-ink); } .t-warn { --tone: var(--warn); --tone-ink: var(--warn-ink); }
.t-partial { --tone: var(--partial); --tone-ink: var(--partial-ink); } .t-down { --tone: var(--down); --tone-ink: var(--down-ink); }
.t-maint { --tone: var(--maint); --tone-ink: var(--maint-ink); } .t-none { --tone: var(--none); --tone-ink: var(--none-ink); }

body.c { background: var(--bg); color: var(--text); font-family: "Inter S", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 14px; line-height: 1.5; letter-spacing: -0.005em; -webkit-font-smoothing: antialiased; }
:where(.c) a { color: inherit; text-decoration: none; }
:where(.c) :is(h1, h2, h3, h4, p) { margin: 0; }
:where(.c) h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.025em; }
:where(.c) h2 { font-size: 15px; font-weight: 650; letter-spacing: -0.015em; }
.c .i { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.c .i-sm { width: 14px; height: 14px; } .c .i-lg { width: 22px; height: 22px; }
.c .num { font-variant-numeric: tabular-nums; } .c .mono { font-family: "Mono S", ui-monospace, Menlo, monospace; font-size: 12.5px; }
.c .muted { color: var(--text-2); } .c .faint { color: var(--text-3); } .c .spacer { flex: 1; } .c .grow { flex: 1; min-width: 0; }
.c .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c .hidden, .c [hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Layout */
.c-shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }
.c-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--side); border-right: 1px solid var(--line); padding: 14px 12px; overflow-y: auto; }
.c-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; }
.c-brand img { border-radius: 8px; }
.c-brand b { display: block; font-size: 14.5px; letter-spacing: -0.02em; }
.c-brand small { display: block; font-size: 11.5px; color: var(--text-3); }
.c-nav { display: flex; flex-direction: column; gap: 1px; }
.c-nav-label { margin: 16px 10px 6px; font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.c-nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; color: var(--text-2); font-weight: 500; }
.c-nav a:hover { background: var(--hover); color: var(--text); }
.c-nav a.is-active { background: var(--brand-soft); color: var(--brand-ink); }
.c-nav a .c-count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--down); color: #fff; font-size: 11px; font-weight: 650; text-align: center; line-height: 18px; }
.c-nav a .c-count.t-maint { background: var(--maint); }
.c-side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.c-me { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; }
.c-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); font-size: 12px; font-weight: 700; flex: none; }
.c-me b { display: block; font-size: 13px; } .c-me small { display: block; font-size: 11.5px; color: var(--text-3); }
.c-main { min-width: 0; display: flex; flex-direction: column; }
.c-scrim { display: none; }
.c-top { display: none; }
.c-page { width: 100%; max-width: 1280px; margin: 0 auto; padding: 26px 32px 60px; }
.c-page-narrow { max-width: 880px; }
.c-head { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 22px; }
.c-head p { margin-top: 4px; color: var(--text-2); }
.c-head-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.c-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 10px; font-size: 13px; color: var(--text-3); }
.c-back:hover { color: var(--text); }

/* Karten */
.c-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.c-card + .c-card { margin-top: 16px; }
.c-card-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.c-card-head p { color: var(--text-3); font-size: 12.5px; }
.c-card-body { padding: 18px; }
.c-card-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 var(--r) var(--r); }
.c-grid { display: grid; gap: 16px; }
.c-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.c-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.c-grid-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.c-stack > * + * { margin-top: 16px; }

/* Kennzahlen */
.c-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.c-kpi { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.c-kpi > span { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); }
.c-kpi b { display: block; margin-top: 4px; font-size: 24px; font-weight: 700; letter-spacing: -0.03em; }
.c-kpi small { display: block; font-size: 12px; color: var(--text-3); }
.c-kpi.t-down b, .c-kpi.t-warn b, .c-kpi.t-ok b { color: var(--tone-ink); }

/* Buttons */
.c-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 550; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow); transition: background .15s, border-color .15s; }
.c-btn:hover { background: var(--hover); }
.c-btn:disabled { opacity: .55; cursor: not-allowed; }
.c-btn-primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.c-btn-primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.dark .c-btn-primary:hover { background: #3b78ec; }
.c-btn-danger { color: var(--down-ink); }
.c-btn-danger:hover { background: color-mix(in srgb, var(--down) 10%, var(--surface)); border-color: color-mix(in srgb, var(--down) 40%, var(--line)); }
.c-btn-ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--text-2); }
.c-btn-ghost:hover { color: var(--text); }
.c-btn-sm { height: 28px; padding: 0 9px; font-size: 12.5px; border-radius: 7px; }
.c-btn-icon { width: 34px; padding: 0; } .c-btn-sm.c-btn-icon { width: 28px; }
.c-btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.c-btn.is-busy::after { content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--text-3); border-top-color: transparent; border-radius: 50%; animation: c-spin .7s linear infinite; }
.c-btn-primary.is-busy::after { border-color: #fff; border-top-color: transparent; }
@keyframes c-spin { to { transform: rotate(360deg); } }

/* Formulare */
.c-form { display: grid; gap: 16px; }
.c-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.c-label { font-size: 13px; font-weight: 600; color: var(--text); }
.c-label small { font-weight: 400; color: var(--text-3); }
.c-help { font-size: 12.5px; color: var(--text-3); }
.c-input, .c-select, .c-textarea { width: 100%; min-width: 0; height: 36px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 14px; transition: border-color .15s, box-shadow .15s; }
.c-textarea { height: auto; min-height: 90px; padding: 9px 11px; line-height: 1.45; resize: vertical; }
.c-textarea.mono, .c-input.mono { font-family: "Mono S", ui-monospace, monospace; font-size: 12.5px; }
.c-input:focus, .c-select:focus, .c-textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.c-input:disabled, .c-select:disabled { background: var(--surface-2); color: var(--text-3); }
.c-select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a93a6' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; background-size: 15px; }
.c-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.c-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.c-fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 14px; }
.c-section-title { font-size: 12px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); margin: 8px 0 -4px; }
.c-switch-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; }
.c-switch-row + .c-switch-row { border-top: 1px solid var(--line-2); }
.c-switch-row div { flex: 1; min-width: 0; }
.c-switch-row b { display: block; font-size: 13.5px; font-weight: 600; }
.c-switch-row small { display: block; font-size: 12.5px; color: var(--text-3); }
.c-switch { position: relative; display: inline-block; width: 38px; height: 22px; flex: none; }
.c-switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.c-switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .2s; }
.c-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .2s; }
.c-switch input:checked + span { background: var(--brand); }
.c-switch input:checked + span::after { transform: translateX(16px); }
.c-switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.c-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; }
.c-check input { width: 16px; height: 16px; accent-color: var(--brand); margin: 0; }
.c-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; }
.c-checklist { max-height: 240px; overflow-y: auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 6px; }
.c-kv { display: grid; gap: 8px; }
.c-kv-row { display: grid; grid-template-columns: 1fr 1.6fr auto; gap: 8px; }
.c-kv-row.c-kv-4 { grid-template-columns: 1.4fr .8fr 1fr auto; }
.c-error { padding: 10px 12px; border-radius: 8px; background: color-mix(in srgb, var(--down) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--down) 30%, var(--line)); color: var(--down-ink); font-size: 13px; }
.c-alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: 9px; font-size: 13.5px; background: color-mix(in srgb, var(--tone, var(--brand)) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--tone, var(--brand)) 28%, var(--line)); }
.c-alert .i { color: var(--tone-ink, var(--brand)); margin-top: 1px; }

/* Tabs / Segmente */
.c-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.c-tabs a, .c-tabs button { padding: 9px 12px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--text-2); font-size: 13.5px; font-weight: 550; cursor: pointer; white-space: nowrap; }
.c-tabs a:hover, .c-tabs button:hover { color: var(--text); }
.c-tabs .is-active { color: var(--brand-ink); border-bottom-color: var(--brand); }
.c-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: var(--line-2); border: 1px solid var(--line); }
.c-seg a, .c-seg button, .c-seg label { padding: 4px 10px; border: 0; border-radius: 6px; background: none; font-size: 12.5px; font-weight: 550; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.c-seg .is-active, .c-seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.c-seg label { padding: 0; } .c-seg label span { display: block; padding: 4px 10px; border-radius: 6px; } .c-seg label input { position: absolute; opacity: 0; pointer-events: none; }

/* Badges & Punkte */
.c-badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; color: var(--tone-ink, var(--text-2)); background: color-mix(in srgb, var(--tone, var(--none)) 13%, transparent); white-space: nowrap; }
.c-badge-plain { color: var(--text-2); background: var(--line-2); }
.c-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tone, var(--none)); flex: none; }
.c-dot.is-pulse { animation: c-pulse 1.6s ease-in-out infinite; }
@keyframes c-pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--tone) 18%, transparent); } }
.c-tag { display: inline-flex; padding: 1px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 550; color: var(--text-2); background: var(--line-2); border: 1px solid var(--line); }

/* Toolbar & Tabelle */
.c-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.c-search { position: relative; flex: 1 1 220px; max-width: 340px; }
.c-search .i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.c-search .c-input { padding-left: 33px; }
.c-toolbar .c-select { width: auto; min-width: 140px; }
.c-table-wrap { overflow-x: auto; }
.c-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.c-table th { position: sticky; top: 0; text-align: left; padding: 9px 12px; font-size: 11.5px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; color: var(--text-3); background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.c-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.c-table td.num { white-space: nowrap; }
.c-table tr:last-child td { border-bottom: 0; }
.c-table tbody tr:hover td { background: var(--surface-2); }
.c-table tr.is-selected td { background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.c-table .c-col-check { width: 36px; padding-right: 0; }
.c-table .c-col-actions { width: 1%; white-space: nowrap; text-align: right; }
.c-table .c-group-row td { padding: 8px 12px; background: var(--surface-2); font-size: 12px; font-weight: 650; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.c-cell-title { display: flex; flex-direction: column; min-width: 0; }
.c-cell-title a { font-weight: 600; }
.c-cell-title a:hover { color: var(--brand-ink); }
.c-cell-title small { color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 360px; }
.c-actions { display: inline-flex; gap: 4px; }
.c-empty { padding: 40px 20px; text-align: center; color: var(--text-3); }
.c-empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.c-bulkbar { position: sticky; bottom: 16px; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: var(--text); color: var(--bg); box-shadow: var(--shadow-2); }
.c-bulkbar .c-select { width: auto; min-width: 150px; height: 32px; background-color: var(--surface); color: var(--text); }
.c-bulkbar .c-input { width: 150px; height: 32px; }
.c-bulkbar b { margin-right: 6px; }
.c-spark { width: 96px; height: 26px; }
.c-spark path.l { fill: none; stroke: var(--brand); stroke-width: 1.5; }
.c-spark path.a { fill: color-mix(in srgb, var(--brand) 12%, transparent); }
.c-spark circle { fill: var(--down); }

/* Listen, Zeitleiste */
.c-list { list-style: none; margin: 0; padding: 0; }
.c-list > li { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-top: 1px solid var(--line-2); }
.c-list > li:first-child { border-top: 0; }
.c-list-title { font-weight: 600; }
.c-list-sub { font-size: 12.5px; color: var(--text-3); }
.c-timeline { list-style: none; margin: 0; padding: 0; }
.c-timeline li { position: relative; padding: 0 0 18px 22px; }
.c-timeline li::before { content: ""; position: absolute; left: 0; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--tone, var(--brand)); }
.c-timeline li::after { content: ""; position: absolute; left: 4.5px; top: 19px; bottom: 0; width: 1px; background: var(--line); }
.c-timeline li:last-child::after { display: none; }
.c-timeline b { color: var(--tone-ink); }
.c-timeline p { margin-top: 3px; color: var(--text-2); white-space: pre-line; }

/* Diagramme */
.c-chart svg { width: 100%; height: auto; display: block; }
.chart-grid line { stroke: var(--line); stroke-dasharray: 3 4; }
.chart text { fill: var(--text-3); font-size: 11px; font-family: inherit; }
.chart-line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; }
.chart-area { fill: color-mix(in srgb, var(--brand) 12%, transparent); }
.chart-down rect { fill: var(--down); }
.chart-empty { padding: 26px; text-align: center; color: var(--text-3); }
.c-hbars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 6px; }
.c-hbars > div { flex: 1; display: flex; flex-direction: column-reverse; min-width: 0; height: 100%; }
.c-hbars i { display: block; border-radius: 2px 2px 0 0; background: var(--ok); }
.c-hbars i.d { background: var(--down); border-radius: 0; }
.c-hbars-x { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--text-3); }
.c-bars { display: flex; gap: 2px; height: 26px; }
.c-bars i { flex: 1; border-radius: 2px; background: var(--tone); }
.c-bars i.t-none { background: var(--line); }

/* Methoden-/Vorlagenkacheln */
.c-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.c-tile { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); cursor: pointer; text-align: left; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.c-tile:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: var(--shadow-2); }
.c-tile-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--brand-soft); color: var(--brand-ink); margin-bottom: 4px; }
.c-tile b { font-size: 14px; }
.c-tile small { font-size: 12.5px; color: var(--text-2); }
.c-tile.is-selected { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }

/* Assistent */
.c-steps { display: flex; gap: 6px; margin-bottom: 18px; overflow-x: auto; }
.c-steps li { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 99px; font-size: 12.5px; font-weight: 550; color: var(--text-3); white-space: nowrap; list-style: none; }
.c-steps li span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--line-2); font-size: 11.5px; }
.c-steps li.is-active { color: var(--text); background: var(--brand-soft); }
.c-steps li.is-active span, .c-steps li.is-done span { background: var(--brand); color: #fff; }
.c-steps ol { display: flex; gap: 6px; margin: 0; padding: 0; }

/* Testergebnis, Code */
.c-result { padding: 14px; border-radius: 9px; border: 1px solid color-mix(in srgb, var(--tone) 35%, var(--line)); background: color-mix(in srgb, var(--tone) 6%, var(--surface)); }
.c-result-head { display: flex; align-items: center; gap: 8px; font-weight: 650; color: var(--tone-ink); }
.c-result pre, .c-code { margin: 10px 0 0; padding: 12px 14px; border-radius: 8px; background: #0f172a; color: #e2e8f0; font-family: "Mono S", ui-monospace, monospace; font-size: 12px; line-height: 1.55; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
.c-secret { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); border: 1px dashed var(--brand); }
.c-secret code { flex: 1; font-family: "Mono S", monospace; font-size: 12.5px; word-break: break-all; }

/* Dialog, Menü, Toasts */
dialog.c-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-2); }
dialog.c-dialog-wide { width: min(760px, calc(100vw - 32px)); }
dialog.c-dialog::backdrop { background: rgba(10, 14, 22, .45); backdrop-filter: blur(2px); }
.c-dialog-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line-2); }
.c-dialog-body { padding: 18px; overflow-y: auto; max-height: calc(100vh - 200px); }
.c-dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line-2); background: var(--surface-2); }
.c-menu { position: absolute; z-index: 60; min-width: 190px; padding: 5px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-2); }
.c-menu button, .c-menu a { display: flex; width: 100%; align-items: center; gap: 9px; padding: 7px 9px; border: 0; border-radius: 6px; background: none; color: var(--text); font-size: 13px; text-align: left; cursor: pointer; }
.c-menu button:hover, .c-menu a:hover { background: var(--hover); }
.c-menu .is-danger { color: var(--down-ink); }
.c-menu hr { border: 0; border-top: 1px solid var(--line-2); margin: 4px 0; }
.c-toasts { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.c-toast { display: flex; align-items: center; gap: 9px; max-width: 380px; padding: 11px 14px; border-radius: 10px; background: var(--text); color: var(--bg); font-size: 13.5px; box-shadow: var(--shadow-2); animation: c-in .2s ease; }
.c-toast.is-error { background: var(--down); color: #fff; }
@keyframes c-in { from { opacity: 0; transform: translateY(6px); } }
.tip { position: fixed; z-index: 120; pointer-events: none; padding: 5px 8px; border-radius: 7px; background: #0f172a; color: #f8fafc; font-size: 12px; white-space: nowrap; opacity: 0; transition: opacity .12s; }
.tip.is-visible { opacity: 1; }
.c-progress { height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.c-progress span { display: block; height: 100%; background: var(--brand); }

/* Anmeldung */
.c-auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 500px at 50% -10%, var(--brand-soft), transparent), var(--bg); }
.c-auth-card { width: min(400px, 100%); padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-2); }
.c-auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.c-auth-brand img { border-radius: 9px; }

/* Responsiv */
@media (max-width: 1100px) {
  .c-grid-main { grid-template-columns: 1fr; }
  .c-grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .c-shell { grid-template-columns: 1fr; }
  .c-side { position: fixed; z-index: 80; left: 0; top: 0; width: 270px; transform: translateX(-102%); transition: transform .25s ease; box-shadow: var(--shadow-2); }
  .c-nav-open .c-side { transform: none; }
  .c-scrim { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(10, 14, 22, .4); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .c-nav-open .c-scrim { opacity: 1; pointer-events: auto; }
  .c-top { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 40; height: 54px; padding: 0 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .c-top img { border-radius: 7px; }
  .c-page { padding: 18px 14px 80px; }
  .c-grid-2, .c-grid-3, .c-row-2 { grid-template-columns: 1fr; }
  .c-head-actions { margin-left: 0; width: 100%; }
  .c-search { max-width: none; flex-basis: 100%; }
  .c-toolbar .c-select { flex: 1; min-width: 0; }
  /* Tabellen → Karten */
  .c-table.c-responsive thead { display: none; }
  .c-table.c-responsive, .c-table.c-responsive tbody, .c-table.c-responsive tr, .c-table.c-responsive td { display: block; width: 100%; }
  .c-table.c-responsive tr { position: relative; padding: 12px 14px 12px 44px; border-bottom: 1px solid var(--line-2); }
  .c-table.c-responsive tr.c-group-row { padding: 0; }
  .c-table.c-responsive td { padding: 2px 0; border: 0; }
  .c-table.c-responsive td[data-label]::before { content: attr(data-label) ": "; color: var(--text-3); font-size: 12px; }
  .c-table.c-responsive .c-col-check { position: absolute; left: 14px; top: 14px; width: auto; }
  .c-table.c-responsive .c-col-actions { text-align: left; padding-top: 8px; }
  .c-table.c-responsive tbody tr:hover td { background: none; }
  .c-table.c-responsive .c-hide-m { display: none; }
  .c-kv-row, .c-kv-row.c-kv-4 { grid-template-columns: 1fr 1fr; }
  .c-kv-row > :last-child { grid-column: 1 / -1; justify-self: start; }
  .c-bulkbar { bottom: 10px; }
  .c-cell-title small { max-width: 240px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
