/* Per-shift colors */
.shift-NF1 { background-color: #e9d5ff; color: #581c87; }
.shift-NF2 { background-color: #c4b5fd; color: #4c1d95; }
.shift-NF3 { background-color: #a78bfa; color: #2e1065; }
.shift-NF4 { background-color: #8b5cf6; color: #ffffff; }
.shift-Station, .shift-Station2 { background-color: #fef9c3; color: #713f12; }
.shift-Neo, .shift-Neo2 { background-color: #99f6e4; color: #134e4a; }
.shift-Visitendienst { background-color: #fca5a5; color: #7f1d1d; }
.shift-SD { background-color: #fed7aa; color: #7c2d12; }
.shift-Night { background-color: #93c5fd; color: #1e3a5f; }
.shift-Ferien { background-color: #bbf7d0; color: #14532d; }

/* Fallback category colors */
.shift-early { background-color: #dbeafe; color: #1e40af; }
.shift-late { background-color: #fef3c7; color: #92400e; }
.shift-night { background-color: #e0e7ff; color: #3730a3; }
.shift-off { background-color: #f3f4f6; color: #9ca3af; }

/* Active tab */
.tab-btn.active { background-color: #2563eb; color: white; }
.tab-btn:not(.active):hover { background-color: #f3f4f6; }
.calsub-btn.active { background-color: #dbeafe; color: #1e40af; }

/* Schedule grid — fixed column widths for equal spacing */
.schedule-table { table-layout: fixed; }
.schedule-cell {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    text-align: center;
    padding: 4px 2px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.1s;
}
.schedule-cell:hover { opacity: 0.75; }
.schedule-cell.swap-selected {
    outline: 3px solid #2563eb;
    outline-offset: -2px;
    box-shadow: 0 0 0 1px #2563eb;
}
.schedule-header {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    font-size: 10px;
    font-weight: 600;
    padding: 6px 2px;
    text-align: center;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* ÜzKomp / Komp absence colors */
.shift-UzKomp { background-color: #fef3c7; color: #92400e; }
.shift-Komp { background-color: #e0f2fe; color: #0c4a6e; }
.schedule-name {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    text-align: left;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    position: sticky;
    left: 0;
    z-index: 2;
    white-space: nowrap;
}
.weekend-col { background-color: #fef2f2; }

/* Chat */
.chat-user { background-color: #dbeafe; border-radius: 12px; padding: 8px 12px; margin-left: 40px; }
.chat-assistant { background-color: #f3f4f6; border-radius: 12px; padding: 8px 12px; margin-right: 40px; }

/* Rule card */
.rule-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
}
.rule-card.inactive { opacity: 0.5; }

/* Shift dropdown in schedule grid */
.shift-dropdown {
    position: absolute;
    z-index: 50;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 120px;
    max-height: 240px;
    overflow-y: auto;
}
.shift-dropdown button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 6px 10px;
    font-size: 12px;
    border: none;
    background: none;
    cursor: pointer;
}
.shift-dropdown button:hover { background-color: #f3f4f6; }

/* Swap mode banner */
.swap-banner {
    background-color: #dbeafe;
    border: 1px solid #93c5fd;
    border-radius: 8px;
    padding: 8px 16px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

/* Person detail back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #2563eb;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 12px;
}
.back-link:hover { text-decoration: underline; }

/* Stats section headers */
.stats-section-header {
    background-color: #f0f9ff;
    font-weight: 600;
    font-size: 13px;
    color: #1e40af;
}
.stats-section-header td {
    padding: 8px;
}
