/* ========================================
   Register Wizard - CSS
   Design System: Kavo
   Mobile-first, 5 steps para cadastro de lojista
   Baseado no vehicle-wizard.css
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --rw-primary: #111111;
    --rw-primary-hover: #000000;
    --rw-bg: #f7f8fa;
    --rw-text: #0f172a;
    --rw-text-secondary: #6b7280;
    --rw-border: #e5e7eb;
    --rw-border-focus: #a3aab5;
    --rw-success: #10b981;
    --rw-error: #b91c1c;
    --rw-white: #ffffff;
    --rw-dealer-gradient: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    --rw-dealer-text: #374151;
}

/* Container principal - 100% largura responsivo */
.rw-container {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    background: var(--rw-bg);
    font-family: 'Manrope', 'Poppins', sans-serif;
    overflow-x: hidden;
}

.rw-container * {
    font-family: 'Manrope', 'Poppins', sans-serif;
    box-sizing: border-box;
}

/* Header do wizard - Logo e Título acima do progress bar */
.rw-wizard-header {
    text-align: center;
    padding: 2rem 1.5rem 1.5rem;
    width: 100%;
}

.rw-wizard-header__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.rw-wizard-header__logo img {
    height: 48px;
    width: auto;
}

.rw-wizard-header__title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--rw-text);
    margin: 0;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

@media (max-width: 576px) {
    .rw-wizard-header {
        padding: 1.5rem 1rem 1rem;
    }
    
    .rw-wizard-header__logo img {
        height: 40px;
    }
    
    .rw-wizard-header__title {
        font-size: 1.5rem;
    }
}


/* Progress bar - ajustado para header oficial */
.rw-progress {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99;
    width: 100%;
    height: 4px;
    background: var(--rw-border);
}

.rw-progress__bar {
    height: 100%;
    background: var(--rw-primary);
    transition: width 0.3s ease;
    border-radius: 0 2px 2px 0;
}

/* Conteúdo principal - 100% largura responsivo */
.rw-content {
    flex: 1;
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding: 2rem 1rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* Card branco envolvendo os steps */
.rw-card {
    position: relative;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    box-shadow: none;
    padding: 1.75rem 1.75rem 1.5rem;
}

/* Botão sair sutil - dentro do card, canto superior esquerdo */
.rw-exit-btn-inline {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #dc2626;
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    opacity: 0.6;
    z-index: 10;
}

.rw-exit-btn-inline:hover {
    opacity: 1;
    background: rgba(220, 38, 38, 0.08);
    color: #b91c1c;
}

/* Header do card - Logo e Título */
.rw-card-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-top: 0.5rem;
}

.rw-card-header__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.rw-card-header__logo img {
    height: 42px;
    width: auto;
}

.rw-card-header__title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--rw-text);
    margin: 0;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

@media (max-width: 576px) {
    .rw-card-header {
        margin-bottom: 1.5rem;
    }
    
    .rw-card-header__logo img {
        height: 36px;
    }
    
    .rw-card-header__title {
        font-size: 1.25rem;
    }
}

/* Mobile: padding ainda menor para evitar corte */
@media (max-width: 576px) {
    .rw-content {
        padding: 1.5rem 0.75rem;
        max-width: 100%;
    }
    
    .rw-card {
        padding: 1.25rem 1rem 1rem;
        border-radius: 16px;
    }
}

@media (max-width: 400px) {
    .rw-card {
        padding: 1rem 0.875rem 1rem;
    }
}

/* Step container */
.rw-step {
    display: none;
    animation: rwFadeIn 0.3s ease;
}

.rw-step.active {
    display: block;
}

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

/* Pergunta principal */
.rw-question {
    text-align: center;
    margin-bottom: 2rem;
}

.rw-question__title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--rw-text);
    margin-bottom: 0.4rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.rw-question__subtitle {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--rw-text-secondary);
    margin: 0;
}

/* Inputs */
.rw-input {
    width: 100%;
    min-height: 42px;
    padding: 0.62rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f7f8fa;
    color: #111827;
    transition: border-color 160ms ease, background-color 160ms ease;
    box-sizing: border-box;
    box-shadow: none;
    max-width: 100%; /* Garantir que não ultrapasse container */
}

