* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f3f4f6;
    color: #1f2937;
}

.container {
    width: min(92%, 520px);
    margin: 60px auto;
    background: white;
    padding: 30px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

h1 {
    margin-bottom: 5px;
}

.subtitle {
    margin-top: 0;
    color: #6b7280;
    margin-bottom: 30px;
}

label {
    display: block;
    margin-top: 18px;
    margin-bottom: 7px;
    font-weight: bold;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 9px;
    font-size: 16px;
}

.days {
    margin-top: 20px;
    padding: 14px;
    background: #f3f4f6;
    border-radius: 9px;
}

button {
    width: 100%;
    margin-top: 25px;
    padding: 14px;
    border: 0;
    border-radius: 9px;
    background: #2563eb;
    color: white;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
}

button:hover {
    background: #1d4ed8;
}

#message {
    text-align: center;
    font-weight: bold;
    margin-top: 20px;
}

.request-card {
    margin-top: 14px;
    padding: 16px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #dddddd;
}

.request-card.approved {
    background: #eef9f0;
    border-color: #8bcf97;
}

.request-card.rejected {
    background: #fff0f0;
    border-color: #e39a9a;
}

.request-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.approve-button {
    background: #2e9d50;
}

.reject-button {
    background: #c94b4b;
}

.approve-button,
.reject-button {
    flex: 1;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-weight: bold;
    cursor: pointer;
}

.overlap-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-left: 5px solid #f59e0b;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 14px 0;
    color: #664d03;
}

.overlap-warning strong {
    display: block;
    margin-bottom: 6px;
}

.overlap-warning p {
    margin: 4px 0;
}

.year-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 16px 0 20px;
}

.year-controls button {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 10px;
    font-size: 20px;
}

.year-controls strong {
    min-width: 80px;
    text-align: center;
    font-size: 22px;
}

#yearOverview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.month-card {
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.month-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    text-align: center;
}

.month-card p {
    margin: 0;
    text-align: center;
    color: #666666;
}

@media (max-width: 700px) {
    #yearOverview {
        grid-template-columns: 1fr;
    }
}

.calendar-weekdays,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-weekdays {
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    color: #666666;
}

.calendar-day {
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #f5f5f5;
    font-size: 13px;
    transition: 0.15s ease;
}

.calendar-day.empty {
    background: transparent;
}

.calendar-day.vacation {
    background: #86efac;
    color: #14532d;
    border: 1px solid #22c55e;
    font-weight: bold;
}

.calendar-day.pending-vacation {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    font-weight: bold;
}

.calendar-legend {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 12px;
    font-size: 14px;
}

.calendar-legend > span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.legend-dot.approved {
    background: #22c55e;
}

.legend-dot.pending {
    background: #ffc107;
}

.calendar-day.overlap {
    background: #f59e0b;
    color: white;
    border: 1px solid #d97706;
    font-weight: bold;
}

#vacationBalances {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.vacation-balance-card {
    background: #f8f9fa;
    border: 1px solid #dddddd;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.vacation-balance-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.vacation-balance-card p {
    margin: 6px 0;
}

@media (max-width: 700px) {
    #vacationBalances {
        grid-template-columns: 1fr;
    }
}

.request-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 16px 0 20px;
}

.request-tab {
    background: #f1f3f5;
    color: #333333;
    border: 1px solid #d8dce0;
    border-radius: 10px;
    padding: 10px 12px;
    font-weight: bold;
    cursor: pointer;
}

.request-tab.active {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.request-card {
    border-left: 5px solid #f59e0b;
}

.request-card.approved {
    border-left-color: #22c55e;
}

.request-card.rejected {
    border-left-color: #ef4444;
}

.request-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.request-card h3 {
    margin-top: 0;
    margin-bottom: 12px;
}

.request-card p {
    margin: 7px 0;
}

.approve-button {
    background: #2e9d50;
}

.reject-button {
    background: #c94b4b;
}

.approve-button:hover {
    background: #258542;
}

.reject-button:hover {
    background: #ad3f3f;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 16px 0;
    font-size: 14px;
    font-weight: 600;
}

.calendar-legend > span {
    display: flex;
    align-items: center;
    gap: 7px;
}

.legend-box {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    display: inline-block;
}

.legend-box.vacation {
    background: #86efac;
    border: 1px solid #22c55e;
}

.legend-box.overlap {
    background: #f59e0b;
    border: 1px solid #d97706;
}

.vacation-progress {
    width: 100%;
    height: 10px;
    background: #e9ecef;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 12px;
}

.vacation-progress-bar {
    height: 100%;
    background: #22c55e;
    border-radius: 999px;
    transition: width 0.25s ease;
}

.vacation-progress-text {
    margin-top: 8px;
    font-size: 13px;
    color: #666666;
    text-align: center;
}

.vacation-warning {
    margin: 10px 0 0;
    padding: 8px 10px;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
}

.employee-calendar-header {
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.employee-calendar-header h3 {
    margin: 0;
    text-align: center;
}

.employee-calendar-header button {
    width: 48px;
    height: 42px;
    padding: 0;
    margin: 0;
    border-radius: 8px;
}

.employee-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-weekday {
    text-align: center;
    font-weight: bold;
    font-size: 12px;
    color: #666666;
    padding: 4px 0;
}

.employee-calendar-grid .calendar-day {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: #f5f5f5;
    font-size: 13px;
}

.employee-calendar-grid .calendar-day.empty {
    background: transparent;
}

#employeeLogoutButton {
    display: block;
    width: auto;
    margin: 0 0 20px auto;
    padding: 10px 22px;
    font-size: 16px;
    font-weight: 600;
}

/* ===== Mitarbeiterseite: kompakter Kopfbereich ===== */

.employee-section {
    margin-top: 20px;
}

#employeeLogoutButton {
    display: block;
    width: auto;
    margin: -20px 0 10px auto;
    padding: 8px 18px;
}

body:has(#employeeLogoutButton) .subtitle {
    margin-bottom: 10px;
}

/* ===== Mitarbeiter-Kalender: bessere Bedienung ===== */

.employee-calendar-header button {
    width: 52px;
    height: 46px;
    font-size: 20px;
}

.employee-calendar-grid {
    gap: 6px;
}

.employee-calendar-grid .calendar-day {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Ansicht */
@media (max-width: 600px) {
    .container {
        width: 94%;
        margin: 20px auto;
        padding: 20px;
    }

    .employee-calendar-header {
        grid-template-columns: 52px 1fr 52px;
        gap: 8px;
    }

    .employee-calendar-grid {
        gap: 4px;
    }

    .employee-calendar-grid .calendar-day {
        min-height: 40px;
        font-size: 14px;
    }

    .calendar-weekday {
        font-size: 11px;
    }
}