/* Töpfermarkt-Manager – eigene Stile (ohne Framework) */

/* ------------------------------------------------------------------ */
/* Schrift: Hanken Grotesk (variabel, lokal, SIL OFL – siehe fonts/OFL.txt) */
/* ------------------------------------------------------------------ */
@font-face {
    font-family: "Hanken Grotesk";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2-variations");
    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: "Hanken Grotesk";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../fonts/hanken-grotesk-latin-ext-wght-normal.woff2") format("woff2-variations");
    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: "Hanken Grotesk";
    font-style: italic;
    font-display: swap;
    font-weight: 100 900;
    src: url("../fonts/hanken-grotesk-latin-wght-italic.woff2") format("woff2-variations");
    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;
}

/* ------------------------------------------------------------------ */
/* Farben & Maße                                                       */
/* ------------------------------------------------------------------ */
:root {
    --bg: #F5F0E8;            /* Seitenhintergrund (Papier) */
    --surface: #FFFCF7;       /* Karten, Kopfzeile */
    --field: #FFFFFF;         /* Eingabefelder */
    --hover: #EFE7DC;
    --line: #E2D8CA;
    --line-strong: #C9BBA8;
    --line-field: #928374;    /* Rahmen von Eingabefeldern und Schaltern (≥ 3:1 zu Feld und Seite) */

    --text: #2A231F;
    --muted: #6A5D53;
    --placeholder: #7A6D62;   /* ≥ 4.5:1 auf Weiß */
    --ink: #2A231F;           /* dunkle Flächen (aktive Filter, Sammelaktionen) */

    --accent: #A84B25;        /* Terrakotta */
    --accent-hover: #8C3D1D;
    --accent-soft: #F3E2D6;

    --success: #2F5A27;
    --success-bg: #EDF4E9;
    --success-line: #C2D8B8;
    --success-dot: #4F8A45;
    --warning: #6A4F00;
    --warning-bg: #FBF3DC;
    --warning-line: #E6D39C;
    --warning-dot: #C99A1E;
    --danger: #8E2C22;
    --danger-bg: #FBEDEA;
    --danger-line: #E7B9B0;
    --danger-dot: #B23A2E;
    --info: #2F4F6B;
    --info-bg: #EEF3F7;
    --info-line: #C3D3E0;

    --radius: 8px;
    --radius-lg: 12px;
    --font: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --focus: 0 0 0 3px var(--accent-soft), 0 0 0 4px var(--accent);
}

/* ------------------------------------------------------------------ */
/* Grundlagen                                                          */
/* ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    /* kein smooth: nach dem Neuladen mit Anker (z. B. /bewerbung/#fotos) direkt zum Ziel springen */
    scroll-behavior: auto;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    /* Footer bei kurzem Inhalt unten am Fenster halten */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
body > main { flex: 1 0 auto; width: 100%; }

