/* =============================================================================
   EVV 2000 — Admin Panel Shared Styles
   Look wie die Website ("Matchday Editorial"): Schwarz #06090f · Navy #101e38 · Blau #3b82f6
                Schrift: Barlow Condensed (Titel) · Barlow (Text)
   ============================================================================= */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --royal: #1e3a8a;
    --royal-light: #27479e;
    --navy: #0c1424;
    --navy-deep: #06090f;
    --card: #121c31;
    --card-hover: #18243e;
    --primary: #3b82f6;
    --primary-light: #60a5fa;
    --primary-dark: #2563eb;
    --accent: #22d3ee;
    --accent-dark: #06b6d4;
    --text: #dbe4f0;
    --text-muted: #8fa3bf;
    --border: rgba(255, 255, 255, 0.08);
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --info: #38bdf8;
    --sidebar-width: 260px;
    --radius: 12px;
    --radius-sm: 8px;
    --font-heading: 'Barlow Condensed', 'Barlow', sans-serif;
    --font-body: 'Barlow', system-ui, sans-serif;
}

body {
    font-family: var(--font-body);
    background: var(--navy);
    color: var(--text);
    min-height: 100vh;
    font-size: 15px;
}

h1, h2, h3, h4 { font-family: var(--font-heading); color: #fff; }
a { color: var(--primary-light); text-decoration: none; }
button { font-family: var(--font-body); }

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--navy-deep);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo { width: 40px; height: 40px; }
.sidebar-logo img { width: 100%; height: 100%; object-fit: contain; }

.sidebar-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
}

.sidebar-brand span {
    background: linear-gradient(90deg, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 0.75rem;
    display: block;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sidebar-nav { flex: 1; padding: 16px 0; overflow-y: auto; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item:hover { color: var(--text); background: rgba(255, 255, 255, 0.03); }

.nav-item.active {
    color: var(--accent);
    border-left-color: var(--accent);
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.08), transparent);
}

.nav-item i { width: 20px; text-align: center; font-size: 1rem; }

.nav-divider { height: 1px; background: var(--border); margin: 12px 20px; }

.sidebar-footer { padding: 16px 20px; border-top: 1px solid var(--border); }

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 0 4px;
}

.sidebar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--royal), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-user-info { min-width: 0; }
.sidebar-user-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-role { font-size: 0.7rem; color: var(--accent); }

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 16px;
    width: 100%;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.logout-btn:hover { background: rgba(239, 68, 68, 0.2); }

/* ── Mobile toggle / overlay ─────────────────────────────────────────────── */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 200;
    width: 40px;
    height: 40px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.sidebar-overlay.active { display: block; }

/* ── Main / Topbar / Content ─────────────────────────────────────────────── */
.main { margin-left: var(--sidebar-width); min-height: 100vh; }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 32px;
    border-bottom: 1px solid var(--border);
    background: var(--navy-deep);
    flex-wrap: wrap;
}

.topbar-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
}

.topbar-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.content { padding: 32px; }

/* ── Stat cards ──────────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 36px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.2s;
}

.stat-card:hover::after { opacity: 1; }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-icon.blue   { background: rgba(59, 130, 246, 0.15); color: var(--primary-light); }
.stat-icon.cyan   { background: rgba(34, 211, 238, 0.15); color: var(--accent); }
.stat-icon.green  { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.stat-icon.orange { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.stat-icon.red    { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

.stat-info h3 { font-size: 1.6rem; font-weight: 700; color: #fff; }
.stat-info p { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

/* ── Sections / Tables ───────────────────────────────────────────────────── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.section-title { font-size: 1.1rem; font-weight: 700; color: #fff; }

.section-link { color: var(--accent); text-decoration: none; font-size: 0.85rem; font-weight: 600; }
.section-link:hover { text-decoration: underline; }

.table-wrap {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
    margin-bottom: 32px;
}

.admin-table { width: 100%; border-collapse: collapse; }

.admin-table th {
    text-align: left;
    padding: 14px 20px;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    white-space: nowrap;
}

.admin-table td {
    padding: 14px 20px;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

.table-thumb {
    width: 52px;
    height: 38px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
    display: block;
}

.table-thumb-empty {
    width: 52px;
    height: 38px;
    border-radius: 6px;
    border: 1px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ── Tags & badges ───────────────────────────────────────────────────────── */
