/* Mitarbeiter-Portal mein.louvenb2b.de
   Doku: readme/hr_portal/readme_ai_hr_portal.md

   Bewusst OHNE externe Schriften: ein Google-Fonts-CDN im Mitarbeiterportal waere eine
   Uebermittlung personenbezogener Daten an Dritte (in DE mehrfach abgemahnt). Wer die
   Mockup-Schrift exakt will, muss sie selbst hosten und hier eintragen. */

:root {
    --grund:        #f4f1ec;   /* warmes Off-White, Seitenhintergrund */
    --flaeche:      #ffffff;
    --flaeche-2:    #faf8f5;
    --rot:          #8b0000;   /* Firmenfarbe aus dem Logo */
    --rot-hell:     #a52121;
    --rot-tief:     #6d0000;
    --rot-blass:    #fdeaea;
    --gold:         #f2c230;   /* Akzent, sparsam einsetzen */
    --gold-tief:    #6b4e00;
    --text:         #1c1614;
    --text-leise:   #6f6862;
    --linie:        #e9e3db;
    --gruen:        #2e7d32;
    --gruen-blass:  #e7f4e9;

    --radius:       16px;
    --radius-klein: 10px;
    --schatten:     0 1px 3px rgba(28,22,20,.06);
    --schatten-hoch:0 6px 24px rgba(28,22,20,.10);

    --seitenleiste: 268px;
    --kopf:         72px;
    --tableiste:    64px;   /* nur mobil */
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background: var(--grund);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--rot); text-decoration: none; }
a:hover { text-decoration: underline; }
.ic { flex: 0 0 auto; }

/* Tastaturbedienung sichtbar lassen – das Portal wird auch am PC benutzt. */
:focus-visible { outline: 3px solid var(--rot); outline-offset: 2px; border-radius: 6px; }

/* ============================================================== Anmeldeseite */

