/* ================================================================
   Buchungssystem — Stylesheet
   TC Schwarz-Weiß Golkrath e.V.
   Farbschema: Schwarz / Weiß / Grau
   ================================================================ */

/* ── Variablen ─────────────────────────────────────────── */
:root {
    --bg-body:       #0a0a0a;
    --bg-card:       #141414;
    --bg-input:      #1a1a1a;
    --bg-slot:       #181818;
    --text:          #ffffff;
    --text-secondary:#b0b0b0;
    --text-muted:    #666666;
    --accent:        #ffffff;
    --accent-hover:  #cccccc;
    --border:        #2a2a2a;
    --border-light:  #333333;
    --success:       #22c55e;
    --success-dim:   #14532d;
    --danger:        #ef4444;
    --danger-dim:    #7f1d1d;
    --own:           #3b82f6;
    --own-dim:       #1e3a5f;
    --radius:        8px;
    --radius-lg:     12px;
    --header-h:      60px;
    --transition:    0.2s ease;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-body);
    color: var(--text);
    line-height: 1.5;
    height: 100%;
    overflow-x: hidden;
    scrollbar-width: none;            /* Firefox */
    -ms-overflow-style: none;         /* IE/Edge */
}
body::-webkit-scrollbar {
    display: none;                    /* Chrome/Safari/Opera */
}

/* ── Typografie ────────────────────────────────────────── */
h1 { font-size: 1.4rem; font-weight: 700; }
h2 { font-size: 1.2rem; font-weight: 600; }
h3 { font-size: 1rem;   font-weight: 600; }

a { color: var(--accent); text-decoration: none; }

/* ── Buttons ───────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn:hover { background: var(--border-light); }

.btn-primary {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}
.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-light);
    color: var(--text-secondary);
}
.btn-outline:hover { background: var(--bg-input); color: var(--text); }

.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-admin { border-color: var(--own); color: var(--own); }

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition);
}
.btn-icon:hover { background: var(--border-light); }

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}
.btn-close:hover { color: var(--text); }

/* ── Formulare ─────────────────────────────────────────── */
.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
    font-weight: 500;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    font-size: 0.9rem;
    color: var(--text);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    transition: border-color var(--transition);
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* ── Auth-Ansicht ──────────────────────────────────────── */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}
.auth-header h1 {
    font-size: 1.2rem;
    letter-spacing: 0.02em;
}
.auth-header p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}
.auth-tab {
    flex: 1;
    padding: 0.6rem;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
}
.auth-tab.active {
    color: var(--text);
    border-bottom-color: var(--accent);
}

.auth-form .btn { margin-top: 0.5rem; }

/* ── Social Auth Buttons ───────────────────────────────── */
.social-auth {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1rem;
}
.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid var(--border-light);
}
.btn-google {
    background: #ffffff;
    color: #3c4043;
}
.btn-google:hover {
    background: #f1f3f4;
}
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── Main View Layout ──────────────────────────────────── */
#mainView {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}
/* Auth view darf scrollen */
.auth-wrapper { overflow-y: auto; }
/* ── App-Header ────────────────────────────────────────── */
.app-header {
    z-index: 100;
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: var(--bg-body);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-shrink: 0;
}

.header-left { display: flex; align-items: center; gap: 0.5rem; }
.header-left h1 { font-size: 1.1rem; }
.back-btn { text-decoration: none; white-space: nowrap; }

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.user-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-right: 0.25rem;
}

/* ── Datum-Navigation ──────────────────────────────────── */
.date-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-body);
    flex-shrink: 0;
}

.date-display {
    position: relative;
    text-align: center;
    min-width: 200px;
    cursor: pointer;
}
.date-display span {
    font-weight: 600;
    font-size: 0.95rem;
}
.date-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

/* ── Platz-Tabs (Mobile) ──────────────────────────────── */
.court-tabs {
    display: none;
    padding: 0 1rem 0.5rem;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ── 14-Tage-Kalenderleiste ───────────────────────────── */
.cal-strip {
    display: flex;
    gap: 4px;
    padding: 0 1rem 0.75rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-shrink: 0;
}
.cal-strip::-webkit-scrollbar { display: none; }

.cal-day {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 52px;
    padding: 0.4rem 0.2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    cursor: pointer;
    transition: all var(--transition);
    gap: 2px;
}
.cal-day:hover {
    background: var(--border-light);
    border-color: var(--border-light);
}
.cal-day.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}
.cal-day.today {
    border-color: var(--own);
}
.cal-day-name {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    opacity: 0.7;
}
.cal-day.active .cal-day-name { opacity: 1; }
.cal-day-num {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}
.cal-day-month {
    font-size: 0.55rem;
    opacity: 0.6;
}
.court-tab {
    flex: 1;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}
.court-tab.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

/* ── Buchungsraster ────────────────────────────────────── */
.grid-wrapper {
    padding: 0 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 1 0;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.grid-wrapper::-webkit-scrollbar {
    display: none;
}

.booking-grid {
    display: grid;
    gap: 3px;
    min-width: 500px;
}

.grid-header {
    padding: 0.6rem 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 80;
}

.grid-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-card);
}
.grid-time .time-end {
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--text-muted);
}

