@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@500;700&display=swap');

/* ============================================================
   Fahrten · Glass Design System
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Brand */
    --accent:        #f59e0b;
    --accent-2:      #fbbf24;
    --accent-deep:   #d97706;
    --accent-soft:   rgba(245, 158, 11, 0.14);
    --accent-glow:   rgba(245, 158, 11, 0.35);
    --accent-border: rgba(245, 158, 11, 0.32);

    /* Dark Base */
    --bg:            #08090d;
    --bg-grad-1:     #14121a;
    --bg-grad-2:     #0b0d12;
    --bg-card:       rgba(255, 255, 255, 0.04);
    --bg-elev:       rgba(255, 255, 255, 0.06);
    --bg-hover:      rgba(255, 255, 255, 0.08);
    --bg-input:      rgba(0, 0, 0, 0.25);
    --topbar-bg:     rgba(255, 255, 255, 0.04);

    /* Borders */
    --border:        rgba(255, 255, 255, 0.08);
    --border-soft:   rgba(255, 255, 255, 0.05);
    --border-strong: rgba(255, 255, 255, 0.14);

    /* Text */
    --text:          #f0eff4;
    --text-soft:     #c9c7d4;
    --text-muted:    #8b889a;
    --text-dim:      #5e5b6c;

    /* Status */
    --success: #4ade80;
    --warning: #fbbf24;
    --danger:  #ff6675;
    --info:    #60a5fa;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,.25);
    --shadow:    0 12px 36px rgba(0,0,0,.30);
    --shadow-lg: 0 24px 64px rgba(0,0,0,.45);

    /* Radii */
    --r-sm: 8px;
    --r:    12px;
    --r-lg: 18px;
    --r-xl: 24px;

    color-scheme: dark;
}
html[data-theme="light"] {
    --bg:            #f3f1ec;
    --bg-grad-1:     #ffe8c4;
    --bg-grad-2:     #f3f1ec;
    --bg-card:       rgba(255, 255, 255, 0.62);
    --bg-elev:       rgba(255, 255, 255, 0.78);
    --bg-hover:      rgba(255, 255, 255, 0.92);
    --bg-input:      rgba(255, 255, 255, 0.65);
    --topbar-bg:     rgba(255, 255, 255, 0.62);
    --border:        rgba(15, 12, 25, 0.08);
    --border-soft:   rgba(15, 12, 25, 0.05);
    --border-strong: rgba(15, 12, 25, 0.14);
    --text:          #1a1822;
    --text-soft:     #3d3a4a;
    --text-muted:    #6b6877;
    --text-dim:      #9b98a6;
    --accent-soft:   rgba(217, 119, 6, 0.12);
    --accent-glow:   rgba(245, 158, 11, 0.28);
    color-scheme: light;
}

/* ============ Base ============ */
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Ambient Glas-Hintergrund — radiale Gradients + dezenter Noise */
body::before {
    content: "";
    position: fixed; inset: 0; z-index: -2;
    background:
        radial-gradient(1200px 700px at 85% -10%, var(--accent-soft), transparent 55%),
        radial-gradient(900px 600px at -10% 0%, var(--bg-grad-1), transparent 60%),
        radial-gradient(1200px 800px at 50% 110%, var(--bg-grad-1), transparent 60%);
    pointer-events: none;
}
body::after {
    content: "";
    position: fixed; inset: 0; z-index: -1;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence baseFrequency='0.85' numOctaves='2'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.025 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    opacity: 0.35; pointer-events: none; mix-blend-mode: overlay;
}

/* Typo */
h1, h2, h3 { letter-spacing: -0.02em; font-weight: 800; line-height: 1.2; }
h1 { font-size: clamp(28px, 4vw, 36px); }
h2 { font-size: 19px; }
h3 { font-size: 15px; font-weight: 700; }
code, .mono { font-family: 'JetBrains Mono', monospace; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ============ Layout: Topbar ============ */
.topbar { position: sticky; top: 0; z-index: 50; padding: 12px 0; }
.topbar-inner {
    max-width: 1180px; margin: 0 auto; padding: 8px 14px;
    display: flex; align-items: center; gap: 14px;
    background: var(--topbar-bg);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}
.topbar-brand {
    display: flex; align-items: center; gap: 10px;
    font-weight: 800; font-size: 15.5px; letter-spacing: -0.01em;
    text-decoration: none; color: var(--text);
}
.topbar-brand:hover { text-decoration: none; }
.topbar-brand-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 18px; box-shadow: 0 6px 18px var(--accent-glow);
}
.topbar-brand-sub { font-size: 11px; color: var(--text-muted); font-weight: 500; letter-spacing: 0.01em; }