.anmelde_seite {
    min-height: 100dvh;
    display: flex; align-items: center; justify-content: center;
    padding: 24px 18px;
    /* Sehr dezenter Verlauf, damit die Karte nicht auf einer flachen Flaeche schwebt. */
    background:
        radial-gradient(1100px 520px at 50% -10%, #fbf7f2 0%, rgba(251,247,242,0) 70%),
        var(--grund);
}

.anmelde_karte {
    width: 100%; max-width: 430px;
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: 22px;
    box-shadow: var(--schatten-hoch);
    padding: 34px 30px 30px;
}

.anmelde_marke { display: flex; align-items: center; gap: 13px; margin-bottom: 26px; }
.anmelde_logo {
    width: 52px; height: 52px; border-radius: 15px;
    background: var(--rot); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 17px; letter-spacing: .5px;
}
.anmelde_marke_titel { font-size: 20px; font-weight: 700; line-height: 1.2; }
.anmelde_marke_sub   { font-size: 14px; color: var(--text-leise); }

.anmelde_karte h1 { font-size: 22px; margin: 0 0 6px; letter-spacing: -.01em; }
.anmelde_karte .vorspann { color: var(--text-leise); font-size: 15px; margin: 0 0 22px; }

.feld { margin-bottom: 17px; }
.feld label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.feld .hinweis { font-size: 13px; color: var(--text-leise); margin-top: 6px; }

input[type=text], input[type=password], input[type=email], input[type=tel] {
    width: 100%; padding: 13px 15px;
    border: 1px solid var(--linie); border-radius: var(--radius-klein);
    background: var(--flaeche-2);
    font-size: 16px;   /* 16px verhindert das Zoomen beim Fokus unter iOS */
    font-family: inherit; color: var(--text);
    transition: border-color .12s, background .12s;
}
input:focus { border-color: var(--rot); background: #fff; outline: none; }
input::placeholder { color: #b3aca5; }
.feld_nummer input { font-size: 19px; letter-spacing: 1px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    padding: 13px 20px; border: none; border-radius: var(--radius-klein);
    background: var(--rot); color: #fff;
    font-size: 16px; font-weight: 600; font-family: inherit;
    cursor: pointer; width: 100%;
    transition: background .12s, transform .06s;
}
.btn:hover { background: var(--rot-hell); }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: #c9c2ba; cursor: not-allowed; }
.btn_hell { background: var(--flaeche); color: var(--rot); border: 1px solid var(--rot); }
.btn_hell:hover { background: var(--rot-blass); }
.btn_schmal { width: auto; padding: 10px 18px; font-size: 15px; }
.btn_gold { background: var(--gold); color: var(--gold-tief); }
.btn_gold:hover { background: #ffd451; }

.meldung {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 12px 14px; border-radius: var(--radius-klein);
    font-size: 14.5px; margin-bottom: 20px;
}
.meldung_fehler { background: var(--rot-blass); color: #7a1414; }
.meldung_ok     { background: var(--gruen-blass); color: #1e5c22; }
.meldung_info   { background: #fff6e0; color: #6b4e00; }
.meldung .ic { margin-top: 1px; }

.anmelde_fuss {
    margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--linie);
    font-size: 13.5px; color: var(--text-leise); line-height: 1.6;
}

/* ============================================================== Grundgeruest */

.huelle { min-height: 100dvh; }

/* --- Seitenleiste (ab Tablet) --- */
.seitenleiste {
    position: fixed; inset: 0 auto 0 0; width: var(--seitenleiste);
    background: var(--flaeche); border-right: 1px solid var(--linie);
    display: none; flex-direction: column; z-index: 40;
}
.seitenleiste_kopf {
    height: var(--kopf); display: flex; align-items: center; gap: 12px;
    padding: 0 22px; border-bottom: 1px solid var(--linie);
}
.marke_logo {
    width: 42px; height: 42px; border-radius: 13px; background: var(--rot); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px;
}
.marke_titel { font-size: 16px; font-weight: 700; line-height: 1.15; }
.marke_sub   { font-size: 12.5px; color: var(--text-leise); }

.nav { flex: 1; padding: 18px 14px; overflow-y: auto; }
.nav_punkt {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 16px; margin-bottom: 4px; border-radius: 12px;
    color: var(--text-leise); font-size: 15.5px; font-weight: 500;
    text-decoration: none; transition: background .12s, color .12s;
}
.nav_punkt:hover { background: var(--flaeche-2); color: var(--text); text-decoration: none; }
.nav_punkt.aktiv { background: var(--rot); color: #fff; font-weight: 600; }
.nav_punkt.aktiv:hover { background: var(--rot); }
.nav_zahl {
    margin-left: auto; min-width: 23px; height: 23px; padding: 0 7px; border-radius: 999px;
    background: var(--rot); color: #fff; font-size: 12.5px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.nav_punkt.aktiv .nav_zahl { background: rgba(255,255,255,.25); }

.seitenleiste_fuss {
    border-top: 1px solid var(--linie); padding: 16px 18px;
    display: flex; align-items: center; gap: 12px;
}
.avatar {
    width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto;
    background: var(--rot-blass); color: var(--rot);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px;
}
.fuss_name { font-size: 14.5px; font-weight: 600; line-height: 1.2; }
.fuss_rolle { font-size: 12.5px; color: var(--text-leise); }
.fuss_abmelden { margin-left: auto; color: var(--text-leise); display: flex; padding: 6px; border-radius: 8px; }
.fuss_abmelden:hover { background: var(--flaeche-2); color: var(--rot); }

/* --- Kopfzeile --- */
.kopfzeile {
    position: sticky; top: 0; z-index: 30;
    height: var(--kopf); background: var(--flaeche);
    border-bottom: 1px solid var(--linie);
    display: flex; align-items: center; gap: 14px; padding: 0 18px;
}
.kopf_titel { font-size: 19px; font-weight: 700; }
.kopf_rechts { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.kopf_knopf {
    width: 42px; height: 42px; border-radius: 12px; border: none; background: none;
    color: var(--text); display: flex; align-items: center; justify-content: center;
    cursor: pointer; position: relative;
}
.kopf_knopf:hover { background: var(--flaeche-2); }
.kopf_logo { width: 40px; height: 40px; border-radius: 12px; background: var(--rot); color: #fff;
             display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }

/* --- Inhalt --- */
.inhalt {
    padding: 26px 18px calc(var(--tableiste) + 28px);
    max-width: 1120px; margin: 0 auto;
}

/* --- Tableiste (nur mobil) --- */
.tableiste {
    position: fixed; inset: auto 0 0 0; z-index: 40;
    height: calc(var(--tableiste) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--flaeche); border-top: 1px solid var(--linie);
    display: flex; align-items: stretch;
}
.tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--text-leise); font-size: 11px; font-weight: 500; text-decoration: none;
    padding: 6px 2px; min-width: 0;
}
.tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab:hover { text-decoration: none; }
.tab_symbol {
    width: 44px; height: 30px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    transition: background .14s, color .14s;
}
.tab.aktiv { color: var(--rot); font-weight: 600; }
.tab.aktiv .tab_symbol { background: var(--rot-blass); }
.tab_punkt {
    position: absolute; transform: translate(11px,-9px);
    width: 8px; height: 8px; border-radius: 50%; background: var(--rot);
}

/* ============================================================== Bausteine */

.karte {
    background: var(--flaeche); border: 1px solid var(--linie);
    border-radius: var(--radius); box-shadow: var(--schatten);
    padding: 20px 22px; margin-bottom: 16px;
}

/* Begruessungskarte */
.hero {
    background: var(--rot); color: #fff; border: none;
    border-radius: var(--radius); padding: 26px 28px; margin-bottom: 18px;
    box-shadow: var(--schatten);
}
.hero_gruss { font-size: 16px; color: rgba(255,255,255,.82); }
/* overflow-wrap: lange Namen oder Stellenbezeichnungen duerfen die Karte nicht sprengen. */
.hero_name  { font-size: 32px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 4px; overflow-wrap: anywhere; }
.hero_rolle { font-size: 15.5px; color: rgba(255,255,255,.78); overflow-wrap: anywhere; }
.hero_werte { display: flex; gap: 0; margin-top: 22px; flex-wrap: wrap; }
.hero_wert  { padding-right: 26px; margin-right: 26px; border-right: 1px solid rgba(255,255,255,.22); }
.hero_wert:last-child { border-right: none; margin-right: 0; padding-right: 0; }
.hero_zahl  { font-size: 30px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hero_label { font-size: 13.5px; color: rgba(255,255,255,.75); margin-top: 2px; }

/* Kachelraster */
.kacheln { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 18px; }
.kachel {
    background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius);
    box-shadow: var(--schatten); padding: 20px; text-decoration: none; color: var(--text);
    display: block; transition: box-shadow .14s, transform .08s, border-color .14s;
}
.kachel:hover { text-decoration: none; box-shadow: var(--schatten-hoch); border-color: #dcd3c8; }
.kachel:active { transform: translateY(1px); }
.kachel_symbol {
    flex: 0 0 auto;   /* feste Groesse darf nie zusammengequetscht werden */
    width: 46px; height: 46px; border-radius: 13px; background: var(--rot-blass); color: var(--rot);
    display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.kachel_titel { font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.kachel_wert  { font-size: 14.5px; color: var(--text-leise); margin-top: 2px; }

/* Hinweisband, z.B. "Ein neuer Gutschein liegt fuer dich bereit".
   Die beiden entscheidenden Regeln fuer schmale Bildschirme:
   - band_symbol/Pfeil: flex:0 0 auto, sonst quetscht der Text die feste Groesse zusammen
   - band_text: min-width:0, sonst kann die Spalte NICHT unter ihre Inhaltsbreite
     schrumpfen (Flex-Vorgabe min-width:auto) und sprengt die Karte nach rechts. */
.band {
    display: flex; align-items: center; gap: 14px;
    background: #fffaee; border: 1px solid #f0d68a;
    border-radius: var(--radius); box-shadow: var(--schatten);
    padding: 16px 18px; margin-bottom: 16px;
    text-decoration: none; color: var(--text);
}
.band:hover { text-decoration: none; box-shadow: var(--schatten-hoch); }
.band .ic { flex: 0 0 auto; color: var(--text-leise); }
.band_symbol {
    flex: 0 0 auto; width: 44px; height: 44px; border-radius: 13px;
    background: #fff3cf; color: var(--gold-tief);
    display: flex; align-items: center; justify-content: center;
}
.band_text  { flex: 1 1 auto; min-width: 0; }
.band_titel { display: block; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.band_sub   { display: block; font-size: 14px; color: var(--text-leise); margin-top: 2px; }

/* Beschriftung + Wert, bricht auf schmalen Geraeten um statt zu quetschen. */
.datenzeile { display: flex; gap: 12px; padding: 11px 0; border-top: 1px solid var(--linie); flex-wrap: wrap; }
.datenzeile_label { flex: 0 0 150px; color: var(--text-leise); font-size: 14px; }
.datenzeile_wert  { flex: 1 1 auto; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 460px) {
    .datenzeile_label { flex-basis: 100%; }
    .datenzeile_wert  { font-weight: 700; }
}

/* Abschnittsueberschrift */
.abschnitt { display: flex; align-items: baseline; gap: 12px; margin: 26px 0 14px; }
.abschnitt h2 { font-size: 21px; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.abschnitt_mehr { margin-left: auto; font-size: 14.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }

/* Liste */
.liste_zeile {
    background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius);
    padding: 16px 18px; margin-bottom: 11px;
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.liste_haupt { flex: 1; min-width: 190px; }
.liste_titel { font-size: 16px; font-weight: 700; }
.liste_sub   { font-size: 13.5px; color: var(--text-leise); margin-top: 2px; }

.marke_pille {
    display: inline-block; padding: 3px 11px; border-radius: 999px;
    font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    background: var(--rot-blass); color: var(--rot); margin-bottom: 7px;
}
.marke_pille.gold  { background: #fff3cf; color: var(--gold-tief); }
.marke_pille.gruen { background: var(--gruen-blass); color: #1e5c22; }
.marke_pille.grau  { background: #eeeae5; color: var(--text-leise); }

.status_pille {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
    font-size: 13px; font-weight: 600; background: var(--gruen-blass); color: #1e5c22;
}
.status_pille.grau { background: #eeeae5; color: var(--text-leise); }

.leer {
    text-align: center; padding: 38px 20px; color: var(--text-leise);
    background: var(--flaeche); border: 1px dashed var(--linie); border-radius: var(--radius);
}
.leer .ic { color: #cdc5bb; margin-bottom: 10px; }

.tabelle { width: 100%; border-collapse: collapse; font-size: 15px; }
.tabelle th {
    text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em;
    color: var(--text-leise); font-weight: 700; padding: 9px 12px; border-bottom: 1px solid var(--linie);
}
.tabelle td { padding: 12px; border-bottom: 1px solid #f3efe9; }
.tabelle tr:last-child td { border-bottom: none; }
.tabelle .zahl { text-align: right; font-variant-numeric: tabular-nums; }
.tabelle_rollbar { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.hinweis_kasten {
    background: var(--flaeche-2); border-left: 3px solid var(--linie);
    padding: 13px 16px; border-radius: 0 var(--radius-klein) var(--radius-klein) 0;
    font-size: 14px; color: var(--text-leise); margin-top: 16px;
}

/* ============================================================== Breiten */

@media (min-width: 900px) {
    .seitenleiste { display: flex; }
    .tableiste    { display: none; }
    .hauptbereich { margin-left: var(--seitenleiste); }
    .kopf_logo, .kopf_menue { display: none; }
    .kopfzeile { padding: 0 28px; }
    .inhalt    { padding: 30px 28px 40px; }
    .kacheln   { grid-template-columns: 1fr 1fr; gap: 16px; }
    .hero      { padding: 30px 32px; }
    .hero_name { font-size: 38px; }
}

@media (min-width: 1280px) {
    .kacheln { grid-template-columns: repeat(4, 1fr); }
}

/* Auf sehr schmalen Geraeten die Trennlinie der Kennzahlen umbrechen lassen. */
@media (max-width: 380px) {
    .hero_wert { padding-right: 18px; margin-right: 18px; }
    .hero_zahl { font-size: 26px; }
    .hero_name { font-size: 27px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* Druck: Navigation weg, Inhalt voll. */
@media print {
    .seitenleiste, .tableiste, .kopfzeile { display: none !important; }
    .hauptbereich { margin-left: 0; }
    .karte, .kachel { box-shadow: none; }
}
