/* =============================================
   Renault Trainer — Design System
   ============================================= */

:root {
    /* Pylon Cosmo Theme — Primary #2780e3 */
    --primary:        #2780e3;
    --primary-hover:  #1a6cc7;
    --primary-light:  #ddeeff;
    --primary-muted:  rgba(39, 128, 227, 0.12);

    --white:     #ffffff;
    --gray-50:   #f0f0f0;
    --gray-100:  #f1f5f9;
    --gray-200:  #e2e8f0;
    --gray-300:  #cbd5e1;
    --gray-400:  #94a3b8;
    --gray-500:  #64748b;
    --gray-600:  #475569;
    --gray-700:  #334155;
    --gray-800:  #1e293b;
    --gray-900:  #0f172a;

    --success:       #3fb618;
    --success-light: #d4f7c0;
    --warning:       #ff7518;
    --warning-light: #ffe8d0;
    --danger:        #ff0039;
    --danger-light:  #ffd0db;
    --info:          #9954bb;
    --info-light:    #eedff7;

    --sidebar-width:  240px;
    --header-height:  60px;
    --radius:         10px;
    --radius-sm:      6px;
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow:     0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg:  0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: #f0f0f0;
    color: var(--gray-800);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--gray-900);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.25s ease;
    overflow: hidden;
}

.sidebar-header {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--white);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.sidebar-logo-icon {
    width: 34px;
    height: 34px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.875rem 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.sidebar-nav ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-nav li a,
.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.875rem;
    border-radius: var(--radius-sm);
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
}

.sidebar-nav li a i,
.sidebar-footer a i {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: color 0.15s;
}

.sidebar-nav li a:hover,
.sidebar-footer a:hover {
    background: rgba(255,255,255,0.07);
    color: var(--white);
}

.sidebar-nav li a.active {
    background: var(--primary-muted);
    color: #a5b4fc;
}

.sidebar-nav li a.active i {
    color: #818cf8;
}

.sidebar-section-title {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-600);
    padding: 0.75rem 0.875rem 0.25rem;
}

.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}

/* =============================================
   MAIN WRAPPER
   ============================================= */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.25s ease;
}

/* =============================================
   TOP HEADER
   ============================================= */
.top-header {
    height: var(--header-height);
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 1.05rem;
    padding: 0.375rem 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    display: none;
    line-height: 1;
}

.sidebar-toggle:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.8rem;
}

/* =============================================
   PAGE CONTENT
   ============================================= */
.page-content {
    flex: 1;
    padding: 1.75rem 2rem 3rem;
}

.page-header {
    margin-bottom: 1.75rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 0.2rem;
    line-height: 1.2;
}

.page-subtitle {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin: 0;
}

/* =============================================
   STAT CARDS
   ============================================= */
.stat-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.stat-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    border-color: var(--primary);
    color: inherit;
    text-decoration: none;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-icon.blue   { background: var(--info-light);    color: var(--info); }
.stat-icon.green  { background: var(--success-light); color: var(--success); }
.stat-icon.amber  { background: var(--warning-light); color: var(--warning); }
.stat-icon.indigo { background: var(--primary-light); color: var(--primary); }
.stat-icon.red    { background: var(--danger-light);  color: var(--danger); }

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.1rem;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.1;
}

/* =============================================
   CARDS
   ============================================= */
.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--gray-100);
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    padding: 1.25rem;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    line-height: 1.5;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(79,70,229,0.25);
}

.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* =============================================
   TABLES
   ============================================= */
.table {
    font-size: 0.875rem;
    margin-bottom: 0;
}

.table thead th {
    background: var(--gray-50);
    color: var(--gray-500);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--gray-200);
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: var(--gray-50);
    cursor: pointer;
}

/* =============================================
   FORMS
   ============================================= */
.form-control, .form-select {
    border-color: var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-muted);
}

.form-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}

/* =============================================
   MODALS
   ============================================= */
.modal-content {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--gray-100);
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 700;
    color: var(--gray-900);
    font-size: 1rem;
}

.modal-body { padding: 1.5rem; }

.modal-footer {
    border-top: 1px solid var(--gray-100);
    padding: 1rem 1.5rem;
}

/* =============================================
   CALENDAR (legacy — kept for compatibility)
   ============================================= */