/* Abstände entstehen über .stack/.cluster/gap, nicht über Element-Margins */
h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure, blockquote, pre, fieldset { margin: 0; }
fieldset { padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
ul, ol { padding-left: 1.25rem; }
img, svg { vertical-align: middle; }
img { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
table { border-collapse: collapse; }
button, input, select, textarea { font: inherit; color: inherit; }
strong, b { font-weight: 650; }
small, .small { font-size: 0.875rem; }
code, pre, kbd { font-family: var(--mono); font-size: 0.875em; }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
h1, .h1 { font-size: 1.875rem; letter-spacing: -0.03em; }
h2, .h2 { font-size: 1.25rem; font-weight: 650; }
h3, .h3 { font-size: 1.0625rem; font-weight: 650; }
h4, .h4 { font-size: 1rem; font-weight: 650; }

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-hover); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Icons (SVG-Sprite /assets/icons.svg, siehe icon() in functions.php) */
.icon {
    width: 1em;
    height: 1em;
    fill: currentColor;
    flex-shrink: 0;
    vertical-align: -0.125em;
}
.icon-lg { width: 1.5rem; height: 1.5rem; }
.icon-xl { width: 2.5rem; height: 2.5rem; }

/* ------------------------------------------------------------------ */
/* Hilfsklassen (bewusst wenige)                                       */
/* ------------------------------------------------------------------ */
.visually-hidden,
.visually-hidden-focusable:not(:focus):not(:focus-within) {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
.muted { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-accent { color: var(--accent); }
.text-center { text-align: center; }
.text-end { text-align: right; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 0.875em; }
.break { overflow-wrap: anywhere; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.fw-normal { font-weight: 400; }
.fw-semibold { font-weight: 600; }
.lead { font-size: 1.0625rem; color: var(--muted); max-width: 60ch; }
.pre-line { white-space: pre-line; }
.w-100 { width: 100%; }
.block { display: block; }

/* ------------------------------------------------------------------ */
/* Layout                                                              */
/* ------------------------------------------------------------------ */
.container {
    width: 100%;
    max-width: 1440px;
    margin-inline: auto;
    padding-inline: 1rem;
}
.container-narrow { max-width: 1000px; }
@media (min-width: 768px) {
    .container { padding-inline: 1.75rem; }
}
.page { display: flex; flex-direction: column; gap: 1.5rem; padding-block: 2rem 3rem; }
.page > * { min-width: 0; }
main:focus { outline: none; }

/* zentrierte, schmalere Spalte (Formulare, Einstellungen) */
.measure { width: 100%; max-width: 800px; margin-inline: auto; }
.measure-sm { width: 100%; max-width: 420px; margin-inline: auto; }

/* vertikaler Stapel mit gleichmäßigem Abstand */
.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack-xs { gap: 0.25rem; }
.stack-sm { gap: 0.5rem; }
.stack-lg { gap: 1.5rem; }
.stack-xl { gap: 2.5rem; }
.stack > * { min-width: 0; }
.stack.text-center { align-items: center; }

/* waagerechte Gruppe, bricht um */
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.cluster-lg { gap: 1rem; }
.cluster-xs { gap: 0.25rem; }
.cluster-between { justify-content: space-between; }
.cluster-end { justify-content: flex-end; }
.cluster-center { justify-content: center; }
.cluster-start { align-items: flex-start; }
.cluster-baseline { align-items: baseline; }
.cluster-nowrap { flex-wrap: nowrap; }
.grow { flex: 1 1 auto; min-width: 0; }

/* Raster für Formulare: 12 Spalten ab Tablet, darunter einspaltig */
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 768px) {
    .form-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .form-grid > * { grid-column: span 12; }
    .form-grid > .span-3 { grid-column: span 3; }
    .form-grid > .span-4 { grid-column: span 4; }
    .form-grid > .span-5 { grid-column: span 5; }
    .form-grid > .span-6 { grid-column: span 6; }
    .form-grid > .span-8 { grid-column: span 8; }
    .form-grid > .span-9 { grid-column: span 9; }
}

/* gleich breite Spalten, auf schmalen Bildschirmen untereinander */
.columns { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) {
    .columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
    .columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 768px) and (max-width: 1099px) {
    .columns-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* zwei gleich breite Elemente nebeneinander (auch auf dem Handy) */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }

/* Hauptspalte + Seitenspalte (Detailansicht) */
.with-sidebar { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 992px) {
    .with-sidebar { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
}

/* ------------------------------------------------------------------ */
/* Kopfzeile, Navigation, Fußzeile                                     */
/* ------------------------------------------------------------------ */
.skip-link {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 1060;
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
}

.devbar {
    position: sticky;
    top: 0;
    z-index: 1051;
    padding: 0.5rem 1rem;
    text-align: center;
    font-weight: 600;
    color: #2A231F;
    background: #F2C14E;
}
/* Sprungmarken nicht unter der klebenden Testumgebungs-Leiste verstecken */
html:has(.devbar) { scroll-padding-top: 3rem; }

.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.topbar-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.5rem;
    min-height: 3.75rem;
    padding-block: 0.5rem;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.0625rem;
    letter-spacing: -0.01em;
    color: var(--text);
    text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand .icon { color: var(--accent); width: 1.25rem; height: 1.25rem; }
.brand-date { font-size: 0.875rem; font-weight: 400; color: var(--muted); }

.topbar .nav-toggle {
    display: none;
    margin-left: auto;
}
.nav {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.125rem;
}
.nav-end { margin-left: auto; }
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius);
    color: var(--muted);
    font-weight: 500;
    font-size: 0.9375rem;
    text-decoration: none;
    background: none;
    border: 0;
    cursor: pointer;
}
.nav-link:hover { color: var(--text); background: var(--hover); }
.nav-link.active,
.nav-link[aria-current="page"] { color: var(--text); background: var(--accent-soft); font-weight: 600; }

@media (max-width: 991px) {
    .topbar .nav-toggle { display: inline-flex; }
    .nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; padding-bottom: 0.5rem; }
    .nav.is-open { display: flex; }
    .nav-end { margin-left: 0; }
    .nav .menu-list { position: static; box-shadow: none; margin-top: 0.25rem; }
}

/* Aufklappmenü auf Basis von <details> */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary .icon-caret { width: 0.75em; height: 0.75em; transition: transform 0.15s; }
.menu[open] > summary .icon-caret { transform: rotate(180deg); }
.menu-list {
    position: absolute;
    right: 0;
    top: calc(100% + 0.375rem);
    z-index: 1000;
    min-width: 13rem;
    margin: 0;
    padding: 0.375rem;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(42, 35, 31, 0.12);
}
.menu-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
}
.menu-item:hover { background: var(--hover); color: var(--text); }
.menu-item.active { background: var(--accent-soft); }
.menu-item-danger { color: var(--danger); }
.menu-item-danger:hover { color: var(--danger); }
.menu-divider { height: 1px; margin: 0.375rem 0; background: var(--line); }

