/* Wizard Cadastro de Loja — layout moderno */
:root {
    --wcl-ink: #0f172a;
    --wcl-ink-soft: #1e293b;
    --wcl-slate: #475569;
    --wcl-muted: #64748b;
    --wcl-line: #e2e8f0;
    --wcl-surface: #ffffff;
    --wcl-page: #f1f5f9;
    --wcl-accent: #c9a227;
    --wcl-accent-soft: rgba(201, 162, 39, 0.14);
    --wcl-accent-glow: rgba(201, 162, 39, 0.25);
    --wcl-focus: #2563eb;
    --wcl-success: #059669;
    --wcl-danger: #dc2626;
    --wcl-radius-lg: 20px;
    --wcl-radius-md: 12px;
    --wcl-radius-sm: 10px;
    --wcl-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(15, 23, 42, 0.04);
    --wcl-font: 'DM Sans', system-ui, sans-serif;
    --wcl-font-display: 'Instrument Serif', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
}

body.wcl-body {
    margin: 0;
    min-height: 100dvh;
    font-family: var(--wcl-font);
    color: var(--wcl-ink);
    background: var(--wcl-page);
    -webkit-font-smoothing: antialiased;
}

/* —— Layout split —— */
.wcl-wrapper {
    display: flex;
    min-height: 100dvh;
}

.wcl-brand {
    flex: 0 0 min(34%, 360px);
    position: relative;
    display: flex;
    flex-direction: column;
    padding: clamp(1.5rem, 3vh, 2.5rem);
    background:
        radial-gradient(ellipse 90% 70% at 20% 20%, rgba(201, 162, 39, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 80% 80%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
        linear-gradient(165deg, #0f172a 0%, #1e293b 45%, #0f172a 100%);
    color: #f8fafc;
    overflow: hidden;
}

.wcl-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.wcl-brand-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    height: 100%;
    max-width: 360px;
    margin: 0 auto;
}

.wcl-brand-mark {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.wcl-brand-mark img {
    width: 48px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.wcl-brand-name {
    font-family: var(--wcl-font-display);
    font-size: 2rem;
    line-height: 1;
    margin: 0;
    font-weight: 400;
}

.wcl-brand-tagline {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(248, 250, 252, 0.5);
    margin: 0.25rem 0 0;
}

.wcl-brand-lead {
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(248, 250, 252, 0.75);
    margin: 0;
}

.wcl-brand-lead strong {
    color: #f8fafc;
    font-weight: 600;
}

/* —— Aviso de validação —— */
.wcl-validation-card {
    padding: 1.15rem 1.2rem;
    border-radius: var(--wcl-radius-md);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(201, 162, 39, 0.35);
    backdrop-filter: blur(8px);
}

.wcl-validation-card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.wcl-validation-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(201, 162, 39, 0.18);
    border: 1px solid rgba(201, 162, 39, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wcl-accent);
    font-size: 1rem;
}

.wcl-validation-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 0.15rem;
    line-height: 1.35;
}

.wcl-validation-sub {
    font-size: 0.72rem;
    color: rgba(248, 250, 252, 0.55);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.wcl-validation-text {
    font-size: 0.82rem;
    line-height: 1.55;
    color: rgba(248, 250, 252, 0.78);
    margin: 0;
}

.wcl-validation-list {
    margin: 0.65rem 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.wcl-validation-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.78rem;
    line-height: 1.45;
    color: rgba(248, 250, 252, 0.7);
}

.wcl-validation-list li i {
    color: var(--wcl-accent);
    margin-top: 0.15rem;
    font-size: 0.65rem;
}

.wcl-validation-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    margin: 0.75rem 0 0;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(201, 162, 39, 0.2);
}

.wcl-validation-meta-item {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    font-size: 0.76rem;
    color: rgba(248, 250, 252, 0.65);
}

.wcl-validation-meta-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(248, 250, 252, 0.45);
}

.wcl-validation-ip {
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;
    letter-spacing: 0.02em;
}

.wcl-validation-mobile .wcl-validation-meta {
    border-top-color: rgba(201, 162, 39, 0.35);
}

.wcl-validation-mobile .wcl-validation-meta-item {
    color: var(--wcl-muted);
}

.wcl-validation-mobile .wcl-validation-meta-label {
    color: var(--wcl-muted);
}

/* —— Features sidebar —— */
.wcl-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.wcl-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 0.5rem;
    border-radius: var(--wcl-radius-sm);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    text-align: center;
    font-size: 0.72rem;
    color: rgba(248, 250, 252, 0.7);
    line-height: 1.3;
}

