:root {
    --color-primary: #0e7c66;
    --color-primary-dark: #0a5c4c;
    --color-bg: #f4f5f7;
    --color-bg-alt: #eaedf0;
    --color-card: #ffffff;
    --color-border: #e1e4e8;
    --color-text: #1f2328;
    --color-muted: #6a737d;
    --color-error-bg: #fdecea;
    --color-error-text: #a6271b;
    --color-disabled-bg: #f1f2f4;
    --radius: 10px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.07), 0 1px 3px rgba(15, 23, 42, 0.05);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
    color: var(--color-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.booking-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 16px 64px;
}

.booking-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--color-border);
    flex-wrap: wrap;
    gap: 8px;
}

.booking-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0;
}

.link-muted {
    color: var(--color-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.link-muted:hover { text-decoration: underline; }

.header-links {
    display: flex;
    gap: 12px;
    align-items: baseline;
}

/* Step indicator */
.steps-indicator {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    gap: 4px;
}

.steps-indicator li {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    font-size: 0.8rem;
    color: var(--color-muted);
    border-bottom: 3px solid var(--color-border);
    transition: color 0.15s, border-color 0.15s;
}

.steps-indicator li.active {
    color: var(--color-primary-dark);
    font-weight: 600;
    border-bottom-color: var(--color-primary);
}

.steps-indicator li.done {
    color: var(--color-text);
    border-bottom-color: var(--color-primary);
}

/* Cards / steps */
.card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
}

.card h2 {
    margin-top: 0;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.step-subtitle {
    color: var(--color-muted);
    margin-top: -6px;
    font-size: 0.92rem;
}

.step-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 22px;
    gap: 10px;
}

.step[hidden] { display: none; }

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 0.92rem;
}

.alert-error {
    background: var(--color-error-bg);
    color: var(--color-error-text);
    border: 1px solid #f3c6c1;
}

/* Action row (home page, and anywhere a plain row of buttons is needed) */
.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Buttons */
.btn-primary, .btn-secondary {
    font-size: 0.95rem;
    font-weight: 600;
    padding: 11px 22px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 1px 2px rgba(14, 124, 102, 0.25);
}

.btn-primary:hover:not(:disabled) {
    background: var(--color-primary-dark);
    box-shadow: 0 3px 8px rgba(14, 124, 102, 0.28);
}

.btn-primary:disabled {
    background: var(--color-disabled-bg);
    color: var(--color-muted);
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary {
    background: #fff;
    color: var(--color-text);
    border-color: var(--color-border);
}

.btn-secondary:hover:not(:disabled) { background: #f7f7f8; border-color: #d3d7db; }

.btn-icon {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
}

.btn-icon:hover:not(:disabled) { background: #f7f7f8; }
.btn-icon:disabled { color: var(--color-muted); cursor: not-allowed; }

/* Service list (step 1) */
.service-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.service-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 16px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.service-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.service-card .service-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.service-card .service-meta {
    color: var(--color-muted);
    font-size: 0.88rem;
}

/* Calendar (step 2) */
.calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.calendar-month-label {
    font-weight: 600;
    min-width: 160px;
    text-align: center;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    color: var(--color-muted);
    font-size: 0.8rem;
    margin-bottom: 4px;
}

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

.calendar-day {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.92rem;
    cursor: pointer;
    border: 1px solid transparent;
    background: #f0f7f5;
    color: var(--color-text);
    transition: background-color 0.15s ease;
}

.calendar-day:hover { background: #d9eee8; }

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

.calendar-day.unavailable {
    background: transparent;
    color: var(--color-muted);
    cursor: not-allowed;
    opacity: 0.55;
}

.calendar-day.today { border-color: var(--color-primary); }

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

/* Slot list (step 3) */
.slot-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.slot-chip {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    background: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.slot-chip:hover {
    border-color: var(--color-primary);
    background: #f0f7f5;
}

.slot-chip.selected {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.empty-state {
    color: var(--color-muted);
    font-size: 0.92rem;
    padding: 12px 0;
}

/* Review (step 4) */
.review-summary {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px 16px;
    margin: 0;
}

.review-summary dt { color: var(--color-muted); }
.review-summary dd { margin: 0; font-weight: 600; }

/* Loading */
.is-loading { opacity: 0.6; pointer-events: none; }

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

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

/* Responsive: laptop 1366x768 is comfortably above this, down to phones */
@media (max-width: 600px) {
    .service-list { grid-template-columns: 1fr; }
    .booking-page { padding: 16px 12px 48px; }
    .steps-indicator li { font-size: 0.72rem; }
    .review-summary { grid-template-columns: 110px 1fr; }
}
