/* ================================================================
   Signup Wizard — 多步驟註冊頁面（珊瑚橘極簡風）
   ================================================================ */

/* ── Reset & Base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Page ──────────────────────────────────────────────────────── */
body { background: #ffffff; }

/* 隱藏首頁 banner（避免於 signup 頁出現） */
.banner { display: none !important; }

/* ── Hero 頁首 ──────────────────────────────────────────────── */
.WizardHero {
    position: relative;
    padding: 48px 24px 32px;
    background:
        radial-gradient(620px 320px at 12% 18%, rgba(255, 107, 71, .06), transparent 60%),
        radial-gradient(540px 280px at 88% 80%, rgba(255, 107, 71, .045), transparent 65%),
        #ffffff;
}

.WizardHero__inner {
    max-width: 720px;
    margin: 0 auto;
}

.WizardBreadcrumb {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.WizardBreadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color .15s;
}

.WizardBreadcrumb a:hover {
    color: #FF6B47;
    text-decoration: none;
}

.WizardBreadcrumb i { font-size: 10px; color: #cbd5e1; }

/* ── Page Container ─────────────────────────────────────────────── */
.WizardPage {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px 56px;
}

/* ── Header ────────────────────────────────────────────────────── */
.WizardHeader {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.WizardLogo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #FFF4EE 0%, #FFE0D0 100%);
    padding: 4px;
}

.WizardHeaderText {
    flex: 1;
}

.WizardEyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #FF6B47;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 5px 14px 5px 10px;
    border: 1px solid #FFD7C7;
    background: #FFF4EE;
    border-radius: 999px;
    margin-bottom: 12px;
}

.WizardEyebrow-dot {
    width: 6px;
    height: 6px;
    background: #FF6B47;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 107, 71, .14);
}

.WizardTitle {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px;
    line-height: 1.25;
    letter-spacing: -.015em;
}

.WizardSubtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* ── Step Indicator ─────────────────────────────────────────────── */
.StepIndicator {
    display: flex;
    align-items: center;
    margin-bottom: 28px;
    padding: 0 4px;
}

.StepItem {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.StepDot {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ffffff;
    border: 1.5px solid #e2e6ec;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: background .3s, border-color .3s, color .3s, box-shadow .3s;
    position: relative;
    z-index: 1;
}

.StepLabel {
    font-size: 11.5px;
    font-weight: 600;
    color: #94a3b8;
    text-align: center;
    white-space: nowrap;
    transition: color .3s;
    letter-spacing: .02em;
}

.StepLine {
    flex: 1;
    height: 2px;
    background: #eef0f4;
    margin: 0 6px;
    margin-bottom: 20px; /* align with dot center */
    transition: background .4s;
    position: relative;
    border-radius: 2px;
    overflow: hidden;
}

.StepLine::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #FF6B47 0%, #FF8C5A 100%);
    width: 0%;
    transition: width .5s ease;
}

.StepLine.done::after { width: 100%; }

/* Active step */
.StepItem.active .StepDot {
    background: linear-gradient(135deg, #FF6B47 0%, #ED5631 100%);
    border-color: transparent;
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .22),
        0 0 0 4px rgba(255, 107, 71, .14),
        0 8px 20px rgba(255, 107, 71, .25);
}
.StepItem.active .StepLabel { color: #FF6B47; font-weight: 700; }

/* Done step */
.StepItem.done .StepDot {
    background: linear-gradient(135deg, #FFE0D0 0%, #FFD7C7 100%);
    border-color: transparent;
    color: #FF6B47;
}
.StepItem.done .StepDot::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FF6B47 0%, #ED5631 100%);
    color: #fff;
    border-radius: 50%;
}
.StepItem.done .StepLabel { color: #FF6B47; }

/* ── Preview step ─ 第 4 步「綁定 LINE」(註冊後才進行) ────────────
   不可達狀態:用 LINE 綠系 + 淡邊 + 提示字,告知使用者「之後完成」
─────────────────────────────────────────────────────────────────── */
.StepItem--preview .StepDot {
    background: #ffffff;
    border: 1.5px dashed #BFE9CC;
    color: #06C755;
    opacity: .92;
}
.StepItem--preview .StepLabel {
    color: #058036;
    font-weight: 700;
    opacity: .9;
}
.StepItem--preview .StepHint {
    margin-top: 2px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    color: #ffffff;
    background: linear-gradient(135deg, #06C755 0%, #05A849 100%);
    padding: 2px 8px;
    border-radius: 999px;
    line-height: 1.4;
    white-space: nowrap;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .22),
        0 3px 8px rgba(6, 199, 85, .25);
}

/* Preview 線:虛線,不會被 .done 填滿 */
.StepLine--preview {
    background: transparent;
    border-top: 2px dashed #d8eee0;
    height: 0;
    margin-bottom: 19px; /* 對齊 dot 中心(2px border 不佔空間) */
}
.StepLine--preview::after { display: none; }

/* ── Wizard Body ────────────────────────────────────────────────── */
.WizardBody {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 16px;
    padding: 36px 32px 28px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, .03),
        0 14px 40px -12px rgba(15, 30, 70, .08);
}

/* ── Alert ──────────────────────────────────────────────────────── */
.SFAlert {
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 22px;
    font-size: 13.5px;
    font-weight: 600;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    line-height: 1.55;
}
.SFAlert i { margin-top: 2px; flex-shrink: 0; }
.SFAlert--success { background: #ecfdf3; border: 1px solid #b8eecf; color: #047a4d; }
.SFAlert--error   { background: #fef2f2; border: 1px solid #fecdd3; color: #be123c; }

/* ── Step Panels ────────────────────────────────────────────────── */
.StepPanel {
    display: none;
    animation: panelIn .35s ease;
}
.StepPanel.active { display: block; }

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

/* Panel hint box */
.PanelHint {
    background: #FFF4EE;
    border: 1px solid #FFD7C7;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    color: #C44726;
    line-height: 1.65;
    margin-bottom: 24px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.PanelHint i { margin-top: 2px; flex-shrink: 0; color: #FF6B47; }

/* ── Form Fields ────────────────────────────────────────────────── */
.FormField {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 18px;
}

.FormRow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.FormLabel {
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
    letter-spacing: .01em;
}

.Required { color: #ef4444; }
.Optional { color: #94a3b8; font-weight: 400; font-size: 11.5px; margin-left: 2px; }

.FormInput {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid #e2e6ec;
    border-radius: 10px;
    font-size: 14px;
    color: #0f172a;
    background: #ffffff;
    transition: border-color .2s, box-shadow .2s;
    appearance: auto;
    font-family: inherit;
}

.FormInput::placeholder { color: #94a3b8; }
.FormInput:hover { border-color: #cbd5e1; }

.FormInput:focus {
    outline: none;
    border-color: #FF6B47;
    box-shadow: 0 0 0 4px rgba(255, 107, 71, .10);
}

.FormInput.is-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, .08);
    animation: shake .3s;
}

.FormInput.is-valid {
    border-color: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, .08);
}

.FormInput[readonly] {
    background: #f8fafc;
    color: #64748b;
    cursor: not-allowed;
}

.FormTextarea {
    height: auto;
    min-height: 96px;
    padding: 12px 14px;
    resize: vertical;
    line-height: 1.6;
}

/* 國家 / 城市：select（台灣）或 input（其他國家）統一樣式 */
.CountryInputContainer select,
.CountryInputContainer input,
.CityInputContainer select,
.CityInputContainer input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid #e2e6ec;
    border-radius: 10px;
    font-size: 14px;
    color: #0f172a;
    background: #ffffff;
    box-sizing: border-box;
    appearance: auto;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.CountryInputContainer select:hover,
.CountryInputContainer input:hover,
.CityInputContainer select:hover,
.CityInputContainer input:hover {
    border-color: #cbd5e1;
}

.CountryInputContainer select:focus,
.CountryInputContainer input:focus,
.CityInputContainer select:focus,
.CityInputContainer input:focus {
    border-color: #FF6B47;
    box-shadow: 0 0 0 4px rgba(255, 107, 71, .10);
}

.Istate { width: 100%; }

.FieldHint {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.5;
}

.FieldError {
    font-size: 12px;
    color: #ef4444;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.FieldError::before {
    content: "\f06a";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 11px;
}

/* ── Password Toggle ────────────────────────────────────────────── */
.InputWithToggle {
    position: relative;
    display: flex;
    align-items: center;
}
.InputWithToggle .FormInput { padding-right: 44px; }

.ToggleBtn {
    position: absolute;
    right: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #94a3b8;
    font-size: 14px;
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color .15s, background-color .15s;
}
.ToggleBtn:hover { color: #FF6B47; background: #FFF4EE; }

/* ── Password Strength ──────────────────────────────────────────── */
.StrengthBar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    visibility: hidden;
}
.StrengthBar.visible { visibility: visible; }

.StrengthTrack {
    flex: 1;
    height: 5px;
    background: #eef0f4;
    border-radius: 99px;
    overflow: hidden;
}
.StrengthFill {
    height: 100%;
    width: 0%;
    border-radius: 99px;
    transition: width .35s ease, background-color .3s;
}
.StrengthLabel {
    font-size: 11px;
    font-weight: 700;
    min-width: 32px;
    text-align: right;
    letter-spacing: .04em;
}

/* Password hints checklist */
.PasswordHints {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
}
.Hint {
    font-size: 12px;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color .2s;
}
.Hint i { font-size: 8px; }
.Hint.ok {
    color: #16a34a;
}
.Hint.ok i::before { content: '\f058'; font-family: 'Font Awesome 6 Free'; font-size: 12px; }

/* ── LINE Binding Step ──────────────────────────────────────────── */
.LineBindCard {
    text-align: center;
    padding: 8px 0 4px;
}

.LineBindIcon {
    width: 76px;
    height: 76px;
    background: linear-gradient(135deg, #06C755 0%, #05a849 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 22px;
    font-size: 38px;
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .25),
        0 12px 30px rgba(6, 199, 85, .3);
}

.LineBindTitle {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px;
    letter-spacing: -.015em;
}

.LineBindDesc {
    font-size: 14px;
    color: #64748b;
    line-height: 1.7;
    margin: 0 0 24px;
}

.LineBenefits {
    list-style: none;
    padding: 18px 22px;
    margin: 0 0 28px;
    text-align: left;
    background: #f6fdf9;
    border: 1px solid #c6f0d8;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.LineBenefits li {
    font-size: 13.5px;
    font-weight: 500;
    color: #047a4d;
    display: flex;
    align-items: center;
    gap: 10px;
}
.LineBenefits li i {
    color: #fff;
    background: #06C755;
    font-size: 9px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.LineBindActions {
    margin-bottom: 16px;
}

.LineBtnPrimary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 32px;
    height: 50px;
    background: linear-gradient(135deg, #06C755 0%, #05a849 100%);
    color: #fff;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .03em;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .25s ease;
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .22),
        0 1px 2px rgba(15, 30, 70, .08),
        0 12px 28px rgba(6, 199, 85, .3);
}
.LineBtnPrimary:hover {
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .28),
        0 2px 4px rgba(15, 30, 70, .1),
        0 18px 36px rgba(6, 199, 85, .4);
    color: #fff;
    text-decoration: none;
}
.LineBtnPrimary:active { transform: translateY(0); }
.LineBtnPrimary i { font-size: 20px; }

.LineBindedNotice {
    background: #ecfdf3;
    border: 1px solid #b8eecf;
    border-radius: 10px;
    padding: 11px 16px;
    font-size: 13px;
    color: #047a4d;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    animation: panelIn .3s ease;
}

.LineSkipBtn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 13px;
    cursor: pointer;
    padding: 10px 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color .15s, background-color .15s;
    border-radius: 8px;
    font-weight: 500;
}
.LineSkipBtn:hover { color: #FF6B47; background: #FFF4EE; }

/* ── Navigation ─────────────────────────────────────────────────── */
.StepNav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid #f1f3f6;
}

.NavRight {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.NavBtn {
    height: 46px;
    padding: 0 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .03em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform .2s ease, box-shadow .25s ease, background-color .2s, color .2s, border-color .2s;
    border: 1px solid transparent;
    font-family: inherit;
}

.NavBtn--prev {
    background: #ffffff;
    color: #475569;
    border-color: #e2e6ec;
}
.NavBtn--prev:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
}

.NavBtn--next {
    background: linear-gradient(135deg, #FF6B47 0%, #ED5631 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, .14);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .22),
        0 1px 2px rgba(15, 30, 70, .08),
        0 8px 22px rgba(255, 107, 71, .26);
}
.NavBtn--next:hover {
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .28),
        0 2px 4px rgba(15, 30, 70, .1),
        0 14px 32px rgba(255, 107, 71, .36);
}
.NavBtn--next:active { transform: translateY(0); }

.NavBtn--submit {
    background: linear-gradient(135deg, #FF6B47 0%, #ED5631 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, .14);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .22),
        0 1px 2px rgba(15, 30, 70, .08),
        0 10px 26px rgba(255, 107, 71, .28);
}
.NavBtn--submit:hover {
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .28),
        0 2px 4px rgba(15, 30, 70, .1),
        0 16px 36px rgba(255, 107, 71, .4);
}
.NavBtn--submit:active { transform: translateY(0); }
.NavBtn--submit:disabled {
    background: #cbd5e1;
    color: #fff;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ── Footer ────────────────────────────────────────────────────── */
.WizardFooterNote {
    text-align: center;
    font-size: 12.5px;
    color: #94a3b8;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}
.WizardFooterNote i { color: #FF6B47; }

/* 已有帳號 → 登入：與「下一步」同列（StepNav 左側） */
.StepNavLogin {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
    margin-right: auto;
    flex-wrap: wrap;
}
#prevBtn + .StepNavLogin { margin-left: 14px; } /* 上一步顯示時保持間距 */
.StepNavLogin__hint { font-size: 13.5px; color: #64748b; font-weight: 600; }
.StepNavLogin__btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    color: #ED5631;
    border: 2px solid #FF6B47;
    font-size: 14px;
    font-weight: 800;
    padding: 9px 20px;
    border-radius: 999px;
    box-shadow: 0 3px 10px rgba(255,107,71,.18);
    transition: background .15s, color .15s, transform .1s;
}
.StepNavLogin:hover .StepNavLogin__btn { background: #FF6B47; color: #fff; }
.StepNavLogin:active .StepNavLogin__btn { transform: translateY(1px); }
@media (max-width: 640px) {
    .StepNavLogin__hint { display: none; } /* 手機留按鈕就好，避免擠壓下一步 */
}

/* 頂部 Hero 登入入口：不用捲動就看得到（桌機靠右；手機換行置左） */
.WizardHeroLogin {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none !important;
    flex-shrink: 0;
}
.WizardHeroLogin__hint { font-size: 12.5px; color: #64748b; font-weight: 600; }
.WizardHeroLogin__btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    color: #ED5631;
    border: 2px solid #FF6B47;
    font-size: 14px;
    font-weight: 800;
    padding: 9px 20px;
    border-radius: 999px;
    box-shadow: 0 3px 10px rgba(255,107,71,.18);
    transition: background .15s, color .15s, transform .1s;
}
.WizardHeroLogin:hover .WizardHeroLogin__btn { background: #FF6B47; color: #fff; }
.WizardHeroLogin:active .WizardHeroLogin__btn { transform: translateY(1px); }
@media (max-width: 640px) {
    .WizardHeader { flex-wrap: wrap; }
    .WizardHeroLogin { margin-left: 0; flex-direction: row; width: 100%; margin-top: 4px; }
}

/* ── Animations ─────────────────────────────────────────────────── */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    60%       { transform: translateX(6px); }
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .WizardHero { padding: 36px 18px 24px; }
    .WizardTitle { font-size: 22px; }
    .WizardSubtitle { font-size: 13px; }
    .WizardLogo { width: 44px; height: 44px; }

    .WizardBody { padding: 26px 20px 22px; border-radius: 14px; }

    .StepLabel { font-size: 11px; }
    .StepDot   { width: 36px; height: 36px; font-size: 13px; }
    .StepLine  { margin-bottom: 18px; }
    .StepLine--preview { margin-bottom: 17px; }
    .StepHint  { font-size: 9px; padding: 2px 6px; }

    .FormRow { grid-template-columns: 1fr; gap: 0; }

    .NavBtn { padding: 0 16px; font-size: 13.5px; height: 44px; }

    .LineBtnPrimary { width: 100%; }
}

@media (max-width: 420px) {
    .WizardHero { padding: 30px 16px 20px; }
    .WizardHeader { gap: 12px; margin-bottom: 24px; }
    .WizardTitle { font-size: 20px; }
    .WizardEyebrow { font-size: 11px; letter-spacing: .03em; padding: 4px 12px 4px 8px; }

    .StepLabel { display: none; }
    .StepDot   { width: 32px; height: 32px; font-size: 12px; }
    .StepHint  { display: none; }

    .PanelHint { font-size: 12.5px; padding: 11px 12px; }
}