/* Mobile: inputs mais compactos */
@media (max-width: 576px) {
    .rw-input {
        font-size: 0.875rem;
        padding: 0.55rem 0.75rem;
        min-height: 40px;
    }
}

.rw-input:focus {
    outline: none;
    border-color: #a3aab5;
    background: #f7f8fa;
    box-shadow: none;
}

.rw-input:hover {
    border-color: #a3aab5;
    background: #f7f8fa;
}

.rw-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.rw-input.is-invalid {
    border-color: #b91c1c;
    box-shadow: none;
}

.rw-input.is-valid {
    border-color: #10b981;
}

/* Form group */
.rw-form-group {
    margin-bottom: 0.95rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.rw-form-group__label {
    display: block;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #4b5563;
    margin-bottom: 0.35rem;
}

.rw-form-group__hint {
    font-size: 0.8rem;
    color: var(--rw-text-secondary);
    margin-top: 0.5rem;
}

/* Input com ícone */
.rw-input-icon {
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.rw-input-icon__icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--rw-text-secondary);
    font-size: 1.1rem;
}

.rw-input-icon .rw-input {
    padding-left: 3rem;
}

/* Telefone (intl-tel-input) alinhado com os demais campos */
.rw-form-group .iti {
    width: 100%;
    display: block;
}

.rw-form-group .iti .rw-input,
.rw-form-group .iti input[type="tel"] {
    width: 100%;
    min-height: 46px;
    font-size: 1rem;
    border-radius: 10px;
    box-sizing: border-box;
}

/* Endereço da empresa (cadastro lojista BR) */
.rw-company-address-card {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    margin-bottom: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden; /* Evitar overflow horizontal */
}

.rw-address-inline-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    align-items: start;
    box-sizing: border-box;
}

/* Mobile: garantir que grid não cause overflow */
@media (max-width: 576px) {
    .rw-address-inline-grid {
        gap: 8px;
    }
}

.rw-address-inline-grid--stacked {
    grid-template-columns: 1fr;
}

.rw-address-grid-col {
    min-width: 0;
    margin-bottom: 0;
}

.rw-address-number-group {
    min-width: 0;
}

.rw-address-number-input {
    padding-left: 14px;
}

/* Select com código de país */
.rw-phone-group {
    display: flex;
    gap: 0;
}

.rw-phone-group__country {
    width: 100px;
    padding: 1rem 0.75rem;
    font-size: 1rem;
    border: 2px solid var(--rw-border);
    border-right: none;
    border-radius: 12px 0 0 12px;
    background: var(--rw-bg);
    color: var(--rw-text);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236C757D' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
}

.rw-phone-group__input {
    flex: 1;
    padding: 1rem;
    font-size: 1.1rem;
    border: 2px solid var(--rw-border);
    border-radius: 0 12px 12px 0;
    background: var(--rw-white);
    color: var(--rw-text);
}

.rw-phone-group__input:focus {
    outline: none;
    border-color: var(--rw-primary);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
}

/* Password input com toggle */
.rw-password-group {
    position: relative;
}

.rw-password-group .rw-input {
    padding-right: 3rem;
}

.rw-password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--rw-text-secondary);
    cursor: pointer;
    padding: 0;
    font-size: 1.1rem;
}

.rw-password-toggle:hover {
    color: var(--rw-text);
}

/* Logo upload — círculo clicável com crop */
.rw-logo-upload-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.rw-logo-upload {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 2.5px dashed var(--rw-border);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--rw-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.rw-logo-upload:hover {
    border-color: var(--rw-primary);
    border-style: solid;
    box-shadow: 0 0 0 4px rgba(17,17,17,0.06);
}

.rw-logo-upload input[type="file"] {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.rw-logo-upload__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    gap: 0.35rem;
}

.rw-logo-upload__icon {
    font-size: 2.2rem;
    color: var(--rw-text-secondary);
    line-height: 1;
}

.rw-logo-upload__text {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--rw-text-secondary);
    text-align: center;
    line-height: 1.2;
}