.site-footer {
    margin-top: 3rem;
    padding-block: 1.25rem;
    border-top: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font-size: 0.875rem;
    text-align: center;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.inline-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1rem; margin: 0; padding: 0; list-style: none; }

/* ------------------------------------------------------------------ */
/* Seitenkopf & Abschnitte                                             */
/* ------------------------------------------------------------------ */
.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.page-header-title { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.page-header h1 { display: flex; align-items: center; gap: 0.6rem; }
.page-header h1 .icon { color: var(--accent); width: 1.5rem; height: 1.5rem; }
.page-subtitle { color: var(--muted); font-size: 0.9375rem; }

.section-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--line);
    font-size: 1.125rem;
    font-weight: 650;
}
.section-title .icon { color: var(--accent); }

.hero { padding-block: 3rem; text-align: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
.hero .lead { margin-inline: auto; }
.hero-meta { font-size: 1.25rem; font-weight: 600; color: var(--accent); }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--muted);
}
.empty-state .icon { width: 2.5rem; height: 2.5rem; }
.empty-state h1, .empty-state h2 { color: var(--text); }

/* Fließtext (Impressum, Datenschutz, E-Mail-Vorschau) */
.prose { max-width: 70ch; }
.prose > * + * { margin-top: 0.85em; }
.prose > :first-child { margin-top: 0; }
.prose h2, .prose h3 { margin-top: 1.75em; }
.prose ul, .prose ol { padding-left: 1.5rem; }
.prose li + li { margin-top: 0.25em; }

/* ------------------------------------------------------------------ */
/* Karten                                                              */
/* ------------------------------------------------------------------ */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    min-width: 0;
}
.card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--line);
    font-weight: 650;
}
.card-header .icon { color: var(--accent); }
h2.card-header, .card-header h2 { font-size: 1rem; font-weight: 650; letter-spacing: -0.01em; }
.card-header > .grow + * { margin-left: auto; }
.card-body { padding: 1.25rem; }
.card-body-lg { padding: 1.5rem; }
@media (min-width: 768px) {
    .card-body-lg { padding: 2rem; }
}
.card-footer {
    padding: 0.875rem 1.25rem;
    border-top: 1px solid var(--line);
}
.card-flush > .card-body { padding: 0; }
.card-muted { background: var(--bg); }
.card-success { border-color: var(--success-line); }
.card-warning { border-color: var(--warning-line); }
.card-danger { border-color: var(--danger-line); }
.card-title { font-size: 1.0625rem; font-weight: 650; }
/* Karte mit Aktion unten: Inhalt oben, Knopf bündig am unteren Rand */
.card-action { display: flex; flex-direction: column; }
.card-action > .card-body:first-child { flex: 1 1 auto; }
.card-action > .card-body + .card-body { padding-top: 0; }

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0 1.125rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn:disabled, .btn.disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
/* Per Tastatur erreichbar bleiben (Hinweis per aria-describedby), Absenden verhindert das Skript */
.btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--hover); color: var(--text); }