.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.tag-success { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.tag-info    { background: rgba(56, 189, 248, 0.15); color: var(--info); }
.tag-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.tag-danger  { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.tag-blue    { background: rgba(59, 130, 246, 0.15); color: var(--primary-light); }
.tag-cyan    { background: rgba(34, 211, 238, 0.15); color: var(--accent); }
.tag-royal   { background: rgba(30, 58, 138, 0.5); color: #b6c8f5; }
.tag-muted   { background: rgba(255, 255, 255, 0.07); color: var(--text-muted); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--royal) 0%, var(--primary) 100%);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--royal-light) 0%, var(--primary-light) 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border);
    color: var(--text);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

.btn-danger {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.btn-danger:hover { background: rgba(239, 68, 68, 0.22); }

.btn-sm { padding: 6px 12px; font-size: 0.78rem; }

.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 9px;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: all 0.2s;
    color: var(--text-muted);
}

.action-btn.edit { color: var(--accent); }
.action-btn.edit:hover { background: rgba(34, 211, 238, 0.1); }
.action-btn.delete { color: var(--danger); }
.action-btn.delete:hover { background: rgba(239, 68, 68, 0.1); }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-grid .full { grid-column: 1 / -1; }

.form-group { margin-bottom: 16px; text-align: left; }

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 7px;
    font-family: var(--font-heading);
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 11px 14px;
    background: var(--navy);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.92rem;
    font-family: var(--font-body);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-input::placeholder, .form-textarea::placeholder { color: #52607a; }

.form-select option { background: var(--navy); color: var(--text); }

.form-textarea { resize: vertical; min-height: 110px; }

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--text);
    cursor: pointer;
    user-select: none;
}

.form-check input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }

.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; }

/* ── Image upload ────────────────────────────────────────────────────────── */
.img-picker {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--navy);
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s;
}

.img-picker.dragover { border-color: var(--accent); }

.img-picker-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 28px 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    text-align: center;
}

.img-picker-empty i { font-size: 1.6rem; color: var(--primary-light); }

.img-picker-preview { position: relative; display: none; }
.img-picker-preview img { width: 100%; height: 180px; object-fit: cover; display: block; }

.img-picker-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
}

.img-picker-actions button {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background: rgba(8, 24, 46, 0.85);
    color: #fff;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.img-picker-actions button:hover { background: var(--danger); }

.img-picker-progress {
    position: absolute;
    inset: 0;
    background: rgba(8, 24, 46, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    color: var(--accent);
    font-size: 0.85rem;
}

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(4, 12, 24, 0.75);
    backdrop-filter: blur(4px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    z-index: 500;
    padding: 40px 16px;
    overflow-y: auto;
}

.modal.open { display: flex; }

.modal-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 640px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    animation: modalIn 0.22s ease;
}

.modal-box.modal-sm { max-width: 460px; }

@keyframes modalIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-head h3 { font-size: 1.05rem; }

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
}

.modal-close:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }

.modal-body { padding: 24px; }

.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

/* ── Toast ───────────────────────────────────────────────────────────────── */
.admin-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    background: var(--card);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 13px 18px;
    font-size: 0.88rem;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.3s;
    pointer-events: none;
    max-width: 90vw;
}

.admin-toast.show { opacity: 1; transform: translateY(0); }
.admin-toast.error { border-color: var(--danger); }
.admin-toast.success { border-color: var(--success); }

/* ── Loading overlay ─────────────────────────────────────────────────────── */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay .spinner,
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner.sm { width: 22px; height: 22px; border-width: 2px; }

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

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state i { font-size: 2rem; margin-bottom: 12px; opacity: 0.5; display: block; }

/* ── Segment switch (Kalender: Termine | Beach) ──────────────────────────── */
.segment {
    display: inline-flex;
    background: var(--navy-deep);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
    gap: 4px;
}