.topbar-nav { display: flex; gap: 4px; margin-left: 18px; flex-wrap: wrap; }
.nav-link {
    color: var(--text-soft); text-decoration: none;
    padding: 8px 13px; border-radius: 10px;
    font-size: 14px; font-weight: 500;
    transition: background .15s, color .15s;
    display: inline-flex; align-items: center; gap: 6px;
}
.nav-link:hover { background: var(--bg-elev); color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--bg-hover); color: var(--text); }

.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.user-chip {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 5px 12px 5px 5px; border-radius: 999px;
    background: var(--bg-card); border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    color: var(--text); text-decoration: none;
}
.user-chip:hover { background: var(--bg-hover); text-decoration: none; }
.user-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: #1a0f00;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800;
}
.user-name { font-size: 12.5px; font-weight: 600; }

.btn-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background .15s, transform .15s;
    font-size: 15px; text-decoration: none;
    backdrop-filter: blur(8px);
}
.btn-icon:hover { background: var(--bg-hover); text-decoration: none; }
.btn-icon:active { transform: scale(0.96); }

.theme-toggle.floating {
    position: fixed; top: 18px; right: 18px; z-index: 100;
    box-shadow: var(--shadow);
}

/* ============ Main ============ */
.main {
    max-width: 1180px; margin: 0 auto; padding: 28px 22px 60px;
}
.page-header {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin-bottom: 26px;
}
.page-header h1 { font-size: clamp(24px, 3.5vw, 32px); }
.page-header .subtitle, .subtitle { color: var(--text-muted); font-size: 13.5px; margin-top: 6px; }

/* ============ Glass Cards ============ */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 20px;
    box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 12px 32px rgba(0,0,0,.18);
    transition: border-color .15s, transform .15s;
}
.card-elev {
    background: var(--bg-elev);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-lg);
    padding: 16px;
}

/* ============ Forms ============ */
.field-stack > * + * { margin-top: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 700px) { .field-row { grid-template-columns: 1fr; } }
.field-label {
    font-size: 11.5px; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px;
}
.field-input {
    width: 100%; padding: 11px 14px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: 10px; color: var(--text);
    font-family: inherit; font-size: 14px;
    transition: border-color .15s, box-shadow .15s;
}
.field-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field-input::placeholder { color: var(--text-dim); }
textarea.field-input { min-height: 88px; resize: vertical; line-height: 1.5; }

/* Custom Select — native Pfeil ersetzen, Glass-Look beibehalten */
select.field-input {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='%238b889a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><polyline points='3.5 5.5 7 9 10.5 5.5'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px 14px;
    padding-right: 36px;
}
select.field-input:hover { background-color: var(--bg-hover); }
select.field-input::-ms-expand { display: none; }
/* Light Theme: dunklerer Pfeil für Kontrast */
html[data-theme="light"] select.field-input {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='%236b6877' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><polyline points='3.5 5.5 7 9 10.5 5.5'/></svg>");
}
/* Options-Liste — soweit der Browser zulässt — auf dunkle Brand-Farben */
select.field-input option {
    background-color: #14121a;
    color: var(--text);
}
html[data-theme="light"] select.field-input option {
    background-color: #ffffff;
    color: #1a1822;
}

.checkbox-row {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13.5px; cursor: pointer; user-select: none;
}
.checkbox-row input[type="checkbox"] {
    width: 18px; height: 18px; accent-color: var(--accent);
}

/* ============ Buttons ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; border-radius: 12px;
    font-family: inherit; font-size: 14px; font-weight: 600;
    cursor: pointer; border: none; text-decoration: none;
    transition: transform .12s, box-shadow .2s, background .15s, border-color .15s;
    line-height: 1.2;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
    color: #1a0f00;
    box-shadow: 0 8px 24px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 10px 32px var(--accent-glow); text-decoration: none; }
.btn-ghost {
    background: var(--bg-card); color: var(--text);
    border: 1px solid var(--border); backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: var(--bg-hover); border-color: var(--border-strong); text-decoration: none; color: var(--text); }
.btn-danger {
    background: rgba(255, 102, 117, 0.12); color: var(--danger);
    border: 1px solid rgba(255, 102, 117, 0.25);
}
.btn-danger:hover { background: rgba(255, 102, 117, 0.18); text-decoration: none; color: var(--danger); }
.btn-ghost.btn-danger { background: rgba(255, 102, 117, 0.10); color: var(--danger); border-color: rgba(255, 102, 117, 0.25); }
.btn-sm { padding: 7px 13px; font-size: 12.5px; border-radius: 9px; }

/* ============ Tables ============ */
.table-wrap {
    background: var(--bg-card);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead tr { background: rgba(255, 255, 255, 0.02); }
html[data-theme="light"] thead tr { background: rgba(0, 0, 0, 0.025); }
th {
    padding: 13px 18px; text-align: left;
    font-size: 11px; color: var(--text-muted); font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border);
}
td { padding: 13px 18px; border-top: 1px solid var(--border-soft); vertical-align: top; }
tbody tr:hover td { background: var(--bg-elev); }
.td-muted { color: var(--text-muted); }