.btn-dark { background: var(--ink); color: var(--surface); }
.btn-dark:hover { background: #000; color: var(--surface); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #244820; color: #fff; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #73231B; color: #fff; }

.btn-danger-outline { background: var(--surface); color: var(--danger); border-color: var(--danger-line); }
.btn-danger-outline:hover { background: var(--danger-bg); color: var(--danger); }

.btn-success-outline { background: var(--surface); color: var(--success); border-color: var(--success-line); }
.btn-success-outline:hover { background: var(--success-bg); color: var(--success); }

.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--hover); color: var(--text); }

.btn-sm { min-height: 2.125rem; padding: 0 0.75rem; font-size: 0.875rem; }
.btn-lg { min-height: 3.125rem; padding: 0 1.5rem; font-size: 1.0625rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 0; width: 2.75rem; }
.btn-icon.btn-sm { width: 2.125rem; }

/* Schließen-Kreuz (Meldungen) */
.btn-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin: -0.25rem -0.5rem -0.25rem auto;
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
}
.btn-close:hover { opacity: 1; background: rgba(42, 35, 31, 0.06); }

/* ------------------------------------------------------------------ */
/* Formulare                                                           */
/* ------------------------------------------------------------------ */
.field { display: flex; flex-direction: column; gap: 0.375rem; min-width: 0; }
.label { display: block; font-weight: 600; font-size: 0.9375rem; }
.req { color: var(--accent); font-weight: 600; }
.opt { color: var(--muted); font-weight: 400; }
.hint { color: var(--muted); font-size: 0.875rem; }
.field-error { color: var(--danger); font-size: 0.875rem; font-weight: 600; }

.input {
    display: block;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--field);
    border: 1px solid var(--line-field);
    border-radius: var(--radius);
    line-height: 1.4;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.input::placeholder { color: var(--placeholder); opacity: 1; }
