/* ── HR Team-Kalender ───────────────────────────────────── */
.hr-tcal-page {
    padding: 0 0 32px;
}
.hr-tcal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.hr-tcal-head-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.hr-tcal-title {
    margin: 0;
    font-weight: 800;
    color: #111827;
    font-size: 18px;
}
.hr-tcal-sub {
    font-size: 13px;
    color: #6b7280;
    margin-top: 2px;
}
.hr-tcal-head-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.hr-tcal-monthnav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 4px;
}
.hr-tcal-navbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: #475569;
    text-decoration: none;
    transition: background .12s, color .12s;
}
.hr-tcal-navbtn:hover {
    background: #eff6ff;
    color: #0656b0;
}
.hr-tcal-monthlabel {
    font-weight: 700;
    color: #0f172a;
    padding: 0 12px;
    min-width: 140px;
    text-align: center;
}
.hr-tcal-todaybtn {
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #0656b0;
    font-weight: 700;
    font-size: 13px;
    padding: 7px 14px;
    border-radius: 8px;
    text-decoration: none;
    transition: background .12s;
}
.hr-tcal-todaybtn:hover { background: #eff6ff; }

/* Switch */
.hr-tcal-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}
.hr-tcal-toggle input { display: none; }
.hr-tcal-toggle-slider {
    position: relative;
    width: 38px;
    height: 22px;
    background: #cbd5e1;
    border-radius: 999px;
    transition: background .15s;
    flex-shrink: 0;
}
.hr-tcal-toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 18px; height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: left .15s;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.hr-tcal-toggle input:checked + .hr-tcal-toggle-slider { background: #dc2626; }
.hr-tcal-toggle input:checked + .hr-tcal-toggle-slider::after { left: 18px; }
/* Eigene Akzentfarbe fuer den Ueberschneidungs-Toggle (orange/amber) */
.hr-tcal-toggle input:checked + .hr-tcal-toggle-slider--overlap { background: #ea580c; }

.hr-tcal-overlap-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    margin-left: 6px;
    background: #fed7aa;
    color: #9a3412;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}
.hr-tcal-toggle-label {
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.hr-tcal-toggle-label .bi-heart-pulse { color: #dc2626; }

/* Legende */
.hr-tcal-legend {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 14px;
}
.hr-tcal-leg-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #374151;
    font-weight: 500;
}
.hr-tcal-leg-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    flex-shrink: 0;
}
.hr-tcal-leg-vac-approved { background: linear-gradient(135deg,#16a34a,#15803d); }
.hr-tcal-leg-vac-pending  { background: repeating-linear-gradient(45deg,#f59e0b,#f59e0b 4px,#fbbf24 4px,#fbbf24 8px); }
.hr-tcal-leg-sick         { background: linear-gradient(135deg,#dc2626,#b91c1c); }

/* Empty */
.hr-tcal-empty {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 48px;
    text-align: center;
    color: #9ca3af;
    font-weight: 600;
}
.hr-tcal-empty .bi {
    display: block;
    font-size: 32px;
    margin-bottom: 10px;
}

/* Grid (Gantt) */
.hr-tcal-grid-wrap {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0;
    overflow: auto;
    box-shadow: 0 1px 3px rgba(15,23,42,.04);
}
.hr-tcal-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(var(--days, 31), minmax(28px, 1fr));
    min-width: max(900px, calc(220px + var(--days, 31) * 28px));
}

.hr-tcal-emp-head {
    grid-column: 1 / 2;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 12px;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .03em;
    position: sticky;
    left: 0;
    z-index: 3;
}
.hr-tcal-day-head {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    border-right: 1px solid #f1f5f9;
    padding: 6px 0;
    text-align: center;
    font-size: 11px;
    color: #475569;
    line-height: 1.2;
}
.hr-tcal-day-head.is-we { background: #f1f5f9; color: #94a3b8; }
.hr-tcal-day-head.is-today {
    background: #eff6ff;
    color: #0656b0;
    font-weight: 800;
    box-shadow: inset 0 -2px 0 #0783ff;
}
.hr-tcal-day-head.is-overlap {
    box-shadow: inset 0 -3px 0 #ea580c;
}
.hr-tcal-day-head.is-overlap.is-today {
    /* Beide aktiv: oben blauer Heute-Bottom-Border bleibt, orange + blau kombinieren */
    box-shadow: inset 0 -3px 0 #ea580c, inset 0 -6px 0 0 #0783ff;
}
.hr-tcal-day-dow { font-weight: 700; }
.hr-tcal-day-num { font-weight: 600; }

.hr-tcal-emp {
    grid-column: 1 / 2;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    border-right: 1px solid #e5e7eb;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: sticky;
    left: 0;
    z-index: 2;
    min-height: 44px;
}
.hr-tcal-emp-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #e5e7eb;
    flex-shrink: 0;
}
.hr-tcal-emp-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dbeafe;
    color: #0656b0;
    font-weight: 800;
    font-size: 13px;
}
.hr-tcal-emp-info {
    min-width: 0;
    overflow: hidden;
}
.hr-tcal-emp-name {
    display: block;
    font-weight: 700;
    font-size: 13px;
    color: #111827;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hr-tcal-emp-name:hover { color: #0656b0; }
.hr-tcal-emp-dept {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Row mit relativem Grid-Track-Layout fuer Baender */
.hr-tcal-row {
    grid-column: 2 / -1;
    display: grid;
    grid-template-columns: repeat(var(--days, 31), minmax(28px, 1fr));
    border-bottom: 1px solid #f1f5f9;
    position: relative;
    min-height: 44px;
    align-items: stretch;
}
.hr-tcal-cell {
    border-right: 1px solid #f1f5f9;
    align-self: stretch;
}
.hr-tcal-cell.is-we    { background: #f8fafc; }
.hr-tcal-cell.is-today { background: rgba(37, 99, 235, .06); box-shadow: inset 1px 0 0 #93c5fd, inset -1px 0 0 #93c5fd; }
/* Tage mit Ueberschneidung (>=2 MA gleichzeitig abwesend) — duenner orange Strich */
.hr-tcal-cell.is-overlap { background: rgba(234, 88, 12, .07); }
.hr-tcal-cell.is-overlap.is-today { background: rgba(234, 88, 12, .12); }

/*
 * Baender werden ABSOLUT positioniert (kein Grid-Item), damit sie die Zeile
 * vollstaendig vertikal ueberdecken und keine Wochenend-/Heute-Zellen
 * dahinter durchscheinen koennen. left/width werden im View per Razor in % gesetzt.
 */
.hr-tcal-band {
    position: absolute;
    top: 0;
    bottom: 1px; /* Platz fuer border-bottom der Zeile */
    z-index: 2;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 0 10px;
    display: flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: default;
    transition: filter .12s;
    border-left: 2px solid rgba(0,0,0,.18);
    border-right: 2px solid rgba(0,0,0,.05);
    box-shadow: inset 0 -2px 0 rgba(0,0,0,.08);
}
.hr-tcal-band:hover {
    filter: brightness(1.05);
    z-index: 5;
}
.hr-tcal-band-lbl {
    text-shadow: 0 1px 1px rgba(0,0,0,.2);
}
.hr-tcal-band--vacation_pending { color: #78350f; text-shadow: none; }
.hr-tcal-band--vacation_pending .hr-tcal-band-lbl { color: #78350f; text-shadow: none; }

.hr-tcal-band.is-clickable { cursor: pointer; }
.hr-tcal-band.is-clickable:hover {
    filter: brightness(1.1);
    z-index: 6;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.55);
}

/* Filter-Reihe: Abteilung / Standort / Vorgesetzter / Vertragsart */
.hr-tcal-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    padding: 10px 14px;
    margin: 0 0 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}
.hr-tcal-filter {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 160px;
}
.hr-tcal-filter label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .4px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
}
.hr-tcal-filter label i { color: #94a3b8; font-size: 12px; }
.hr-tcal-filter select {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
    background: #fff;
    color: #0f172a;
    min-width: 160px;
    cursor: pointer;
}
.hr-tcal-filter select:focus {
    outline: none;
    border-color: #ea580c;
    box-shadow: 0 0 0 3px rgba(234,88,12,.15);
}
.hr-tcal-filter-reset {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    margin-left: auto;
    align-self: flex-end;
}
.hr-tcal-filter-reset:hover {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

/* ── Schlanker Header (nur Title) ─────────────────────────── */
.hr-tcal-head--slim { padding-bottom: 8px; }
.hr-tcal-head--slim .hr-tcal-head-right { display: none; }

/* ── Toggle-Checkboxen in der Filter-Reihe ────────────────── */
.hr-tcal-filter--checks {
    display: flex;
    flex-direction: row;
    gap: 14px;
    align-items: center;
    padding-top: 14px; /* visuelle Höhen-Angleichung an Dropdowns */
}
.hr-tcal-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #334155;
    user-select: none;
    margin: 0;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}
.hr-tcal-check:hover { border-color: #cbd5e1; background: #f8fafc; }
.hr-tcal-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #ea580c;
    margin: 0;
    cursor: pointer;
}
.hr-tcal-check input[type="checkbox"]:checked + span { color: #c2410c; font-weight: 700; }
.hr-tcal-check input[type="checkbox"][data-param="sick"]:checked + span { color: #b91c1c; }
.hr-tcal-check span i { color: #94a3b8; }
.hr-tcal-check input[type="checkbox"]:checked + span i { color: inherit; }

/* ── Zentrale Monats-Bar über dem Kalender ────────────────── */
.hr-tcal-monthbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 18px 0 12px;
    flex-wrap: wrap;
}
.hr-tcal-monthbar-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #475569;
    text-decoration: none;
    transition: all .15s;
}
.hr-tcal-monthbar-arrow:hover {
    background: #ea580c;
    color: #fff;
    border-color: #ea580c;
    transform: translateY(-1px);
}
.hr-tcal-monthbar-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #fff7ed, #fed7aa);
    border: 1px solid #fdba74;
    border-radius: 999px;
    padding: 8px 22px;
    font-size: 16px;
    font-weight: 800;
    color: #7c2d12;
    cursor: pointer;
    min-width: 220px;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(234,88,12,.12);
    transition: box-shadow .15s, transform .15s;
}
.hr-tcal-monthbar-label:hover {
    box-shadow: 0 4px 12px rgba(234,88,12,.22);
    transform: translateY(-1px);
}
.hr-tcal-monthbar-label i { color: #ea580c; }
.hr-tcal-monthpicker {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: 0;
}
.hr-tcal-monthbar-today {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #475569;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
}
.hr-tcal-monthbar-today:hover {
    background: #ea580c;
    color: #fff;
    border-color: #ea580c;
}