.rw-logo-upload__hint {
    font-size: 0.72rem;
    color: var(--rw-text-secondary);
    text-align: center;
}

.rw-logo-upload__preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: none;
}

.rw-logo-upload--has-image {
    border-style: solid;
    border-color: var(--rw-border);
}

.rw-logo-upload--has-image .rw-logo-upload__content {
    display: none;
}

.rw-logo-upload--has-image .rw-logo-upload__preview {
    display: block;
}

.rw-logo-upload__edit-hint {
    font-size: 0.82rem;
    color: var(--rw-text-secondary);
    font-weight: 500;
}

/* Modal de crop de logo */
.rw-crop-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.rw-crop-modal-backdrop.show {
    display: flex;
}

.rw-crop-modal {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.28);
}

.rw-crop-modal__title {
    font-size: 1rem;
    font-weight: 700;
    color: #111;
    margin: 0;
    text-align: center;
}

.rw-crop-modal__hint {
    font-size: 0.82rem;
    color: var(--rw-text-secondary);
    text-align: center;
    margin: -8px 0 0;
}

.rw-crop-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.rw-crop-viewport:active {
    cursor: grabbing;
}

.rw-crop-viewport__img {
    position: absolute;
    transform-origin: top left;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.rw-crop-circle-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.rw-crop-zoom-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rw-crop-zoom-row label {
    font-size: 0.82rem;
    color: var(--rw-text-secondary);
    white-space: nowrap;
    font-weight: 500;
}

.rw-crop-zoom-row input[type=range] {
    flex: 1;
    height: 4px;
    accent-color: #111;
    cursor: pointer;
}

.rw-crop-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.rw-crop-btn {
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
}

.rw-crop-btn:hover { opacity: 0.88; }

.rw-crop-btn--confirm {
    background: #111;
    color: #fff;
}

.rw-crop-btn--cancel {
    background: #f3f4f6;
    color: #374151;
}

/* Info box — oculto globalmente (redundante, título já se auto-explica) */
.rw-info {
    display: none;
}

.rw-info--warning {
    background: rgba(245, 158, 11, 0.06);
    border-left-color: #f59e0b;
}

.rw-info__icon {
    color: #6b7280;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.rw-info--warning .rw-info__icon {
    color: #f59e0b;
}

.rw-info__text {
    font-size: 0.9rem;
    color: var(--rw-text);
    margin: 0;
    line-height: 1.5;
}

/* Error message */
.rw-error-msg {
    color: var(--rw-error);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Checkbox terms */
.rw-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.rw-checkbox input {
    width: 22px;
    height: 22px;
    margin-top: 2px;
    accent-color: var(--rw-primary);
    cursor: pointer;
}

.rw-checkbox__label {
    font-size: 0.95rem;
    color: var(--rw-text);
    line-height: 1.5;
}

.rw-checkbox__label a {
    color: var(--rw-primary);
    text-decoration: none;
    font-weight: 500;
}

.rw-checkbox__label a:hover {
    text-decoration: underline;
}

/* Password requirements */
.rw-password-requirements {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 0.85rem;
    padding: 0.75rem 1rem;
    background: #f7f8fa;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.rw-password-req {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--rw-text-secondary);
}

.rw-password-req__icon {
    font-size: 0.9rem;
}

.rw-password-req.valid {
    color: var(--rw-success);
}

.rw-password-req.valid .rw-password-req__icon {
    color: var(--rw-success);
}

/* Footer dos steps (inline) */
.rw-step-footer {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.rw-step-footer:has(> :only-child) {
    grid-template-columns: 1fr;
}

.rw-footer__btn {
    padding: 0.72rem 1rem;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: background-color 180ms ease, transform 180ms ease, border-color 180ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
    box-shadow: none;
    letter-spacing: 0.01em;
}

.rw-footer__btn--primary {
    order: 2;
    background: #111111;
    color: #ffffff;
}

.rw-footer__btn--primary:hover {
    background: #000000;
    transform: translateY(-1px);
}

.rw-footer__btn--primary:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.rw-footer__btn--secondary {
    order: 1;
    background: #f7f8fa;
    color: #111111;
    border: 1px solid #e5e7eb;
    font-weight: 600;
}

.rw-footer__btn--secondary:hover {
    background: #f3f4f6;
    border-color: #a3aab5;
}

.rw-footer__btn--submit {
    order: 2;
    background: #111111;
    color: #ffffff;
    font-weight: 700;
    box-shadow: none;
}

.rw-footer__btn--submit:hover {
    background: #000000;
    transform: translateY(-1px);
}

/* Skip button (para logo opcional) */
.rw-skip-btn {
    background: #f7f8fa;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.72rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 14px;
    transition: background-color 180ms ease, border-color 180ms ease;
    width: 100%;
    order: 1;
}

.rw-skip-btn:hover {
    color: #111111;
    background: #f3f4f6;
    border-color: #a3aab5;
}

/* Loading state */
.rw-loading {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.rw-loading.active {
    display: flex;
}

.rw-loading__spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--rw-border);
    border-top-color: var(--rw-primary);
    border-radius: 50%;
    animation: rwSpin 1s linear infinite;
}

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

.rw-loading__text {
    margin-top: 1rem;
    color: var(--rw-text-secondary);
    font-size: 1rem;
}

/* Toast de validação */
.rw-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--rw-error);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: rwSlideDown 0.3s ease;
    max-width: 90%;
    text-align: center;
    display: none;
}

