/* ==========================================================
   Projektmanagement Pro Service - Gestaltung
   Modern-klassisch: viel Weissraum, ruhige Typografie,
   tiefes Marineblau als Markenfarbe.
   ========================================================== */

:root {
    --marine:        #0b2545;
    --marine-hell:   #133b6f;
    --akzent:        #1d4ed8;
    --akzent-dunkel: #1740a8;
    --tinte:         #0f172a;
    --text:          #334155;
    --text-leise:    #64748b;
    --linie:         #e2e8f0;
    --flaeche:       #f8fafc;
    --weiss:         #ffffff;
    --gruen:         #047857;
    --gruen-bg:      #ecfdf5;
    --rot:           #b91c1c;
    --rot-bg:        #fef2f2;
    --gelb:          #92400e;
    --gelb-bg:       #fffbeb;
    --radius:        14px;
    --schatten:      0 1px 2px rgba(15, 23, 42, .04),
                     0 12px 32px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    background: var(--weiss);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--akzent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ==========================================================
   ANMELDE-LAYOUT (zweigeteilt)
   ========================================================== */

.anmelde-seite {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    min-height: 100vh;
}

/* --- Linke Seite: Markenbereich --- */
.marken-seite {
    position: relative;
    background:
        radial-gradient(1100px 600px at 15% 10%, rgba(29, 78, 216, .35), transparent 60%),
        linear-gradient(160deg, var(--marine) 0%, #071b34 100%);
    color: #e8eef7;
    padding: 56px 64px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

/* feines Raster im Hintergrund - rein dekorativ */
.marken-seite::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(80% 70% at 40% 40%, #000 25%, transparent 85%);
    pointer-events: none;
}

.marken-kopf,
.marken-mitte,
.marken-fuss { position: relative; z-index: 1; }

.marken-logo {
    background: var(--weiss);
    border-radius: 10px;
    padding: 12px 16px;
    display: inline-block;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
}
.marken-logo img { display: block; height: 40px; width: auto; }

.marken-mitte { max-width: 30rem; }

.marken-mitte h1 {
    font-size: 2.45rem;
    line-height: 1.18;
    letter-spacing: -.02em;
    color: var(--weiss);
    font-weight: 600;
    margin: 0 0 18px;
}

.marken-mitte p {
    font-size: 1.03rem;
    color: rgba(232, 238, 247, .82);
    margin: 0 0 32px;
}

.marken-liste {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}
.marken-liste li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: .96rem;
    color: rgba(232, 238, 247, .9);
}
.marken-liste .haken {
    flex: 0 0 22px;
    height: 22px;
    margin-top: 1px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .25);
    color: var(--weiss);
    font-size: .8rem;
    line-height: 20px;
    text-align: center;
}

.marken-fuss {
    font-size: .82rem;
    color: rgba(232, 238, 247, .55);
    letter-spacing: .02em;
}

/* --- Rechte Seite: Formular --- */
.formular-seite {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    background: var(--weiss);
}

.formular-block {
    width: 100%;
    max-width: 25.5rem;
}

.formular-block .augenbraue {
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--akzent);
    margin: 0 0 10px;
}

.formular-block h2 {
    font-size: 1.72rem;
    letter-spacing: -.015em;
    color: var(--tinte);
    font-weight: 600;
    margin: 0 0 8px;
}

.formular-block .untertitel {
    color: var(--text-leise);
    font-size: .95rem;
    margin: 0 0 30px;
}

/* nur auf schmalen Bildschirmen sichtbar */
.mobil-logo { display: none; }

/* ==========================================================
   FORMULARE
   ========================================================== */

.feld { margin-bottom: 18px; }

label {
    display: block;
    font-size: .87rem;
    font-weight: 600;
    color: var(--tinte);
    margin-bottom: 7px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"] {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--tinte);
    background: var(--weiss);
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    transition: border-color .15s, box-shadow .15s;
}

input:focus {
    outline: none;
    border-color: var(--akzent);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .16);
}

