@import "marke-45-4I_q.css";

/*
 * Teambereich, Anmeldung und Fehlerseiten.
 * Aufbau nach dem Vorbild von Wolf Projekts (Neubau): Seitenleiste links, Inhalt rechts.
 * Alle Werte kommen aus marke.css (Wolf Marketing Design System, dazu der dunkle Modus).
 */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--surface-page);
    transition: background var(--dur-base) var(--ease-standard), color var(--dur-base) var(--ease-standard);
}

h1 { font-size: var(--fs-h1); margin-bottom: var(--space-3); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 var(--space-4); }
small { color: var(--text-muted); }
.gedaempft { color: var(--text-muted); font-size: var(--fs-sm); }
.nur-lesen { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Rahmen: Seitenleiste links, Inhalt rechts ---------- */
.rahmen { display: flex; min-height: 100vh; }
.hauptbereich { flex: 1; min-width: 0; }
.inhalt { max-width: 1100px; margin: 0 auto; padding: var(--space-5) var(--space-6) 64px; display: grid; gap: var(--space-5); align-content: start; }

.seitenleiste {
    width: 248px; flex: none; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    display: flex; flex-direction: column; gap: var(--space-4);
    padding: var(--space-5) var(--space-3) var(--space-3);
    background: var(--surface-side); border-right: 1px solid var(--border-subtle);
}
.marke { display: flex; align-items: center; gap: var(--space-2); padding: 0 var(--space-2); }
.marke img { display: block; height: 38px; width: auto; }
.marke .marke-logo-dunkel { display: none; }
.marke-name { font-family: var(--font-display); font-weight: var(--fw-bold); color: var(--text-heading); font-size: 1.0625rem; }
:root[data-theme="dunkel"] .marke .marke-logo-hell { display: none; }
:root[data-theme="dunkel"] .marke .marke-logo-dunkel { display: block; }
.marke .marke-logo-hell + .marke-logo-dunkel + .marke-name { margin-left: -4px; }

.menue { display: flex; flex-direction: column; gap: 2px; }
.menue-titel { margin: var(--space-4) 0 var(--space-1); padding: 0 var(--space-3); font-size: .75rem; font-weight: var(--fw-semibold); letter-spacing: var(--ls-eyebrow); text-transform: uppercase; color: var(--text-muted); }
.menue-titel:first-child { margin-top: 0; }
.menue a, .menue-eintrag {
    display: flex; align-items: center; gap: var(--space-3); width: 100%; padding: 9px var(--space-3);
    border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-body);
    font-family: var(--font-body); font-size: var(--fs-sm); font-weight: var(--fw-medium); line-height: 1.3;
    text-align: left; cursor: pointer; text-decoration: none;
}
.menue a:hover, .menue-eintrag:hover { background: var(--surface-hover); color: var(--text-heading); }
.menue a[aria-current="page"], .menue-eintrag[aria-current="page"] { background: var(--surface-accent-soft); color: var(--text-accent); font-weight: var(--fw-semibold); }
.menue .symbol, .menue-eintrag .symbol { flex: none; opacity: .85; }
.menue-form { display: contents; }
.seitenleiste-fuss { margin-top: auto; padding-top: var(--space-3); border-top: 1px solid var(--border-subtle); display: flex; flex-direction: column; gap: 2px; }
.seitenleiste-fuss .konto { padding: 0 var(--space-3) var(--space-2); font-size: var(--fs-xs); color: var(--text-muted); overflow-wrap: anywhere; }