.rw-toast.show {
    display: block;
}

@keyframes rwSlideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Links no footer */
.rw-links {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rw-border);
}

.rw-links a {
    color: var(--rw-text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
}

.rw-links a:hover {
    color: var(--rw-primary);
}

.rw-links__separator {
    margin: 0.75rem 0;
    color: var(--rw-text-secondary);
    font-size: 0.85rem;
}

/* Email suggestions */
.rw-email-suggestions {
    position: absolute;
    top: calc(100% + 7px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #d7dce3;
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.09), 0 2px 6px rgba(15, 23, 42, 0.04);
    z-index: 1000;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.rw-email-suggestions.show {
    display: block;
}

.rw-email-suggestion-item {
    margin: 2px 6px;
    padding: 8px 10px;
    cursor: pointer;
    transition: background-color 140ms ease;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #111827;
}

.rw-email-suggestion-item:hover {
    background: #f3f4f6;
}

.rw-email-suggestion-item strong {
    color: var(--rw-text);
}

/* Search-select unificado (departamento/cidade) */
.rw-search-select {
    position: relative;
}

.rw-search-select .rw-input-icon {
    position: relative;
}

.rw-search-select__icon--search,
.rw-search-select__icon--place {
    transition: opacity 0.15s;
}

.rw-search-select__clear {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--rw-text-muted, #9ca3af);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    z-index: 2;
}

.rw-search-select__clear:hover {
    color: var(--rw-text);
}

/* Department/City suggestions (RegisterDealer step 5) */
.rw-location-suggestions {
    position: absolute;
    top: calc(100% + 7px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #d7dce3;
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.09), 0 2px 6px rgba(15, 23, 42, 0.04);
    z-index: 1000;
    display: none;
    max-height: 248px;
    overflow-y: auto;
    padding: 6px 0;
}

.rw-location-suggestions.show {
    display: block;
}

.rw-location-suggestion-item {
    display: block;
    width: calc(100% - 12px);
    margin: 0 6px;
    text-align: left;
    background: transparent;
    border: none;
    color: #111827;
    padding: 8px 10px;
    cursor: pointer;
    transition: background-color 140ms ease;
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: 8px;
}

.rw-location-suggestion-item:hover {
    background: #f3f4f6;
}

/* Modal customizado para termos */
.rw-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.rw-modal.show {
    display: flex;
}

.rw-modal__content {
    background: var(--rw-white);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.rw-modal__header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--rw-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rw-modal__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--rw-text);
    margin: 0;
}

.rw-modal__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--rw-text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.rw-modal__close:hover {
    background: var(--rw-bg);
    color: var(--rw-text);
}

.rw-modal__body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.rw-modal__body h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--rw-text);
    margin: 1.5rem 0 0.75rem;
}

