/**
 * BoxKIx Oberfläche 2026: letzte Schicht über boxkix.css, boxkix-modern.css und boxkix-mobil.css.
 * Gilt auf jeder Seite. Gleiche Farben und Maße (Variablen aus :root), aber ruhigere Flächen:
 * weiche Karten, runde Felder, klare Tabellen, getönte Hinweise. Nur Aussehen, keine Funktion.
 * Abschalten: Datei in layout.php nicht laden.
 */

:root {
	--radius: 10px;
	--radius-gross: 16px;
	--schatten-weich: 0 1px 2px rgb(0 0 0 / .35), 0 8px 24px rgb(0 0 0 / .18);
	--fokus: 0 0 0 3px rgb(242 180 65 / .45);
}

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { line-height: 1.55; }

h1, h2, h3 { letter-spacing: -.012em; text-wrap: balance; }
h1 { font-weight: 700; line-height: 1.12; }
h2 { font-weight: 650; }
p, li { text-wrap: pretty; }

a { text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }

/* Kopfleiste: ruhig, mit feiner Linie */
.kopfleiste { border-bottom: 1px solid var(--rahmen); background: color-mix(in srgb, var(--grund) 92%, var(--flaeche-hoch)); }

/* Karten: weiche Fläche statt dicker Kante */
.karte {
	padding: 1.25rem 1.4rem;
	border: 1px solid var(--rahmen);
	border-left: 1px solid var(--rahmen);
	border-radius: var(--radius-gross);
	background: var(--flaeche);
	box-shadow: var(--schatten-weich);
}
.karte h2, .karte h3 { margin-top: 0; }
.karte--hinweis { border-color: color-mix(in srgb, var(--akzent) 55%, var(--rahmen)); }
.kachel { border-radius: var(--radius-gross); border-color: var(--rahmen); box-shadow: var(--schatten-weich); }
details.eintrag { border-radius: var(--radius-gross); }

/* Hinweise und Meldungen: getönt, mit Kante */
.hinweis, .meldung {
	padding: .85rem 1.1rem;
	border: 1px solid var(--rahmen);
	border-inline-start-width: 4px;
	border-radius: var(--radius);
	background: var(--flaeche);
}
.hinweis--erfolg, .meldung--erfolg { background: color-mix(in srgb, var(--erfolg) 10%, var(--flaeche)); border-color: color-mix(in srgb, var(--erfolg) 45%, var(--rahmen)); border-inline-start-color: var(--erfolg); }
.hinweis--fehler, .meldung--fehler { background: color-mix(in srgb, var(--fehler) 10%, var(--flaeche)); border-color: color-mix(in srgb, var(--fehler) 45%, var(--rahmen)); border-inline-start-color: var(--fehler); }
.fehlerliste { border-radius: var(--radius-gross); border-width: 1px; background: color-mix(in srgb, var(--fehler) 8%, var(--flaeche)); }

/* Kennsätze: Pillen mit zarter Tönung */
.kennsatz { min-height: 1.6rem; padding: .1rem .7rem; border-radius: 999px; font-size: .8rem; letter-spacing: .02em; background: color-mix(in srgb, currentColor 10%, transparent); }

/* Formulare */
label { font-weight: 600; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="date"],
input[type="number"], input[type="url"], input[type="tel"], input[type="time"], input[type="datetime-local"], select, textarea {
	border: 1px solid var(--rahmen-hell);
	border-radius: var(--radius);
	background-color: var(--grund);
	transition: border-color .15s, box-shadow .15s;
}
input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: var(--text-still); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 0; border-color: var(--akzent); box-shadow: var(--fokus); }
input:disabled, select:disabled, textarea:disabled { opacity: .55; }
fieldset { padding: 0; }
legend { font-weight: 650; }

/* Schaltflächen: Pille bleibt, Zustände ruhiger */
.knopf { font-weight: 650; letter-spacing: .005em; box-shadow: none; }
.knopf:hover { transform: none; box-shadow: 0 4px 14px rgb(0 0 0 / .35); }
.knopf:active { transform: scale(.98); box-shadow: none; }
.knopf--zweit { border-color: var(--rahmen-hell); background: transparent; }
.knopf--zweit:hover { background: var(--flaeche-hoch); border-color: var(--text-still); }
.knopf--still { background: transparent; border-color: var(--rahmen); color: var(--text-still); }
.knopf--still:hover { background: var(--flaeche-hoch); border-color: var(--rahmen-hell); color: var(--text); }
.knopf--gefahr, .knopf--gefahr:hover { border-radius: 999px; }
.knopfreihe { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }

/* Tabellen: runde Hülle, feine Linien, leise Kopfzeile */
.tabellenhuelle { border: 1px solid var(--rahmen); border-radius: var(--radius-gross); background: var(--flaeche); box-shadow: var(--schatten-weich); }
.tabellenhuelle table { border-collapse: separate; border-spacing: 0; }
th, td { border-bottom: 1px solid color-mix(in srgb, var(--rahmen) 80%, transparent); padding: .8rem 1rem; }
thead th {
	position: sticky; inset-block-start: 0; z-index: 1;
	background: color-mix(in srgb, var(--flaeche-hoch) 94%, transparent);
	backdrop-filter: blur(6px);
	font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 650; color: var(--text-still); opacity: 1;
}
caption { padding: 1rem 1.1rem .4rem; font-size: .9rem; font-weight: 500; color: var(--text-still); border-bottom: 0; }
.tabellenhuelle tbody tr:hover { background: color-mix(in srgb, var(--akzent) 6%, transparent); box-shadow: none; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td a:not(.knopf), th[scope="row"] a { text-decoration: none; font-weight: 600; }
td a:not(.knopf):hover, th[scope="row"] a:hover { text-decoration: underline; }
td .knopf, td form { margin-block: .1rem; }
td form { display: inline; }

/* Status */
.status { border-radius: 999px; padding: .12rem .7rem; font-size: .8rem; font-weight: 650; }

/* Aufklappbereiche */
details { border-radius: var(--radius); }
details > summary { cursor: pointer; border-radius: var(--radius); }
details > summary:hover { color: var(--akzent); }

/* Abstände im Inhalt */
main h1 + p { color: var(--text-still); max-inline-size: 70ch; }
main h2 { margin-block: 2rem .75rem; }
main .karte h2:first-child, main .br-karte h2:first-child { margin-top: 0; }

/* Scrollleisten */
* { scrollbar-width: thin; scrollbar-color: var(--rahmen-hell) transparent; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } .karte, .kachel, details.eintrag { animation: none; } }
@media print {
	.karte, .tabellenhuelle, .kachel { box-shadow: none; }
	thead th { position: static; backdrop-filter: none; }
}
