/* ═══════════════════════════════════════════════════════════════════
   PILOT ONBOARDING — Sprint R
   ═══════════════════════════════════════════════════════════════════
   Senior-friendly 5-step wizard. Big type, big buttons, clean layout. */

.pob-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 30, 36, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    padding: 16px;
    animation: pob-fade-in 0.3s ease-out;
}
@keyframes pob-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.pob-card {
    background: #fbf7ef;
    border-radius: 20px;
    max-width: 560px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    animation: pob-slide-up 0.35s ease-out;
}
@keyframes pob-slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

/* Progress dots */
.pob-progress {
    display: flex;
    gap: 8px;
    padding: 16px 24px 0;
    justify-content: center;
}
.pob-progress-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(200, 168, 119, 0.25);
    transition: all 0.2s ease;
}
.pob-progress-dot.pob-progress-done {
    background: #c8a877;
}
.pob-progress-dot.pob-progress-current {
    background: #c8a877;
    transform: scale(1.4);
    box-shadow: 0 0 0 4px rgba(200, 168, 119, 0.25);
}

/* Body */
.pob-body {
    padding: 24px clamp(24px, 5vw, 40px) 32px;
    flex: 1;
}

/* Step 1: Welcome */
.pob-welcome {
    text-align: center;
}
.pob-avatar {
    width: 140px;
    height: 140px;
    margin: 12px auto 20px;
    display: block;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%,
        color-mix(in srgb, #c8a877 22%, #fff),
        color-mix(in srgb, #c8a877 8%, #fff));
    padding: 6px;
    animation: pob-breathe 3s ease-in-out infinite;
}
@keyframes pob-breathe {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.03); }
}

/* Step headers */
.pob-step h2,
.pob-welcome h1 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin: 0 0 14px;
    color: #2a3940;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
}
.pob-lead {
    font-size: 1.08rem;
    line-height: 1.55;
    color: #3a4a52;
    margin: 0 0 16px;
}
.pob-welcome .pob-lead { text-align: center; }
.pob-tiny {
    font-size: 0.88rem;
    color: #6a7880;
    margin: 12px 0 0;
    font-style: italic;
}
.pob-welcome .pob-tiny { text-align: center; }

