/* Familiencockpit Design-System — Clean Frosted Glass über Foto (Spec §7) */

/* @font-face für Inter WOFF2 (lokal, DSGVO-konform) */
@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/inter-300.woff2') format('woff2');
    font-weight: 300;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/inter-400.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/inter-500.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/inter-600.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/inter-700.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

:root {
    --bg-fallback: #9aa39a;
    --glass-bg: rgba(255, 255, 255, 0.20);
    --glass-border: rgba(255, 255, 255, 0.34);
    --glass-blur: 22px;
    --pill-dark-bg: rgba(40, 45, 42, 0.55);
    --text: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.85);
    --text-faint: rgba(255, 255, 255, 0.65);
    --ink: #3a3f3a;              /* Text auf weißen Pills */
    --radius-card: 24px;
    --radius-pill: 99px;
    --shadow-card: 0 8px 28px rgba(40, 45, 40, 0.16);
    --font: 'Inter', -apple-system, 'Segoe UI', sans-serif;
    --tabbar-h: 72px;
}
@media (prefers-color-scheme: dark) {
    :root {
        --glass-bg: rgba(20, 24, 20, 0.38);
        --glass-border: rgba(255, 255, 255, 0.16);
        --pill-dark-bg: rgba(15, 18, 15, 0.6);
    }
    .bg-overlay { background: linear-gradient(180deg, rgba(20,24,20,.55), rgba(15,18,15,.35) 40%, rgba(10,12,10,.6)) !important; }
}

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg-fallback);
    -webkit-font-smoothing: antialiased;
}

/* Vollflächiger Foto-Hintergrund + Overlay */
.bg-photo {
    position: fixed; inset: 0; z-index: -2;
    width: 100%; height: 100%; object-fit: cover;
    filter: saturate(.75) brightness(.96);
}
.bg-overlay {
    position: fixed; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(120,125,118,.38), rgba(110,115,108,.12) 38%, rgba(90,95,88,.42));
}

.app { max-width: 480px; margin: 0 auto; padding: 16px 14px calc(var(--tabbar-h) + 20px); min-height: 100dvh; }

/* Glass-Karte */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 16px;
    margin-bottom: 12px;
}

/* Liquid-Glass-Buttons */
.btn {
    display: block; width: 100%; text-align: center; cursor: pointer;
    padding: 12px 18px; border-radius: var(--radius-pill);
    font: 600 14px var(--font); color: var(--text);
    /* Liquid Glass: durchscheinend, Hintergrund bleibt sichtbar — Lesbarkeit über Text-Shadow */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.20), rgba(255, 255, 255, 0.06));
    backdrop-filter: blur(20px) saturate(1.15); -webkit-backdrop-filter: blur(20px) saturate(1.15);
    border: 1px solid rgba(255, 255, 255, 0.32);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 6px 18px rgba(0, 0, 0, 0.22);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
    transition: transform .15s ease, opacity .15s ease;
    text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn-light {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    color: #20241f; border-color: rgba(255, 255, 255, 0.55);
    text-shadow: none; font-weight: 650;
}
.btn-inline { display: inline-block; width: auto; padding: 8px 16px; font-size: 12px; }

/* Pill-Zeile (z.B. "2 Termine heute | Ansehen") */
.row-pill {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-pill);
    padding: 10px 10px 10px 18px; margin-bottom: 10px;
    font-size: 14px; font-weight: 500;
}

/* Pill-Toggle */
.toggle { display: inline-flex; background: rgba(255,255,255,.18); border-radius: var(--radius-pill); padding: 3px; }
.toggle button {
    border: 0; background: transparent; color: var(--text-faint);
    font: 600 12px var(--font); padding: 6px 14px; border-radius: var(--radius-pill); cursor: pointer;
}
.toggle button.active { background: #fff; color: var(--ink); }

/* Datums-Badge */
.date-badge {
    min-width: 48px; height: 52px; border-radius: 14px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: rgba(255,255,255,.30); border: 1px solid rgba(255,255,255,.4);
}
.date-badge b { font-size: 18px; line-height: 1; }
.date-badge span { font-size: 10px; color: var(--text-dim); }

/* Editorial Headline (Dashboard) */
.headline { padding: 36px 8px 22px; }
.headline .kicker { font-size: 12px; color: var(--text-dim); margin-bottom: 8px; }
.headline h1 { font-size: 28px; line-height: 1.16; font-weight: 500; letter-spacing: -.02em; text-shadow: 0 1px 14px rgba(0,0,0,.18); }

/* Formulare */
.input {
    width: 100%; padding: 13px 16px; border-radius: 16px;
    background: rgba(255,255,255,.22); border: 1px solid var(--glass-border);
    color: var(--text); font: 400 14px var(--font); outline: none;
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    margin-bottom: 10px;
}
.input::placeholder { color: var(--text-faint); }
.input:focus { border-color: rgba(255,255,255,.6); }
label { font-size: 12px; color: var(--text-dim); display: block; margin: 6px 4px 4px; }
.error { background: rgba(180,60,50,.35); border: 1px solid rgba(255,120,100,.4); border-radius: 14px; padding: 10px 14px; font-size: 13px; margin-bottom: 10px; }

/* Tab-Bar */
.tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; height: var(--tabbar-h);
    display: flex; justify-content: space-around; align-items: flex-start;
    padding: 10px 8px env(safe-area-inset-bottom);
    background: linear-gradient(180deg, rgba(60,65,60,0), rgba(60,65,60,.30));
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.tabbar a {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    text-decoration: none; color: var(--text); opacity: .65; font-size: 10px;
}
.tabbar a.active { opacity: 1; }
.tabbar svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Header (Greeting) */
.greet { display: flex; align-items: center; gap: 10px; padding: 4px 6px 0; }
.greet .avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1.5px solid rgba(255,255,255,.6); background: rgba(255,255,255,.3); }
.greet .g-sub { font-size: 12px; color: var(--text-dim); }
.greet .g-main { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.greet .g-action {
    margin-left: auto; width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.35);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
