
@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; }

:root {
  color-scheme: light;
  --kp-magenta: #FF0066;
  --kp-magenta-fill: #E6005C;
  --kp-magenta-press: #CC0052;
  --kp-navy: #0A2342;
  --font-sans: Fustat, 'Segoe UI', system-ui, sans-serif;
  --font-serif: 'IBM Plex Serif', Georgia, serif;
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --surface-hell: #FFFFFF;
  --surface-2: #EEF0F3;
  --text: #0A2342;
  --muted: #526176;
  --line: #DCE0E6;
  --line-strong: #C3CAD4;
  --violet: #CC0052;
  --green: #0B7A55;
  --amber: #946200;
  --red: #C8102E;
  --side: #0A2342;
  --side-hover: #123054;
  --side-muted: #A9B6C8;
  --shadow-sm: 0 1px 2px rgb(10 35 66 / 6%), 0 6px 20px rgb(10 35 66 / 6%);
  --shadow-lg: 0 24px 70px rgb(10 35 66 / 22%);
  --radius: 8px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0A2342;
    --surface: #123054;
    --surface-2: #0D2848;
    --text: #FFFFFF;
    --muted: #A9B6C8;
    --line: #24466F;
    --line-strong: #33598A;
    --violet: #FF5C97;
    --green: #22EAAA;
    --amber: #ECF500;
    --red: #FF7A8A;
    --side: #071A33;
    --side-hover: #0F2B4D;
    --side-muted: #8C9BB0;
    --shadow-sm: none;
    --shadow-lg: 0 28px 90px rgb(0 0 0 / 55%);
  }
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--bg); font: 15px/1.5 var(--font-sans); }
.seitenleiste { background: var(--side); color: var(--surface-hell); padding: 24px 16px; }
.marke { display: flex; gap: 10px; align-items: center; color: inherit; font: 700 19px/1.15 var(--font-serif); text-decoration: none; }
.markenzeichen {
  width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center;
  border-radius: 4px; background: var(--kp-magenta); color: var(--surface-hell);
}
.markenzeichen svg { width: 20px; height: 20px; }
nav { display: grid; gap: 4px; margin-top: 28px; }
nav a {
  display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 4px;
  color: var(--side-muted); font-weight: 500; text-decoration: none;
}
nav a:hover { background: var(--side-hover); color: var(--surface-hell); }
nav a[aria-current="page"] { background: var(--kp-magenta-fill); color: var(--surface-hell); font-weight: 600; }
.verwaltung { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.verwaltung main { width: 100%; max-width: 90rem; padding: 34px 40px 60px; min-width: 0; }
.dialog { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.dialog main {
  width: min(460px, 100%); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(24px, 5vw, 38px); background: var(--surface); box-shadow: var(--shadow-lg);
}
.dialog .marke { margin-bottom: 20px; }
.dialog .markenzeichen { width: 38px; height: 38px; flex-basis: 38px; }
.dialog .primaer, .dialog button { width: 100%; }
.dialog svg[role="img"] { display: block; width: min(220px, 100%); height: auto; }
h1, h2, h3 { font-family: var(--font-serif); line-height: 1.15; letter-spacing: -.01em; }
h1 { margin: 0 0 24px; font-size: clamp(27px, 4vw, 34px); overflow-wrap: anywhere; }
.dialog h1 { font-size: 27px; margin-bottom: 18px; }
h2 { font-size: 19px; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 0 0 4px; }
p { margin: .5rem 0 1rem; }
p:last-child, ul:last-child, dl:last-child { margin-bottom: 0; }
a { color: var(--violet); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .14em; }
:focus-visible { outline: 3px solid var(--kp-magenta); outline-offset: 3px; }
.seitenleiste :focus-visible { outline-color: var(--surface-hell); }
input, button, select { font: inherit; }
input:not([type=hidden]), select {
  display: block; width: 100%; min-height: 44px; margin-top: 5px;
  padding: 8px 10px; color: var(--text); border: 1px solid var(--line-strong);
  border-radius: 4px; background: var(--bg);
}
label { display: block; font-weight: 600; min-width: 0; }
label + label, .felder + button { margin-top: 12px; }
button, .primaer {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 8px 18px; border: 1px solid var(--kp-magenta-fill); border-radius: 4px;
  background: var(--kp-magenta-fill); color: var(--surface-hell); font-weight: 600;
  text-decoration: none; text-align: center; cursor: pointer;
}
button:hover, .primaer:hover { background: var(--kp-magenta-press); border-color: var(--kp-magenta-press); }
button.neutral, .faktor-wiederherstellung button {
  border-color: var(--text); background: transparent; color: var(--text);
}
button.neutral:hover, .faktor-wiederherstellung button:hover { background: var(--text); color: var(--bg); }
.faktor-formular { display: grid; gap: 12px; }
.faktor-formular + .faktor-formular { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.spalten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.stapel { display: grid; gap: 16px; min-width: 0; }
.felder { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.felder label { margin: 0; }
.felder label.breit { grid-column: 1 / -1; }
.karte {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  background: var(--surface); box-shadow: var(--shadow-sm); min-width: 0;
}
.schmal { max-width: 43rem; }
.leise { color: var(--muted); }
.kennung, code, pre { font: .87rem/1.6 ui-monospace, monospace; overflow-wrap: anywhere; }
.kennung { color: var(--muted); }
.objekt, .zeile { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; }
.objekt { margin-bottom: 18px; }
.objekt p { margin: 4px 0; min-width: 0; overflow-wrap: anywhere; }
.zustand {
  display: inline-block; background: var(--surface-2); color: var(--muted);
  padding: 3px 8px; font-size: 12px; font-weight: 600;
}
.zustand.aktiv { color: var(--green); background: color-mix(in srgb, var(--green) 10%, var(--surface)); }
.zustand.gesperrt, .zustand.zur_entfernung, .zustand.getrennt {
  color: var(--amber); background: color-mix(in srgb, var(--amber) 11%, var(--surface));
}
.liste { margin: 0; padding: 0; list-style: none; }
.liste > li { border-top: 1px solid var(--line); padding: 12px 0; overflow-wrap: anywhere; }
.liste > li:first-child { border-top: 0; padding-top: 0; }
.liste > li:last-child { padding-bottom: 0; }
.liste p { margin: 4px 0; }
.dialog .liste { margin-bottom: 16px; }
.pfad { margin: 0 0 18px; color: var(--muted); }
dl { display: grid; grid-template-columns: minmax(7rem, 1fr) minmax(0, 2fr); gap: 4px 12px; margin: 0 0 16px; }
dt { color: var(--muted); overflow-wrap: anywhere; }
dd { margin: 0; overflow-wrap: anywhere; }
form + form, .karte > form + details { margin-top: 12px; }
details > summary { cursor: pointer; color: var(--violet); font-weight: 600; }
details[open] > summary { margin-bottom: 8px; }
.waehrend { margin-top: 16px; }
.hinweis {
  padding: 10px 12px; margin-bottom: 16px; border: 1px solid color-mix(in srgb, var(--green) 24%, var(--line));
  background: color-mix(in srgb, var(--green) 8%, var(--surface)); color: var(--green); border-radius: 6px;
}
.hinweis.fehler {
  border-color: color-mix(in srgb, var(--red) 24%, var(--line));
  background: color-mix(in srgb, var(--red) 8%, var(--surface)); color: var(--red);
}
.audit-daten { white-space: pre-wrap; margin: 8px 0 0; }
.pagination { display: flex; flex-wrap: wrap; gap: 16px; margin: 16px 0 0; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.actions form { margin: 0; }
@media (max-width: 64rem) {
  .verwaltung main { padding-inline: 24px; }
  .spalten { grid-template-columns: 1fr; }
}
@media (max-width: 48rem) {
  .verwaltung { display: block; }
  .seitenleiste { padding: 12px 16px; }
  .seitenleiste nav { display: flex; flex-wrap: wrap; margin-top: 12px; }
  nav a { padding-inline: 10px; }
  .verwaltung main { padding: 24px 16px 40px; }
  .karte { padding: 16px; }
  .felder { grid-template-columns: 1fr; }
}
@media (max-width: 22rem) {
  dl { grid-template-columns: 1fr; }
  dd:not(:last-child) { margin-bottom: 6px; }
}
