/* kiproof-ds.css — KiPROOF-Design-System für on/mm/docs.
   Vendored aus dem Hub (kiproof-hub apps/web/src/app/globals.css, Cockpit-Stand 2026-10-04):
   Magenta #FF0066, Navy #0A2342, Gelb #ECF500, Mint #22EAAA; Fustat + IBM Plex Serif self-hosted.
   Identische Kopie in allen drei Apps halten; app-spezifisches Styling gehört in die App-eigenen Dateien. */

@font-face { font-family: 'Fustat'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/fonts/fustat-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fustat'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/fonts/fustat-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Serif'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/ibm-plex-serif-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Serif'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/ibm-plex-serif-700-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Tokens (Namen wie im Hub; --accent entspricht Hubs --violet) ---------- */
:root {
  color-scheme: light;
  --kp-magenta: #FF0066;
  --kp-magenta-fill: #E6005C;
  --kp-magenta-press: #CC0052;
  --kp-navy: #0A2342;
  --kp-yellow: #ECF500;
  --kp-mint: #22EAAA;
  --font-sans: Fustat, 'Segoe UI', system-ui, sans-serif;
  --font-serif: 'IBM Plex Serif', Georgia, serif;
  --font-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .6, .2, 1);
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --surface-2: #EEF0F3;
  --text: #0A2342;
  --muted: #526176;
  --line: #DCE0E6;
  --line-strong: #C3CAD4;
  --accent: #CC0052;
  --accent-2: #E6005C;
  --accent-soft: #FFE8F0;
  --tint-text: #B3004A;
  --blue: #1F5FBF;
  --green: #0B7A55;
  --amber: #946200;
  --red: #C8102E;
  --kpi: #0A2342;
  --side: #0A2342;
  --side-hover: #123054;
  --side-muted: #A9B6C8;
  --selected: #FFF3F7;
  --shadow-sm: 0 1px 2px rgba(10, 35, 66, .06), 0 6px 20px rgba(10, 35, 66, .06);
  --shadow-lg: 0 24px 70px rgba(10, 35, 66, .22);
  --radius: 8px;
  --radius-sm: 4px;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0A2342;
  --surface: #123054;
  --surface-2: #0D2848;
  --text: #FFFFFF;
  --muted: #A9B6C8;
  --line: #24466F;
  --line-strong: #33598A;
  --accent: #FF5C97;
  --accent-2: #FF8AB5;
  --accent-soft: #3B1640;
  --tint-text: #FF8AB5;
  --blue: #7FB2FF;
  --green: #22EAAA;
  --amber: #ECF500;
  --red: #FF7A8A;
  --kpi: #ECF500;
  --side: #071A33;
  --side-hover: #0F2B4D;
  --side-muted: #8C9BB0;
  --selected: #1B3B63;
  --shadow-sm: none;
  --shadow-lg: 0 28px 90px rgba(0, 0, 0, .55);
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--bg); font-family: var(--font-sans); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-serif); font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }
code, pre, kbd { font-family: var(--font-mono); }
::selection { background: var(--kp-magenta); color: #fff; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--kp-magenta) 55%, transparent); outline-offset: 2px; }
.kp-icon, .kp-shell svg { width: 20px; height: 20px; flex: 0 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- Buttons ---------- */
.button, .icon-button { border: 1px solid transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font-weight: 600; transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease); }
.button { min-height: 44px; border-radius: var(--radius-sm); padding: 0 18px; font-size: 15px; }
.button:disabled, .icon-button:disabled { opacity: .45; cursor: not-allowed; }
.button svg, .icon-button svg { width: 18px; height: 18px; }
.button.primary { background: var(--kp-magenta-fill); border-color: var(--kp-magenta-fill); color: #fff; }
.button.primary:hover:not(:disabled) { background: var(--kp-magenta-press); border-color: var(--kp-magenta-press); color: #fff; }
.button.secondary { background: transparent; border-color: var(--text); color: var(--text); }
.button.secondary:hover:not(:disabled) { background: var(--text); color: var(--bg); }
.button.ghost { background: transparent; color: var(--muted); }
.button.ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.button.danger { background: transparent; border-color: var(--red); color: var(--red); }
.button.danger:hover:not(:disabled) { background: var(--red); color: var(--bg); }
.button.sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.button.wide { width: 100%; }
.icon-button { width: 44px; height: 44px; padding: 0; border-color: var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.icon-button:hover:not(:disabled) { border-color: var(--text); }

/* ---------- Formulare ---------- */
.kp-field { display: grid; gap: 6px; min-width: 0; }
.kp-field > span, .kp-label { font-size: 14px; font-weight: 600; color: var(--text); }
.kp-hint { color: var(--muted); font-size: 13px; }
.kp-input, .kp-field input:not([type='checkbox']):not([type='radio']), .kp-field select, .kp-field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-size: 15px; transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.kp-field textarea, textarea.kp-input { min-height: 120px; resize: vertical; line-height: 1.45; }
.kp-input:focus, .kp-field input:focus, .kp-field select:focus, .kp-field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.kp-input::placeholder, .kp-field input::placeholder, .kp-field textarea::placeholder { color: var(--muted); }
input[type='checkbox'], input[type='radio'] { accent-color: var(--kp-magenta-fill); }

/* ---------- Karten, Seitenkopf, Text ---------- */
.kp-page { display: grid; gap: 24px; min-width: 0; }
.kp-page-head { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.kp-page-head h1 { margin: 6px 0 0; font-size: clamp(26px, 3vw, 36px); line-height: 1.1; }
.kp-page-actions { margin-left: auto; display: flex; gap: 12px; flex-wrap: wrap; }
.kp-kicker { margin: 0; font-family: var(--font-serif); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.kp-muted { margin: 0; color: var(--muted); font-size: 14px; }
.kp-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px 24px; min-width: 0; }
.kp-card-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.kp-card-head h2 { margin: 0; font-size: 19px; }
.kp-card-head > :nth-child(2) { margin-left: auto; }
.kp-stack { display: grid; gap: 20px; min-width: 0; }
.kp-link { border: 0; padding: 0; background: none; color: var(--accent); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.kp-link:hover { color: var(--accent-2); }

/* ---------- Chips & Hinweise ---------- */
.kp-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.kp-chip.action { background: var(--accent-soft); color: var(--tint-text); }
.kp-chip.check { background: var(--kp-yellow); color: var(--kp-navy); }
.kp-chip.blocked { background: var(--kp-navy); color: #fff; }
:root[data-theme='dark'] .kp-chip.blocked { background: #FFFFFF; color: var(--kp-navy); }
.kp-chip.done { background: var(--kp-mint); color: var(--kp-navy); }
.alert { min-height: 44px; padding: 10px 14px; border-radius: 6px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; }
.alert.error { color: var(--red); border-color: color-mix(in srgb, var(--red) 28%, transparent); background: color-mix(in srgb, var(--red) 8%, var(--surface)); }
.alert.warning { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 30%, transparent); background: color-mix(in srgb, var(--amber) 8%, var(--surface)); }
.alert.success { color: var(--green); border-color: color-mix(in srgb, var(--green) 28%, transparent); background: color-mix(in srgb, var(--green) 8%, var(--surface)); }

/* ---------- Shell: Navy-Seitenleiste + Topbar (wie Hub) ---------- */
.kp-shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.kp-sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--side); color: #fff; padding: 24px 16px; display: flex; flex-direction: column; gap: 28px; z-index: 60; }
.kp-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; color: inherit; text-decoration: none; }
.kp-brand strong { font-family: var(--font-serif); font-size: 19px; letter-spacing: -.01em; }
.kp-brand span { font-size: 16px; font-weight: 500; opacity: .8; }
/* Längere App-Namen ("Model Manager") dürfen in der 256px-Leiste umbrechen, ohne über den Rand zu laufen. */
.kp-sidebar > .kp-brand { padding: 0 4px; }
.kp-brand span { min-width: 0; line-height: 1.15; overflow-wrap: anywhere; }
.kp-brand-mark { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 4px; background: var(--kp-magenta); color: #fff; display: grid; place-items: center; }
.kp-brand-mark svg { width: 20px; height: 20px; }
.kp-nav { display: grid; gap: 4px; }
.kp-nav p { margin: 0 0 4px; padding: 0 12px; color: var(--side-muted); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.kp-nav-item { min-height: 44px; width: 100%; border: 0; border-radius: 4px; background: transparent; color: var(--side-muted); display: flex; align-items: center; gap: 12px; padding: 0 12px; font-size: 15px; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; transition: background .18s var(--ease), color .18s var(--ease); }
.kp-nav-item:hover { background: var(--side-hover); color: #fff; }
.kp-nav-item.active, .kp-nav-item[aria-current='page'] { background: var(--kp-magenta-fill); color: #fff; font-weight: 600; }
.kp-nav-item em { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; background: var(--kp-yellow); color: var(--kp-navy); }
.kp-sidebar-foot { margin-top: auto; display: grid; gap: 12px; }
.kp-user { display: flex; align-items: center; gap: 10px; padding: 0 8px; min-width: 0; }
.kp-user div { min-width: 0; }
.kp-user strong, .kp-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kp-user strong { font-size: 14px; }
.kp-user small { color: var(--side-muted); font-size: 12px; }
.kp-user a, .kp-user button { color: var(--side-muted); }
.kp-avatar { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; background: var(--kp-magenta); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.kp-nav-backdrop { display: none; }
.kp-main { min-width: 0; display: flex; flex-direction: column; }
.kp-topbar { position: sticky; top: 0; z-index: 40; min-height: 72px; display: flex; align-items: center; gap: 16px; padding: 0 40px; background: var(--surface); border-bottom: 1px solid var(--line); }
.kp-topbar-title { min-width: 0; font-family: var(--font-serif); font-weight: 700; font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kp-menu, .kp-brand-top { display: none; }
.kp-top-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.kp-theme { display: flex; gap: 2px; padding: 3px; border-radius: 6px; background: var(--surface-2); }
.kp-theme button { width: 38px; height: 38px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.kp-theme button svg { width: 18px; height: 18px; }
.kp-theme button[aria-pressed='true'] { background: var(--kp-magenta-fill); color: #fff; }
.kp-content { padding: 32px 40px 64px; display: grid; gap: 24px; align-content: start; min-width: 0; }

@media (max-width: 900px) {
  .kp-shell { display: block; }
  .kp-sidebar { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); transform: translateX(-100%); transition: transform .18s var(--ease); z-index: 90; }
  .kp-shell.nav-open .kp-sidebar { transform: none; }
  .kp-shell.nav-open .kp-nav-backdrop { display: block; position: fixed; inset: 0; z-index: 80; border: 0; background: rgba(7, 26, 51, .55); }
  .kp-topbar { gap: 8px 10px; padding: 8px 12px; min-height: 60px; background: var(--side); border-bottom: 0; color: #fff; }
  .kp-topbar-title { display: none; }
  .kp-menu { display: grid; background: transparent; border: 0; color: #fff; }
  .kp-brand-top { display: flex; color: #fff; padding: 0; }
  .kp-brand-top strong { font-size: 17px; }
  .kp-brand-top span { font-size: 14px; }
  .kp-top-actions { gap: 8px; }
  .kp-theme { background: rgba(255, 255, 255, .08); }
  .kp-theme button { color: var(--side-muted); }
  .kp-content { padding: 20px 16px 48px; }
  .kp-page { gap: 18px; }
  .kp-page-head h1 { font-size: 26px; }
  .kp-page-actions { margin-left: 0; width: 100%; }
  .kp-card { padding: 16px; }
}

/* ---------- Anmeldeseite ---------- */
.kp-login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.kp-login-card { width: min(440px, 100%); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; background: var(--surface); box-shadow: var(--shadow-lg); }
.kp-login-card .kp-brand { padding: 0; margin-bottom: 28px; }
.kp-login-card h1 { margin: 8px 0 12px; font-size: 28px; line-height: 1.15; }
.kp-login-card > p:not(.kp-kicker) { margin-bottom: 24px; color: var(--muted); font-size: 15px; }
.kp-login-card .alert { margin-bottom: 16px; }
@media (max-width: 480px) { .kp-login-card { padding: 24px 20px; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