.input:disabled { background: var(--bg); color: var(--muted); }
.input[readonly] { background: var(--bg); }
.input.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px #F3DAD5; }
.input.is-invalid:focus { box-shadow: 0 0 0 3px #F3DAD5, 0 0 0 4px var(--danger); }
textarea.input { min-height: 6rem; resize: vertical; }
textarea.input.mono { font-size: 0.875rem; }
select.input {
    appearance: none;
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236A5D53' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px 12px;
}
.input-sm { min-height: 2.125rem; padding: 0.25rem 0.6rem; font-size: 0.875rem; }
select.input-sm { padding-right: 2rem; }
.input-auto { width: auto; max-width: 100%; }
.input-md { max-width: 24rem; }
.static-value { padding-block: 0.6rem; }

/* Feld mit vor-/nachgestelltem Text (z. B. €) */
.input-group { display: flex; align-items: stretch; width: 100%; }
.input-group > .input { flex: 1 1 auto; width: 1%; min-width: 0; }
.input-group > :not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.input-group > :not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .input:focus { position: relative; z-index: 1; }
.input-group.input-auto { width: auto; }
.input-group.input-auto > .input { flex: 0 1 auto; width: auto; }
.input-addon {
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    background: var(--bg);
    border: 1px solid var(--line-field);
    border-radius: var(--radius);
    color: var(--muted);
    white-space: nowrap;
}

/* Checkbox/Radio mit Beschriftung */
.choice { display: flex; align-items: flex-start; gap: 0.6rem; cursor: pointer; }
.choice > input { flex-shrink: 0; width: 1.125rem; height: 1.125rem; margin: 0.15rem 0 0; accent-color: var(--accent); cursor: pointer; }
.choice > input.is-invalid { outline: 2px solid var(--danger); outline-offset: 1px; }
.choice-indent { padding-left: 1.725rem; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }

/* Schalter */
.switch { display: flex; align-items: flex-start; gap: 0.75rem; cursor: pointer; }
.switch > input {
    appearance: none;
    flex-shrink: 0;
    position: relative;
    width: 2.5rem;
    height: 1.4rem;
    margin: 0.05rem 0 0;
    border-radius: 999px;
    background: var(--line-field);
    cursor: pointer;
    transition: background-color 0.15s;
}
.switch > input::after {
    content: "";
    position: absolute;
    top: 0.2rem;
    left: 0.2rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.15s;
}
.switch > input:checked { background: var(--accent); }
.switch > input:checked::after { transform: translateX(1.1rem); }
.switch > input:focus-visible { outline: none; box-shadow: var(--focus); }
.switch-lg { font-size: 1.0625rem; font-weight: 500; }

/* ------------------------------------------------------------------ */
/* Meldungen                                                           */
/* ------------------------------------------------------------------ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}
.alert > .icon { margin-top: 0.2rem; }
.alert > .grow > * + * { margin-top: 0.35rem; }
.alert a { color: inherit; font-weight: 600; }
.alert:focus { outline: none; box-shadow: var(--focus); }
.alert-success { color: var(--success); background: var(--success-bg); border-color: var(--success-line); }
.alert-warning { color: var(--warning); background: var(--warning-bg); border-color: var(--warning-line); }
.alert-danger  { color: var(--danger);  background: var(--danger-bg);  border-color: var(--danger-line); }
.alert-info    { color: var(--info);    background: var(--info-bg);    border-color: var(--info-line); }
.alert-neutral { color: var(--text); }
.alert-compact { padding: 0.5rem 0.75rem; }

/* ------------------------------------------------------------------ */
/* Status & Badges                                                     */
/* ------------------------------------------------------------------ */
/* Bewerbungsstatus: farbige Pille mit Punkt */
.status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.15rem 0.65rem 0.15rem 0.55rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.8125rem;
    font-weight: 650;
    line-height: 1.4;
    white-space: nowrap;
    vertical-align: middle;
}
.status::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: currentColor; }
.status-open     { color: #6A4F00; background: #FBEFC9; border-color: #E9CF7E; }
.status-accepted { color: #24521F; background: #DDEFD6; border-color: #A9CF9C; }
.status-rejected { color: #8E2C22; background: #F8DAD5; border-color: #E3A69C; }

/* kleine Kennzeichnung */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--muted);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    vertical-align: middle;
}
.badge-success { color: var(--success); background: var(--success-bg); border-color: var(--success-line); }
.badge-warning { color: var(--warning); background: var(--warning-bg); border-color: var(--warning-line); }
.badge-danger  { color: var(--danger);  background: var(--danger-bg);  border-color: var(--danger-line); }
.badge-info    { color: var(--info);    background: var(--info-bg);    border-color: var(--info-line); }
.badge-accent  { color: var(--accent);  background: var(--accent-soft); border-color: transparent; }

/* ------------------------------------------------------------------ */
/* Tabellen                                                            */
/* ------------------------------------------------------------------ */
.table-wrap {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}
.table { width: 100%; font-size: 0.9375rem; }
.table th {
    padding: 0.7rem 0.875rem;
    text-align: left;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--muted);
    border-bottom: 1px solid var(--line-strong);
    white-space: nowrap;
    vertical-align: bottom;
}
.table td {
    padding: 0.75rem 0.875rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table-hover tbody tr:hover { background: var(--bg); }
.table-compact th, .table-compact td { padding: 0.4rem 0.6rem; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table input[type="checkbox"] { width: 1.05rem; height: 1.05rem; vertical-align: middle; }
.table .actions-col { white-space: nowrap; text-align: right; }
.table-wrap > .table th:first-child, .table-wrap > .table td:first-child { padding-left: 1rem; }
.table-wrap > .table th:last-child, .table-wrap > .table td:last-child { padding-right: 1rem; }
.table a:not(.btn):not(.row-link) { text-decoration: none; }
.table a:not(.btn):not(.row-link):hover { text-decoration: underline; }
.cell-sub { display: block; color: var(--muted); font-size: 0.875rem; }
.col-check { width: 2.5rem; }
@media (max-width: 767px) {
    .table th, .table td { font-size: 0.875rem; }
    .hide-mobile { display: none; }
}

/* Sortierbare Tabellen-Header */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text); }
.sort-icon { opacity: 0.4; width: 0.75em; height: 0.75em; margin-left: 0.25rem; }
th[data-dir="asc"] .sort-icon,
th[data-dir="desc"] .sort-icon { opacity: 1; }

/* Definitionsliste (Profil/Detail) */
.dl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.25rem 1.5rem; }
.dl dt { color: var(--muted); font-size: 0.875rem; font-weight: 500; }
.dl dd { margin-bottom: 0.6rem; }
.dl dd:last-child { margin-bottom: 0; }
@media (min-width: 576px) {
    .dl { grid-template-columns: minmax(8rem, 1fr) minmax(0, 2fr); row-gap: 0.6rem; }
    .dl dt { font-size: 0.9375rem; }
    .dl dd { margin-bottom: 0; }
}