/* ============ Badges (unified — Status + Generic) ============ */
.badge {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 12px 5px 10px;
    border-radius: 999px;
    font-size: 10.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.10em;
    border: 1px solid;
    line-height: 1; white-space: nowrap;
    backdrop-filter: blur(8px);
}
.badge::before {
    content: "";
    width: 7px; height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor, 0 0 2px currentColor;
    flex-shrink: 0;
}
.badge.no-dot::before { display: none; }
.badge-accent {
    background: linear-gradient(135deg, var(--accent-soft), transparent);
    color: var(--accent); border-color: var(--accent-border);
}
.badge-mute {
    background: var(--bg-card); color: var(--text-muted); border-color: var(--border);
}
.badge-mute::before { box-shadow: none; opacity: 0.5; }

/* Status (semantic): pending / confirmed / done / cancelled */
.b-pending, .badge-status[data-status="angefragt"] {
    background: linear-gradient(135deg, rgba(251,191,36,0.18), rgba(251,191,36,0.06));
    color: var(--warning); border-color: rgba(251,191,36,0.35);
}
.b-pending::before, .badge-status[data-status="angefragt"]::before { animation: pulse-dot 2s ease-in-out infinite; }
.b-confirmed, .badge-status[data-status="bestaetigt"] {
    background: linear-gradient(135deg, rgba(74,222,128,0.18), rgba(74,222,128,0.06));
    color: var(--success); border-color: rgba(74,222,128,0.35);
}
.b-done, .badge-status[data-status="durchgefuehrt"] {
    background: linear-gradient(135deg, rgba(96,165,250,0.18), rgba(96,165,250,0.06));
    color: var(--info); border-color: rgba(96,165,250,0.35);
}
.b-cancelled, .badge-status[data-status="storniert"] {
    background: linear-gradient(135deg, rgba(255,102,117,0.16), rgba(255,102,117,0.06));
    color: var(--danger); border-color: rgba(255,102,117,0.32);
    opacity: 0.75; text-decoration: line-through;
}
.b-cancelled::before, .badge-status[data-status="storniert"]::before { box-shadow: none; opacity: 0.6; }

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 8px currentColor, 0 0 2px currentColor; opacity: 1; }
    50%      { box-shadow: 0 0 14px currentColor, 0 0 4px currentColor; opacity: 0.7; }
}

/* ============ Contact-Card (öffentliches Buchungsformular) ============ */
.contact-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--accent-border);
    border-radius: var(--r-lg);
    padding: 22px 24px;
    box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 12px 32px rgba(0,0,0,.18), 0 0 32px var(--accent-glow);
    margin: 18px 0;
}
.contact-card-head {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    margin-bottom: 18px;
}
.contact-card-emoji {
    width: 56px; height: 56px; border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 28px; box-shadow: 0 8px 24px var(--accent-glow);
    flex-shrink: 0;
}
.contact-card-title {
    font-size: 14px; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.06em;
}
.contact-card-sub {
    font-size: 12.5px; color: var(--text-muted); margin-top: 2px;
}
.contact-card-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 22px; font-weight: 700; letter-spacing: 0.02em;
    color: var(--text); margin-top: 4px;
}
.contact-card-actions {
    display: flex; gap: 10px; flex-wrap: wrap;
}
.contact-card-actions .btn { flex: 1; justify-content: center; min-width: 130px; }
@media (max-width: 480px) {
    .contact-card-number { font-size: 18px; }
    .contact-card-emoji  { width: 48px; height: 48px; font-size: 24px; }
}