.segment button {
    border: none;
    background: transparent;
    color: var(--text-muted);
    padding: 8px 18px;
    border-radius: 7px;
    font-family: var(--font-heading);
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.segment button.active {
    background: linear-gradient(135deg, var(--royal), var(--primary));
    color: #fff;
    box-shadow: 0 3px 12px rgba(59, 130, 246, 0.3);
}

/* ── Monats-Kalender ─────────────────────────────────────────────────────── */
.cal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.cal-nav { display: flex; align-items: center; gap: 8px; }

.cal-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.cal-nav-btn:hover { border-color: var(--primary); color: var(--primary-light); }

.cal-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    min-width: 170px;
    text-align: center;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.cal-dow {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 6px 0;
}

.cal-day {
    min-height: 96px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px;
    position: relative;
    transition: border-color 0.15s;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
}

.cal-day.clickable { cursor: pointer; }
.cal-day.clickable:hover { border-color: var(--primary); }

.cal-day.other { opacity: 0.35; }

.cal-day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }

.cal-day-num {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 2px 4px;
}

.cal-day.today .cal-day-num { color: var(--accent); }

.cal-chip {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.cal-chip.spiel    { background: rgba(59, 130, 246, 0.18); color: #a8c7fa; border-left-color: var(--primary); }
.cal-chip.turnier  { background: rgba(34, 211, 238, 0.14); color: #9ae7f5; border-left-color: var(--accent); }
.cal-chip.event    { background: rgba(16, 185, 129, 0.15); color: #86e7c8; border-left-color: var(--success); }
.cal-chip.training { background: rgba(245, 158, 11, 0.14); color: #f8d193; border-left-color: var(--warning); }

.cal-more { font-size: 0.68rem; color: var(--text-muted); padding: 0 4px; cursor: pointer; }

/* ── Beach-Matrix ────────────────────────────────────────────────────────── */
.beach-matrix {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
}

.bm-grid { min-width: 640px; }

.bm-head {
    display: grid;
    grid-template-columns: 90px repeat(4, 1fr);
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.bm-head > div {
    padding: 12px 8px;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.bm-row {
    display: grid;
    grid-template-columns: 90px repeat(4, 1fr);
    border-bottom: 1px solid var(--border);
}

.bm-row:last-child { border-bottom: none; }

.bm-time {
    padding: 10px 8px;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bm-cell {
    margin: 4px;
    min-height: 44px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    font-size: 0.72rem;
    font-weight: 600;
    transition: all 0.15s;
    text-align: center;
    padding: 3px;
}

.bm-cell.free {
    background: rgba(16, 185, 129, 0.07);
    border: 1px dashed rgba(16, 185, 129, 0.3);
    color: var(--success);
    cursor: pointer;
}

.bm-cell.free:hover { background: rgba(16, 185, 129, 0.18); }

.bm-cell.busy {
    background: rgba(59, 130, 246, 0.14);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--primary-light);
}

.bm-cell.blocked {
    background: repeating-linear-gradient(45deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.1) 6px, rgba(245, 158, 11, 0.16) 6px, rgba(245, 158, 11, 0.16) 12px);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: var(--warning);
    cursor: pointer;
}

.bm-cell.past { background: rgba(255, 255, 255, 0.02); border: 1px solid transparent; color: #4a5a75; }

.bm-cell small { font-weight: 400; font-size: 0.65rem; opacity: 0.8; }

/* ── Filter-Pills ────────────────────────────────────────────────────────── */
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; }

.filter-pill {
    padding: 7px 15px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-pill:hover { border-color: var(--primary); color: var(--text); }

.filter-pill.active {
    background: linear-gradient(135deg, var(--royal), var(--primary));
    border-color: var(--primary);
    color: #fff;
}

/* ── Permissions-Checkboxen (Verwaltung) ─────────────────────────────────── */
.perm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.perm-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--navy);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.2s;
    font-size: 0.85rem;
    user-select: none;
}

.perm-item:hover { border-color: var(--primary); }
.perm-item input { accent-color: var(--primary); width: 15px; height: 15px; }
.perm-item i { color: var(--primary-light); width: 18px; text-align: center; }

/* ── Audit-Log ───────────────────────────────────────────────────────────── */
.log-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.8rem;
}

.log-action.create { color: var(--success); }
.log-action.update { color: var(--info); }
.log-action.delete { color: var(--danger); }
.log-action.login  { color: var(--text-muted); }

/* ── Zugriff verweigert ──────────────────────────────────────────────────── */
.no-access {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.no-access i { font-size: 3rem; color: var(--warning); margin-bottom: 16px; display: block; }
.no-access h2 { margin-bottom: 8px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-toggle { display: flex; }
    .main { margin-left: 0; }
    .topbar { padding: 20px 16px 20px 64px; }
    .content { padding: 20px 16px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .perm-grid { grid-template-columns: 1fr; }
    .cal-day { min-height: 64px; }
}

@media (max-width: 600px) {
    .stats-grid { grid-template-columns: 1fr; }
    .admin-table th, .admin-table td { padding: 10px 12px; font-size: 0.8rem; }
    .cal-grid { gap: 3px; }
    .cal-day { min-height: 52px; border-radius: 7px; }
    .cal-chip { font-size: 0.58rem; padding: 1px 4px; }
}

/* ── Kader-Editor (js/admin-roster.js) ───────────────────────────────────── */
.rp-list { display: flex; flex-direction: column; gap: 10px; }
.rp-row {
    display: grid;
    grid-template-columns: 20px auto minmax(0, 1fr) 36px;
    gap: 12px;
    align-items: center;
    padding: 10px 12px 10px 8px;
    background: var(--navy);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.rp-row.is-staff { border-color: rgba(34, 211, 238, 0.28); }
.rp-handle { color: var(--text-muted); cursor: grab; text-align: center; opacity: 0.6; }
.rp-handle:hover { opacity: 1; color: var(--accent); }
.rp-handle:active { cursor: grabbing; }
.rp-photos { display: flex; gap: 8px; align-items: center; }
.rp-tile {
    position: relative;
    width: 72px; height: 90px;
    border-radius: 8px;
    border: 2px dashed rgba(255, 255, 255, 0.18);
    background: var(--navy-deep);
    cursor: pointer;
    overflow: hidden;
    flex: none;
    transition: border-color 0.2s, transform 0.15s;
}
.rp-tile--alt { width: 56px; height: 70px; }
.rp-tile:hover, .rp-tile.dragover { border-color: var(--accent); }
.rp-tile.dragover { transform: scale(1.04); }
.rp-tile.has-img { border-style: solid; border-color: transparent; }
.rp-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; display: block; }
.rp-tile-ph {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    color: var(--text-muted); font-size: 0.68rem; letter-spacing: 0.3px;
}
.rp-tile-ph i { font-size: 1.05rem; color: var(--primary-light); }
.rp-tile.has-img .rp-tile-ph { opacity: 0; background: rgba(8, 24, 46, 0.72); color: #fff; transition: opacity 0.15s; }
.rp-tile.has-img .rp-tile-ph i { color: #fff; }
.rp-tile.has-img:hover .rp-tile-ph { opacity: 1; }
.rp-tile-busy { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(8, 24, 46, 0.82); }
.rp-tile.is-uploading .rp-tile-busy { display: flex; }
.rp-tile-x {
    position: absolute; top: 3px; right: 3px;
    width: 20px; height: 20px; border-radius: 6px; border: none;
    background: rgba(8, 24, 46, 0.85); color: #fff; font-size: 0.6rem; cursor: pointer; display: none;
}
.rp-tile.has-img:hover .rp-tile-x { display: block; }
.rp-tile-x:hover { background: var(--danger); }
.rp-fields { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr) 72px; gap: 8px; align-items: start; }
.rp-fields .form-input, .rp-fields .form-select { padding: 9px 10px; font-size: 0.9rem; }
.rp-role-wrap { display: grid; gap: 6px; }
.rp-del {
    width: 36px; height: 36px; border-radius: 8px;
    border: 1px solid var(--border); background: transparent; color: var(--text-muted);
    cursor: pointer; transition: all 0.15s;
}
.rp-del:hover { color: #fff; background: var(--danger); border-color: var(--danger); }
.rp-empty { padding: 22px; text-align: center; color: var(--text-muted); border: 1px dashed var(--border); border-radius: var(--radius-sm); font-size: 0.88rem; }
.rp-empty i { margin-right: 6px; color: var(--primary-light); }
.rp-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.rp-count { margin-left: auto; color: var(--text-muted); font-size: 0.82rem; }
.rp-paste { margin-top: 10px; display: grid; gap: 8px; }
.rp-paste-actions { display: flex; gap: 8px; }
.rp-hint { margin-top: 10px; }
.rp-hint i { color: var(--accent); margin-right: 4px; }
@media (max-width: 640px) {
    .rp-row { grid-template-columns: 16px auto minmax(0, 1fr) 32px; row-gap: 8px; padding: 10px; }
    .rp-fields { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) 64px; }
    .rp-fields .rp-name { grid-column: 1 / -1; }
    .rp-del { width: 32px; height: 32px; }
}

/* ── WISO MeinVerein (Hinweisleiste + Dashboard-Karte) ────────────────────── */
.mv-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 14px; background: rgba(59, 130, 246, 0.08); border: 1px solid rgba(59, 130, 246, 0.28); border-radius: var(--radius-sm); font-size: 0.86rem; color: var(--text); }
.mv-bar-text i { color: var(--primary-light); margin-right: 4px; }
.mv-bar-text em { font-style: normal; color: var(--text-muted); }
.mv-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mv-card { display: flex; justify-content: space-between; align-items: center; gap: 16px 28px; flex-wrap: wrap; padding: 20px 22px; margin-bottom: 30px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.mv-card-text p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.55; max-width: 680px; }
.mv-card-text strong { color: #fff; }
.mv-card-text em { font-style: normal; color: var(--text); }
.mv-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Kalender: Filter, Tagesliste, Listenansicht ─────────────────────────── */
.cal-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
.cal-filters .form-select, .cal-filters .form-input { width: auto; min-width: 170px; padding: 8px 12px; font-size: 0.85rem; }
.cal-filters #viewSeg { margin-left: auto; }
.cal-day.selected { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; background: rgba(59, 130, 246, 0.08); }
.cal-chip.is-h1 { background: var(--primary) !important; color: #fff !important; }
.day-panel { margin-top: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.day-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.day-panel-head h3 { font-size: 1.1rem; }
.ev-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid transparent; }
.ev-row + .ev-row { margin-top: 6px; }
.ev-row:hover { background: rgba(255, 255, 255, 0.03); border-color: var(--border); }
.ev-row.is-h1 { border-color: rgba(59, 130, 246, 0.45); background: rgba(59, 130, 246, 0.08); }
.ev-row.is-draft { opacity: 0.6; }
.ev-row.is-tournament { border-color: rgba(34, 211, 238, 0.35); }
.ev-time b { display: block; font-family: var(--font-heading); font-weight: 700; color: #fff; }
.ev-time span { display: block; font-size: 0.78rem; color: var(--text-muted); }
.ev-title { color: #fff; font-weight: 600; }
.ev-meta { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.ev-actions { display: flex; gap: 6px; align-items: center; }
.list-period { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; font-size: 0.85rem; color: var(--text-muted); }
.list-period label { display: flex; gap: 8px; align-items: center; }
.list-period .form-input { width: auto; padding: 7px 10px; }
.list-count { margin-left: auto; }
.admin-table tr.is-h1 td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
@media (max-width: 640px) { .ev-row { grid-template-columns: 1fr; gap: 6px; } .cal-filters #viewSeg { margin-left: 0; } }

/* ── Zuschneide-Fenster ──────────────────────────────────────────────────── */
.modal-box.crop-box { max-width: 860px; }
.crop-presets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.crop-preset { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); cursor: pointer; font-family: var(--font-heading); font-weight: 600; font-size: 0.82rem; letter-spacing: 0.04em; }
.crop-preset:hover { color: #fff; border-color: var(--primary); }
.crop-preset.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.crop-stage-wrap { display: flex; justify-content: center; background: #05080f; border-radius: var(--radius-sm); padding: 12px; }
.crop-stage { position: relative; overflow: hidden; background: #000; cursor: grab; touch-action: none; user-select: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25); }
.crop-stage:active { cursor: grabbing; }
.crop-stage img { position: absolute; left: 0; top: 0; transform-origin: 0 0; max-width: none; pointer-events: none; }
.crop-tools { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--text-muted); flex-wrap: wrap; }
.crop-tools input[type=range] { flex: 1; min-width: 140px; max-width: 280px; accent-color: var(--primary); }
.crop-hint { font-size: 0.78rem; margin-left: auto; }