input::placeholder { color: #94a3b8; }

/* Eingabefeld fuer den 6-stelligen Code */
.code-feld {
    text-align: center;
    font-size: 1.7rem !important;
    font-weight: 600;
    letter-spacing: .5rem;
    text-indent: .5rem;
    padding: 14px !important;
    font-variant-numeric: tabular-nums;
}

.knopf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 600;
    color: var(--weiss);
    background: var(--akzent);
    border: 1px solid var(--akzent);
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s, box-shadow .15s, transform .05s;
}
.knopf:hover  { background: var(--akzent-dunkel); border-color: var(--akzent-dunkel); }
.knopf:active { transform: translateY(1px); }
.knopf:focus-visible { outline: 3px solid rgba(29, 78, 216, .35); outline-offset: 2px; }

.knopf-zweit {
    color: var(--tinte);
    background: var(--weiss);
    border: 1px solid #cbd5e1;
}
.knopf-zweit:hover { background: var(--flaeche); border-color: #94a3b8; }

.knopf-schmal { width: auto; padding: 9px 16px; font-size: .88rem; }

.formular-zeile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -2px 0 22px;
    font-size: .88rem;
}

.merken {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-weight: 400;
    margin: 0;
    cursor: pointer;
}
.merken input { accent-color: var(--akzent); width: 16px; height: 16px; }

.hinweis-text {
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--linie);
    font-size: .87rem;
    color: var(--text-leise);
    text-align: center;
}

/* ==========================================================
   MELDUNGEN
   ========================================================== */

