/* Content Johann Brinster – Rahmen, Anmeldung, Sicherheit.
   CI aus design-richtung.md: Inter Tight (Überschriften), Inter (Text), Tinte, Blau als einziger Akzent,
   Himmel im Verlauf, Karten 20 px, Klickbares als Pille. Aufbau wie das Cockpit von Mesut. */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-400-normal.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: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/inter-latin-600-normal.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: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/inter-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/inter-latin-700-normal.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: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/inter-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/inter-tight-latin-700-normal.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: 'Inter Tight'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/inter-tight-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --papier: #FFFFFF; --nebel: #F5F5F7; --tinte: #1D1D1F; --grau: #6E6E73; --linie-ci: #E3E3E8;
  --blau: #0071E3; --himmel: #4AA3F0; --hauch: #EAF3FD; --nacht: #161617;

  --bg: var(--nebel); --surface: var(--papier); --surface-2: var(--nebel); --line: var(--linie-ci);
  --text: var(--tinte); --text-2: #3A3A3F; --muted: var(--grau);
  --accent: var(--blau); --accent-soft: var(--hauch); --accent-text: #FFFFFF; --focus: var(--blau);
  --good: #1B7F3B; --good-bg: #E6F4EA; --warn: #8A5300; --warn-bg: #FFF4E0; --bad: #B3261E; --bad-bg: #FCE8E6;
  --radius: 20px; --radius-s: 12px;
  --shadow: 0 1px 2px rgba(29,29,31,.04), 0 8px 28px rgba(29,29,31,.06);
  --titel: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0F0F10; --surface: #1C1C1E; --surface-2: #2A2A2D; --line: #333336;
  --text: #F5F5F7; --text-2: #D2D2D7; --muted: #98989D;
  --accent: var(--himmel); --accent-soft: #14283D; --accent-text: #0B1520; --focus: var(--himmel);
  --good: #6FD08F; --good-bg: #15301F; --warn: #F5B95C; --warn-bg: #3A2A12; --bad: #FF8A80; --bad-bg: #3D1A18;
  --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 15px; line-height: 1.5; background: var(--bg); color: var(--text); }
h1, h2, h3 { font-family: var(--titel); font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0; }
a { color: var(--accent); }
code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .88em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: .5rem; left: .5rem; z-index: 100; background: var(--surface); padding: .5rem 1rem; border-radius: 999px; }

