/* ── Nino Dashboard – Futuristic Blue ────────────────────────────────────── */

/* Reset & Basis */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #050a18;
    color: #c8d6e5;
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(15, 50, 120, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, rgba(10, 40, 100, 0.2) 0%, transparent 60%);
    background-attachment: fixed;
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px 8px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(5, 10, 24, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(96, 165, 250, 0.06);
}

.header-left {
    flex-shrink: 0;
}

.header h1 {
    font-size: 22px;
    font-weight: 700;
    color: #60a5fa;
    text-shadow: 0 0 20px rgba(96, 165, 250, 0.3);
    letter-spacing: 2px;
}

/* ── Tab-Navigation (im Header) ──────────────────────────────────────────── */

.tab-nav {
    display: flex;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.tab {
    background: none;
    border: none;
    color: #2a4060;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 8px;
    transition: all 0.25s;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}

.tab.aktiv {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.08);
}

.tab:hover:not(.aktiv) {
    color: #4a6a8a;
    background: rgba(96, 165, 250, 0.04);
}

.tab:active {
    transform: scale(0.95);
}

/* ── Header rechts (BTC + Logout) ────────────────────────────────────────── */

.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.btc-header {
    color: #f59e0b;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
    white-space: nowrap;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(96, 165, 250, 0.15);
    color: #4a6a8a;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.logout-btn:hover {
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

/* ── Sub-Header (Datum) ──────────────────────────────────────────────────── */

.sub-header {
    padding: 6px 16px 2px;
    background: rgba(5, 10, 24, 0.6);
}

.sub-header .datum {
    color: #4a6a8a;
    font-size: 13px;
    letter-spacing: 0.3px;
}

/* ── Seiten-Container ────────────────────────────────────────────────────── */

.seiten {
    padding: 16px;
    padding-bottom: 32px;
    max-width: 800px;
    margin: 0 auto;
}

.seite {
    display: none;
}

.seite.aktiv {
    display: block;
}

/* ── Listen-Grid (Aufgaben links, Einkauf rechts) ────────────────────────── */

.listen-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 640px) {
    .listen-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        align-items: start;
    }

    .listen-grid .karte {
        margin-bottom: 0;
    }
}

/* ── Karten (Glassmorphism) ──────────────────────────────────────────────── */

.karte {
    background: rgba(10, 18, 40, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 16px;
    border: 1px solid rgba(96, 165, 250, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.karte::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.2), transparent);
}

.karte:hover {
    border-color: rgba(96, 165, 250, 0.18);
    box-shadow: 0 4px 30px rgba(96, 165, 250, 0.06);
}

.karte-titel {
    font-size: 11px;
    font-weight: 600;
    color: #4a6a8a;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Kalender Zeitraum-Header ────────────────────────────────────────────── */

.kalender-zeitraum {
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0.3px;
    color: #60a5fa;
}

/* ── Termine ─────────────────────────────────────────────────────────────── */

.termin-item {
    display: flex;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(96, 165, 250, 0.06);
}

.termin-item:last-child { border-bottom: none; }

.termin-zeit {
    color: #60a5fa;
    font-size: 13px;
    font-weight: 600;
    min-width: 50px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.termin-titel {
    font-size: 14px;
    color: #c8d6e5;
}

.termin-kalender {
    font-size: 12px;
    color: #3a5570;
    margin-top: 2px;
}

.termin-dauer {
    font-size: 11px;
    color: #4a6a8a;
    margin-top: 2px;
}

/* ── Aufgaben ────────────────────────────────────────────────────────────── */

.aufgabe-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(96, 165, 250, 0.06);
    transition: opacity 0.2s;
}

.aufgabe-item:last-child { border-bottom: none; }

.aufgabe-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1.5px solid rgba(96, 165, 250, 0.25);
    background: rgba(96, 165, 250, 0.03);
    cursor: pointer;
    transition: all 0.25s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 13px;
}

.aufgabe-checkbox:hover {
    border-color: #34d399;
    color: #34d399;
    background: rgba(52, 211, 153, 0.08);
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.15);
}

.aufgabe-text {
    flex: 1;
    font-size: 14px;
    color: #c8d6e5;
}

.aufgabe-prio {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 600;
    flex-shrink: 0;
    letter-spacing: 0.3px;
}

.prio-hoch { background: rgba(239, 68, 68, 0.12); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.15); }
.prio-mittel { background: rgba(251, 191, 36, 0.1); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.12); }
.prio-niedrig { background: rgba(52, 211, 153, 0.1); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.12); }

.aufgabe-faellig {
    font-size: 12px;
    color: #3a5570;
    margin-top: 2px;
}

.aufgabe-loeschen {
    background: none;
    border: none;
    color: #2a4060;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    transition: all 0.25s;
    flex-shrink: 0;
}

.aufgabe-loeschen:hover {
    color: #f87171;
    text-shadow: 0 0 8px rgba(248, 113, 113, 0.3);
}

/* ── Einkaufsliste ───────────────────────────────────────────────────────── */