.calendar-day {
    min-height: 110px;
    border: 1px solid var(--gray-200);
    padding: 0.5rem;
    background: var(--white);
    transition: background 0.1s;
}
.calendar-day:hover { background: var(--gray-50); }
.calendar-day-header {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-bottom: 0.4rem;
}
.calendar-event {
    font-size: 0.72rem;
    padding: 0.2rem 0.5rem;
    margin-bottom: 0.2rem;
    border-radius: 4px;
    background: var(--primary-light);
    border-left: 3px solid var(--primary);
    color: var(--gray-700);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}
.empty-day { background: var(--gray-50); opacity: 0.55; }

/* =============================================
   DUAL-VIEW CALENDAR
   ============================================= */

/* Section dividers */
.dual-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
}

/* ── Weekday header ── */
.cal-weekday-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray-400);
    padding: 0.5rem 0 0.3rem;
    border-bottom: 1px solid var(--gray-100);
    text-align: center;
}
.cal-weekday-header .cal-weekend-hdr { color: var(--gray-300); }

/* ── Day detail popover ── */
.cal-day-detail {
    position: fixed;
    z-index: 9999;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0.875rem 1rem;
    min-width: 200px;
    max-width: 280px;
    font-size: 0.82rem;
}

/* =============================================
   GANTT VIEW
   ============================================= */
.gantt-header-row {
    display: flex;
    margin-bottom: 3px;
}
.gantt-row {
    display: flex;
    margin-bottom: 3px;
}
.gantt-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gray-700);
    padding: 3px 8px 3px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.gantt-day-hdr {
    font-size: 0.58rem;
    color: var(--gray-400);
    line-height: 1;
    padding: 1px 0;
    pointer-events: none;
}
.gantt-we      { color: var(--gray-300); }
.gantt-today-hdr { color: var(--primary); font-weight: 700; }
.gantt-track {
    flex: 1;
    position: relative;
    min-height: 28px;
    background: var(--gray-50);
    border-radius: 4px;
    overflow: visible;
}
.gantt-day-bg {
    position: absolute;
    top: 0; bottom: 0;
    pointer-events: none;
    border-right: 1px solid rgba(0,0,0,0.03);
}
.gantt-bg-we    { background: rgba(0,0,0,0.025); }
.gantt-bg-today { background: rgba(39,128,227,0.07); border-right-color: rgba(39,128,227,0.25); }
.gantt-bar {
    position: absolute;
    height: 20px;
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 6px;
    min-width: 4px;
    transition: filter 0.15s;
}
.gantt-bar:hover { filter: brightness(0.88); }
.gantt-bar span {
    font-size: 0.67rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

/* =============================================
   WIKI
   ============================================= */
.wiki-info-icon {
    cursor: pointer;
    color: var(--info);
    margin-left: 5px;
    font-size: 0.85em;
    transition: color 0.15s;
}
.wiki-info-icon:hover { color: #1d4ed8; }

.wiki-content-box {
    margin-top: 8px;
    padding: 10px 12px;
    background: var(--info-light);
    border-left: 3px solid var(--info);
    border-radius: var(--radius-sm);
    font-size: 0.82em;
    color: var(--gray-700);
}

/* =============================================
   BADGES
   ============================================= */
.badge {
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
    border-radius: 4px;
}

/* =============================================
   FILTER BAR
   ============================================= */
.filter-bar {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 0.875rem 1.25rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}

/* =============================================
   PAGE-SPECIFIC HELPERS
   ============================================= */
.section-heading {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-800);
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--gray-100);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 999;
}
.sidebar-overlay.show { display: block; }

/* =============================================
   TRAINER NAME BADGE (colored dot + name)
   ============================================= */
/* Trägt nur noch den Namen — der Farbpunkt davor ist entfallen. */
.trainer-name-badge {
    font-weight: 600;
}

/* =============================================
   DASHBOARD
   ============================================= */
