/* QM-Evaluierung – zwei Layouts über CSS-Variablen (Werte: Vault-Notiz „Layouts“) */
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* Layout 1: World Transfer */
:root, [data-theme="wt"] {
  --primary: #1a75bb; --primary-hover: #155f98; --primary-soft: #e8f1f9;
  --accent: #b0347b;
  --side-bg: #0b3b5b; --side-text: #dce8f1; --side-muted: #9fb8cb; --side-active-bg: #1a75bb; --side-active-text: #ffffff;
  --bg: #f4f7fa; --surface: #ffffff; --text: #1f2933; --muted: #5b6573; --border: #d9dee4;
  --success: #2e7d32; --success-soft: #e7f3e8; --warning: #8a5a00; --warning-soft: #fdf3e0;
  --danger: #c62828; --danger-soft: #fbeaea; --info-soft: #e8f1f9;
  --radius: 6px; --radius-lg: 10px;
  --font: "Montserrat", system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(52, 55, 58, .08), 0 2px 8px rgba(52, 55, 58, .06);
}
/* Layout 2: Dashboard hell (angelehnt, ohne fremde Marke) */
[data-theme="hell"] {
  --primary: #006b51; --primary-hover: #00553f; --primary-soft: #e6f4f0;
  --accent: #3f52cf;
  --side-bg: #ffffff; --side-text: #24262a; --side-muted: #6b6b6b; --side-active-bg: #e6f4f0; --side-active-text: #006b51;
  --bg: #f7f7f7; --surface: #ffffff; --text: #24262a; --muted: #6b6b6b; --border: #e0e0e0;
  --success: #006c5b; --success-soft: #e6f4f0; --warning: #8f6401; --warning-soft: #fff6de;
  --danger: #bb2100; --danger-soft: #fdece8; --info-soft: #eaf2fd;
  --radius: 8px; --radius-lg: 12px;
  --font: "Inter", system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .4rem; }
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 .75rem; }
a { color: var(--primary); }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .9em; }
.strong { font-weight: 700; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

.demo-band { background: var(--warning-soft); color: var(--warning); text-align: center; font-size: .8rem; font-weight: 600; padding: .3rem; border-bottom: 1px solid var(--border); letter-spacing: .02em; }

/* Rahmen */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 30px); background: linear-gradient(to right, var(--side-bg) 240px, transparent 240px); }
[data-theme="hell"] .shell { background: linear-gradient(to right, var(--side-bg) 239px, var(--border) 239px, var(--border) 240px, transparent 240px); }
.sidebar { background: var(--side-bg); color: var(--side-text); display: flex; flex-direction: column; padding: 1.25rem .9rem; position: sticky; top: 0; height: calc(100vh - var(--band, 0px)); max-height: 100vh; overflow-y: auto; border-right: 1px solid var(--border); }
body.has-band { --band: 30px; }
[data-theme="wt"] .sidebar { border-right: 0; }
.brand { padding: 0 .5rem 1.25rem; display: flex; flex-direction: column; gap: .15rem; }
.brand-mark { font-weight: 800; font-size: 1.15rem; letter-spacing: .01em; color: #ffffff; }
.brand-mark-dark { color: var(--side-bg); }
.brand-dot { width: 28px; height: 28px; border-radius: 8px; background: var(--primary); margin-bottom: .35rem; }
.brand-title { font-weight: 700; font-size: 1.1rem; color: var(--side-text); }
.brand-sub { font-size: .8rem; color: var(--side-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.sidebar nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.nav-link { display: block; padding: .55rem .75rem; border-radius: var(--radius); color: var(--side-text); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav-link:hover { background: rgba(127, 127, 127, .14); color: var(--side-text); }
.nav-link.is-active { background: var(--side-active-bg); color: var(--side-active-text); }
.sidebar-foot { margin-top: auto; border-top: 1px solid rgba(127, 127, 127, .25); padding-top: .9rem; display: grid; gap: .6rem; }
.who { display: grid; padding: 0 .5rem; }
.who-name { font-weight: 700; }
.who-role { font-size: .8rem; color: var(--side-muted); }
.sidebar .btn-ghost { color: var(--side-text); border-color: rgba(127, 127, 127, .4); width: 100%; }

.content { padding: 1.75rem 2.25rem 3rem; max-width: 1280px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.25rem; }

/* Bausteine */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem 1.4rem; margin-bottom: 1.25rem; box-shadow: var(--shadow); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 { margin-bottom: 1.25rem; }
.empty { text-align: center; padding: 3rem 1.5rem; }
.empty-title { font-weight: 700; font-size: 1.05rem; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem 1.1rem; display: grid; gap: .2rem; box-shadow: var(--shadow); }
.kpi-label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.kpi-value { font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi-value.ok { color: var(--success); }
.kpi-value.bad { color: var(--danger); }
.kpi-note { font-size: .8rem; color: var(--muted); }

.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: .5rem .6rem; border-bottom: 1px solid var(--border); }
.table th.num { text-align: right; }
.table td { padding: .55rem .6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }

.pill { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--primary-soft); color: var(--primary); }
.pill-ok { background: var(--success-soft); color: var(--success); }
.pill-bad { background: var(--danger-soft); color: var(--danger); }

.alert { padding: .7rem .9rem; border-radius: var(--radius); border: 1px solid transparent; }
.alert-danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.alert-success { background: var(--success-soft); color: var(--success); border-color: var(--success); }
.alert-info { background: var(--info-soft); color: var(--text); border-color: var(--border); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-weight: 700; font-size: .92rem; padding: .6rem 1.1rem; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--primary); color: #ffffff; }
.btn-primary:hover { background: var(--primary-hover); color: #ffffff; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-small { padding: .35rem .7rem; font-size: .85rem; }
.btn-block { width: 100%; }
[data-theme="wt"] .btn { text-transform: uppercase; letter-spacing: .03em; font-size: .85rem; }

.stack { display: grid; gap: .9rem; }
.field { display: grid; gap: .3rem; font-weight: 600; font-size: .9rem; }
.field input, .field select, .field textarea { font: inherit; font-weight: 400; padding: .6rem .7rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.field input:focus { border-color: var(--primary); }

/* Anmeldung */
.login { min-height: calc(100vh - 30px); display: grid; place-items: center; padding: 1.5rem; background: var(--bg); }
[data-theme="wt"] .login { background: linear-gradient(160deg, #0b3b5b 0%, #0b3b5b 38%, var(--bg) 38%); }
.login-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; box-shadow: 0 8px 30px rgba(0, 0, 0, .12); }
.login-head { margin-bottom: 1.25rem; }
.login-head .brand-mark { display: block; margin-bottom: .75rem; }

/* Admin */
.layout-pick { display: grid; gap: .7rem; }
.choice { display: flex; gap: .8rem; align-items: center; padding: .7rem .8rem; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.choice.is-selected { border-color: var(--primary); background: var(--primary-soft); }
.choice input { accent-color: var(--primary); }
.swatch { display: inline-flex; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); flex: none; }
.swatch i { width: 18px; height: 30px; }
.swatch-wt i:nth-child(1) { background: #0b3b5b; }
.swatch-wt i:nth-child(2) { background: #1a75bb; }
.swatch-wt i:nth-child(3) { background: #f4f7fa; }
.swatch-hell i:nth-child(1) { background: #ffffff; }
.swatch-hell i:nth-child(2) { background: #008f6d; }
.swatch-hell i:nth-child(3) { background: #f7f7f7; }
.layout-pick .btn { justify-self: start; }

.ko-slots { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .6rem; }
.ko-slot { border: 1px dashed var(--border); border-radius: var(--radius); padding: .6rem .7rem; display: flex; gap: .5rem; align-items: center; }
.ko-slot.ko-aktiv { border: 1px solid var(--danger); background: var(--danger-soft); }
.ko-num { font-weight: 800; color: var(--danger); }

.block { border-top: 1px solid var(--border); padding: .4rem 0; }
.block summary { cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; font-weight: 700; }
.block summary .muted { font-weight: 400; }

@media (max-width: 900px) {
  .shell, [data-theme="hell"] .shell { display: block; background: none; min-height: 0; }
  .sidebar { position: static; height: auto; max-height: none; padding: .9rem; border-right: 0; border-bottom: 1px solid var(--border); }
  .brand { padding-bottom: .6rem; }
  .sidebar-foot { margin-top: .6rem; grid-template-columns: 1fr auto; align-items: center; }
  .sidebar .btn-ghost { width: auto; }
  .sidebar nav ul { grid-auto-flow: column; overflow-x: auto; }
  .content { padding: 1.25rem; }
  .grid-2, .kpis, .ko-slots { grid-template-columns: 1fr; }
}
