:root {
    --beta-bg-1: #f3efe8;
    --beta-bg-2: #fff7ec;
    --beta-accent: #c17b2d;
    --beta-accent-deep: #8a4d12;
    --beta-ink: #27211a;
    --beta-line: #e6d6c0;
    --beta-soft: #fffaf4;
}

.beta-body {
    background: linear-gradient(145deg, var(--beta-bg-1), var(--beta-bg-2));
    color: var(--beta-ink);
}

.beta-main {
    flex: 1 0 auto;
}

.beta-shell {
    max-width: 960px;
    background: #ffffffee;
    border: 1px solid var(--beta-line);
    border-radius: 18px;
    box-shadow: 0 8px 18px rgba(62, 44, 19, 0.1);
    overflow: hidden;
}

.beta-header,
.beta-content,
.beta-nav,
.stepper-wrap {
    padding: 1rem;
}

.beta-stepper {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.35rem;
}

.step-carousel {
    position: relative;
    overflow: visible;
}

.progress-track {
    position: absolute;
    top: 12px;
    left: 0;
    right: 0;
    height: 3px;
    background: #e9dfd1;
    border-radius: 999px;
    z-index: 0;
    pointer-events: none;
}

.progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #d8b48a, #c17b2d);
    border-radius: 999px;
    transition: width 0.28s ease;
}

.step-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
    min-width: 20px;
    flex: 1 1 auto;
}

