:root {
    --bg: #f5f6fa;
    --topbar:#A94347;
    --panel-menu:#A94347;
    --surface: #ffffff;
    --border: #dde1ea;
    --primary: #d41514;
    --primary-hover: #d41514;
    --secondary: #d41514;
    --secondary-hover: #d41514;
    --danger: #dc2626;
    --warning-bg: #fff7ed;
    --warning-border: #f97316;
    --error-bg: #fef2f2;
    --error-border: #dc2626;
    --success-bg: #f0fdf4;
    --success-border: #16a34a;
    --info-bg: #eff6ff;
    --info-border: #3b82f6;
    --text: #000000;
    --muted: #333333;
    --cell-free: #f8fafc;
    --cell-valid: #dcfce7;
    --cell-conflict: #fee2e2;
    --cell-warning: #fff7ed;
    --cell-setup: #e0e7ff;
    --cell-floodlight: #fef9c3;
    --cell-blocked: #f1f5f9;
    --cell-locked: #f0fdf4;
    --table-header: #000000;
    --table-text: #000000;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.layout { display: flex; min-height: 100vh; }
.sidebar { display: none; }
.sidebar-logo { padding: 20px 16px 12px; font-size: 15px; font-weight: 700; color: #fff; border-bottom: 1px solid #334155; }
.sidebar-week { padding: 8px 16px; font-size: 12px; color: #94a3b8; border-bottom: 1px solid #334155; }
nav a { display: block; padding: 9px 16px; color: #cbd5e1; font-size: 13px; transition: background 0.15s; }
nav a:hover, nav a.active { background: #2563eb; color: #fff; text-decoration: none; }
.nav-section { padding: 10px 16px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #ffffff; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { background: var(--topbar); border-bottom: 1px solid var(--border); padding: 12px 24px; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 50; height: 49px; }
.topbar h1 { color: #fff; font-size: 17px; font-weight: 600; }
.content { padding: 24px; flex: 1; touch-action: pan-y; }
.plan-sticky-nav { position: sticky; top: 49px; z-index: 40; background: var(--bg); padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.plan-sticky-nav-scroll { position: static; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 20px; }
.card-header { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-header h2 { font-size: 15px; font-weight: 600; }
.card-body { padding: 20px; }

/* Plan day cards: sticky header + sticky table head, one day at a time */
.plan-day-card { position: relative; }
.plan-day-header { position: sticky; top: var(--plan-header-top, 49px); z-index: 30; background: var(--surface); }
.plan-day-card .plan-table thead th { position: sticky; z-index: 20; }
.plan-day-card .plan-table thead tr:nth-child(1) th { top: var(--plan-sticky-top, 96px); }
.plan-day-card .plan-table thead tr:nth-child(2) th { top: var(--plan-sticky-top-2, 123px); }
.hidden { display: none !important; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 6px; border: 1px solid transparent; font-size: 13px; cursor: pointer; font-weight: 500; text-decoration: none; transition: background 0.15s; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); text-decoration: none; color:#fff; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--secondary-hover); color:#fff; text-decoration: none;  opacity: 0.7}
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #b91c1c; text-decoration: none; color:#fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* Tables */
table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th, table.data-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; }
table.data-table th { background: var(--bg); font-weight: 600; font-size: 12px; color: var(--table-header); text-transform: uppercase; letter-spacing:.04em; }
table.data-table tr:hover td { background: #f8fafc; }

/* Sortable table headers */
.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.sortable:hover { background: #e8edf5; }
.sortable .sort-icon { color: var(--muted); font-size: 11px; margin-left: 3px; }
.sortable.sort-asc .sort-icon,
.sortable.sort-desc .sort-icon { color: var(--primary); }
.sortable.sort-asc .sort-icon::after  { content: '↑'; }
.sortable.sort-desc .sort-icon::after { content: '↓'; }

/* Forms */
.form-grid { display: grid; /* grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));*/ gap: 25px; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--text); text-transform: uppercase; letter-spacing:.04em; }
.form-group input, .form-group select, .form-group textarea {
    padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px;
    font-size: 13px; background: var(--surface); color: var(--text);
    transition: border-color 0.15s;
    /* width: 33%; */
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary);
}
.form-group textarea { resize: vertical; min-height: 70px; }
.form-check { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.form-check input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; }
.form-actions { margin-top: 18px; display: flex; gap: 10px; }

/* Flash */
.flash-list { margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.flash { padding: 10px 14px; border-radius: 6px; border: 1px solid; font-size: 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.flash.success { background: var(--success-bg); border-color: var(--success-border); color: #166534; }
.flash.error   { background: var(--error-bg);   border-color: var(--error-border);   color: #991b1b; }
.flash.warning { background: var(--warning-bg); border-color: var(--warning-border); color: #9a3412; }
.flash.info    { background: var(--info-bg);    border-color: var(--info-border);    color: #1e40af; }
.flash-action  { flex-shrink: 0; padding: 4px 10px; border-radius: 5px; border: 1px solid currentColor; font-size: 12px; font-weight: 600; text-decoration: none; color: inherit; white-space: nowrap; }
.flash-action:hover { background: rgba(0,0,0,.06); }

/* Badge */
.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.badge-green  { background: #ffffff; color: #166534; }
.badge-red    { background: #ffffff; color: #991b1b; }
.badge-orange { background: #ffffff; color: #9a3412; }
.badge-white  { background: #ffffff; color: #000000; }
.badge-gray   { background: #ffffff; color: #475569; }

/* Status dot */
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.dot-valid   { background: #16a34a; }
.dot-invalid { background: #dc2626; }
.dot-warning { background: #f97316; }
.dot-draft   { background: #94a3b8; }

/* Plan table */
.plan-table-wrap { overflow: visible; }
.plan-table { border-collapse: separate; border-spacing: 0; min-width: 600px; font-size: 12px; }
.plan-table th, .plan-table td { border-width: 0 1px 1px 0; border-style: solid; border-color: var(--border); padding: 0; min-width: 80px; vertical-align: top; }
.plan-table tr > th:first-child, .plan-table tr > td:first-child { border-left: 1px solid var(--border); }
.plan-table thead tr:first-child > th { border-top: 1px solid var(--border); }
.plan-table .time-col { width: 52px; min-width: 52px; }
.plan-table thead .time-col { background: var(--bg); }
.plan-table .time-label { padding: 3px 6px; color: var(--text); font-size: 11px; white-space: nowrap; background: var(--bg); text-align: right; }
.plan-table .field-header { padding: 6px 8px; background: #1e293b; color: #fff; text-align: center; font-size: 12px; font-weight: 600; }
.plan-table .subcol-header { padding: 4px 6px; background: var(--bg); text-align: center; font-size: 11px; color: var(--muted); width: 200px;}
.plan-table .slot-row.hour-mark .time-label,
.plan-table .slot-row.hour-mark td { border-top: 1px solid transparent; }
.plan-table .slot-row:not(.hour-mark) .time-label,
.plan-table .slot-row:not(.hour-mark) td { border-top: 1px solid transparent; }
.plan-table .slot-row.hour-mark .time-label { border-top-color: #94a3b8; font-weight: 700; color: var(--text); }
.plan-table .slot-row.hour-mark td { border-top-color: #94a3b8; }
.plan-table .slot-row.half-hour-mark .time-label { border-top-color: #94a3b8; }
.plan-table .slot-row:hover .time-label,
.plan-table .slot-row:hover td { border-top-color: var(--primary); }
.plan-table .cell-free { background: var(--cell-free); min-height: 18px; cursor: pointer; }
.plan-table .cell-free:hover { background: #e0f2fe; }
.plan-table .cell-blocked { background: var(--cell-blocked); text-align: center; color: var(--muted); font-size: 11px; }
.plan-table .cell-club-event { background: #fef3c7; border-left: 3px solid #f59e0b; padding: 3px 5px; cursor: pointer; vertical-align: top; }
.plan-table .cell-club-event:hover { filter: brightness(0.95); }
.plan-table .cell-assigned { background: var(--cell-valid); padding: 3px 5px; cursor: pointer; vertical-align: top; }
.plan-table .cell-assigned:hover { filter: brightness(0.95); }
.plan-table .cell-conflict-hard { background: var(--cell-conflict); }
.plan-table .cell-conflict-soft { background: var(--cell-warning); }
.plan-table .cell-setup { background: var(--cell-setup); opacity: 0.8; }
.plan-table .cell-floodlight { border-left: 3px solid #eab308; }
.plan-table .cell-locked { opacity: 0.7; }
.cell-team { display: block; font-weight: 600; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-meta { display: block; font-size: 10px; color: var(--muted); }

/* Gestapelte Doppelbelegung */
.cell-overlay-wrap { display: flex; flex-direction: column; height: 100%; width: 100%; }
.cell-overlay-slot { flex: 1; padding: 3px 5px; cursor: pointer; overflow: hidden; min-height: 0; }
.cell-overlay-slot:not(:last-child) { border-bottom: 2px solid rgba(0,0,0,0.25); }
.cell-overlay-slot:hover { filter: brightness(0.92); }
.cell-overlay-slot[draggable="true"] { cursor: grab; }

/* Feldanteil-Resize-Handle */
.cell-assigned { position: relative; }
.cell-club-event { position: relative; }
.cell-resize-handle {
    position: absolute; bottom: 3px; right: 3px;
    width: 12px; height: 12px;
    cursor: ew-resize;
    opacity: 0;
    transition: opacity 0.15s;
    background: transparent;
    border-right: 3px solid currentColor;
    border-bottom: 3px solid currentColor;
    border-radius: 0 0 2px 0;
}
.cell-assigned .cell-resize-handle { display: none; }
.cell-assigned[data-parts="2"] .cell-resize-handle,
.cell-assigned[data-parts="3"] .cell-resize-handle,
.cell-assigned[data-parts="4"] .cell-resize-handle { display: block; opacity: 0.35; }
.cell-assigned[data-parts="2"]:hover .cell-resize-handle,
.cell-assigned[data-parts="3"]:hover .cell-resize-handle,
.cell-assigned[data-parts="4"]:hover .cell-resize-handle { opacity: 0.7; }
.cell-club-event .cell-resize-handle { display: none; }
.cell-club-event[data-parts="2"] .cell-resize-handle,
.cell-club-event[data-parts="3"] .cell-resize-handle,
.cell-club-event[data-parts="4"] .cell-resize-handle { display: block; opacity: 0.35; }
.cell-club-event[data-parts="2"]:hover .cell-resize-handle,
.cell-club-event[data-parts="3"]:hover .cell-resize-handle,
.cell-club-event[data-parts="4"]:hover .cell-resize-handle { opacity: 0.7; }
.resize-ghost-col {
    background: rgba(0,0,0,0.12);
    outline: 2px dashed rgba(0,0,0,0.3);
}

/* Spieltag-Sperr-Blöcke */
.plan-table .cell-match-lock {
    padding: 2px 4px; vertical-align: top; text-align: left;
    border: 1px dashed #94a3b8; cursor: default;
}
.plan-table .cell-match-streuen {
    background: repeating-linear-gradient(135deg,#fef9c3,#fef9c3 4px,#fefce8 4px,#fefce8 10px);
    border-color: #ca8a04;
}
.plan-table .cell-match-aufbau {
    background: repeating-linear-gradient(135deg,#dbeafe,#dbeafe 4px,#eff6ff 4px,#eff6ff 10px);
    border-color: #3b82f6;
}
.plan-table .cell-match-aufwaermen {
    background: repeating-linear-gradient(135deg,#dcfce7,#dcfce7 4px,#f0fdf4 4px,#f0fdf4 10px);
    border-color: #16a34a;
}
.plan-table .cell-match-abbau {
    background: repeating-linear-gradient(135deg,#fce7f3,#fce7f3 4px,#fdf4ff 4px,#fdf4ff 10px);
    border-color: #a21caf;
}
.plan-table .cell-match-main {
    border-top: 3px solid #1e40af !important;
}
.cell-match-lock-label { display: block; font-size: 10px; font-weight: 700; color: #1e293b; line-height: 1.3; }
.cell-match-lock-nr    { display: block; font-size: 9px;  color: #475569; line-height: 1.2; }
.cell-match-lock-time  { display: block; font-size: 9px;  color: #64748b; line-height: 1.2; }
.cell-match-teams { display: block; font-weight: 700; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-match-change-warning { display: block; font-size: 10px; font-weight: 700; color: #b45309; background: #fef3c7; border-radius: 3px; padding: 1px 4px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Cell edit button (planning + overview) */
.cell-edit-btn {
    position: absolute; top: 3px; right: 3px; width: 20px; height: 20px;
    background: rgba(255,255,255,0.88); border: none; border-radius: 4px;
    font-size: 11px; cursor: pointer; z-index: 5;
    display: flex; align-items: center; justify-content: center;
    line-height: 1; padding: 0; color: #1e293b;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.cell-edit-btn:hover { background: #fff; }
.cell-delete-btn {
    position: absolute; bottom: 3px; right: 3px; width: 20px; height: 20px;
    background: rgba(255,255,255,0.88); border: none; border-radius: 4px;
    font-size: 13px; cursor: pointer; z-index: 5;
    display: flex; align-items: center; justify-content: center;
    line-height: 1; padding: 0; color: #dc2626;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.cell-delete-btn:hover { background: #fff; }

/* Drag & Drop (planning + overview) */
.cell-assigned.is-dragging  { opacity: 0.35; }
.cell-free.drop-target      { background: #eff6ff; cursor: copy; }
.cell-free.drag-over        { background: #bfdbfe !important; outline: 2px dashed #3b82f6; outline-offset: -2px; }
.cell-assigned.drop-target-self { outline: 2px dashed #3b82f6; outline-offset: -2px; }
.cell-assigned.drop-target-self.drag-over { outline-style: solid; outline-color: #1d4ed8; }
/* Klick+Zielauswahl (Alt+Klick) */
.cell-assigned.pick-source  { outline: 3px solid #f59e0b; outline-offset: -2px; cursor: crosshair; }
.cell-free.pick-target      { background: #d1fae5 !important; cursor: crosshair; }
.cell-assigned.pick-blocked { opacity: .35; pointer-events: none; }
/* Quittier-Icon */
.conflict-ack-icon          { cursor: pointer; font-size: 13px; line-height: 1; vertical-align: middle; display: inline-block; }
.conflict-ack-icon.conflict-unacked { color: inherit; }
.conflict-ack-icon.conflict-acked   { font-weight: 700; }
.conflict-ack-icon:hover    { opacity: .7; }

/* Day tabs */
.day-tabs { display: flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.day-tab { padding: 6px 14px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; cursor: pointer; text-decoration: none; color: var(--text); }
.day-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.day-tab:hover { text-decoration: none; background: var(--primary-hover); color: #fff; opacity: 0.7; }
.day-tab.active:hover { background: var(--primary-hover); }

/* Stats grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; }
.stat-card .stat-value { font-size: 26px; font-weight: 700; color: var(--primary); }
.stat-card .stat-label { font-size: 12px; color: var(--text); margin-top: 2px; }

/* Conflict list */
.conflict-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.conflict-item:last-child { border-bottom: none; }
.conflict-item .icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.conflict-item .details .type { font-weight: 600; font-size: 13px; }
.conflict-item .details .msg  { font-size: 12px; color: var(--text); margin-top: 2px; }
.conflict-item.conflict-acknowledged { opacity: .7; background: #f0fdf4; }

/* Modal */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: var(--surface); border-radius: 10px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 15px; font-weight: 600; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text); line-height: 1; text-decoration: none; }
.modal-body { padding: 20px; color: var(--text); }
.modal-body label { color: var(--text); }

.no-data { color: var(--muted); font-style: italic; padding: 16px 0; }
.text-muted { color: var(--text); opacity: 0.7; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }

/* Gesamtübersicht Legende */
.overview-legend { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.overview-legend-item { padding: 5px 12px; border-radius: 6px; font-size: 13px; color: #fff; display: flex; align-items: center; gap: 6px; }

/* Burger */
.burger-btn { background: none; border: none; cursor: pointer; color: var(--bg); padding: 4px; display: flex; align-items: center; border-radius: 6px; flex-shrink: 0; }
.burger-btn:hover { background: var(--bg); color: var(--text); }

/* Nav Drawer */
.nav-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 199; }
.nav-backdrop.open { display: block; }
.nav-drawer { position: fixed; top: 0; left: -290px; width: 260px; height: 100vh; background: var(--panel-menu); color: #e2e8f0; z-index: 200; transition: left .22s ease; overflow-y: auto; display: flex; flex-direction: column; }
.nav-drawer.open { left: 0; }
.nav-drawer .drawer-logo { padding: 18px 16px 12px; font-size: 15px; font-weight: 700; color: #fff; display: flex; justify-content: space-between; align-items: center; }
.nav-drawer .drawer-close { background: none; border: none; color: #ffffff; font-size: 20px; cursor: pointer; line-height: 1; padding: 0; }
.nav-drawer .drawer-close:hover { color: #fff; }
.nav-drawer .drawer-week { padding: 8px 16px; font-size: 12px; color: #ffffff; border-bottom: 1px solid #ffffff; }
.nav-drawer nav a { display: block; padding: 9px 16px; color: #ffffff; font-size: 13px; transition: background .15s; text-decoration: none; }
.nav-drawer nav a:hover, .nav-drawer nav a.active { background: #ffffff; color: #000000; }
.nav-drawer .nav-section { padding: 10px 16px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #ffffff; border-top: 1px solid #ffffff; }
.nav-drawer .admin-badge { display: inline-block; font-size: 10px; font-weight: 700; background: #f59e0b; color: #fff; border-radius: 3px; padding: 1px 5px; margin-left: 6px; vertical-align: middle; }
.nav-drawer .drawer-nav-login { font-size: 10px; opacity: 0.6; text-transform: none; letter-spacing: 0; margin-left: 4px; }
.nav-drawer .nav-link-btn { display: block; width: 100%; text-align: left; padding: 9px 16px; color: #ffffff; font-size: 13px; background: none; border: none; cursor: pointer; transition: background .15s; }
.nav-drawer .nav-link-btn:hover { background: #ffffff; color: #000000; }

/* History */
.btn-icon-ghost {
    background: none; border: none; cursor: pointer;
    padding: 2px 4px; border-radius: 4px;
    color: var(--muted); line-height: 1;
    display: inline-flex; align-items: center;
}
.btn-icon-ghost:hover { background: var(--border); color: var(--text); }

/* Team search combobox */
.team-search-wrap { position: relative; }
.team-search-wrap input[type=text] { width: 100%; }
.team-dropdown {
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 200;
    background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
    max-height: 220px; overflow-y: auto; margin-top: 2px;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.team-dropdown.open { display: block; }
.team-dropdown-item { padding: 7px 10px; font-size: 13px; cursor: pointer; }
.team-dropdown-item:hover, .team-dropdown-item.kbd-active { background: var(--bg); }
.team-dropdown-empty { padding: 8px 10px; font-size: 13px; color: #94a3b8; font-style: italic; }

@media (max-width: 768px) {
    .content { padding: 16px; }
}

/* ── Password toggle ─────────────────────────────────────────────────────── */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 36px; width: 100%; }
.pw-toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; padding: 4px;
    color: #94a3b8; display: flex; align-items: center; border-radius: 4px;
    line-height: 0;
}
.pw-toggle:hover { color: var(--text); }

/* ── Login page ──────────────────────────────────────────────────────────── */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--bg); }
.login-wrap  { width: 100%; max-width: 380px; padding: 16px; }
.login-card  { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 32px 28px; box-shadow: 0 4px 24px rgba(0,0,0,.08); }
.login-logo  { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; margin-bottom: 28px; color: var(--text); }
.login-form .form-group { margin-bottom: 14px; }
.login-flash { padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; }
.login-flash-error   { background: var(--error-bg);   border: 1px solid var(--error-border);   color: #991b1b; }
.login-flash-success { background: var(--success-bg); border: 1px solid var(--success-border); color: #166534; }

/* ── Auth — topbar user ──────────────────────────────────────────────────── */
.topbar-user { display: flex; align-items: center; gap: 6px; color: #fff; font-size: 13px; margin-left: auto; opacity: 0.9; }


/* ── Forced modal — no dismiss ───────────────────────────────────────────── */
.modal-forced { cursor: default; }
.modal-forced .modal-overlay-backdrop { pointer-events: none; }

/* ── btn-warning ─────────────────────────────────────────────────────────── */
.btn-warning { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.btn-warning:hover { background: #d97706; border-color: #d97706; }

/* ── badge-blue ──────────────────────────────────────────────────────────── */
.badge-blue { background: #dbeafe; color: #1e40af; }

/* ── Fast tooltip ────────────────────────────────────────────────────────── */
#fast-tooltip {
    position: fixed;
    z-index: 9999;
    background: #1e293b;
    color: #f1f5f9;
    font-size: 12px;
    line-height: 1.55;
    padding: 6px 10px;
    border-radius: 6px;
    max-width: 340px;
    white-space: pre-wrap;
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(0,0,0,.35);
    opacity: 0;
    transition: opacity 0.1s;
}
#fast-tooltip.ft-visible { opacity: 1; }

/* ── Admin-Impersonation ────────────────────────────────────────────────── */
.impersonation-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff8e1;
    border: 2px solid #ffc107;
    border-radius: 6px;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    flex-wrap: wrap;
}
.impersonation-banner-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.btn-impersonate-toggle {
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid #aaa;
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
}
.btn-impersonate-toggle.readonly {
    background: #f3f4f6;
    color: #374151;
}
.btn-impersonate-toggle.write {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}
.btn-impersonate-stop {
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid #fca5a5;
    background: #fee2e2;
    color: #991b1b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

/* ── Test-Runner ────────────────────────────────────────────────────────── */
.test-output {
    background: #0f172a;
    color: #e2e8f0;
    font-family: ui-monospace, 'Cascadia Code', monospace;
    font-size: 13px;
    line-height: 1.6;
    padding: 16px;
    border-radius: 0 0 6px 6px;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
}
.test-ok   { color: #4ade80; font-weight: 600; }
.test-fail { color: #f87171; font-weight: 600; }
.test-result-card {
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
}
.test-result-ok   { border: 1px solid #86efac; }
.test-result-fail { border: 1px solid #fca5a5; }
.test-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
.test-result-time {
    font-size: 12px;
    color: #6b7280;
    font-weight: 400;
}
.badge-red   { background: #fee2e2; color: #991b1b; }
.badge-green { background: #dcfce7; color: #166534; }

/* ── Listenansicht (geteilt: embed.php, team_calendar.php) ────────────────── */
.list-day { margin-bottom: 12px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }

.list-day-header {
    padding: 7px 12px; font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em;
    display: flex; align-items: center; gap: 8px;
}
.list-day-count {
    font-size: 11px; font-weight: 600; opacity: .75;
    background: rgba(0,0,0,.1); border-radius: 10px; padding: 1px 7px;
}

.list-empty { padding: 8px 12px; color: var(--muted); font-size: 12px; font-style: italic; }

.list-entries { display: flex; flex-direction: column; }

.list-entry {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 8px 12px; border-top: 1px solid var(--border);
    background: var(--surface);
}
.list-entry:hover { background: var(--bg); }
.list-entry-exception { background: #fffbeb; }
.list-entry-exception:hover { background: #fef3c7; }

.list-time {
    min-width: 42px; text-align: right; font-size: 12px;
    font-weight: 700; line-height: 1.4; padding-top: 1px;
    color: var(--text); flex-shrink: 0;
}

.list-info { flex: 1; min-width: 0; }
.list-team  { font-size: 13px; font-weight: 600; line-height: 1.3; }
.list-club  { font-weight: 400; color: var(--muted); font-size: 12px; margin: 0 6px; }
.list-age     { font-weight: 400; color: var(--muted); font-size: 12px; }
.list-trainer { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 5px; }
.list-trainer::before { content: '· '; }
.list-field { font-size: 12px; color: var(--muted); margin-top: 2px; }
