/* =====================================================================
   cool-me Partnerportal – App-Rahmen (24.10.2026)
   Firmensoftware statt Homepage: Kopfleiste, Seitenleiste je Rolle,
   Karten. Gilt für start.php und die Anmeldemaske (app-anmeldung.php).
   ===================================================================== */
@font-face{font-family:"Fira Sans";font-weight:400;font-display:swap;src:url(../fonts/fira/fira-sans-400.woff2) format("woff2")}
@font-face{font-family:"Fira Sans";font-weight:500;font-display:swap;src:url(../fonts/fira/fira-sans-500.woff2) format("woff2")}
@font-face{font-family:"Fira Sans";font-weight:600;font-display:swap;src:url(../fonts/fira/fira-sans-600.woff2) format("woff2")}

:root {
    --grund: #f4f2ee;
    --karte: #ffffff;
    --dunkel: #232220;
    --dunkel-2: #2f2d2a;
    --text: #232220;
    --leise: #5d5850;
    --linie: #e2ddd3;
    --rot: #C1272D;
    --rot-dunkel: #9E1B21;
    --rot-zart: rgba(193, 39, 45, .08);
    --gruen: #2e7d4f;
    --radius: 10px;
    --schatten: 0 1px 2px rgba(0,0,0,.05), 0 2px 8px rgba(0,0,0,.04);
    --seite: 248px;
    --top: 56px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    font-family: "Fira Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 15px; line-height: 1.45; color: var(--text); background: var(--grund);
}
a { color: var(--rot-dunkel); }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Kopfleiste ---------- */
.app-top {
    position: fixed; inset: 0 0 auto 0; height: var(--top); z-index: 30;
    display: flex; align-items: center; gap: 12px; padding: 0 16px;
    background: var(--dunkel); color: #fff; border-bottom: 3px solid var(--rot);
}
.app-marke { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.app-marke img { display: block; }
.app-marke span { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #cfcac2; border-left: 1px solid #55514b; padding-left: 10px; }
.app-top-rechts { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.app-rolle { font-size: 12px; padding: 3px 9px; border-radius: 99px; background: var(--rot); color: #fff; font-weight: 500; }
.app-person { display: flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; }
.app-avatar { width: 32px; height: 32px; border-radius: 50%; background: #4a4641; display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.app-person-text { display: flex; flex-direction: column; line-height: 1.15; }
.app-person-text strong { font-size: 13px; font-weight: 500; }
.app-person-text small { font-size: 11px; color: #bdb7ae; }
.app-menue-knopf { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.app-menue-knopf span { display: block; width: 20px; height: 2px; background: #fff; margin: 4px 0; }

/* ---------- Seitenleiste ---------- */
.app-koerper { padding-top: var(--top); }
.app-seite {
    position: fixed; top: var(--top); bottom: 0; left: 0; width: var(--seite); z-index: 20;
    background: var(--karte); border-right: 1px solid var(--linie); padding: 14px 10px; overflow-y: auto;
    display: flex; flex-direction: column;
}
.app-gruppe { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--leise); margin: 16px 10px 6px; }
.app-seite a {
    display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px;
    color: var(--text); text-decoration: none; font-size: 14px;
}
.app-seite a svg { color: var(--leise); }
.app-seite a:hover { background: var(--grund); }
.app-seite a.aktiv { background: var(--rot-zart); color: var(--rot-dunkel); font-weight: 500; }
.app-seite a.aktiv svg { color: var(--rot); }
.app-seite-fuss { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--linie); }
.app-seite-fuss small { display: block; font-size: 11px; color: var(--leise); padding: 8px 10px 0; }

/* ---------- Hauptbereich ---------- */
.app-haupt { margin-left: var(--seite); padding: 28px 32px 48px; max-width: calc(1440px + var(--seite)); }
.app-kopfzeile { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.app-kopfzeile h1 { margin: 0; font-size: 26px; font-weight: 600; }
.app-kopfzeile p { margin: 2px 0 0; color: var(--leise); }

.app-schnell { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 18px; }
.app-schnell-kachel {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius);
    background: var(--karte); border: 1px solid var(--linie); box-shadow: var(--schatten);
    text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s;
}
.app-schnell-kachel:hover { border-color: var(--rot); transform: translateY(-1px); }
.app-schnell-kachel strong { display: block; font-weight: 600; }
.app-schnell-kachel small { display: block; color: var(--leise); font-size: 13px; }
.app-schnell-ikon { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; background: var(--rot-zart); color: var(--rot); flex: none; }
.app-schnell-kachel:first-child .app-schnell-ikon { background: var(--rot); color: #fff; }

.app-zahlen { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.app-zahl {
    padding: 14px 16px; border-radius: var(--radius); background: var(--karte); border: 1px solid var(--linie);
    text-decoration: none; color: var(--text); box-shadow: var(--schatten);
}
.app-zahl span { display: block; font-size: 28px; font-weight: 600; line-height: 1.1; }
.app-zahl small { color: var(--leise); }

.app-raster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.app-breit { grid-column: span 2; }
.app-voll { grid-column: 1 / -1; }
.app-karte { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); padding: 16px 18px; min-width: 0; }
.app-karte header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.app-karte h2 { margin: 0; font-size: 16px; font-weight: 600; }
.app-karte header a { font-size: 13px; text-decoration: none; }
.app-leer { color: var(--leise); margin: 6px 0; }
.app-leise { color: var(--leise); font-size: 13px; }

.app-tabelle { width: 100%; border-collapse: collapse; font-size: 14px; }
.app-tabelle th { text-align: left; font-weight: 500; font-size: 12px; color: var(--leise); text-transform: uppercase; letter-spacing: .04em; padding: 6px 8px; border-bottom: 1px solid var(--linie); }
.app-tabelle td { padding: 9px 8px; border-bottom: 1px solid var(--linie); }
.app-tabelle tr:last-child td { border-bottom: 0; }
.app-tabelle tbody tr { cursor: pointer; }
.app-tabelle tbody tr:hover { background: var(--grund); }
.app-tabelle td a { text-decoration: none; color: var(--text); font-weight: 500; }
.app-tabelle .re { text-align: right; white-space: nowrap; }

.app-liste { list-style: none; margin: 0; padding: 0; }
.app-liste li { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--linie); }
.app-liste li:last-child { border-bottom: 0; }
.app-liste li > a { flex: 1; display: block; padding: 9px 0; text-decoration: none; color: var(--text); min-width: 0; }
.app-liste strong { display: block; font-weight: 500; }
.app-liste small { display: block; color: var(--leise); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-marke-klein { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--grund); border: 1px solid var(--linie); white-space: nowrap; }
.app-marke-klein.gruen { background: #e8f4ec; border-color: #bfdcc9; color: var(--gruen); }
.app-kontakt p { margin: 6px 0; }

.app-schleier { display: none; }

/* ---------- Handy / Tablet ---------- */
@media (max-width: 900px) {
    .app-menue-knopf { display: block; }
    .app-seite { transform: translateX(-100%); transition: transform .2s; box-shadow: 4px 0 16px rgba(0,0,0,.12); }
    body.menue-offen .app-seite { transform: none; }
    body.menue-offen .app-schleier { display: block; position: fixed; inset: var(--top) 0 0 0; background: rgba(0,0,0,.3); z-index: 15; }
    .app-haupt { margin-left: 0; padding: 20px 16px 40px; }
    .app-person-text, .app-rolle { display: none; }
    .app-raster { grid-template-columns: 1fr; }
    .app-breit, .app-voll { grid-column: auto; }
}
@media (max-width: 560px) {
    .app-marke span { display: none; }
    .app-tabelle th:nth-child(4), .app-tabelle td:nth-child(4) { display: none; }
    .app-kopfzeile h1 { font-size: 22px; }
}

/* ---------- Anmeldung ---------- */
body.app-login {
    min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 24px 16px; background: var(--dunkel) radial-gradient(1200px 600px at 50% -10%, #3a3733 0%, var(--dunkel) 60%);
}
.login-karte { width: 100%; max-width: 440px; background: var(--karte); border-radius: 14px; padding: 0 28px 24px; box-shadow: 0 20px 50px rgba(0,0,0,.35); overflow: hidden; }
.login-marke { margin: 0 -28px 22px; padding: 22px 28px; background: var(--dunkel-2); border-bottom: 3px solid var(--rot); display: flex; align-items: center; gap: 12px; }
.login-marke span { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #cfcac2; border-left: 1px solid #55514b; padding-left: 12px; }
.login-karte h1 { font-size: 22px; font-weight: 600; margin: 0 0 14px; }
.login-fehler { background: var(--rot-zart); border: 1px solid rgba(193,39,45,.3); color: var(--rot-dunkel); padding: 9px 12px; border-radius: 8px; font-size: 14px; margin: 0 0 14px; }
.login-rollen { border: 0; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.login-rollen legend { font-size: 13px; color: var(--leise); margin-bottom: 6px; padding: 0; }
.login-rolle { position: relative; display: flex; align-items: center; gap: 9px; padding: 10px; border: 1.5px solid var(--linie); border-radius: 9px; cursor: pointer; transition: border-color .15s, background .15s; }
.login-rolle input { position: absolute; opacity: 0; pointer-events: none; }
.login-rolle-ikon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--grund); color: var(--leise); flex: none; }
.login-rolle-text { min-width: 0; }
.login-rolle-text strong { display: block; font-size: 14px; font-weight: 600; }
.login-rolle-text small { display: block; font-size: 11.5px; color: var(--leise); line-height: 1.25; }
.login-rolle:hover { border-color: #c9c2b5; }
.login-rolle:has(input:checked) { border-color: var(--rot); background: var(--rot-zart); }
.login-rolle:has(input:checked) .login-rolle-ikon { background: var(--rot); color: #fff; }
.login-rolle:has(input:focus-visible) { outline: 2px solid var(--rot); outline-offset: 2px; }
.login-feld { display: block; margin-bottom: 12px; }
.login-feld span { display: block; font-size: 13px; color: var(--leise); margin-bottom: 4px; }
.login-feld input { width: 100%; padding: 11px 12px; font: inherit; border: 1.5px solid var(--linie); border-radius: 8px; background: #fff; }
.login-feld input:focus { outline: none; border-color: var(--rot); box-shadow: 0 0 0 3px var(--rot-zart); }
.login-knopf { width: 100%; margin-top: 6px; padding: 12px; font: inherit; font-weight: 600; color: #fff; background: var(--rot); border: 0; border-radius: 8px; cursor: pointer; }
.login-knopf:hover { background: var(--rot-dunkel); }
.login-unten { text-align: center; font-size: 14px; color: var(--leise); margin: 16px 0 0; }
.login-fuss { margin-top: 18px; font-size: 12px; color: #a59f96; display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; text-align: center; }
.login-fuss a { color: #cfcac2; }
@media (max-width: 380px) { .login-rollen { grid-template-columns: 1fr; } }