/* schmale Spalte: Begriff und Wert nebeneinander, auch auf dem Handy */
.dl-compact { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 0.6rem; }
.dl-compact dd { margin-bottom: 0; }

/* hervorgehobene Notiz (interner Kommentar) */
.note { padding: 0.75rem 1rem; background: var(--warning-bg); border: 1px solid var(--warning-line); border-radius: var(--radius); }

/* ------------------------------------------------------------------ */
/* Filter, Tabs, Seitenzahlen, Sammelaktionen                          */
/* ------------------------------------------------------------------ */
.segmented { display: flex; flex-wrap: wrap; gap: 0.375rem; margin: 0; padding: 0; list-style: none; }
.segmented a, .segmented button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--text);
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
}
.segmented a:hover, .segmented button:hover { background: var(--hover); color: var(--text); }
.segmented .active,
.segmented [aria-current="page"],
.segmented [aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.segmented .active:hover,
.segmented [aria-current="page"]:hover,
.segmented [aria-pressed="true"]:hover { background: var(--ink); color: var(--surface); }
.segmented .count { opacity: 0.65; }

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
    border-bottom: 1px solid var(--line);
}
.tabs a {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: -1px;
    padding: 0.6rem 0.9rem;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font-weight: 500;
    text-decoration: none;
}
.tabs a:hover { color: var(--text); }
.tabs a.active, .tabs a[aria-current="page"] { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.6rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
}
.pagination a:hover { background: var(--hover); }
.pagination [aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--surface); font-weight: 600; }
.pagination .disabled { color: var(--line-strong); }

.bulkbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.5rem 0.5rem 1rem;
    border-radius: var(--radius-lg);
    background: var(--ink);
    color: var(--surface);
}
.bulkbar .btn-secondary { background: transparent; color: var(--surface); border-color: #5E534C; }
.bulkbar .btn-secondary:hover { background: rgba(255, 255, 255, 0.1); color: var(--surface); }
.bulkbar .input { background: var(--ink); color: var(--surface); border-color: #5E534C; }
.bulkbar-label { font-weight: 600; margin-right: 0.5rem; }

/* Werkzeugleiste über Tabellen (Auswahl + Sammelaktionen) */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}
.toolbar-divider { width: 1px; align-self: stretch; margin: 0.25rem 0.25rem; background: var(--line); }
.toolbar-end { margin-left: auto; }
@media (max-width: 575px) {
    .toolbar-divider { display: none; }
}

/* Kennzahlen (Übersicht) */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 768px) {
    .stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .stat:last-child:nth-child(odd) { grid-column: auto; }
}
.stat {
    padding: 0.875rem 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}
.stat-value { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: 0.875rem; }

/* Name in Tabellenzeile als Link */
.row-link { color: var(--text); font-weight: 600; text-decoration: none; }
.row-link:hover { color: var(--accent); text-decoration: underline; }

/* ------------------------------------------------------------------ */
/* Fotos                                                               */
/* ------------------------------------------------------------------ */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.gallery-lg { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.photo-tile {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    height: 100%;
    padding: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}
.photo-tile-caption { color: var(--muted); font-size: 0.8125rem; }
/* Für den Export ausgewählte Fotos (Stern) */
.photo-tile, .photo-group { scroll-margin-top: 1rem; }
.missing-selection { margin: 0; padding-left: 1.25rem; }
.photo-tile-selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.photo-select[aria-pressed="true"],
.photo-select[aria-pressed="true"]:hover { color: var(--accent); }
.photo-tile-mark { display: inline-flex; align-items: center; justify-content: center; width: 2.125rem; height: 2.125rem; }
.photo-thumb {
    display: block;
    width: 100%;
    height: 160px;
    object-fit: contain;
    border-radius: 6px;
    background: var(--bg);
}
.photo-card { position: relative; display: inline-block; }

/* Juryansicht: Angaben links, Fotos rechts */
.jury-card { scroll-margin-top: 1rem; }
.jury-body { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 992px) {
    .jury-body { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
}
.photo-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 768px) {
    .photo-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.photo-strip .photo-tile { padding: 0.25rem; }
.photo-strip .photo-thumb { height: 180px; }

/* Drag-and-Drop-Bereich für Fotos */
.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 2rem;
    border: 1.5px dashed var(--line-strong);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--muted);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}