.wcl-feature i {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(201, 162, 39, 0.12);
    color: var(--wcl-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.wcl-brand-footer {
    margin-top: auto;
    padding-top: 0.5rem;
}

.wcl-back-login {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: rgba(248, 250, 252, 0.55);
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.15s;
}

.wcl-back-login:hover {
    color: #f8fafc;
}

/* —— Painel do formulário —— */
.wcl-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-y: auto;
    background: var(--wcl-surface);
}

.wcl-form-inner {
    width: 100%;
    max-width: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: clamp(1.25rem, 2.5vw, 2rem) clamp(1.25rem, 3vw, 2.5rem);
    animation: wclFadeIn 0.5s ease-out;
}

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

.wcl-page-top {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--wcl-line);
}

.wcl-page-top-aside {
    flex-shrink: 0;
}

.wcl-form-header {
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
}

.wcl-form-header h1 {
    font-family: var(--wcl-font-display);
    font-size: clamp(1.65rem, 3vw, 2rem);
    font-weight: 400;
    margin: 0 0 0.5rem;
    color: var(--wcl-ink);
    line-height: 1.2;
}

.wcl-form-header p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--wcl-muted);
    line-height: 1.55;
}

/* Aviso mobile */
.wcl-validation-mobile {
    display: none;
    margin-bottom: 1.5rem;
}

.wcl-validation-mobile .wcl-validation-card {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: rgba(201, 162, 39, 0.45);
    color: var(--wcl-ink);
}

.wcl-validation-mobile .wcl-validation-icon {
    background: rgba(201, 162, 39, 0.2);
}

.wcl-validation-mobile .wcl-validation-title {
    color: var(--wcl-ink);
}

.wcl-validation-mobile .wcl-validation-sub {
    color: var(--wcl-muted);
}

.wcl-validation-mobile .wcl-validation-text,
.wcl-validation-mobile .wcl-validation-list li {
    color: var(--wcl-slate);
}

/* —— Progresso do wizard —— */
.wcl-progress {
    margin-bottom: 0;
}

.wcl-progress-track {
    display: flex;
    align-items: flex-start;
    gap: 0;
    position: relative;
}

.wcl-progress-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.wcl-progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 18px;
    left: calc(50% + 22px);
    width: calc(100% - 44px);
    height: 2px;
    background: var(--wcl-line);
    z-index: 0;
}

.wcl-progress-step.completed:not(:last-child)::after {
    background: linear-gradient(90deg, var(--wcl-success), var(--wcl-line));
}

.wcl-progress-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--wcl-line);
    color: var(--wcl-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    position: relative;
    z-index: 1;
}

.wcl-progress-step.active .wcl-progress-num {
    background: var(--wcl-ink);
    color: #fff;
    box-shadow: 0 0 0 4px var(--wcl-accent-soft), 0 4px 12px rgba(15, 23, 42, 0.2);
}

.wcl-progress-step.completed .wcl-progress-num {
    background: var(--wcl-success);
    color: #fff;
}

.wcl-progress-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--wcl-muted);
    text-align: center;
}

.wcl-progress-step.active .wcl-progress-label {
    color: var(--wcl-ink);
}