.meldung {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: .9rem;
    margin-bottom: 20px;
    border: 1px solid transparent;
}
.meldung-fehler  { background: var(--rot-bg);   color: var(--rot);   border-color: #fecaca; }
.meldung-ok      { background: var(--gruen-bg); color: var(--gruen); border-color: #a7f3d0; }
.meldung-info    { background: #eff6ff;         color: #1e40af;      border-color: #bfdbfe; }
.meldung-warnung { background: var(--gelb-bg);  color: var(--gelb);  border-color: #fde68a; }

/* ==========================================================
   2FA-EINRICHTUNG
   ========================================================== */

.methoden { display: grid; gap: 12px; margin-bottom: 24px; }

.methode {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px;
    border: 1px solid var(--linie);
    border-radius: 12px;
    cursor: pointer;
    background: var(--weiss);
    transition: border-color .15s, background .15s, box-shadow .15s;
    font-weight: 400;
    margin: 0;
}
.methode:hover { border-color: #94a3b8; background: var(--flaeche); }
.methode input { accent-color: var(--akzent); margin-top: 3px; width: 18px; height: 18px; }
.methode-titel { display: block; font-weight: 600; color: var(--tinte); margin-bottom: 3px; }
.methode-text  { display: block; font-size: .86rem; color: var(--text-leise); }

.qr-block {
    text-align: center;
    padding: 22px;
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: 12px;
    margin-bottom: 20px;
}
.qr-block img { display: block; margin: 0 auto; background: #fff; }

.schluessel-text {
    margin-top: 14px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 1rem;
    letter-spacing: .12em;
    color: var(--tinte);
    word-break: break-all;
}
.schluessel-label {
    font-size: .78rem;
    color: var(--text-leise);
    text-transform: uppercase;
    letter-spacing: .08em;
}

.code-liste {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 20px;
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: 12px;
    margin-bottom: 20px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 1rem;
    letter-spacing: .06em;
    color: var(--tinte);
    text-align: center;
}

.schritte {
    display: flex;
    gap: 8px;
    margin-bottom: 26px;
    font-size: .78rem;
    color: var(--text-leise);
}
.schritt {
    flex: 1;
    padding-top: 8px;
    border-top: 3px solid var(--linie);
}
.schritt-aktiv { color: var(--akzent); border-top-color: var(--akzent); font-weight: 600; }
.schritt-fertig { border-top-color: var(--gruen); color: var(--gruen); }

/* ==========================================================
   GESCHUETZTER BEREICH (Kopfzeile + Inhalt)
   ========================================================== */

.kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 32px;
    background: var(--weiss);
    border-bottom: 1px solid var(--linie);
    position: sticky;
    top: 0;
    z-index: 10;
}
.kopf-logo img { display: block; height: 34px; width: auto; }
.kopf-rechts { display: flex; align-items: center; gap: 16px; }
.kopf-name { font-size: .9rem; color: var(--text); }
.kopf-name strong { color: var(--tinte); }

.inhalt {
    max-width: 68rem;
    margin: 0 auto;
    padding: 40px 32px 64px;
}
.inhalt h1 {
    font-size: 1.8rem;
    letter-spacing: -.015em;
    color: var(--tinte);
    font-weight: 600;
    margin: 0 0 6px;
}
.inhalt .untertitel { color: var(--text-leise); margin: 0 0 32px; }

.karten { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 18px; }

.karte {
    background: var(--weiss);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--schatten);
}
.karte h3 { margin: 0 0 6px; font-size: 1.02rem; color: var(--tinte); font-weight: 600; }
.karte p  { margin: 0; font-size: .9rem; color: var(--text-leise); }

.fuss {
    text-align: center;
    font-size: .82rem;
    color: var(--text-leise);
    padding: 24px;
    border-top: 1px solid var(--linie);
}

/* ==========================================================
   SCHMALE BILDSCHIRME (Handy / Tablet)
   ========================================================== */

@media (max-width: 900px) {
    .anmelde-seite { grid-template-columns: 1fr; }
    .marken-seite  { display: none; }
    .mobil-logo    { display: block; margin-bottom: 28px; }
    .mobil-logo img { height: 42px; width: auto; display: block; }
    .formular-seite { align-items: flex-start; padding: 40px 22px 60px; }
    .kopf, .inhalt  { padding-left: 18px; padding-right: 18px; }
    .code-liste     { grid-template-columns: 1fr; }
}

/* Ausdruck: nur der Inhalt, keine Zierelemente */
@media print {
    .marken-seite, .kopf, .knopf, .fuss { display: none !important; }
}

/* ==========================================================
   ANWENDUNGS-RAHMEN (Kopfzeile + linkes Menue + Inhalt)
   ========================================================== */

body.app { background: var(--flaeche); display: flex; flex-direction: column; min-height: 100vh; }

.rumpf { display: flex; flex: 1; align-items: stretch; min-height: 0; }

/* --- Schalter zum Ein- und Ausklappen --- */
.menue-schalter {
    display: flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 40px; height: 40px; padding: 0 9px;
    background: var(--weiss); border: 1px solid var(--linie);
    border-radius: 9px; cursor: pointer; flex: 0 0 auto;
}
.menue-schalter:hover { background: var(--flaeche); border-color: #94a3b8; }
.menue-schalter .balken { display: block; height: 2px; background: var(--tinte); border-radius: 2px; }
.menue-schalter:focus-visible { outline: 3px solid rgba(29,78,216,.35); outline-offset: 2px; }

.kopf { gap: 14px; }
.kopf-logo { margin-right: auto; }

.abzeichen {
    display: inline-block; margin-left: 8px; padding: 2px 8px;
    font-size: .72rem; font-weight: 600; letter-spacing: .03em;
    color: var(--akzent); background: #eff6ff;
    border: 1px solid #bfdbfe; border-radius: 999px;
}

/* --- Linkes Menue --- */
.seitenmenue {
    flex: 0 0 250px; width: 250px;
    background: var(--weiss);
    border-right: 1px solid var(--linie);
    padding: 18px 12px 12px;
    display: flex; flex-direction: column;
    position: sticky; top: 63px; align-self: flex-start;
    height: calc(100vh - 63px); overflow-y: auto;
    transition: width .18s ease, flex-basis .18s ease, transform .18s ease;
}

.menue, .menue-unter { list-style: none; margin: 0; padding: 0; }
.menue > li { margin-bottom: 2px; }

.menue-punkt,
.seitenmenue summary {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 12px; border-radius: 9px;
    font-size: .93rem; font-weight: 500; color: var(--text);
    text-decoration: none; cursor: pointer;
    white-space: nowrap;
}
.menue-punkt:hover,
.seitenmenue summary:hover { background: var(--flaeche); color: var(--tinte); text-decoration: none; }

.menue-punkt.aktiv {
    background: #eff6ff; color: var(--akzent-dunkel); font-weight: 600;
    box-shadow: inset 3px 0 0 var(--akzent);
}

.menue-symbol { width: 19px; height: 19px; flex: 0 0 19px; fill: currentColor; opacity: .8; }
.menue-punkt.aktiv .menue-symbol { opacity: 1; }

.menue-bald { color: var(--text-leise); cursor: default; }
.menue-bald:hover { background: transparent; color: var(--text-leise); }
.menue-notiz {
    margin-left: auto; font-size: .68rem; text-transform: uppercase;
    letter-spacing: .08em; color: #94a3b8;
}

/* Gruppen - aufklappbar ganz ohne JavaScript */
.seitenmenue details > summary { list-style: none; }
.seitenmenue details > summary::-webkit-details-marker { display: none; }
.menue-pfeil {
    margin-left: auto; width: 8px; height: 8px; flex: 0 0 8px;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(-45deg); transition: transform .15s; opacity: .55;
}
.seitenmenue details[open] > summary .menue-pfeil { transform: rotate(45deg); }

.menue-unter { margin: 2px 0 6px 0; padding-left: 30px; }
.menue-unter a {
    display: block; padding: 8px 12px; border-radius: 8px;
    font-size: .89rem; color: var(--text); text-decoration: none;
}
.menue-unter a:hover { background: var(--flaeche); color: var(--tinte); text-decoration: none; }
.menue-unter a.aktiv { background: #eff6ff; color: var(--akzent-dunkel); font-weight: 600; }

.menue-fuss {
    margin-top: auto; padding: 14px 12px 4px;
    font-size: .74rem; color: #94a3b8;
    border-top: 1px solid var(--linie); white-space: nowrap;
}

/* --- Eingeklappt: nur noch Symbole --- */
body.menue-zu .seitenmenue { flex-basis: 62px; width: 62px; padding-left: 8px; padding-right: 8px; }
body.menue-zu .menue-text,
body.menue-zu .menue-notiz,
body.menue-zu .menue-pfeil,
body.menue-zu .menue-fuss { display: none; }
body.menue-zu .menue-punkt,
body.menue-zu .seitenmenue summary { justify-content: center; padding: 11px 0; }
body.menue-zu .menue-unter { padding-left: 0; }
body.menue-zu .menue-unter a { text-align: center; font-size: .74rem; padding: 6px 2px; }

/* --- Inhaltsbereich --- */
body.app .inhalt { flex: 1; max-width: none; padding: 30px 34px 60px; min-width: 0; }

.seiten-kopfzeile {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin-bottom: 26px;
}
.seiten-kopfzeile h1 { margin: 0 0 4px; }
.seiten-kopfzeile .untertitel { margin: 0; }
.seiten-kopfzeile .werkzeuge { display: flex; gap: 10px; flex-wrap: wrap; }

.brotkrume { font-size: .82rem; color: var(--text-leise); margin: 0 0 10px; }
.brotkrume a { color: var(--text-leise); }

/* ==========================================================
   TABELLEN
   ========================================================== */

.tabellen-rahmen {
    background: var(--weiss); border: 1px solid var(--linie);
    border-radius: var(--radius); box-shadow: var(--schatten);
    overflow-x: auto;
}

table.liste { width: 100%; border-collapse: collapse; font-size: .91rem; }
table.liste th, table.liste td { padding: 12px 16px; text-align: left; vertical-align: middle; }
table.liste thead th {
    font-size: .74rem; text-transform: uppercase; letter-spacing: .07em;
    color: var(--text-leise); background: var(--flaeche);
    border-bottom: 1px solid var(--linie); white-space: nowrap;
}
table.liste tbody tr { border-bottom: 1px solid var(--linie); }
table.liste tbody tr:last-child { border-bottom: none; }
table.liste tbody tr:hover { background: #f8fafc; }
table.liste td.rechts, table.liste th.rechts { text-align: right; white-space: nowrap; }
table.liste .haupt { color: var(--tinte); font-weight: 600; }
table.liste .leise { color: var(--text-leise); font-size: .85rem; }

.stand {
    display: inline-block; padding: 3px 10px; border-radius: 999px;
    font-size: .76rem; font-weight: 600; white-space: nowrap;
}
.stand-ok       { background: var(--gruen-bg); color: var(--gruen); }
.stand-warten   { background: var(--gelb-bg);  color: var(--gelb); }
.stand-gesperrt { background: var(--rot-bg);   color: var(--rot); }
.stand-neutral  { background: #f1f5f9;         color: var(--text-leise); }

.leer-hinweis { padding: 40px 20px; text-align: center; color: var(--text-leise); }

/* ==========================================================
   FORMULARE IM ANWENDUNGSBEREICH
   ========================================================== */

.block {
    background: var(--weiss); border: 1px solid var(--linie);
    border-radius: var(--radius); box-shadow: var(--schatten);
    padding: 24px; margin-bottom: 20px;
}
.block h2 { margin: 0 0 4px; font-size: 1.08rem; font-weight: 600; color: var(--tinte); }
.block .block-text { margin: 0 0 18px; font-size: .88rem; color: var(--text-leise); }

.raster-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.raster-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }

select, textarea {
    width: 100%; padding: 12px 14px; font-size: 1rem; font-family: inherit;
    color: var(--tinte); background: var(--weiss);
    border: 1px solid #cbd5e1; border-radius: 10px;
}
select:focus, textarea:focus {
    outline: none; border-color: var(--akzent);
    box-shadow: 0 0 0 3px rgba(29,78,216,.16);
}

.knopf-reihe { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.knopf-reihe .knopf { width: auto; padding: 11px 20px; }
.knopf-gefahr { background: var(--rot); border-color: var(--rot); }
.knopf-gefahr:hover { background: #991b1b; border-color: #991b1b; }

/* Auswahlkaesten fuer Rollen und Rechte */
.wahl-liste { display: grid; gap: 8px; }
.wahl {
    display: flex; gap: 11px; align-items: flex-start;
    padding: 11px 13px; border: 1px solid var(--linie); border-radius: 10px;
    font-weight: 400; margin: 0; cursor: pointer; background: var(--weiss);
}
.wahl:hover { border-color: #94a3b8; background: var(--flaeche); }
.wahl input { accent-color: var(--akzent); width: 17px; height: 17px; margin-top: 2px; flex: 0 0 17px; }
.wahl-titel { display: block; font-weight: 600; color: var(--tinte); font-size: .9rem; }
.wahl-text  { display: block; font-size: .82rem; color: var(--text-leise); }

.rechte-gruppe { margin-bottom: 22px; }
.rechte-gruppe h3 {
    margin: 0 0 10px; font-size: .78rem; text-transform: uppercase;
    letter-spacing: .08em; color: var(--text-leise);
    border-bottom: 1px solid var(--linie); padding-bottom: 7px;
}

.hilfe { font-size: .82rem; color: var(--text-leise); margin: 6px 0 0; }

.einladungs-link {
    font-family: Consolas, "Courier New", monospace;
    font-size: .85rem; word-break: break-all; color: var(--tinte);
    background: var(--flaeche); border: 1px solid var(--linie);
    border-radius: 10px; padding: 12px 14px; margin: 10px 0 0;
}

/* ==========================================================
   SCHMALE BILDSCHIRME
   ========================================================== */
@media (max-width: 900px) {
    .seitenmenue {
        position: fixed; top: 0; left: 0; bottom: 0; z-index: 30;
        height: 100vh; width: 260px; flex-basis: 260px;
        box-shadow: 0 0 40px rgba(15,23,42,.18);
        padding-top: 76px;
    }
    body.menue-zu .seitenmenue { transform: translateX(-100%); width: 260px; flex-basis: 260px; }
    body.menue-zu .menue-text, body.menue-zu .menue-notiz,
    body.menue-zu .menue-pfeil, body.menue-zu .menue-fuss { display: initial; }
    body.menue-zu .menue-punkt, body.menue-zu .seitenmenue summary {
        justify-content: flex-start; padding: 10px 12px;
    }
    body.app .inhalt { padding: 22px 18px 50px; }
    .raster-2, .raster-3 { grid-template-columns: 1fr; }
    .kopf-name { display: none; }
}