.upload-area .icon { width: 2rem; height: 2rem; }
.upload-area strong { color: var(--text); }
.upload-area:hover,
.upload-area.dragover { border-color: var(--accent); background: var(--accent-soft); }
/* Fokus des (visuell versteckten) Dateifelds an der Ablagefläche zeigen */
input:focus-visible + .upload-area { border-color: var(--accent); box-shadow: var(--focus); }
@media (prefers-reduced-motion: reduce) {
    .upload-area { transition: none; }
}
/* Fortschrittsanzeige beim Hochladen (gleiche Fläche wie die Ablagefläche) */
.upload-progress {
    padding: 2rem;
    border: 1.5px solid var(--success-line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    text-align: center;
}
.upload-progress:focus { outline: none; box-shadow: var(--focus); }

.progress {
    height: 0.6rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--hover);
}
.progress-bar {
    height: 100%;
    background: var(--success-dot);
    border-radius: 999px;
    transition: width 0.2s;
}

.spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .spinner { animation-duration: 2s; }
}

/* ------------------------------------------------------------------ */
/* Sonstiges                                                           */
/* ------------------------------------------------------------------ */
/* Audit-Log: JSON-Payload kompakt */
.audit-payload {
    margin: 0;
    padding: 0.4rem 0.5rem;
    max-height: 120px;
    overflow-y: auto;
    font-family: var(--mono);
    font-size: 0.8rem;
    background: var(--bg);
    border-radius: 6px;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Locked-Banner im Keramiker*innen-Bereich */
.locked-banner { position: sticky; top: 0; z-index: 100; }

/* aufklappbare Hilfe (E-Mail-Platzhalter, Formatierung) */
.disclosure {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.disclosure > summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}
.disclosure > summary { list-style: none; }
.disclosure > summary::-webkit-details-marker { display: none; }
/* Dreieck als Auf-/Zuklapp-Hinweis (das native Marker-Dreieck fehlt bei display: flex) */
.disclosure > summary::before {
    content: "";
    flex-shrink: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0.3rem 0 0.3rem 0.45rem;
    border-color: transparent transparent transparent var(--muted);
    transition: transform 0.15s;
}
.disclosure[open] > summary::before { transform: rotate(90deg); }
.disclosure > summary:hover::before { border-left-color: var(--text); }
@media (prefers-reduced-motion: reduce) {
    .disclosure > summary::before { transition: none; }
}
.disclosure > summary .icon { color: var(--accent); }
.disclosure-body { padding: 0 0.875rem 0.875rem; }
.disclosure .table th, .disclosure .table td { border-color: var(--line); }

/* Platzhalter-Knöpfe in E-Mail-Formularen: Gruppen nebeneinander, darin Knopf + Beschreibung als ausgerichtete Spalten */
.placeholder-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
    gap: 1rem 2rem;
}
.placeholder-group { display: grid; gap: 0.375rem; align-content: start; }
.placeholder-group-title {
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}
.placeholder-list {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: baseline;
    gap: 0.375rem 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.placeholder-list li { display: contents; }
.placeholder-chip {
    justify-self: start;
    padding: 0.05rem 0.4rem;
    font-family: var(--mono);
    font-size: 0.8125rem;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    cursor: pointer;
}
.placeholder-chip:hover { border-color: var(--accent); color: var(--accent); }

/* E-Mail-Vorschau */
.email-preview {
    padding: 1rem 1rem 0.25rem;
    font-size: 0.875rem;
    background: var(--bg);
    border-radius: var(--radius);
}
.email-preview p { margin: 0 0 0.75rem; }

/* einfache Liste in Karten (Empfänger) */
.list { margin: 0; padding: 0; list-style: none; }
.list-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem 0.5rem 1.25rem;
    border-bottom: 1px solid var(--line);
}
.list-item:last-child { border-bottom: 0; }

/* große Zahl (Gebühr, Kennzahlen) */
.figure-lg { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.figure-xl { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }

/* Login-/Hinweis-Seiten mittig */
.center-screen { display: flex; align-items: center; justify-content: center; flex: 1 0 auto; padding: 2rem 1rem; }