.wcl-progress-step.completed .wcl-progress-label {
    color: var(--wcl-success);
}

/* —— Seções do formulário —— */
.wcl-form-card {
    flex: 1;
    width: 100%;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin-bottom: 0;
}

.wcl-form-sections-split {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.wcl-section-block {
    min-width: 0;
}

.wcl-section-block--full {
    margin-top: 0.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--wcl-line);
}

.wcl-section-hint {
    margin: -0.35rem 0 1rem;
    font-size: 0.88rem;
    color: var(--wcl-muted);
}

.wcl-origem-fieldset {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.wcl-origem-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (min-width: 576px) {
    .wcl-origem-options {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.wcl-origem-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 48px;
    padding: 0.65rem 0.85rem;
    border: 1.5px solid var(--wcl-line);
    border-radius: var(--wcl-radius-sm);
    background: #fff;
    color: var(--wcl-ink-soft);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

.wcl-origem-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.wcl-origem-option:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.wcl-origem-option.is-selected {
    border-color: var(--wcl-accent);
    background: var(--wcl-accent-soft);
    box-shadow: 0 0 0 3px var(--wcl-accent-glow);
    color: var(--wcl-ink);
}

.wcl-origem-outro-wrap {
    margin-top: 1.35rem;
    margin-bottom: 1.25rem;
    padding-top: 1.15rem;
    padding-bottom: 0.25rem;
    border-top: 1px solid var(--wcl-line);
    max-width: 100%;
}

.wcl-origem-outro-wrap .form-label {
    display: block;
    margin-bottom: 0.45rem;
}

.wcl-origem-outro-wrap .form-control {
    max-width: 520px;
}

.wcl-origem-outro-wrap.is-hidden {
    display: none;
}

.wcl-form-card .row {
    --bs-gutter-x: 1.25rem;
    --bs-gutter-y: 1rem;
}

#wizardLojaForm,
#wizardObreiroForm {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.wcl-form-inner > form {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.wcl-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wcl-slate);
    margin: 0 0 1.15rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--wcl-line);
}

.wcl-section-title i {
    color: var(--wcl-accent);
    font-size: 0.85rem;
}

.wcl-section-title + .wcl-section-title,
.wcl-form-card .wcl-section-title:not(:first-child) {
    margin-top: 0;
}

.wcl-form-card .form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--wcl-ink-soft);
    margin-bottom: 0.35rem;
}

.wcl-form-card .form-control,
.wcl-form-card .form-select {
    border: 1.5px solid var(--wcl-line);
    border-radius: var(--wcl-radius-sm);
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
    min-height: 2.75rem;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: var(--wcl-surface);
}

.wcl-form-card .form-control:focus,
.wcl-form-card .form-select:focus {
    border-color: var(--wcl-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    outline: none;
}

.wcl-form-card .form-text {
    font-size: 0.78rem;
    color: var(--wcl-muted);
}

.wcl-form-card .input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.wcl-form-card .input-group .input-group-text {
    border: 1.5px solid var(--wcl-line);
    border-left: none;
    border-radius: 0 var(--wcl-radius-sm) var(--wcl-radius-sm) 0;
    background: var(--wcl-page);
    cursor: pointer;
    transition: background 0.15s;
    min-height: 2.75rem;
}

.wcl-form-card .input-group .input-group-text:hover {
    background: var(--wcl-accent-soft);
}

.wcl-form-card .input-group .input-group-text i {
    color: var(--wcl-accent);
}

.wcl-badge-info {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border-radius: 99px;
    background: var(--wcl-page);
    border: 1px solid var(--wcl-line);
    font-size: 0.78rem;
    color: var(--wcl-muted);
    margin-top: 0.5rem;
}

.wcl-badge-info i {
    color: var(--wcl-accent);
}

/* —— Alertas —— */
.wcl-alert {
    border-radius: var(--wcl-radius-md);
    border: none;
    padding: 0.9rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.wcl-alert-danger {
    background: #fef2f2;
    color: #b91c1c;
    border-left: 4px solid var(--wcl-danger);
}

/* —— Barra de ações —— */
.wcl-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1.5rem;
    justify-content: flex-end;
    border-top: 1px solid var(--wcl-line);
}

.wcl-actions .btn {
    flex: 0 1 auto;
    min-width: 150px;
    min-height: 48px;
    border-radius: var(--wcl-radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: transform 0.15s, box-shadow 0.15s;
}

.wcl-btn-primary {
    background: var(--wcl-ink);
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
}

.wcl-btn-primary:hover:not(:disabled) {
    background: var(--wcl-ink-soft);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.25);
}

.wcl-btn-secondary {
    background: var(--wcl-surface);
    color: var(--wcl-slate);
    border: 1.5px solid var(--wcl-line);
}

.wcl-btn-secondary:hover {
    background: var(--wcl-page);
    color: var(--wcl-ink);
    border-color: var(--wcl-slate);
}

.btn-submitting {
    pointer-events: none;
    opacity: 0.85;
}

.wcl-spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: wclSpin 0.6s linear infinite;
    vertical-align: -0.15em;
}

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