.liste-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(96, 165, 250, 0.06);
    font-size: 14px;
    color: #c8d6e5;
}

.liste-item:last-child { border-bottom: none; }

.liste-entfernen {
    background: none;
    border: none;
    color: #2a4060;
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    transition: all 0.25s;
}

.liste-entfernen:hover {
    color: #f87171;
    text-shadow: 0 0 8px rgba(248, 113, 113, 0.3);
}

/* ── Input-Zeile & Buttons ───────────────────────────────────────────────── */

.input-zeile {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.input-zeile input, .input-zeile select {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(96, 165, 250, 0.12);
    background: rgba(5, 10, 24, 0.8);
    color: #c8d6e5;
    font-size: 14px;
    outline: none;
    transition: all 0.25s;
}

.input-zeile input:focus, .input-zeile select:focus {
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 0 0 15px rgba(96, 165, 250, 0.08);
}

.input-zeile input { flex: 1; }

.btn-aktion {
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 2px 15px rgba(37, 99, 235, 0.2);
}

.btn-aktion:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    box-shadow: 0 2px 20px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.btn-aktion:active {
    transform: translateY(0);
}

/* ── Aufgaben-Formular ───────────────────────────────────────────────────── */

.aufgabe-form {
    display: none;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(96, 165, 250, 0.06);
}

.aufgabe-form.aktiv { display: flex; }

.form-zeile {
    display: flex;
    gap: 8px;
}

.form-zeile input, .form-zeile select {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(96, 165, 250, 0.12);
    background: rgba(5, 10, 24, 0.8);
    color: #c8d6e5;
    font-size: 14px;
    outline: none;
    transition: all 0.25s;
    flex: 1;
}

.form-zeile input:focus, .form-zeile select:focus {
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 0 0 15px rgba(96, 165, 250, 0.08);
}

.form-zeile select { flex: 0 1 auto; min-width: 90px; }
.form-zeile input[type="date"] { flex: 0 1 auto; }

.btn-toggle-form {
    background: rgba(96, 165, 250, 0.04);
    border: 1px dashed rgba(96, 165, 250, 0.15);
    color: #4a6a8a;
    padding: 10px;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: all 0.25s;
    letter-spacing: 0.3px;
}

.btn-toggle-form:hover {
    border-color: rgba(96, 165, 250, 0.35);
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.06);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.05);
}

/* ── Wellbeing ───────────────────────────────────────────────────────────── */

.chart-container {
    position: relative;
    height: 200px;
    margin-top: 8px;
}

.wb-zusammenfassung {
    font-size: 14px;
    line-height: 1.6;
    color: #8aa4c0;
}

.wb-zusammenfassung .wb-wert {
    color: #60a5fa;
    font-weight: 600;
}

.wb-zusammenfassung .wb-trend-up { color: #34d399; }
.wb-zusammenfassung .wb-trend-down { color: #f87171; }
.wb-zusammenfassung .wb-trend-stabil { color: #fbbf24; }

.wb-eintrag {
    padding: 10px 0;
    border-bottom: 1px solid rgba(96, 165, 250, 0.06);
    font-size: 13px;
}

.wb-eintrag:last-child { border-bottom: none; }

.wb-eintrag-datum {
    color: #4a6a8a;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
}

.wb-eintrag-werte {
    display: flex;
    gap: 16px;
    color: #8aa4c0;
}

.wb-eintrag-werte span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.wb-eintrag-notiz {
    color: #5a7a9a;
    font-style: italic;
    margin-top: 4px;
    font-size: 12px;
}

/* ── Geburtstage ─────────────────────────────────────────────────────────── */

.geburtstag-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(96, 165, 250, 0.06);
    font-size: 14px;
}

.geburtstag-item:last-child { border-bottom: none; }

.geburtstag-datum {
    color: #818cf8;
    font-size: 12px;
    font-weight: 600;
    min-width: 60px;
}

/* ── Reminders ───────────────────────────────────────────────────────────── */

.reminder-item {
    display: flex;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(96, 165, 250, 0.06);
    font-size: 14px;
    color: #c8d6e5;
}

.reminder-item:last-child { border-bottom: none; }

.reminder-zeit {
    color: #818cf8;
    font-size: 13px;
    font-weight: 600;
    min-width: 100px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* ── Leer-Texte & Laden ──────────────────────────────────────────────────── */

.leer-text {
    color: #2a4060;
    font-size: 14px;
    font-style: italic;
    padding: 8px 0;
}

.laden {
    color: #3a5570;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.laden::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(96, 165, 250, 0.1);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 639px) {
    .header {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px 6px;
    }

    .tab-nav {
        order: 3;
        width: 100%;
        justify-content: space-around;
        border-top: 1px solid rgba(96, 165, 250, 0.06);
        padding-top: 6px;
    }

    .tab {
        font-size: 12px;
        padding: 5px 10px;
    }

    .btc-header {
        font-size: 11px;
    }
}

@media (min-width: 640px) {
    .seiten {
        padding: 24px;
    }
}
