:root {
    --primary: #2563eb;
    --secondary: #1e40af;
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --success: #16a34a;
    --error: #dc2626;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.tagline {
    color: var(--muted);
    font-size: 0.95rem;
}

.main {
    background: var(--surface);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.step h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.options {
    display: grid;
    gap: 0.75rem;
}

.option-btn {
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--surface);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.option-btn:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

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

.option-btn .name {
    font-weight: 600;
}

.option-btn .detail {
    font-size: 0.85rem;
    color: var(--muted);
}

.option-btn.selected .detail {
    color: rgba(255, 255, 255, 0.85);
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    text-align: center;
}

.calendar-header {
    font-size: 0.75rem;
    color: var(--muted);
    padding: 0.5rem 0;
    font-weight: 600;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid transparent;
}

.calendar-day.available {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.3);
}

.calendar-day.available:hover {
    background: var(--primary);
    color: white;
}

.calendar-day.selected {
    background: var(--primary);
    color: white;
}

.calendar-day.disabled {
    color: var(--muted);
    opacity: 0.4;
    cursor: not-allowed;
}

.calendar-day.empty {
    cursor: default;
}

.slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.slot-btn {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--surface);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.slot-btn:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

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

.muted {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 0.875rem;
    border: none;
    border-radius: 0.5rem;
    background: var(--primary);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    padding: 0.625rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--surface);
    cursor: pointer;
    font-size: 0.9rem;
}

.hidden {
    display: none !important;
}

.loading {
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: var(--error);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    text-align: center;
}

.success-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
}

#success-detail {
    text-align: center;
    margin-bottom: 1rem;
}

.footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--muted);
    font-size: 0.85rem;
}

@media (max-width: 400px) {
    .slots {
        grid-template-columns: repeat(2, 1fr);
    }
}