/* ── Slot-Zellen ───────────────────────────────────────── */
.grid-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.3rem;
    min-height: 42px;
    font-size: 0.75rem;
    text-align: center;
    border-radius: 4px;
    transition: all var(--transition);
    position: relative;
}

/* Frei */
.grid-slot.free {
    background: transparent;
    border: 1px solid var(--success);
    color: var(--success);
    cursor: pointer;
    font-weight: 500;
}
.grid-slot.free:hover {
    background: var(--success-dim);
    border-color: var(--success);
    transform: scale(1.02);
}

/* Belegt */
.grid-slot.booked {
    background: #2d1a00;
    border: 1px solid #d97706;
    color: #fbbf24;
}
.slot-name {
    font-size: 0.72rem;
    line-height: 1.3;
}

/* Eigene Buchung */
.grid-slot.own {
    background: var(--own-dim);
    border: 1px solid var(--own);
    color: #93c5fd;
}
.grid-slot.own .slot-name {
    font-weight: 600;
    color: #93c5fd;
}

/* Vergangen */
.grid-slot.past {
    background: var(--bg-body);
    color: var(--text-muted);
    opacity: 0.4;
}

/* Gesperrt */
.grid-slot.blocked {
    background: var(--danger-dim);
    border: 1px solid var(--danger);
    color: var(--danger);
}
.grid-slot.blocked .slot-name {
    font-size: 0.65rem;
    font-weight: 600;
}

/* Stornieren-Button im Slot */
.btn-cancel {
    margin-top: 0.15rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.6rem;
    font-weight: 500;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 4px;
    color: var(--danger);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn-cancel:hover {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

/* ── Legende ───────────────────────────────────────────── */
.legend {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}
.legend-dot.free   { background: rgba(34,197,94,0.1);  border: 1.5px dashed rgba(34,197,94,0.5); }
.legend-dot.own    { background: rgba(59,130,246,0.15); border: 1.5px solid rgba(59,130,246,0.5); }
.legend-dot.booked { background: rgba(217,119,6,0.12);  border: 1px solid rgba(217,119,6,0.4); }
.legend-dot.blocked{ background: rgba(239,68,68,0.08);  border: 1px solid rgba(239,68,68,0.3); }
.legend-dot.past   { background: var(--bg-body);        border: 1px solid var(--border); opacity: 0.4; }

/* ── Info-Bar ──────────────────────────────────────────── */
.info-bar {
    text-align: center;
    padding: 0.25rem 1rem 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ── Legal Footer ──────────────────────────────────────── */
.legal-footer {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 0.25rem 1rem 0.75rem;
    flex-shrink: 0;
}
.legal-link {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.8rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: all var(--transition);
}
.legal-link:hover {
    color: var(--text);
    border-color: var(--border-light);
    background: var(--bg-card);
}

/* ── Seitenpanels ──────────────────────────────────────── */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.side-panel {
    position: fixed;
    top: 0;
    right: -520px;
    width: 380px;
    max-width: 95vw;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    z-index: 300;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    overflow: hidden;
}
.side-panel.open { right: 0; }
.side-panel.panel-wide { width: 500px; }

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
    -webkit-overflow-scrolling: touch;
}

.panel-form .form-group { margin-bottom: 1rem; }
.panel-form .btn { margin-top: 0.5rem; }

/* ── Meine Buchungen ───────────────────────────────────── */
.my-booking-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
}
.my-booking-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.my-booking-date {
    font-weight: 600;
    font-size: 0.85rem;
}
.my-booking-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.my-booking-court {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.empty-msg {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 0;
    font-size: 0.9rem;
}

/* ── Admin-Panel ───────────────────────────────────────── */
.admin-user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    gap: 0.75rem;
}
.admin-user-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
.admin-user-name {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-user-email {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-user-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.2rem;
}
.badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge-admin  { background: var(--own-dim); color: var(--own); border: 1px solid var(--own); }
.badge-member { background: var(--bg-body); color: var(--text-muted); border: 1px solid var(--border); }
.badge-active   { background: var(--success-dim); color: var(--success); border: 1px solid var(--success); }
.badge-inactive { background: var(--danger-dim);  color: var(--danger);  border: 1px solid var(--danger); }

.admin-user-actions {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}
.admin-user-actions .btn-sm {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

/* ── Admin-Tabs ────────────────────────────────────────── */
.admin-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.admin-tab {
    flex: 1;
    padding: 0.6rem;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
}
.admin-tab.active {
    color: var(--text);
    border-bottom-color: var(--accent);
}

/* ── Sperrzeiten-Liste ─────────────────────────────────── */
.blocked-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    gap: 0.75rem;
}
.blocked-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
.blocked-reason {
    font-weight: 600;
    font-size: 0.85rem;
    color: #f59e0b;
}
.blocked-detail {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── Toast-Benachrichtigungen ──────────────────────────── */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}
.toast {
    padding: 0.7rem 1.2rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: auto;
    max-width: 350px;
}
.toast.show {
    transform: translateX(0);
    opacity: 1;
}
.toast-success { background: var(--success-dim); color: var(--success); border: 1px solid var(--success); }
.toast-error   { background: var(--danger-dim);  color: var(--danger);  border: 1px solid var(--danger); }
.toast-info    { background: var(--bg-card);     color: var(--text);    border: 1px solid var(--border); }

/* ── Loading ───────────────────────────────────────────── */
.loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: var(--accent);
    z-index: 999;
    transition: width 0.3s ease;
}

/* ── Mobile Header & Menu ──────────────────────────────── */
.mobile-header-right {
    display: none;          /* Desktop: versteckt */
    align-items: center;
    gap: 0.5rem;
}
.mobile-user {
    font-size: 0.8rem;
    color: var(--text-secondary);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mobile-menu-btn {
    font-size: 1.4rem;
    width: 40px;
    height: 40px;
}
.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    min-width: 200px;
    z-index: 150;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    flex-direction: column;
    overflow: hidden;
}
.mobile-menu.open {
    display: flex;
}
.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: background var(--transition);
}
.mobile-menu-item:last-child { border-bottom: none; }
.mobile-menu-item:hover,
.mobile-menu-item:active { background: var(--bg-input); }
.mobile-menu-logout { color: var(--danger); }
.mobile-admin-item { color: var(--own); }