button, .btn { font: inherit; font-weight: 600; border: 0; border-radius: 999px; padding: .6rem 1.25rem; background: var(--accent); color: var(--accent-text); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
button:hover, .btn:hover { filter: brightness(1.08); }
button:disabled { opacity: .5; cursor: default; filter: none; }
.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.ghost:hover { background: var(--surface-2); filter: none; }
.small { padding: .38rem .9rem; font-size: .88rem; }

/* Rahmen */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.side { background: var(--nacht); color: #F5F5F7; padding: 1.6rem 1rem 1.2rem; display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side::before { content: ""; display: block; height: 4px; border-radius: 4px; margin: 0 .7rem -.6rem; background: linear-gradient(90deg, var(--blau), var(--himmel)); }
.brand { padding: 0 .7rem; }
.brand-name { font-family: var(--titel); font-size: 1.3rem; font-weight: 700; }
.brand-sub { font-size: .88rem; color: #A1A1A6; }
.side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.side nav a { display: grid; padding: .55rem .8rem; border-radius: 14px; text-decoration: none; color: #F5F5F7; }
.side nav a:hover { background: rgba(255,255,255,.06); }
.side nav a[aria-current="page"] { background: rgba(74,163,240,.16); box-shadow: inset 3px 0 0 var(--himmel); }
.m-label { font-weight: 600; }
.m-sub { font-size: .8rem; color: #A1A1A6; }
.side-foot { margin-top: auto; display: grid; gap: .55rem; padding: 0 .7rem; justify-items: start; }
.side-foot form { margin: 0; }
.side-foot .ghost { color: #F5F5F7; border-color: rgba(245,245,247,.28); }
.side-foot .ghost:hover { background: rgba(255,255,255,.08); }
.who { font-size: .82rem; color: #A1A1A6; }

.main-col { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: flex-start; gap: 1rem; padding: 1.8rem clamp(1rem, 3.5vw, 2.6rem) 1rem; }
.top-text { display: grid; gap: .3rem; }
.eyebrow { font-size: .85rem; color: var(--accent); font-weight: 600; }
.lead { color: var(--text-2); max-width: 70ch; }
.menu-btn { display: none; }
main { padding: .6rem clamp(1rem, 3.5vw, 2.6rem) 2.4rem; display: grid; gap: 1.3rem; align-content: start; }

/* Karten und Tabellen (Sicherheit) */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; box-shadow: var(--shadow); display: grid; gap: .9rem; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.3rem; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
.data th, .data td { padding: .5rem; text-align: left; border-bottom: 1px solid var(--line); }
.data thead th { font-size: .82rem; color: var(--muted); }
.empty { color: var(--muted); text-align: center !important; padding: 1.2rem !important; }
.kv th { text-align: left; font-weight: 400; color: var(--text-2); padding: .45rem 0; border-bottom: 1px solid var(--line); }
.kv td { text-align: right; padding: .45rem 0 .45rem .8rem; border-bottom: 1px solid var(--line); font-weight: 600; }
.ampel { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.ampel.gruen { background: var(--good-bg); color: var(--good); }
.ch-hint { background: var(--warn-bg); color: var(--text); border-radius: var(--radius-s); padding: .55rem .8rem; font-size: .92rem; }
.ok-note { background: var(--good-bg); color: var(--good); border-radius: var(--radius-s); padding: .65rem .9rem; font-weight: 600; }
.error { background: var(--bad-bg); color: var(--bad); border-radius: var(--radius-s); padding: .6rem .9rem; }
.stack { display: grid; gap: .8rem; }
.stack label { display: grid; gap: .3rem; font-size: .95rem; }
.stack input:not([type=checkbox]) { font: inherit; padding: .6rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.codes { columns: 2; gap: 1.2rem; margin: .4rem 0 1rem; padding-left: 1.4rem; }
.codes li { margin: .25rem 0; }
.codes code { font-size: 1.05rem; }

/* Anmeldung */
body.login { min-height: 100vh; display: grid; place-items: center; background: var(--nacht); }
.login-box { width: min(94vw, 440px); background: var(--papier); color: var(--tinte); border-radius: 24px; padding: 2.2rem; display: grid; gap: .5rem; border-top: 5px solid; border-image: linear-gradient(90deg, var(--blau), var(--himmel)) 1; }
.login-box .eyebrow { color: var(--blau); }
.login-box .lead { color: #3A3A3F; }
.login-box form { display: grid; gap: .9rem; margin-top: 1rem; }
.login-box label { display: grid; gap: .3rem; font-size: .95rem; }
.login-box input { font: inherit; padding: .7rem 1rem; border-radius: 999px; border: 1px solid var(--linie-ci); background: #fff; color: var(--tinte); }
.login-box input:focus { outline: 2px solid var(--blau); border-color: var(--blau); }
.login-box button, .login-box .btn { background: var(--blau); color: #fff; margin-top: .3rem; }
.login-box .ghost { background: transparent; color: var(--tinte); }
.login-box a { color: var(--blau); }
.login-box .ok-note { background: #E6F4EA; color: #1B7F3B; }
.login-box .error { background: #FCE8E6; color: #B3261E; }
.step-note { font-size: .88rem; color: var(--grau); margin-top: .6rem; }
.step-help { font-size: .95rem; margin-top: .4rem; }
.step-help summary { cursor: pointer; font-weight: 600; color: var(--blau); }
.step-help p { margin-top: .4rem; }
.check { display: flex !important; align-items: center; gap: .5rem; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--blau); padding: 0; }
.code-input { font-size: 1.3rem !important; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; }
.setup-steps { margin: .6rem 0 0; padding-left: 1.2rem; display: grid; gap: .7rem; }
.qr-box { margin: .7rem 0 .3rem; padding: 10px; background: #fff; border-radius: 16px; border: 1px solid var(--linie-ci); width: fit-content; }
.qr-box svg { display: block; width: 200px; height: 200px; }
.secret code { font-size: 1.05rem; letter-spacing: .08em; word-break: break-all; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(84vw, 300px); z-index: 50; transform: translateX(-102%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .menu-btn { display: inline-flex; }
  .top { padding-top: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