/* —— Página de sucesso —— */
.wcl-success-card {
    text-align: center;
    padding: clamp(2rem, 5vw, 3rem) clamp(1.25rem, 4vw, 2rem);
}

.wcl-success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: var(--wcl-success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 24px rgba(5, 150, 105, 0.2);
}

.wcl-success-card h2 {
    font-family: var(--wcl-font-display);
    font-size: 1.75rem;
    margin: 0 0 0.75rem;
    font-weight: 400;
}

.wcl-success-card .lead {
    color: var(--wcl-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 440px;
    margin: 0 auto 1.5rem;
}

/* —— Mobile —— */
@media (max-width: 900px) {
    .wcl-wrapper {
        flex-direction: column;
    }

    .wcl-brand {
        flex: none;
        padding: 1.5rem 1.25rem;
    }

    .wcl-brand-inner {
        max-width: none;
        gap: 1rem;
    }

    .wcl-validation-desktop {
        display: none;
    }

    .wcl-validation-mobile {
        display: block;
    }

    .wcl-features {
        display: none;
    }

    .wcl-brand-lead {
        font-size: 0.85rem;
    }

    .wcl-brand-footer {
        display: none;
    }

    .wcl-form-inner {
        padding-bottom: 100px;
    }

    .wcl-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        justify-content: space-between;
        background: var(--wcl-surface);
        padding: 0.85rem 1.25rem;
        margin: 0;
        border-top: 1px solid var(--wcl-line);
        box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
        z-index: 100;
    }

    .wcl-actions .btn {
        flex: 1;
        min-height: 48px;
        min-width: 0;
    }
}

@media (min-width: 901px) {
    .wcl-validation-mobile {
        display: none;
    }

    .wcl-brand {
        flex: 0 0 300px;
    }

    .wcl-page-top {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        gap: 2rem;
    }

    .wcl-page-top-aside {
        width: 260px;
    }

    .wcl-form-sections-split {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 2.5rem;
        align-items: start;
    }

    .wcl-section-block + .wcl-section-block {
        border-left: 1px solid var(--wcl-line);
        padding-left: 2.5rem;
    }

    .wcl-section-block--full {
        grid-column: 1 / -1;
        border-left: none !important;
        padding-left: 0 !important;
    }

    .wcl-form-inner {
        padding: 2rem 2.5rem;
    }
}

@media (min-width: 1200px) {
    .wcl-brand {
        flex: 0 0 320px;
    }

    .wcl-form-inner {
        padding: 2rem 3rem;
    }

    .wcl-form-sections-split {
        gap: 0 3rem;
    }

    .wcl-section-block + .wcl-section-block {
        padding-left: 3rem;
    }
}