/* ============ Custom Confirm-Dialog ============ */
.ss-confirm-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(4, 6, 12, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    animation: ssCfmFade .18s ease-out;
}
.ss-confirm-overlay.leaving { animation: ssCfmOut .15s ease-in forwards; }
.ss-confirm-box {
    background: #14121a;
    border: 1px solid var(--border-strong);
    border-radius: 18px;
    padding: 26px 26px 20px;
    max-width: 400px; width: 100%;
    box-shadow: 0 32px 80px rgba(0,0,0,0.65), 0 0 0 1px rgba(255,255,255,0.04) inset;
    text-align: center;
    animation: ssCfmPop .22s cubic-bezier(.34, 1.5, .64, 1);
}
html[data-theme="light"] .ss-confirm-box {
    background: #ffffff;
    box-shadow: 0 32px 80px rgba(20,30,60,0.22), 0 0 0 1px rgba(0,0,0,0.04) inset;
}
.ss-confirm-icon  { font-size: 42px; line-height: 1; margin-bottom: 10px; }
.ss-confirm-title { font-size: 17px; font-weight: 800; color: var(--text); margin-bottom: 6px; letter-spacing: -.01em; }
.ss-confirm-msg   { font-size: 13.5px; color: var(--text-muted); line-height: 1.55; margin-bottom: 20px; }
.ss-confirm-actions { display: flex; gap: 10px; }
.ss-confirm-actions .btn { flex: 1; padding: 10px 14px; font-size: 13.5px; }

@keyframes ssCfmFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ssCfmOut  { from { opacity: 1; } to { opacity: 0; } }
@keyframes ssCfmPop  { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ============ Autocomplete-Dropdowns (Kunden + Adressen) ============ */
.customer-suggest,
.addr-suggest {
    position: absolute; top: 100%; left: 0; right: 0;
    margin-top: 6px;
    background: #14121a;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.04) inset;
    max-height: 260px; overflow-y: auto;
    z-index: 100;
    padding: 4px;
}
html[data-theme="light"] .customer-suggest,
html[data-theme="light"] .addr-suggest {
    background: #ffffff;
    box-shadow: 0 24px 64px rgba(20,30,60,0.18), 0 0 0 1px rgba(0,0,0,0.04) inset;
}
.addr-row {
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: background .12s;
    border-bottom: none;
}
.addr-row + .addr-row { margin-top: 2px; }
.addr-row:hover { background: var(--bg-hover); }
.cust-row {
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: background .12s;
    display: block;
}
.cust-row + .cust-row { margin-top: 2px; }
.cust-row:hover { background: var(--bg-hover); }
.cust-row .cust-name { font-weight: 700; color: var(--text); font-size: 13.5px; }
.cust-row .cust-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; line-height: 1.4; }
.cust-row .cust-times {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 10.5px; font-weight: 700;
    padding: 2px 8px; border-radius: 999px;
    background: var(--accent-soft); color: var(--accent);
    border: 1px solid var(--accent-border);
    margin-left: 8px; letter-spacing: 0.04em;
    text-transform: uppercase;
}
.cust-row .cust-times::before {
    content: ""; width: 5px; height: 5px; border-radius: 50%;
    background: currentColor; box-shadow: 0 0 5px currentColor;
}

/* ============ Settings Section ============ */
.settings-stack { display: flex; flex-direction: column; gap: 18px; max-width: 760px; }
.settings-section { padding: 24px 26px; }
.settings-section .section-header {
    display: flex; align-items: baseline; gap: 12px;
    margin-bottom: 4px;
}
.settings-section .section-header h2 {
    font-size: 17px; font-weight: 800; letter-spacing: -0.01em;
    display: inline-flex; align-items: center; gap: 8px;
}
.settings-section .section-hint {
    font-size: 12.5px; color: var(--text-muted);
    line-height: 1.55; margin-bottom: 18px;
}
.settings-section .section-hint code {
    background: var(--bg-input); padding: 1px 7px; border-radius: 5px;
    color: var(--accent); font-size: 12px;
    border: 1px solid var(--border);
}
.settings-section .field-stack > * + * { margin-top: 16px; }

