/* Seiring Media Kundenreport - gemeinsames Stylesheet für Login & Dashboard */

:root {
    --sand: #D9BB8D;
    --sand-dark: #C4A06A;
    --sand-light: #F5EEE1;
    --text: #383B40;
    --text-muted: #8A8A8A;
    --border: #ECE6DA;
    --bg: #FFFFFF;
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, "Segoe UI", Inter, Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    min-height: 100vh;
}

/* Topbar */
.topbar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 16px 32px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    min-height: 96px;
}

.topbar .logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    height: 64px;
    display: block;
}

.topbar .abmelden {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 0.15s;
}
.topbar .abmelden:hover { background: var(--sand-light); color: var(--text); }

.abmelden-mobil {
    display: none;
    text-align: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin: 40px auto 0;
    padding: 12px;
}

.topbar-rechts {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.kunden-umschalter {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
}
.kunden-umschalter:focus { outline: 2px solid var(--sand); }

/* Content */
.inhalt {
    max-width: 1320px;
    margin: 0 auto;
    padding: 40px 32px 80px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

h1.kundenname {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 4px;
}

.untertitel {
    color: var(--text-muted);
    font-size: 15px;
    margin: 0 0 8px;
}

/* Monatsnavigation */
.monatsnav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px 0 8px;
}

.monatsnav a {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-size: 18px;
    transition: background 0.15s, border-color 0.15s;
}
.monatsnav a:hover { background: var(--sand-light); border-color: var(--sand); }
.monatsnav a.deaktiviert { opacity: 0.3; pointer-events: none; }

.monatsnav .aktuell-button {
    font-weight: 600;
    font-size: 17px;
    min-width: 180px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 20px;
    cursor: pointer;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}
.monatsnav .aktuell-button:hover { border-color: var(--sand); }
.kalender-pfeil { font-size: 12px; color: var(--sand-dark); }

.kalender {
    display: none;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    margin: 0 auto 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    max-width: 420px;
    text-align: left;
}
.kalender.offen { display: block; }

.kalender-jahre {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.jahr-tab {
    border: none;
    background: transparent;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
}
.jahr-tab.aktiv { background: var(--sand); color: var(--text); }
.jahr-tab:hover { background: var(--sand-light); }

.kalender-monate {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.monat-feld {
    text-align: center;
    padding: 10px 4px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text);
    background: var(--bg);
    border: 1px solid transparent;
}
.monat-feld:hover { border-color: var(--sand); }
.monat-feld.gewaehlt { background: var(--sand); color: var(--text); }
.monat-feld.leer { color: #D8D2C4; background: transparent; cursor: default; }

@media (max-width: 480px) {
    .kalender { max-width: 100%; }
    .kalender-monate { grid-template-columns: repeat(3, 1fr); }
    .monatsnav .aktuell-button { min-width: 140px; font-size: 15px; }
}

/* Kategorien & Kacheln */
.gesamt-karte {
    background: linear-gradient(135deg, var(--sand-light), #fff);
    border: 1px solid var(--sand);
    border-radius: 16px;
    padding: 24px 28px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(217,187,141,0.2);
}

.gesamt-label {
    font-weight: 700;
    color: var(--sand-dark);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.gesamt-werte {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.gesamt-zahl {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}

.gesamt-name {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 2px;
}

.kategorie {
    margin-top: 40px;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sand-dark);
}

.kacheln {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 14px;
}

.kachel {
    flex: 0 1 270px;
}

@media (max-width: 900px) {
    .kachel { flex-basis: 45%; }
}

@media (max-width: 560px) {
    .kachel { flex-basis: 100%; }

    .monats-fazit { order: 999; margin-top: 32px; }

    .topbar .abmelden-desktop { display: none; }
    .abmelden-mobil { display: block; order: 1000; }

    .gesamt-karte { padding: 16px 18px; }
    .gesamt-werte {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    .gesamt-zahl { font-size: 26px; }
    .gesamt-posten { text-align: center; }
    .monats-fazit { flex-direction: column; text-align: center; padding: 16px 20px; }
    .monats-fazit p { text-align: center; }
}

.kachel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 24px;
    min-width: 200px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.mini-chart {
    height: 60px;
    margin-top: 12px;
}

.kachel .name {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.info-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-muted);
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    cursor: help;
    flex-shrink: 0;
}
.info-icon:hover { background: var(--sand); color: #fff; }

.info-icon .tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    background: var(--text);
    color: #fff;
    text-align: left;
    font-weight: 400;
    font-size: 12.5px;
    line-height: 1.4;
    padding: 10px 12px;
    border-radius: 8px;
    transition: opacity 0.15s;
    z-index: 10;
    pointer-events: none;
}
.info-icon:hover .tooltip { visibility: visible; opacity: 1; }
.info-icon .tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--text) transparent transparent transparent;
}

.kachel .wert {
    font-size: 30px;
    font-weight: 700;
    margin-top: 6px;
    letter-spacing: -0.02em;
}

.kachel .vormonat {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 4px;
}

.leer {
    color: var(--text-muted);
    margin-top: 24px;
}

.monats-fazit {
    max-width: 720px;
    margin: 24px auto 0;
    background: linear-gradient(135deg, #fff, var(--sand-light));
    border: 1px solid var(--sand);
    border-radius: 16px;
    padding: 20px 28px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 10px rgba(217,187,141,0.25);
}

.monats-fazit-icon {
    font-size: 22px;
    color: var(--sand-dark);
    flex-shrink: 0;
}

.monats-fazit p {
    margin: 0;
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.6;
    text-align: left;
}

/* Login-Seite */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-karte {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.05);
    text-align: center;
}

.login-karte .logo {
    height: auto;
    width: 100%;
    max-width: 260px;
    margin-bottom: 24px;
}

.login-karte h2 {
    font-size: 17px;
    margin: 0 0 24px;
    font-weight: 600;
    line-height: 1.4;
}

.login-karte input[type="text"],
.login-karte input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    margin-bottom: 12px;
    background: var(--bg);
}
.login-karte input:focus { outline: 2px solid var(--sand); border-color: var(--sand); }

.login-karte label.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
    margin: 4px 0 20px;
    text-align: left;
}

.login-karte button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: var(--sand);
    color: #1F1F1F;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.15s;
}
.login-karte button:hover { background: var(--sand-dark); }