.dash-upcoming-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
}
.dash-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700;
    flex-shrink: 0;
}
.dash-upcoming-main { flex: 1; min-width: 0; }
.dash-upcoming-trainer { font-weight: 600; font-size: 0.82rem; color: var(--gray-800); }
.dash-upcoming-seminar { font-size: 0.78rem; color: var(--gray-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-upcoming-hotel   { font-size: 0.72rem; color: var(--gray-400); margin-top: 1px; }
.dash-upcoming-dates   { text-align: right; flex-shrink: 0; }
.dash-date-row { display: flex; align-items: center; gap: 5px; font-size: 0.78rem; justify-content: flex-end; }
.dash-chip { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 0.68rem; font-weight: 600; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-wrapper {
        margin-left: 0;
    }
    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .page-content {
        padding: 1.25rem 1rem 2rem;
    }
}

/* =============================================
   PROJEKT-EINTRÄGE (Aufgaben und Notizen an einer Projekt-ID)
   Wird in der Notiz-Schublade (Seminare) und in der Projekt-Schublade
   (Übernachtungen) gezeichnet — siehe components/projekteintraege.js
   ============================================= */
.pe-gruppe {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--gray-400);
    margin: 0.7rem 0 0.15rem;
}
.pe-gruppe:first-child { margin-top: 0; }

.pe-eintrag {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--gray-100);
}
.pe-eintrag:last-child { border-bottom: 0; }

.pe-text {
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--gray-800);
    overflow-wrap: anywhere;
}
.pe-eintrag.erledigt .pe-text {
    color: var(--gray-400);
    text-decoration: line-through;
}

.pe-meta {
    font-size: 0.68rem;
    color: var(--gray-400);
    margin-top: 0.15rem;
    line-height: 1.35;
}

/* Kästchen zum Abhaken. Bewusst ein <button>, damit es per Tastatur
   erreichbar ist — das Häkchen wird erst im erledigten Zustand sichtbar. */
.pe-box {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    margin-top: 2px;
    padding: 0;
    border: 1.5px solid var(--gray-300);
    border-radius: 4px;
    background: var(--white);
    color: transparent;
    font-size: 0.6rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.pe-box:hover { border-color: var(--primary); }
.pe-box.erledigt {
    background: var(--success);
    border-color: var(--success);
    color: var(--white);
}

.pe-marke {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    margin-top: 2px;
    border: 1px solid var(--primary-light);
    border-radius: 4px;
    background: var(--primary-muted);
    color: var(--primary);
    font-size: 0.58rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pe-loeschen {
    flex-shrink: 0;
    border: 0;
    background: none;
    color: var(--gray-300);
    font-size: 0.78rem;
    line-height: 1;
    padding: 0.1rem 0.25rem;
    border-radius: 3px;
    cursor: pointer;
}
.pe-loeschen:hover {
    color: var(--danger);
    background: var(--danger-light);
}

.pe-eintrag .min-w-0 { min-width: 0; }

.pe-neu { border-top: 1px dashed var(--gray-200); padding-top: 0.6rem; }

/* =============================================
   SUCHFELD MIT VORSCHLAGSLISTE (components/autocomplete.js)
   Ersetzt die langen Auswahlfelder für Hotel und Trainer im Termin-Dialog.
   ============================================= */
.ac-wrap { position: relative; flex: 1 1 auto; min-width: 0; }

.ac-panel {
    position: absolute;
    top: calc(100% + 3px);
    left: 0;
    right: 0;
    z-index: 1080;              /* über dem Dialog-Inhalt */
    max-height: 17rem;
    overflow-y: auto;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.16);
    padding: 0.25rem 0;
}

.ac-kopf {
    padding: 0.3rem 0.7rem 0.35rem;
    font-size: 0.68rem;
    color: var(--gray-400);
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: 0.15rem;
}

/* Gruppenüberschrift: Stadt bei Hotels, Agentur bei Trainern. */
.ac-gruppe {
    padding: 0.4rem 0.7rem 0.15rem;
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray-400);
}

.ac-option {
    padding: 0.32rem 0.7rem;
    cursor: pointer;
    line-height: 1.3;
}
.ac-option:hover { background: var(--gray-100); }
.ac-option.ac-aktiv { background: var(--primary-muted); }

.ac-text {
    display: block;
    font-size: 0.84rem;
    color: var(--gray-800);
}
.ac-option.ac-aktiv .ac-text { color: var(--primary); font-weight: 600; }