/* ============ KPI Cards (Heute) ============ */
.kpi-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}
.kpi {
    padding: 14px 16px;
    background: var(--bg-card);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset;
    transition: border-color .15s, transform .15s;
}
.kpi:hover { border-color: var(--accent-border); transform: translateY(-1px); }
.kpi-label {
    font-size: 10.5px; color: var(--text-muted); font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
}
.kpi-value {
    font-size: 22px; font-weight: 800; letter-spacing: -0.01em; margin-top: 4px;
}
.kpi-value.accent {
    background: linear-gradient(135deg, var(--accent), #ffd55a);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ============ Ride-Card (Event-Detail / Heute) ============ */
.ride {
    background: var(--bg-card);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 16px 18px;
    margin-bottom: 12px;
    box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 12px 32px rgba(0,0,0,.18);
    transition: border-color .15s, transform .15s, box-shadow .2s;
}
.ride:hover {
    border-color: var(--accent-border);
    box-shadow: 0 12px 32px rgba(0,0,0,.18), 0 0 24px var(--accent-glow);
    transform: translateY(-1px);
}
.ride-head {
    display: flex; align-items: center; gap: 12px;
    flex-wrap: wrap; margin-bottom: 12px;
}
.ride-route {
    background: rgba(0, 0, 0, 0.20);
    border: 1px solid var(--border-soft);
    border-radius: 12px; padding: 12px 14px;
    margin: 10px 0;
    font-size: 13px;
}
html[data-theme="light"] .ride-route { background: rgba(0, 0, 0, 0.04); }
.ride-route .label {
    font-size: 10.5px; color: var(--text-muted); font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em; margin-top: 6px;
}
.ride-route .label:first-child { margin-top: 0; }
.ride-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

/* ============ Chips ============ */
.chip {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11.5px; padding: 3px 10px; border-radius: 999px;
    background: var(--bg-elev); border: 1px solid var(--border);
    color: var(--text-soft);
}
.chip-plate {
    font-family: 'JetBrains Mono', monospace; font-weight: 700;
    background: var(--accent-soft); color: var(--accent);
    border-color: var(--accent-border); letter-spacing: 0.04em;
}

/* ============ Modal ============ */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    padding: 14px;
    animation: modal-fade 0.18s ease-out;
}
.modal-backdrop.hidden { display: none; }
.modal {
    background: var(--bg-card);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-xl);
    padding: 26px;
    width: 100%; max-width: 520px;
    max-height: 92vh; overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modal-pop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal.modal-lg { max-width: 720px; }
.modal h2 { font-size: 18px; font-weight: 800; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }

@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop {
    from { opacity: 0; transform: translateY(10px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============ Alerts ============ */
.alert-success, .alert-error, .alert-info {
    padding: 12px 16px; border-radius: 12px; margin-bottom: 18px;
    font-size: 13.5px; border: 1px solid;
    backdrop-filter: blur(12px);
}
.alert-success { background: rgba(74,222,128,0.12); border-color: rgba(74,222,128,0.30); color: var(--success); }
.alert-error   { background: rgba(255,102,117,0.12); border-color: rgba(255,102,117,0.30); color: var(--danger); }
.alert-info    { background: rgba(96,165,250,0.12); border-color: rgba(96,165,250,0.30); color: var(--info); }

/* ============ Empty State ============ */
.empty-state {
    text-align: center; padding: 56px 22px;
    background: var(--bg-card); backdrop-filter: blur(20px);
    border: 1px dashed var(--border-strong); border-radius: var(--r-lg);
}
.empty-state .icon { font-size: 56px; opacity: 0.55; margin-bottom: 12px; }
.empty-state h3 { font-size: 17px; margin-bottom: 6px; }
.empty-state p { color: var(--text-muted); font-size: 13.5px; max-width: 380px; margin: 0 auto; }

/* ============ Auth Pages ============ */
.auth-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 22px;
}
.auth-box {
    width: 100%; max-width: 400px;
    background: var(--bg-card);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-xl);
    padding: 36px 30px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}
.auth-box h1 { font-size: 22px; margin-top: 8px; }
.auth-box .subtitle { font-size: 13px; margin-top: 4px; margin-bottom: 22px; color: var(--text-muted); }
.auth-box form { text-align: left; }
.auth-icon {
    width: 64px; height: 64px; border-radius: 18px;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 30px; box-shadow: 0 12px 32px var(--accent-glow);
    margin: 0 auto;
}

/* ============ Mobile Adjustments ============ */
@media (max-width: 700px) {
    .topbar-inner { padding: 8px 12px; flex-wrap: wrap; }
    .topbar-nav { margin-left: 0; width: 100%; order: 3; overflow-x: auto; }
    .topbar-nav .nav-link { font-size: 13px; padding: 7px 11px; white-space: nowrap; }
    .main { padding: 18px 14px 40px; }
    .user-name { display: none; }
    .page-header { flex-direction: column; align-items: stretch; }
    th { padding: 10px 12px; font-size: 10.5px; }
    td { padding: 10px 12px; font-size: 12.5px; }
    .modal { padding: 22px; max-width: calc(100vw - 16px); border-radius: 16px; }
    .modal-backdrop { padding: 8px; }
}

/* ============ Print ============ */
@media print {
    body::before, body::after { display: none; }
    body { background: white; color: #000; }
    .no-print, .topbar, .theme-toggle { display: none !important; }
    .card, .table-wrap, .modal { background: white; border-color: #ddd; backdrop-filter: none; box-shadow: none; }
}