.fehler {
    background: #FBEAE9;
    color: #C0392B;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}


.monats-gesamt-anfragen {
    display: inline-flex !important;
    align-self: center;
    align-items: center;
    gap: 10px;
    margin: 8px 0 20px !important;
    padding: 10px 24px !important;
    background: linear-gradient(135deg, #fff, var(--sand-light)) !important;
    border: 1px solid var(--sand) !important;
    border-radius: 999px !important;
    box-shadow: 0 2px 8px rgba(217,187,141,0.2) !important;
}
.monats-gesamt-zahl {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}
.monats-gesamt-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}
 
 @media (max-width: 640px) {
    .topbar {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 16px 20px;
        min-height: auto;
    }
    .topbar .logo {
        position: static;
        transform: none;
        margin-bottom: 12px;
    }
    .topbar-rechts {
        justify-content: center;
        width: 100%;
    }
}
 /* ===== Neue Sidebar-Navigation (Kompass-Stil) ===== */

.shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid var(--border);
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar__logo img {
    height: 68px;
    display: block;
    margin: 0 auto 24px;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.side-nav a {
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    color: var(--text);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    transition: box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s;
}
.side-nav a:hover { border-color: var(--sand); box-shadow: 0 6px 18px rgba(0,0,0,0.08); }
.side-nav a.is-active { background: var(--sand-light); border-color: var(--sand); color: var(--text); font-weight: 700; }

.sidebar__abmelden {
    margin-top: auto;
    padding: 11px 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}
.sidebar__abmelden:hover { color: var(--text); }

.firmen-topbar {
    position: fixed;
    top: 20px;
    right: 28px;
    z-index: 30;
}

.kunden-umschalter {
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

@media (max-width: 900px) {
    .firmen-topbar { top: 12px; right: 16px; }
}

.shell__main {
    flex: 1;
    min-width: 0;
}

.mobile-topbar {
    display: none;
}

.mobile-topbar__burger {
    display: none;
}

.sidebar-backdrop {
    display: none;
}

@media (max-width: 900px) {
    .shell { flex-direction: column; }

    .firmen-topbar { display: none; }

    .sidebar {
        position: fixed;
        left: 0; top: 0;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        z-index: 50;
        box-shadow: 0 0 24px rgba(0,0,0,0.12);
    }
    .sidebar.is-open { transform: translateX(0); }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.35);
        z-index: 40;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }
    .sidebar-backdrop.is-open { opacity: 1; pointer-events: auto; }

    .mobile-topbar {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 14px;
        background: #fff;
        border-bottom: 1px solid var(--border);
        position: sticky;
        top: 0;
        z-index: 20;
    }
    .mobile-topbar__logo { height: 40px; }
    .mobile-topbar .kunden-umschalter { font-size: 13px; padding: 7px 12px; }

    .mobile-topbar__burger {
        display: block;
        position: fixed;
        top: 14px;
        left: 16px;
        z-index: 60;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        border: 1px solid var(--border);
        background: #fff;
        font-size: 18px;
        cursor: pointer;
    }
}

/* ===== Übersichtsseite (KPI-Karten im Kompass-Stil) ===== */

.uebersicht-inhalt {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 32px 80px;
}

.uebersicht-inhalt .kundenname {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 4px;
}

.uebersicht-link {
    margin-top: 24px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.kpi-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 20px;
    text-align: left;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.kpi-card__label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
}
.kpi-card__value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
}
.kpi-card__trend {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 6px;
}
.kpi-card__trend--up { color: #3D8B5F; }

.wide-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 20px;
    margin-top: 20px;
    text-align: left;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.wide-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.wide-card__head h3 {
    font-size: 15px;
    margin: 0;
}
.wide-card__link {
    font-size: 13px;
    color: var(--sand-dark);
    text-decoration: none;
    font-weight: 600;
}
.wide-card__link:hover { text-decoration: underline; }

.finance-line {
    display: flex;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.finance-line:last-child { border-bottom: none; }
.finance-line .amount { font-weight: 700; }