/* ── Court-Tab Innenlayout ─────────────────────────────── */
.court-tab-name { display: block; }
.court-tab-free {
    display: block;
    font-size: 0.65rem;
    font-weight: 400;
    opacity: 0.7;
    margin-top: 1px;
}
.court-tab.active .court-tab-free { opacity: 1; }

/* ── Vergangene Slots Toggle ──────────────────────────── */
.past-toggle-row {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: all var(--transition);
    user-select: none;
}
.past-toggle-row:hover {
    background: var(--bg-input);
    color: var(--text-secondary);
}

/* ── Jetzt-Markierung ──────────────────────────────────── */
.grid-time-now {
    border-left: 3px solid var(--success);
    background: var(--success-dim);
    border-radius: 4px 0 0 4px;
}

/* ── Vorschlaege ───────────────────────────────────────── */
.suggestions-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    overflow-x: auto;
    scrollbar-width: none;
    flex-shrink: 0;
}
.suggestions-bar::-webkit-scrollbar { display: none; }

.suggestions-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.suggestion-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    background: var(--success-dim);
    border: 1px solid #1a3d1a;
    border-radius: 20px;
    color: var(--success);
    cursor: pointer;
    transition: all var(--transition);
    flex-shrink: 0;
}
.suggestion-chip:hover {
    background: #1a4d1a;
    border-color: var(--success);
    transform: scale(1.03);
}

/* ── Dauer-Auswahl Modal ────────────────────────────── */
.duration-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.duration-modal.show {
    opacity: 1;
    pointer-events: auto;
}
.duration-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    width: 320px;
    max-width: 90vw;
    transform: scale(0.9);
    transition: transform 0.2s ease;
}
.duration-modal.show .duration-card {
    transform: scale(1);
}
.duration-header {
    text-align: center;
    margin-bottom: 1rem;
}
.duration-title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}
.duration-header-info {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.duration-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.duration-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
}
.duration-btn:hover {
    background: var(--success-dim);
    border-color: var(--success);
}
.duration-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}
.duration-label {
    font-weight: 600;
}
.duration-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
    html { font-size: 14px; }

    .app-header {
        position: relative;
        flex-direction: row;
        flex-wrap: nowrap;
        padding: 0.5rem 0.75rem;
        min-height: 48px;
    }
    .header-left h1 { font-size: 0.95rem; }
    .header-right { display: none; }
    .mobile-header-right { display: inline-flex; }

    .court-tabs {
        display: flex;
    }
    .court-tab {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }

    /* Touch-freundlichere Slots */
    .grid-slot {
        min-height: 50px;
        font-size: 0.8rem;
        padding: 0.45rem;
    }
    .grid-slot.free {
        font-weight: 600;
    }
    .grid-slot.free::before {
        font-size: 1.2rem;
    }

    .grid-wrapper { padding: 0 0.5rem; }
    .booking-grid { min-width: unset; }

    .legend { gap: 0.6rem; padding: 0.5rem 0.5rem; }
    .legend-item { font-size: 0.7rem; }
    .info-bar { font-size: 0.65rem; padding: 0.2rem 0.5rem 0.5rem; }

    .date-nav { padding: 0.5rem; gap: 0.35rem; }
    .date-display { min-width: 160px; }
    .date-display span { font-size: 0.85rem; }

    .side-panel { width: 100vw; max-width: 100vw; }
    .side-panel.panel-wide { width: 100vw; }

    .admin-user-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .admin-user-actions {
        width: 100%;
        margin-top: 0.5rem;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .date-nav { padding: 0.5rem 0.25rem; }
    .date-display { min-width: 140px; }

    .form-row {
        grid-template-columns: 1fr;
    }

    .auth-card { padding: 1.5rem; }
}