.step-dot {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #ddd3c4;
    border: 2px solid #cdbba3;
    box-shadow: 0 0 0 3px #f3e8d8;
    /* Use scale() so layout space is always 24×24 — no positional drift */
    transform: scale(0.75);
    transition: transform 0.28s ease,
                background-color 0.24s ease, border-color 0.24s ease,
                box-shadow 0.24s ease, opacity 0.24s ease;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

/* future steps label */
.step-bubble small {
    font-size: 0.72rem;
    font-weight: 500;
    color: #6f624f;
    white-space: nowrap;
    opacity: 0.5;
    text-align: center;
    transition: opacity 0.24s ease, font-size 0.24s ease;
}

/* ── done bubbles shrink by distance ── */
.step-bubble.done small {
    opacity: 0.55;
}

.step-bubble.done[data-dist="1"] .step-dot {
    transform: scale(0.67);
    opacity: 0.9;
}
.step-bubble.done[data-dist="2"] .step-dot {
    transform: scale(0.54);
    opacity: 0.75;
}
.step-bubble.done[data-dist="3"] .step-dot {
    transform: scale(0.46);
    opacity: 0.6;
    box-shadow: none;
}
.step-bubble.done[data-dist="4"] .step-dot,
.step-bubble.done[data-dist="5"] .step-dot,
.step-bubble.done[data-dist="6"] .step-dot {
    transform: scale(0.38);
    opacity: 0.45;
    box-shadow: none;
    border-width: 1.5px;
}

.step-bubble.done[data-dist="2"] small,
.step-bubble.done[data-dist="3"] small,
.step-bubble.done[data-dist="4"] small,
.step-bubble.done[data-dist="5"] small,
.step-bubble.done[data-dist="6"] small {
    font-size: 0.65rem;
    opacity: 0.38;
}

/* ── active bubble ── */
@keyframes dotPop {
    0%   { transform: scale(0.65); }
    55%  { transform: scale(1.12); }
    100% { transform: scale(1); }
}

.step-bubble.active .step-dot {
    transform: scale(1);
    box-shadow: 0 0 0 5px rgba(193, 123, 45, 0.22);
    background: var(--beta-accent);
    border-color: var(--beta-accent);
    animation: dotPop 0.32s ease forwards;
}

.step-bubble.done .step-dot {
    background: #1f8a3a;
    border-color: #1f8a3a;
    box-shadow: 0 0 0 2px rgba(31, 138, 58, 0.18);
}

.step-bubble.active small {
    opacity: 1;
    font-weight: 700;
    color: var(--beta-accent);
}

.wizard-step {
    display: none;
    opacity: 0;
    transform: translateX(14px);
}

.wizard-step.active {
    display: block;
    animation: stepIn 240ms ease forwards;
}

@keyframes stepIn {
    from {
        opacity: 0;
        transform: translateX(14px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.api-loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.main-category-selector {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.main-category-card {
    border: 2px solid #e0e0e0;
    border-radius: 14px;
    padding: 1.05rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.main-category-card:hover {
    border-color: #d4af8c;
    box-shadow: 0 4px 12px rgba(212, 175, 140, 0.22);
}

.main-category-card.active {
    border-color: #d4af8c;
    background: linear-gradient(135deg, rgba(212, 175, 140, 0.15), rgba(139, 115, 85, 0.12));
    box-shadow: 0 0 0 3px rgba(212, 175, 140, 0.22);
}

.main-cat-icon {
    font-size: 1.4rem;
}

.couple-mode-wrap {
    border: 1px solid #e6d6c0;
    background: #fffaf4;
    border-radius: 12px;
    padding: 0.8rem;
    margin-bottom: 0.85rem;
}

.accordion-item {
    border: none;
    margin-bottom: 0.85rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
}

.accordion-button {
    background: #e5d5c7;
    color: #5a5a5a;
    font-weight: 600;
    padding: 1rem 1.1rem;
}

.accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, #d4af8c 0%, #8b7355 100%);
    color: #fff;
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(212, 175, 140, 0.5);
}

.accordion-body {
    background: #f8f9fa;
}

.procedure-name {
    font-weight: 600;
    color: #56473a;
    margin-bottom: 0.55rem;
}

.procedure-variants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
}

.procedure-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1rem 0.8rem;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
    background: #fff;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 90px;
}

.procedure-card-content {
    width: 100%;
}

.variant-duration {
    color: #6c757d;
    font-size: 0.92rem;
    margin-bottom: 0.55rem;
}

.variant-duration i {
    margin-right: 0.2rem;
}

.variant-price {
    font-size: 1.28rem;
    font-weight: 700;
    color: #d4af8c;
}

.procedure-card:hover {
    border-color: #d4af8c;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 175, 140, 0.24);
}

.procedure-card.selected {
    border-color: #d4af8c;
    background: linear-gradient(135deg, rgba(212, 175, 140, 0.15), rgba(212, 175, 140, 0.08));
    box-shadow: 0 0 0 3px rgba(212, 175, 140, 0.28);
}

.date-grid,
.time-grid {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.time-slot-row {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
}

.calendar-container {
    background: #f8f9fa;
    border: 1px solid #e6d6c0;
    border-radius: 14px;
    padding: 0.9rem;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.35rem;
}

.calendar-weekday {
    text-align: center;
    font-size: 0.78rem;
    color: #7b6b5b;
    font-weight: 700;
    padding: 0.2rem 0;
}

.calendar-day {
    border: 2px solid #e0e0e0;
    border-radius: 9px;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #fff;
    font-weight: 600;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    user-select: none;
}

.calendar-day:hover:not(.disabled):not(.other-month) {
    border-color: #d4af8c;
    transform: translateY(-1px);
}

.calendar-day.other-month {
    opacity: 0.45;
    cursor: default;
}

.calendar-day.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f0f0f0;
}

.calendar-day.available {
    background: #e5d5c7;
    border-color: #d4af8c;
}

.calendar-day.selected {
    background: #d4af8c;
    border-color: #8b7355;
    color: #fff;
}

.pill-btn {
    border: 1px solid var(--beta-line);
    border-radius: 999px;
    background: #fff;
    padding: 0.55rem 0.7rem;
    font-weight: 600;
    color: var(--beta-ink);
}

.pill-btn.active {
    background: var(--beta-accent);
    color: #fff;
    border-color: var(--beta-accent);
}

.time-slots-by-hour {
    max-width: 100%;
}

.hour-row {
    background: #e5d5c7;
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid #d8c3ab;
    overflow: hidden;
}

.hour-label {
    font-size: 1rem;
    font-weight: 700;
    color: #8b7355;
    margin-bottom: 0;
}

.hour-toggle {
    width: 100%;
    background: transparent;
    border: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0.9rem;
    font-weight: 700;
    color: #6f5a43;
}

.hour-toggle i {
    transition: transform 0.2s ease;
}

.hour-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.hour-collapse {
    padding: 0 0.9rem 0.9rem;
}

.masseur-box {
    margin-top: 0.9rem;
    border: 1px solid #e6d6c0;
    border-radius: 12px;
    background: #fffaf4;
    padding: 0.9rem;
}

/* Auto-assign button */
.masseur-auto-btn {
    width: 100%;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    text-align: left;
}
.masseur-auto-btn:hover {
    border-color: #d4af8c;
    box-shadow: 0 3px 10px rgba(212,175,140,0.2);
}
.masseur-auto-btn.active {
    border-color: #c17b2d;
    background: #fff8ee;
    box-shadow: 0 0 0 3px rgba(193,123,45,0.15);
}
.masseur-auto-icon {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: linear-gradient(135deg, #e5d5c7, #d4af8c);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
    color: #8b5c1e;
}
.masseur-auto-text { flex: 1; }
.masseur-auto-label {
    font-weight: 700;
    font-size: 0.95rem;
    color: #3a2910;
    line-height: 1.2;
}
.masseur-auto-sub {
    font-size: 0.8rem;
    color: #8b7355;
    margin-top: 0.15rem;
}

/* or-divider */
.masseur-or-divider {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0.75rem 0;
    color: #b0a090;
    font-size: 0.82rem;
    font-weight: 600;
}
.masseur-or-divider::before,
.masseur-or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e6d6c0;
}

/* Masseur chips row */
.masseur-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.6rem;
}
.masseur-chip {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 0.55rem 0.85rem;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
    width: 100%;
}
.masseur-chip:hover {
    border-color: #d4af8c;
}
.masseur-chip.active {
    border-color: #c17b2d;
    background: #fff2e2;
    box-shadow: 0 0 0 3px rgba(193,123,45,0.12);
}
.masseur-chip-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: linear-gradient(135deg, #e5d5c7, #c9a67a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #7a4e1e;
    font-weight: 700;
}
.masseur-chip-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: #3a2910;
    text-align: center;
}

/* keep old .masseur-name / .masseur-sub in case used elsewhere */
.masseur-name {
    font-weight: 700;
    color: #463625;
}

.masseur-sub {
    font-size: 0.88rem;
    color: #7f6b54;
}

.time-slot {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
    background: #fff;
    white-space: nowrap;
}

.time-slot:hover {
    border-color: #d4af8c;
    background: rgba(212, 175, 140, 0.1);
}

.time-slot.selected {
    background: #d4af8c;
    border-color: #8b7355;
    color: #fff;
}

.premium-summary {
    border-radius: 16px;
    border: 1px solid #d9c5a9;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 235, 0.96));
    box-shadow: 0 6px 16px rgba(76, 47, 15, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.85);
    padding: 1rem;
}

.premium-summary .summary-row {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    border-bottom: 1px dashed #e1d3bf;
    padding: 0.45rem 0;
}

.premium-summary .summary-row:last-child {
    border-bottom: 0;
}

.contact-prefill-top {
    border: 1px solid #e6d6c0;
    border-radius: 12px;
    padding: 0.8rem;
    background: #fffaf4;
}

.contact-divider {
    border-color: #e6d6c0;
    opacity: 1;
    margin: 0.9rem 0 1rem;
}

/* ── Skeleton shimmer ─────────────────────────────────── */
@keyframes shimmer {
    from { background-position: -640px 0; }
    to   { background-position:  640px 0; }
}

.sk {
    background: linear-gradient(90deg, #ede8e0 25%, #f5f0e8 50%, #ede8e0 75%);
    background-size: 640px 100%;
    animation: shimmer 1.3s infinite linear;
    border-radius: 8px;
}

/* procedures skeleton */
.sk-wrap { display: flex; flex-direction: column; gap: 0.85rem; }
.sk-group { border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
.sk-group-header { height: 52px; border-radius: 0; }
.sk-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    padding: 0.85rem;
    background: #f8f9fa;
}
.sk-proc-card { height: 88px; }

/* calendar skeleton */
.sk-cal-day { min-height: 42px; }

/* times skeleton */
.sk-hour-block { border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
.sk-hour-header { height: 50px; border-radius: 0; }
.sk-slots-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.55rem;
    padding: 0.6rem 0.9rem 0.9rem;
    background: #f8f9fa;
}
.sk-time-slot { height: 52px; }

/* fade-in when real content replaces skeleton */
@keyframes contentIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}
.content-ready { animation: contentIn 220ms ease forwards; }

@media (min-width: 576px) {
    .beta-header,
    .beta-content,
    .beta-nav,
    .stepper-wrap {
        padding: 1.25rem 1.4rem;
    }

    .beta-stepper {
        gap: 0.7rem;
    }

    .main-category-selector {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .procedure-variants-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .date-grid,
    .time-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }
}

@media (max-width: 575px) {
    .step-bubble small {
        font-size: 0.67rem;
    }
}

@media (min-width: 992px) {
    .time-slot-row {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.5rem;
        overflow-x: auto;
        padding-bottom: 0.15rem;
        scrollbar-width: thin;
        justify-content: flex-start;
    }

    .time-slot-row .time-slot {
        flex: 0 0 92px;
        width: 92px;
        min-width: 92px;
        max-width: 92px;
    }
}
