:root {
    --primary-color: #4A306D;
    --primary-hover: #3a2555;
}

[data-bs-theme="dark"] {
    --bs-body-bg: #212529;
    --bs-body-color: #dee2e6;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

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

.card {
    border-radius: 0.75rem;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.badge {
    border-radius: 0.5rem;
    padding: 0.35em 0.65em;
}

.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

.navbar-brand {
    font-weight: bold;
    color: var(--primary-color) !important;
    font-size: 1.5rem;
}

.modal-content {
    border-radius: 0.75rem;
}

.form-control, .form-select {
    border-radius: 0.5rem;
}

[data-bs-theme="dark"] .card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    max-width: 900px;
    margin: 0 auto;
}

.calendar-header {
    text-align: center;
    font-weight: 600;
    padding: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    font-size: 0.85rem;
}

.calendar-day {
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 6px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    background: white;
}

@media (max-width: 768px) {
    .calendar-grid {
        gap: 2px;
    }
    
    .calendar-header {
        padding: 4px 2px;
        font-size: 0.65rem;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 4px 2px;
    }
    
    .day-number {
        font-size: 0.75rem;
    }
    
    .apt-badge {
        font-size: 0.6rem;
        padding: 1px 3px;
    }
}

.calendar-day:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.calendar-day.other-month {
    opacity: 0.3;
}

.calendar-day.today {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border: 2px solid #667eea;
    font-weight: 600;
}

.calendar-day.past-day {
    background: #e9ecef;
    opacity: 0.5;
    pointer-events: none;
}

[data-bs-theme="dark"] .calendar-day.past-day {
    background: #1a1d20;
    opacity: 0.4;
}

.day-number {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.apt-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 2px;
    width: 100%;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-bs-theme="dark"] .calendar-day {
    border-color: #495057;
    background: #212529;
}

[data-bs-theme="dark"] .calendar-day:hover {
    background: #343a40;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
