/* ============================================================
   GLOBAL
============================================================ */
body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #fafafa;
    color: #202124;
}

.page {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

h1 {
    font-size: 28px;
    margin-bottom: 4px;
}

.subtitle {
    color: #5f6368;
    margin-bottom: 24px;
}

/* ============================================================
   LAYOUT
============================================================ */
.layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   CARD
============================================================ */
.card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    padding: 20px 22px 22px;
}

.card h2 {
    font-size: 18px;
    margin: 0 0 12px;
}

/* ============================================================
   CALENDAR HEADER
============================================================ */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.calendar-header span {
    font-weight: 600;
    color: #202124;
}

.cal-nav-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 18px;
    color: #5f6368;
}

.cal-nav-btn:hover {
    background: #e8eaed;
}

/* ============================================================
   WEEKDAYS + GRID
============================================================ */
.weekday-row,
.day-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.weekday {
    text-align: center;
    font-size: 11px;
    text-transform: uppercase;
    color: #5f6368;
    padding-bottom: 4px;
}

/* ============================================================
   DAY CELLS
============================================================ */
.day-cell {
    position: relative;
    height: 42px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    color: #202124;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}

.day-cell.empty {
    background: transparent;
    border: none;
    cursor: default;
}

/* Wochenende */
.day-cell.weekend {
    background: #f1f3f4;
    color: #9aa0a6;
}

/* ============================================================
   STATUS-FARBEN (GOOGLE LOOK)
============================================================ */
.day-cell.free {
    background: #e8f0fe;
    border-color: #d2e3fc;
    color: #174ea6;
}

.day-cell.partial {
    background: #fef7e0;
    border-color: #fce8b2;
    color: #a05a00;
}

.day-cell.full {
    background: #fce8e6;
    border-color: #f7c5c0;
    color: #c5221f;
}

/* Auswahl */
.day-cell.selected {
    background: #1a73e8;
    color: #ffffff;
    border-color: #1a73e8;
}

/* Hover */
.day-cell:hover:not(.empty):not(.selected) {
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

/* ============================================================
   TIMES LIST
============================================================ */
.times-list {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
}

.time-pill {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #dadce0;
    font-size: 13px;
    cursor: pointer;
    background: #ffffff;
    color: #202124;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.time-pill.selected {
    background: #1a73e8;
    color: #ffffff;
    border-color: #1a73e8;
}

/* ============================================================
   FORM
============================================================ */
.form-group {
    margin-bottom: 10px;
}

label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
    color: #5f6368;
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #dadce0;
    padding: 8px 10px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* ============================================================
   BUTTONS
============================================================ */
.btn-primary {
    border: none;
    border-radius: 6px;
    padding: 9px 18px;
    background: #1a73e8;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
}

.btn-primary:hover {
    background: #1765cc;
}

/* ============================================================
   STATUS + ALERTS
============================================================ */
.status-line {
    font-size: 12px;
    color: #5f6368;
    margin-top: 6px;
    min-height: 16px;
}

.alert {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
}

.alert-success {
    background: #e6f4ea;
    color: #137333;
}

.alert-error {
    background: #fce8e6;
    color: #c5221f;
}
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin: 15px 0 20px 0;
    font-size: 13px;
    color: #444;
}

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

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

/* Farben der Legende */
.legend-selected { background: #1e4fa3; }
.legend-free { background: #4caf50; }
.legend-partial { background: #ffb300; }
.legend-full { background: #e53935; }
.legend-weekend { background: #bdbdbd; }
