:root {
    --bg-main: #f0ebe4;
    --bg-card: #ffffff;
    --header-bg: #FFF153;
    --header-text: #1c1c1c;
    --text-main: #2b2b2b;
    --text-muted: #8c8c8c;
    --text-dim: #b5b0a8;
    --border-color: #e5e0d8;
    --primary-yellow: #FFF153;
    --primary-yellow-hover: #faeb37;
    --primary-yellow-border: #edd913;
    --slot-bg: #e8e2d9;
    --slot-hover: #dad2c7;
    --slot-selected: #e5dec3;
    --slot-selected-text: #2b2b2b;
    --highlight-date: #e5dec3;
    --highlight-date-text: #2b2b2b;
    --error-bg: #fde8e8;
    --error-text: #9b1c1c;
    --success-bg: #def7ec;
    --success-text: #03543f;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html, body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Header */
.top-header {
    background-color: var(--header-bg);
    color: var(--header-text);
    padding: 10px 24px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 13px;
    letter-spacing: 0.2px;
}

.top-header .clock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    opacity: 0.95;
}

/* Main Container */
.page-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 20px 24px 60px 24px;
}

/* Navigation Back Bar */
.nav-back-bar {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.btn-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 0;
    transition: opacity 0.2s;
}

.btn-back-link:hover {
    opacity: 0.7;
}

/* Service Selection Tabs (Step 1 Top) */
.service-selection-wrapper {
    margin-bottom: 20px;
}

.service-selection-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 10px;
}

.service-cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.service-tab-card {
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.service-tab-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.service-tab-card.active {
    border-color: #2b2b2b;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.service-tab-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.service-tab-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 12px;
}

.service-tab-meta {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Calendar Card */
.calendar-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 24px 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 28px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.month-nav-btn {
    background: none;
    border: none;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.month-nav-btn:hover:not(:disabled) {
    color: var(--text-main);
    background: var(--bg-main);
}

.month-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.current-month-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

/* Day Strip / Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    text-align: center;
}

.calendar-header-day {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    padding-bottom: 6px;
    border-bottom: 2px solid #ccc6be;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.calendar-day-cell {
    padding: 10px 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
    user-select: none;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day-cell.muted {
    color: var(--text-dim);
    cursor: default;
}

.calendar-day-cell.past,
.calendar-day-cell.closed,
.calendar-day-cell.unavailable {
    color: #d1cbc3;
    cursor: not-allowed;
    text-decoration: line-through;
}

.calendar-day-cell.selectable {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-main);
}

.calendar-day-cell.selectable:hover {
    background-color: var(--bg-main);
}

.calendar-day-cell.selected {
    background-color: var(--highlight-date);
    color: var(--highlight-date-text);
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.calendar-day-cell.today-marker {
    border: 1px solid #b0a89d;
}

/* Two Column Lower Section */
.booking-lower-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 28px;
    align-items: start;
}

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

/* Selected Info Side Cards */
.side-cards-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 22px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.info-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    line-height: 1.3;
}

.info-card-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 16px;
}

.info-card-duration {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.provider-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 18px 22px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 12px;
}

.provider-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary);
    color: #1c1c1c;
    border: 1px solid #edd913;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.provider-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
}

/* Slots Section */
.slots-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.slots-heading {
    font-size: 18px;
    font-weight: 600;
    color: #4a4a4a;
}

.slots-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    min-height: 60px;
    align-items: center;
}

.time-slot-btn {
    background-color: var(--slot-bg);
    border: none;
    border-radius: 6px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.15s ease;
}

.time-slot-btn:hover {
    background-color: var(--slot-hover);
    transform: translateY(-1px);
}

.time-slot-btn.selected {
    background-color: #FFF153;
    color: #1c1c1c;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    border: 1.5px solid #d4c40e;
    transform: translateY(-1px);
}

.slots-legend {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 10px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #cfc8bd;
}

.no-slots-msg {
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
    padding: 14px 0;
}

.slots-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-muted);
    padding: 14px 0;
}

/* Bottom Action Bar */
.step1-action-bar {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}

.btn-primary {
    background-color: var(--primary-yellow);
    color: #1c1c1c;
    border: 1px solid var(--primary-yellow-border);
    border-radius: 6px;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-yellow-hover);
    box-shadow: 0 4px 14px rgba(255, 241, 83, 0.4);
}

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

/* Step 2 Form */
.form-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-width: 680px;
    margin: 0 auto;
}

.form-header-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.form-header-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Booking Summary Box in Step 2 */
.booking-summary-banner {
    background: var(--bg-main);
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}

.summary-item-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.summary-item-val {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

/* Form Inputs */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 580px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.form-label .req {
    color: #e53e3e;
}

.form-input {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fafafa;
    color: var(--text-main);
    transition: all 0.15s ease;
}

.form-input:focus {
    outline: none !important;
    border-color: #1c5253 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(28, 82, 83, 0.12) !important;
}

.form-input.error {
    border-color: #e53e3e;
    background: #fff8f8;
}

.field-error-msg {
    font-size: 12px;
    color: #e53e3e;
    margin-top: 4px;
}

/* Alert Boxes */
.alert-box {
    padding: 14px 18px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.alert-box.success {
    background-color: var(--success-bg);
    color: var(--success-text);
    border: 1px solid #84e1bc;
}

/* Step 2 Buttons */
.form-buttons-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
}

.btn-secondary {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 11px 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.15s ease;
}

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

/* Success View */
.success-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-width: 600px;
    margin: 40px auto;
    text-align: center;
}

.success-icon-circle {
    width: 64px;
    height: 64px;
    background: var(--primary);
    color: #1c1c1c;
    border: 1px solid #edd913;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin: 0 auto 20px auto;
}

.success-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.success-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 24px;
}

.success-details-list {
    background: var(--bg-main);
    border-radius: 6px;
    padding: 18px 24px;
    text-align: left;
    margin-bottom: 28px;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.success-detail-row {
    display: flex;
    justify-content: space-between;
}

.success-detail-label {
    color: var(--text-muted);
    font-weight: 500;
}

.success-detail-val {
    color: var(--text-main);
    font-weight: 600;
}

/* Email Confirmation Banner */
.email-confirmation-banner {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
}

.email-confirmation-banner .email-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.email-confirmation-banner strong {
    font-size: 14px;
    color: #166534;
    display: block;
    margin-bottom: 2px;
}

.email-confirmation-banner .email-subtext {
    font-size: 13px;
    color: #15803d;
    line-height: 1.4;
}

.email-confirmation-banner .email-highlight {
    font-weight: 700;
    text-decoration: underline;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(28, 28, 28, 0.3);
    border-radius: 50%;
    border-top-color: #1c1c1c;
    animation: spin 0.8s linear infinite;
}

.spinner-dark {
    border: 2px solid rgba(28, 28, 28, 0.2);
    border-top-color: #1c1c1c;
}

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