.rw-modal__body h3:first-child {
    margin-top: 0;
}

.rw-modal__body p {
    font-size: 0.9rem;
    color: var(--rw-text-secondary);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.rw-modal__body ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.rw-modal__body li {
    font-size: 0.9rem;
    color: var(--rw-text-secondary);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

/* ========================================
   Verificação de Código
   ======================================== */

/* Seleção de canal (Email/WhatsApp) */
.rw-verification-channels {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.rw-channel-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
    background: var(--rw-white);
    border: 2px solid var(--rw-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.rw-channel-btn:hover {
    border-color: var(--rw-primary);
    background: rgba(15, 118, 110, 0.03);
}

.rw-channel-btn.active {
    border-color: var(--rw-primary);
    background: rgba(15, 118, 110, 0.06);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.rw-channel-btn i {
    font-size: 1.75rem;
    color: var(--rw-text-secondary);
}

.rw-channel-btn.active i {
    color: var(--rw-primary);
}

.rw-channel-btn[data-channel="whatsapp"] i {
    color: #25D366;
}

.rw-channel-btn__label {
    font-weight: 600;
    color: var(--rw-text);
    font-size: 0.95rem;
}

.rw-channel-btn__value {
    font-size: 0.8rem;
    color: var(--rw-text-secondary);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Seção de envio de código */
.rw-send-code {
    margin-top: 1.5rem;
}

/* Seção de input de código */
.rw-code-input-section {
    text-align: center;
}

.rw-code-sent-to {
    color: var(--rw-text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.rw-code-sent-to strong {
    color: var(--rw-text);
}

/* Inputs de código (6 dígitos) */
.rw-code-inputs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.rw-code-digit {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 2px solid var(--rw-border);
    border-radius: 10px;
    background: var(--rw-white);
    transition: all 0.2s;
}

.rw-code-digit:focus {
    border-color: var(--rw-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.rw-code-digit.is-invalid {
    border-color: var(--rw-error);
    background: #fef2f2;
    animation: rwShake 0.4s ease;
}

@keyframes rwShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Erro de código */
.rw-code-error {
    color: var(--rw-error);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #fef2f2;
    border-radius: 8px;
    text-align: center;
}

/* Seção de reenvio */
.rw-resend-section {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--rw-text-secondary);
}

.rw-resend-btn {
    background: none;
    border: none;
    color: var(--rw-primary);
    font-weight: 600;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    margin-left: 0.25rem;
    transition: all 0.2s;
}

.rw-resend-btn:hover:not(:disabled) {
    text-decoration: underline;
}

.rw-resend-btn:disabled {
    color: var(--rw-text-secondary);
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 576px) {
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    .rw-container {
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .rw-content {
        padding: 1.25rem 0.875rem;
    }
    
    .rw-question {
        margin-bottom: 1.25rem;
    }

    .rw-question__title {
        font-size: 1.15rem;
    }
    
    .rw-header {
        padding: 0.875rem 0.75rem;
        gap: 0.5rem;
    }
    
    .rw-header__title {
        font-size: 0.875rem;
    }
    
    .rw-header__badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }
    
    .rw-header__exit {
        font-size: 0.8125rem;
    }
    
    .rw-step-footer {
        margin-top: 1.25rem;
        grid-template-columns: 1fr;
    }

    .rw-footer__btn--primary,
    .rw-footer__btn--submit {
        order: 1;
    }

    .rw-footer__btn--secondary,
    .rw-skip-btn {
        order: 2;
    }
    
    .rw-modal__content {
        max-height: 90vh;
    }
    
    .rw-modal__header,
    .rw-modal__body {
        padding: 1rem;
    }

    .rw-address-inline-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .rw-header {
        padding: 0.75rem 0.5rem;
        gap: 0.375rem;
    }
    
    .rw-header__title {
        font-size: 0.75rem;
    }
    
    .rw-header__exit {
        font-size: 0.75rem;
    }

    .rw-address-inline-grid {
        grid-template-columns: 1fr;
    }
}