/* Meldungen oben im Inhalt */
.flash-erfolg, .flash-fehler { margin: var(--space-5) var(--space-6) 0; padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid; font-size: var(--fs-sm); font-weight: var(--fw-semibold); max-width: 1100px; }
.hauptbereich .flash-erfolg, .hauptbereich .flash-fehler { margin-left: auto; margin-right: auto; width: calc(100% - 2 * var(--space-6)); }
.flash-erfolg { background: var(--wm-green-100); color: var(--wm-green-900); border-color: var(--wm-green-200); }
.flash-fehler { background: #fbeaea; color: #8f2020; border-color: #f1c4c4; }
:root[data-theme="dunkel"] .flash-erfolg { background: #1c2a10; color: var(--wm-green-300); border-color: var(--wm-green-800); }
:root[data-theme="dunkel"] .flash-fehler { background: #3a1f1f; color: #f0a3a3; border-color: #6b2b2b; }

/* ---------- Knöpfe ---------- */
.knopf {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 26px; border: 1px solid transparent; border-radius: var(--radius-pill);
    font-family: var(--font-body); font-weight: var(--fw-semibold); font-size: 15px; line-height: 1.2;
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard),
        transform var(--dur-base) var(--ease-standard), border-color var(--dur-base) var(--ease-standard);
}
.knopf svg { width: 18px; height: 18px; flex: none; }
.knopf.primaer { background: var(--brand-primary); color: var(--brand-on-primary); }
.knopf.primaer:hover { background: var(--brand-primary-hover); color: #fff; box-shadow: var(--shadow-accent); transform: translateY(-1px); }
.knopf.primaer:active { background: var(--brand-primary-active); box-shadow: none; transform: none; }
.knopf.sekundaer { background: var(--brand-secondary); color: #fff; }
.knopf.sekundaer:hover { background: var(--brand-secondary-hover); color: #fff; }
.knopf.geist { background: transparent; color: var(--text-accent); border-color: var(--brand-primary); }
.knopf.geist:hover { background: var(--surface-accent-soft); color: var(--text-accent); }
.knopf.leise { background: var(--surface-card); color: var(--text-body); border-color: var(--border-subtle); }
.knopf.leise:hover { border-color: var(--border-strong); color: var(--text-heading); }
.knopf.klein { padding: 8px 18px; font-size: 14px; }
.knopf:disabled { opacity: .45; cursor: not-allowed; }
.textknopf { background: none; border: 0; padding: 4px 2px; font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-link); cursor: pointer; border-radius: var(--radius-xs); text-decoration: none; }
.textknopf:hover { color: var(--text-link-hover); text-decoration: underline; }
.textknopf.gefahr { color: var(--wm-danger); }
.textknopf.gefahr:hover { color: #a82424; }

/* ---------- Eingaben ---------- */
.feld { display: grid; gap: 6px; }
.feld > span { font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--text-body); }
.feld input, .feld select, .einstellung select {
    width: 100%; padding: 12px 14px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
    background: var(--surface-card); font-size: var(--fs-sm); color: var(--text-heading);
    transition: border-color var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard);
}
.feld input:focus, .feld select:focus, .einstellung select:focus { outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 3px var(--wm-green-100); }
.feld input.code-eingabe { font-size: 1.5rem; letter-spacing: .35em; text-align: center; padding: 14px; }
.feld small { color: var(--text-muted); font-size: var(--fs-xs); }
.eyebrow { font-size: var(--fs-eyebrow); font-weight: var(--fw-semibold); letter-spacing: var(--ls-eyebrow); text-transform: uppercase; color: var(--text-accent); margin-bottom: 6px; }

.hinweis { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; margin: 0 0 16px; border-radius: var(--radius-sm); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.hinweis.oben { margin-top: 16px; }
.hinweis.fehler { background: #fbeaea; color: #8f2020; }
:root[data-theme="dunkel"] .hinweis.fehler { background: #3a1f1f; color: #f0a3a3; }

/* ---------- Anmeldung, Einmalcode, Fehlerseiten ---------- */
.gast { display: grid; grid-template-columns: minmax(280px, 5fr) 7fr; min-height: 100vh; }
.gast-marke { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 48px; background: var(--wm-ink-800); color: #fff; }
.gast-marke::before { content: ""; position: absolute; left: -140px; bottom: -160px; width: 420px; height: 420px; border-radius: 50%; background: var(--wm-green-500); opacity: .9; }
.gast-marke::after { content: ""; position: absolute; right: -90px; top: -90px; width: 240px; height: 240px; border-radius: 50%; background: var(--wm-blue-600); opacity: .55; }
.gast-marke > * { position: relative; z-index: 1; }
.gast-marke img { width: min(260px, 70%); height: auto; }
.gast-marke p { margin: 0; font-family: var(--font-display); font-weight: var(--fw-bold); font-size: var(--fs-h3); line-height: var(--lh-heading); max-width: 14em; color: #fff; }
.gast-marke small { color: rgba(255, 255, 255, .7); font-size: var(--fs-xs); }
.gast-inhalt { display: grid; place-items: center; padding: 32px 24px; background: var(--surface-subtle); }
.gast-karte { width: min(420px, 100%); }
.gast-karte h1 { font-size: var(--fs-h2); margin-bottom: 8px; }
.gast-karte form { display: grid; gap: 16px; margin-top: 24px; }
.gast-karte .knopf.primaer { width: 100%; padding: 14px 26px; }
.gast-karte .fussnote { margin-top: 20px; text-align: center; }
.fehlernummer { font-family: var(--font-display); font-weight: 800; font-size: clamp(4rem, 12vw, 7rem); line-height: 1; color: var(--brand-primary); letter-spacing: var(--ls-display); }

/* ---------- Teambereich ---------- */
.seitenkopf h1 { margin-bottom: 8px; }
.seitenkopf p { margin: 0; max-width: 40em; }
.karte { background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: var(--card-pad); box-shadow: var(--shadow-sm); }
.karte h2 { font-size: var(--fs-h3); margin: 0 0 4px; }
.neu-formular { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 16px; align-items: end; margin-top: 18px; }

.projekte { display: grid; gap: 16px; }
.projekt { display: grid; gap: 18px; transition: box-shadow var(--dur-base) var(--ease-standard); }
.projekt:hover { box-shadow: var(--shadow-md); }
.projekt-kopf { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.projekt-kopf h3 { margin: 0; font-size: var(--fs-h4); }
.projekt-kopf a.adresse { display: block; margin-top: 2px; font-size: var(--fs-sm); color: var(--text-muted); overflow-wrap: anywhere; }
.projekt-kopf a.adresse:hover { color: var(--text-link-hover); }
.plaketten { display: flex; flex-wrap: wrap; gap: 8px; }
.plakette { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--radius-pill); font-size: var(--fs-xs); font-weight: var(--fw-semibold); background: var(--wm-ink-100); color: var(--wm-ink-700); }
.plakette::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--punkt, transparent); }
.plakette.s-aktiv { --punkt: var(--wm-blue-600); background: var(--wm-blue-100); color: var(--wm-blue-700); }
.plakette.s-in_arbeit { --punkt: var(--wm-warning); background: #fcf0d1; color: #6b4a00; }
.plakette.s-pruefung { --punkt: var(--wm-green-400); background: var(--wm-green-100); color: var(--wm-green-800); }
.plakette.s-erledigt { --punkt: var(--wm-green-700); background: var(--wm-green-100); color: var(--wm-green-800); }
.plakette.gruen { background: var(--wm-green-100); color: var(--wm-green-900); }
.plakette.gruen::before, .plakette.grau::before { display: none; }
:root[data-theme="dunkel"] .plakette { background: var(--wm-ink-600); color: var(--wm-ink-100); }
:root[data-theme="dunkel"] .plakette.s-aktiv { background: #14284a; color: var(--wm-blue-200); }
:root[data-theme="dunkel"] .plakette.s-in_arbeit { background: #3a2c0d; color: #e8c169; }
:root[data-theme="dunkel"] .plakette.s-pruefung, :root[data-theme="dunkel"] .plakette.s-erledigt, :root[data-theme="dunkel"] .plakette.gruen { background: #1c2a10; color: var(--wm-green-300); }
.linkzeile { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.linkzeile input { flex: 1 1 280px; min-width: 0; padding: 10px 14px; border: 1px solid var(--border-subtle); border-radius: var(--radius-pill); background: var(--surface-subtle); font-size: var(--fs-sm); color: var(--text-body); }
.projekt-fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-top: 16px; border-top: 1px solid var(--border-subtle); }
.einstellung { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); margin: 0; }
.einstellung select { width: auto; padding: 8px 12px; }
.aktionen { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.aktionen form { display: inline; margin: 0; }
.leerzustand { text-align: center; padding: 48px 24px; }
.leerzustand .plus { width: 56px; height: 56px; border-radius: var(--radius-md); background: var(--brand-primary); color: #fff; display: inline-grid; place-items: center; margin-bottom: 14px; }
.leerzustand .plus svg { width: 28px; height: 28px; }

/* Formulare aus Symfony (Formularthema form/marke.html.twig) */
.feld > label { font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--text-body); }
.feld-fehler { margin: 0; padding: 0; list-style: none; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--wm-danger); }
.karten-formular { display: grid; gap: 16px; max-width: 460px; margin: 16px 0; }
.karte form[data-controller="bestaetigen"] { margin: 0; }
code { font-size: .9em; padding: 1px 6px; border-radius: var(--radius-xs); background: var(--surface-hover); }

/* Sicherheitsprotokoll */
.filter { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; }
.filter .feld { min-width: 260px; }
.tabellenkarte { padding: 0; overflow-x: auto; }
.tabelle { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.tabelle th { text-align: left; font-size: var(--fs-xs); letter-spacing: var(--ls-eyebrow); text-transform: uppercase; color: var(--text-muted); padding: 12px 16px; border-bottom: 1px solid var(--border-subtle); white-space: nowrap; }
.tabelle td { padding: 10px 16px; border-bottom: 1px solid var(--border-subtle); vertical-align: top; overflow-wrap: anywhere; }
.tabelle tbody tr:last-child td { border-bottom: 0; }
.tabelle tbody tr:hover { background: var(--surface-hover); }

/* Turbo: der Ladebalken oben nimmt die Markenfarbe */
.turbo-progress-bar { background: var(--brand-primary); }

/* ---------- Schmale Fenster ---------- */
@media (max-width: 900px) {
    .rahmen { flex-direction: column; }
    .seitenleiste { position: static; width: auto; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding: var(--space-3); border-right: 0; border-bottom: 1px solid var(--border-subtle); }
    .menue { flex-direction: row; flex-wrap: wrap; flex: 1; }
    .menue-titel, .seitenleiste-fuss .konto { display: none; }
    .menue a, .menue-eintrag { width: auto; }
    .seitenleiste-fuss { margin-top: 0; padding-top: 0; border-top: 0; flex-direction: row; }
    .inhalt { padding: var(--space-4) var(--space-4) 48px; }
    .hauptbereich .flash-erfolg, .hauptbereich .flash-fehler { width: calc(100% - 2 * var(--space-4)); margin-top: var(--space-4); }
}
@media (max-width: 860px) {
    .gast { grid-template-columns: 1fr; }
    .gast-marke { padding: 28px 24px 56px; gap: 20px; }
    .gast-marke p { font-size: var(--fs-h4); }
    .gast-marke::before { width: 220px; height: 220px; left: -90px; bottom: -120px; }
    .neu-formular { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