/* Actions */
.pob-actions {
    display: flex;
    gap: 10px;
    margin-top: 28px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.pob-welcome .pob-actions { justify-content: center; }

.pob-btn-primary,
.pob-btn-ghost {
    padding: 14px 24px;
    font-size: 1.05rem;
    font-family: inherit;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    min-height: 52px;
    transition: all 0.15s ease;
    border: none;
}
.pob-btn-primary {
    background: #c8a877;
    color: #fff;
    box-shadow: 0 2px 8px rgba(200, 168, 119, 0.35);
}
.pob-btn-primary:hover:not(:disabled) {
    background: #b89964;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(200, 168, 119, 0.45);
}
.pob-btn-primary:disabled {
    background: #ccc;
    color: #fff;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.7;
}
.pob-btn-ghost {
    background: transparent;
    color: #3a4a52;
    border: 1.5px solid #ccd3da;
}
.pob-btn-ghost:hover {
    background: #f0e9da;
    border-color: #c8a877;
    color: #8a6b20;
}

/* Step 2: Voice test */
.pob-voice-box {
    text-align: center;
    padding: 24px 0;
}
.pob-voice-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 36px;
    margin: 0 auto;
    background: #fff;
    border: 3px solid #c8a877;
    border-radius: 20px;
    cursor: pointer;
    min-width: 240px;
    transition: all 0.2s ease;
    font-family: inherit;
}
.pob-voice-btn:hover:not(:disabled) {
    background: color-mix(in srgb, #c8a877 8%, #fff);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(200, 168, 119, 0.25);
}
.pob-voice-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}
.pob-voice-btn.pob-voice-ok {
    background: color-mix(in srgb, #6ba368 14%, #fff);
    border-color: #6ba368;
}
.pob-voice-icon {
    font-size: 3rem;
    line-height: 1;
}
.pob-voice-btn.pob-voice-ok .pob-voice-icon {
    color: #6ba368;
}
.pob-voice-label {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2a3940;
}
.pob-voice-transcript {
    margin-top: 16px;
    font-size: 1.15rem;
    font-style: italic;
    color: #6a7880;
    min-height: 28px;
}

/* Step 3: Phone */
.pob-phone-box {
    padding: 16px 0;
}
.pob-phone-label {
    display: block;
    margin-bottom: 8px;
}
.pob-phone-label > span {
    display: block;
    font-weight: 600;
    color: #3a4a52;
    margin-bottom: 6px;
    font-size: 1rem;
}
.pob-phone-input {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid #d0d6de;
    border-radius: 12px;
    font-size: 1.2rem;
    font-family: inherit;
    background: #fff;
    letter-spacing: 0.03em;
    min-height: 56px;
}
.pob-phone-input:focus {
    outline: none;
    border-color: #c8a877;
    box-shadow: 0 0 0 4px rgba(200, 168, 119, 0.2);
}

/* Step 4: ATHS steps (iOS) */
.pob-aths-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 20px 0;
}
.pob-aths-step {
    display: flex;
    gap: 16px;
    padding: 14px 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.pob-aths-num {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #c8a877;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}
.pob-aths-step strong {
    display: block;
    margin-bottom: 2px;
    color: #2a3940;
    font-size: 1rem;
}
.pob-aths-step p {
    margin: 0;
    color: #6a7880;
    font-size: 0.92rem;
    line-height: 1.45;
}
.pob-icon-box {
    display: inline-block;
    padding: 0 6px;
    background: #f0e9da;
    border-radius: 4px;
    margin: 0 2px;
}
.pob-checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 12px;
    font-size: 0.92rem;
    color: #3a4a52;
    cursor: pointer;
    user-select: none;
}
.pob-checkbox-inline input { width: 18px; height: 18px; cursor: pointer; }

/* Step 4 Android: notif button */
.pob-notif-box {
    text-align: center;
    padding: 20px 0;
}
.pob-btn-notif {
    padding: 18px 32px;
    font-size: 1.15rem;
    min-height: 60px;
}

/* Step 5: Consents */
.pob-consent-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 20px 0;
}
.pob-consent-row {
    display: flex;
    gap: 12px;
    padding: 16px 18px;
    background: #fff;
    border: 2px solid color-mix(in srgb, #c8a877 20%, transparent);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    align-items: flex-start;
}
.pob-consent-row:has(input:checked) {
    background: color-mix(in srgb, #c8a877 12%, #fff);
    border-color: #c8a877;
}
.pob-consent-row input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: #c8a877;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
}
.pob-consent-row span {
    font-size: 0.98rem;
    line-height: 1.5;
    color: #2a3940;
}
.pob-consent-row a {
    color: #8a6b20;
    font-weight: 600;
    text-decoration: underline;
}

/* Done toast */
.pob-toast {
    position: fixed;
    left: 50%;
    bottom: 40px;
    transform: translate(-50%, 30px);
    background: #2a3940;
    color: #fff;
    padding: 14px 28px;
    border-radius: 999px;
    font-size: 1.05rem;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: all 0.35s ease;
    z-index: 10000;
}
.pob-toast.pob-toast-show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* Responsive */
@media (max-width: 500px) {
    .pob-actions {
        flex-direction: column-reverse;
    }
    .pob-actions > * {
        width: 100%;
    }
    .pob-checkbox-inline {
        margin: 10px 0;
        width: 100%;
        justify-content: center;
    }
    .pob-card {
        border-radius: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pob-overlay,
    .pob-card,
    .pob-avatar { animation: none; }
    .pob-btn-primary:hover:not(:disabled),
    .pob-voice-btn:hover:not(:disabled) { transform: none; }
}

@media (forced-colors: active) {
    .pob-btn-primary,
    .pob-btn-ghost { border: 2px solid ButtonText; }
    .pob-consent-row:has(input:checked) { border: 3px solid CanvasText; }
}