.ac-zusatz {
    display: block;
    font-size: 0.7rem;
    color: var(--gray-400);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ac-panel mark {
    background: #fff3bf;
    color: inherit;
    padding: 0;
    border-radius: 2px;
}

/* Schon zugewiesene Trainer: sichtbar, aber nicht wählbar — sonst sucht man
   sie in der Liste und findet sie nicht. */
.ac-option.ac-aus { cursor: default; opacity: 0.45; }
.ac-option.ac-aus:hover { background: transparent; }

.ac-leer {
    padding: 0.6rem 0.7rem;
    font-size: 0.8rem;
    color: var(--gray-400);
    font-style: italic;
}
.ac-leer-hinweis { font-style: normal; font-size: 0.72rem; color: var(--gray-500); }

/* =============================================
   SEMINARE: NOTIZZEICHEN UND ZEILENMENÜ
   Die Notizhinweise standen früher als beschriftete Knöpfe in der
   Aktionsspalte. Sie sind keine Aktionen, sondern Anzeigen — und haben die
   Spalte so breit gemacht, dass die Tabelle seitlich scrollen musste.
   ============================================= */
.ovw-notiz-name {
    border: 0;
    background: none;
    padding: 0;
    margin: 0;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: help;
    text-decoration: underline dotted var(--primary);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.ovw-notiz-name:hover { text-decoration-style: solid; }
.ovw-notiz-name:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 3px;
}

.ovw-aktionen { white-space: nowrap; }

/* Menü hinter dem ⋮. Hängt an <body>, weil ein Dropdown im
   .table-responsive abgeschnitten würde. */
.ovw-menu {
    position: fixed;
    z-index: 1090;
    min-width: 12.5rem;
    padding: 0.3rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}

.ovw-menu-punkt {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.4rem 0.55rem;
    border: 0;
    border-radius: 5px;
    background: none;
    color: var(--gray-800);
    font-size: 0.84rem;
    text-align: left;
    cursor: pointer;
}
.ovw-menu-punkt i { width: 1rem; text-align: center; color: var(--gray-400); font-size: 0.78rem; }
.ovw-menu-punkt:hover { background: var(--gray-100); }
.ovw-menu-punkt:focus-visible { background: var(--primary-muted); outline: none; }

.ovw-menu-gefahr { color: var(--danger); }
.ovw-menu-gefahr i { color: var(--danger); }
.ovw-menu-gefahr:hover { background: var(--danger-light); }
.ovw-menu-gefahr:focus-visible { background: var(--danger-light); }

.ovw-menu-trenner {
    height: 1px;
    margin: 0.3rem 0.2rem;
    background: var(--gray-200);
}

/* "Kein Hotel nötig": früher eine eigene, meist leere Spalte mit einem "Ja".
   Die Aussage gehört zum Hotel — Ort sichtbar, aber durchgestrichen. */
/* Bewusst inline und nicht flex: der Hotelname darf umbrechen, und das
   Verbotszeichen soll dann dem letzten Wort folgen und nicht am Ende der
   ersten Zeile hängen. */
.ovw-ohne-hotel {
    display: inline;
    cursor: help;
}
.ovw-ohne-hotel-ort {
    color: var(--gray-400);
    text-decoration: line-through;
    text-decoration-color: var(--gray-300);
}
.ovw-ohne-hotel i {
    font-size: 0.62rem;
    color: var(--gray-400);
    margin-left: 0.3rem;
}

/* Agentur als Unterzeile am Trainernamen — sie hatte eine eigene Spalte, ist
   aber Hintergrundwissen und nichts, wonach man eine Zeile sucht. */
.ovw-agentur {
    font-weight: 400;
    font-size: 0.72rem;
    color: var(--gray-500);
    line-height: 1.25;
    margin-top: 1px;
    /* Die Spaltenbreite ist jetzt bekannt (colgroup), deshalb reicht 100 %. */
    /* Agenturnamen können lang sein ("RvS Automotive coaching consulting
       training"). Eine Zeile mit Auslassungspunkten, der ganze Name im
       Tooltip — sonst treibt eine Agentur die Zeilenhöhe hoch oder die
       Spalte breit. */
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Stift am Projekteintrag. Wie das Löschkreuz zurückhaltend, bis die Maus
   auf der Zeile steht. */
.pe-stift {
    flex-shrink: 0;
    border: 0;
    background: none;
    color: var(--gray-300);
    font-size: 0.7rem;
    line-height: 1;
    padding: 0.1rem 0.25rem;
    border-radius: 3px;
    cursor: pointer;
}
.pe-stift:hover {
    color: var(--primary);
    background: var(--primary-muted);
}
.pe-eintrag .pe-text[data-pe-edit] { cursor: text; }
.pe-eintrag.pe-bearbeiten { align-items: flex-start; }

/* Angemeldete Person am Fuß der Seitenleiste. Der Name steht über dem
   Abmelden-Knopf, damit klar ist, wen es betrifft. */
.sidebar-nutzer {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-nutzer-name {
    padding: 0 1rem 0.25rem;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-abmelden {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.86rem;
}
.sidebar-abmelden:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}
.sidebar-abmelden i { width: 1.1rem; text-align: center; }

/* Seminartabelle mit festen Spaltenbreiten. Ohne table-layout: fixed legt der
   Browser den freien Platz in die Spalten mit dehnbarem Inhalt — nach dem
   Wegfall zweier Spalten war das vor allem Luft zwischen Zeitraum und
   Projekt-IDs, während die IDs selbst untereinander umbrachen. */
/* Mindestbreite, sonst frisst die feste Verteilung auf schmalen Bildschirmen
   die Seminarspalte auf: bei 1150 px blieb ihr 0 px, und der Seminarname
   brach buchstabenweise um. Unterhalb dieser Breite scrollt die Tabelle
   waagerecht in ihrem .table-responsive — das ist das kleinere Übel. */
.tabelle-fest {
    table-layout: fixed;
    min-width: 1150px;
}

/* Projekt-IDs nebeneinander, nicht gestapelt: zwei Badges passen in die
   Spalte, drei ergaben vorher drei Zeilen Höhe je Termin. */
.tabelle-fest td .badge { white-space: nowrap; }

/* Projekt-ID in der Tabelle: schmaler als ein normales Badge, damit zwei
   nebeneinander in die Spalte passen. */
.ovw-projekte {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px;
}

.ovw-projekt-id {
    font-size: 0.66rem;
    font-weight: 500;
    padding: 0.2rem 0.34rem;
    cursor: pointer;
    white-space: nowrap;
}

/* Task-Knopf in der Aktionsspalte: der Zähler sitzt am Knopf selbst, damit
   man vor dem Klick sieht, ob etwas offen ist. */
/* z-index, damit die Zahl in der Ecke nicht vom nachfolgenden ⋮-Knopf der
   Knopfgruppe überdeckt wird. */
.ovw-task-knopf { position: relative; z-index: 3; }

/* Die Zahl sitzt in der Ecke des Knopfes, nicht daneben: neben dem Symbol
   hätte sie den Knopf verbreitert und die Aktionsspalte um 40 px wachsen
   lassen — der Platz fehlt dann den Seminarnamen. */
.ovw-task-zahl {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 15px;
    padding: 0 3px;
    border-radius: 999px;
    background: var(--warning);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 15px;
    text-align: center;
}
.ovw-task-zahl.ueberfaellig { background: var(--danger); }

/* Nichts offen, aber es steht etwas im Projekt (Notiz oder Abgehaktes). */
.ovw-task-punkt {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

/* =============================================
   TASKS (components/tasks.js)
   ============================================= */
.sidebar-zaehler {
    margin-left: auto;
    min-width: 1.25rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: var(--warning);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.25rem;
    text-align: center;
}
.sidebar-zaehler.ueberfaellig { background: var(--danger); }

.tasks-kachel {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
}
.tasks-kachel.klickbar { cursor: pointer; }
.tasks-kachel.klickbar:hover { border-color: var(--gray-300); background: var(--gray-50); }
.tasks-kachel-zahl { font-size: 1.15rem; font-weight: 700; line-height: 1; }
.tasks-kachel-text { font-size: 0.76rem; color: var(--gray-500); }

.tasks-abschnitt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem 0.35rem;
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.tasks-abschnitt-zahl {
    font-weight: 600;
    letter-spacing: 0;
    color: var(--gray-400);
}

.tasks-zeile {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--gray-100);
}
.tasks-zeile:last-child { border-bottom: 0; }
.tasks-zeile:hover { background: var(--gray-50); }

.tasks-mitte { flex: 1; min-width: 0; }
.tasks-text { font-size: 0.88rem; color: var(--gray-800); line-height: 1.35; overflow-wrap: anywhere; }
.tasks-zeile.erledigt .tasks-text { color: var(--gray-400); text-decoration: line-through; }

.tasks-kontext {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.85rem;
    margin-top: 0.2rem;
    font-size: 0.72rem;
    color: var(--gray-500);
}
.tasks-kontext-seminar { font-weight: 600; color: var(--gray-600); }

.tasks-rechts {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    padding-top: 0.1rem;
}
.tasks-frist {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--gray-500);
    white-space: nowrap;
}
.tasks-frist.ueberfaellig { color: var(--danger); }
.tasks-wer { font-size: 0.7rem; color: var(--gray-400); white-space: nowrap; min-width: 8rem; text-align: right; }

/* Mehrere Trainer in einer Zeile: die Konsolidierung liefert eine Zeile je
   Trainer, die Liste fasst sie zu einem Termin zusammen. */
.ovw-trainer-zeile { line-height: 1.3; }
.ovw-trainer-zeile + .ovw-trainer-zeile { margin-top: 0.2rem; }

/* "Kein Hotel nötig" am einzelnen Trainer — nur nötig, wenn sich die Trainer
   einer Zeile darin unterscheiden. */
.ovw-ohne-hotel-marke {
    font-size: 0.6rem;
    color: var(--gray-400);
    cursor: help;
}

/* Projekt-ID in der Seminarliste: die Farbe sagt, was am Projekt liegt —
   ohne zusätzliche Zahl, denn zwei IDs sollen nebeneinander in die Spalte
   passen. Orange = offene Tasks, rot = überfällig, blau = nur Notizen,
   grün = alles erledigt, grau = noch nichts. */
.ovw-projekt-id-offen {
    background: var(--warning-light);
    border: 1px solid #e8c193;
    color: #8a4409;
}
.ovw-projekt-id-ueberfaellig {
    background: var(--danger-light);
    border: 1px solid #e4a3a7;
    color: #b4232b;
}
.ovw-projekt-id-notiz {
    background: var(--primary-light);
    border: 1px solid #a9cbeb;
    color: #1f6fbf;
}
.ovw-projekt-id-fertig {
    background: var(--success-light);
    border: 1px solid #aad39c;
    color: #2d7a19;
}

/* Sprung aus der Schublade in die Taskliste. */
.pe-taskliste {
    font-size: 0.7rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

/* Anzeige in der Taskliste, dass sie auf Projekte eingeschränkt ist. */
.tasks-projektfilter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    background: var(--primary-muted);
    border: 1px solid var(--primary-light);
    border-radius: 6px;
    font-size: 0.8rem;
}
.tasks-projektfilter-text { color: var(--gray-600); }

/* Quittung für kurze Rückmeldungen (Kopieren). Unten in der Mitte, kein
   Dialog — eine Kopie muss man nicht bestätigen. */
.app-quittung {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(0.5rem);
    z-index: 2000;
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    background: var(--gray-900);
    color: #fff;
    font-size: 0.85rem;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
}
.app-quittung.sichtbar {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    .app-quittung { transition: none; }
}

/* Ein Seminar mit seinen Projekt-IDs. Die IDs standen früher in einer eigenen
   Spalte; welche zu welchem Seminar gehört, war daraus nicht ablesbar. */
.ovw-posten + .ovw-posten {
    margin-top: 0.4rem;
    padding-top: 0.4rem;
    border-top: 1px dashed var(--gray-200);
}
.ovw-seminar-name {
    font-size: 0.8rem;
    color: var(--gray-600);
    line-height: 1.3;
}
.ovw-posten .ovw-projekte { margin-top: 0.2rem; }

/* Badge und Kopierknopf gehören zusammen. Der Knopf erscheint erst beim
   Überfahren der Zeile — sonst stehen in einer langen Liste doppelt so viele
   Symbole wie Informationen. */
.ovw-projekt-gruppe {
    display: inline-flex;
    align-items: center;
    gap: 1px;
}
.ovw-kopieren {
    border: 0;
    background: none;
    padding: 0 0.15rem;
    color: var(--gray-300);
    font-size: 0.65rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity .1s ease;
}
tr:hover .ovw-kopieren,
.ovw-kopieren:focus-visible { opacity: 1; }
.ovw-kopieren:hover { color: var(--primary); }
@media (prefers-reduced-motion: reduce) { .ovw-kopieren { transition: none; } }

/* =============================================
   1-TAGES-TERMINE (components/eintagestermine.js)
   ============================================= */

/* Eingerückt unter "Seminare", damit erkennbar ist, dass die Seite dazugehört. */
.sidebar-nav li.sidebar-unterpunkt a {
    padding-left: 2.1rem;
    font-size: 0.82rem;
}

/* Eigene Mindestbreite statt .tabelle-fest (1150px): sechs Spalten passen
   auch auf einen Laptop, ohne seitlich zu scrollen. */
.et-tabelle {
    table-layout: fixed;
    min-width: 900px;
}

/* Kopf und Filter: bewusst kompakt. Standort als Reiter oben an der Tabelle,
   Status/Sparte/Suche in einer schmalen Werkzeugzeile darunter. */
.et-kopf {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: .25rem 0 1rem;
}
.et-info { cursor: help; font-size: .95rem; }

.et-monatswahl {
    display: inline-flex;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    padding: 2px;
}
.et-monatswahl button {
    border: 0;
    background: transparent;
    color: var(--gray-600);
    border-radius: 999px;
    padding: .2rem .55rem;
    font-size: .78rem;
}
.et-monatswahl button:hover { background: var(--gray-100); color: var(--gray-900); }
.et-monat {
    min-width: 110px;
    font-weight: 600;
    white-space: nowrap;
}

.et-karte { overflow: hidden; }

.et-standorte {
    display: flex;
    gap: .15rem;
    padding: 0 .75rem;
    border-bottom: 1px solid var(--gray-200);
    overflow-x: auto;
    scrollbar-width: none;
}
.et-reiter {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    background: transparent;
    padding: .6rem .75rem .5rem;
    font-size: .84rem;
    font-weight: 500;
    color: var(--gray-500);
    white-space: nowrap;
}
.et-reiter:hover { color: var(--gray-800); }
.et-reiter.aktiv { color: var(--primary); border-bottom-color: var(--primary); }
.et-zahl {
    min-width: 1.1rem;
    padding: 0 .3rem;
    border-radius: 999px;
    background: var(--warning);
    color: #fff;
    font-size: .66rem;
    font-weight: 700;
    line-height: 1.1rem;
    text-align: center;
}

.et-werkzeuge {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    padding: .55rem .75rem;
    border-bottom: 1px solid var(--gray-100);
}
.et-segment {
    display: inline-flex;
    background: var(--gray-100);
    border-radius: 8px;
    padding: 2px;
}
.et-segment button {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border: 0;
    background: transparent;
    border-radius: 6px;
    padding: .22rem .65rem;
    font-size: .78rem;
    font-weight: 500;
    color: var(--gray-600);
}
.et-segment button.aktiv {
    background: var(--white);
    color: var(--gray-900);
    box-shadow: var(--shadow-sm);
}
.et-zahl-leise { font-size: .7rem; color: var(--gray-400); }
.et-sparte { width: auto; font-size: .78rem; }
.et-suche { position: relative; margin-left: auto; }
.et-suche i {
    position: absolute;
    left: .6rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: .72rem;
    color: var(--gray-400);
    pointer-events: none;
}
.et-suche input { width: 190px; padding-left: 1.75rem; font-size: .78rem; }

.et-hinweis {
    padding: .4rem .75rem;
    font-size: .78rem;
    color: #9a3f00;
    background: var(--warning-light);
    border-bottom: 1px solid var(--gray-100);
}

.et-status {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.et-status-offen     { background: var(--warning-light); color: #9a3f00; }
.et-status-teilweise { background: var(--danger-light);  color: #a3001f; }
.et-status-umgebucht { background: var(--success-light); color: #236b0a; }
.et-status-bleibt    { background: var(--gray-100);      color: var(--gray-600); }
.et-status-pruefen   { background: var(--danger);        color: #fff; }

/* Ausgesetzte Umbuchung: kräftig, weil hier etwas Gebuchtes nicht mehr passt. */
.et-ausgesetzt {
    color: #a3001f;
    font-weight: 600;
    font-size: 0.8rem;
}

.et-sub {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.et-seminar + .et-seminar { margin-top: 0.35rem; }

.et-neu {
    font-size: 0.7rem;
    font-weight: 600;
    color: #a3001f;
}

/* Seminarhotel durchgestrichen, aber lesbar: man soll sehen, wo der Trainer
   ursprünglich geplant war (Übernachtungen und 1-Tages-Termine). */
.et-ursprung {
    text-decoration: line-through;
    color: var(--gray-500);
}
.et-ziel {
    color: #236b0a;
    font-weight: 600;
}

/* Beide Aktionsknöpfe gleich breit untereinander. */
.et-aktionen .btn { white-space: nowrap; }
