* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 32%),
        radial-gradient(circle at bottom right, rgba(249, 115, 22, 0.14), transparent 26%),
        linear-gradient(135deg, #f8fafc 0%, #eef4ff 48%, #fff7ed 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--cor-texto);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 1.05fr) minmax(420px, 560px);
    gap: 2rem;
    padding: 2rem;
}

.auth-shell.auth-shell-minimal {
    grid-template-columns: 1fr;
    padding: 2rem 1.25rem;
    place-items: center;
}

.auth-shell.auth-shell-minimal .container-criar-conta {
    width: 100%;
}

.auth-shell.auth-shell-minimal .form-container {
    max-width: 560px;
}

.auth-brand-panel,
.auth-card {
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(12px);
}

.auth-brand-panel {
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.88));
    color: #e2e8f0;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: calc(100vh - 4rem);
}

.auth-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    align-self: flex-start;
}

.auth-brand-logo-wrap {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.98);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
}

.auth-brand-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.auth-brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.auth-brand-text strong {
    font-size: 1.2rem;
    line-height: 1.1;
}

.auth-brand-text span {
    color: #cbd5e1;
    font-size: 0.95rem;
}

.auth-brand-copy {
    margin: 2.5rem 0 2rem;
    max-width: 560px;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.18);
    color: #bfdbfe;
    font-size: 0.85rem;
    font-weight: 700;
}

.auth-brand-copy h1 {
    margin: 1rem 0 0.85rem;
    font-size: clamp(2rem, 3vw, 3.2rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #f8fafc;
}

.auth-brand-copy p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.7;
    color: #cbd5e1;
}

.auth-highlights {
    display: grid;
    gap: 1rem;
}

.auth-highlight {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.05rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-highlight i {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    color: #fbbf24;
    flex-shrink: 0;
}

.container-criar-conta {
    display: flex;
    justify-content: center;
    align-items: center;
}

.form-container {
    background: rgba(255, 255, 255, 0.96);
    padding: 2rem;
    width: 100%;
    max-width: 560px;
}

.back-btn-wrapper {
    margin-bottom: 1.25rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--cor-texto-claro);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.back-link:hover {
    color: var(--cor-primary);
    transform: translateX(-3px);
}

.form-header {
    text-align: center;
    margin-bottom: 1.8rem;
}

.form-logo-wrap {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.form-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.form-header h1 {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--cor-texto);
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}

.form-header p {
    color: var(--cor-texto-claro);
    font-size: 0.98rem;
    line-height: 1.65;
}

.alert {
    padding: 0.95rem 1rem;
    border-radius: 16px;
    margin-bottom: 1.25rem;
    font-size: 0.92rem;
}

.alert[hidden] {
    display: none;
}

.alert-success {
    background-color: var(--cor-sucesso-bg);
    color: var(--cor-sucesso);
    border: 1px solid rgba(22, 163, 74, 0.24);
}

.alert-error {
    background-color: var(--cor-erro-bg);
    color: var(--cor-erro);
    border: 1px solid rgba(220, 38, 38, 0.24);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.lojista-fields {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 20px;
    background: rgba(37, 99, 235, 0.04);
}

.lojista-fields.is-hidden {
    display: none;
}

.lojista-hint {
    margin-top: 0.2rem;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.5;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--cor-texto);
    font-size: 0.9rem;
}

.form-group select {
    width: 100%;
    padding: 0.95rem 1rem;
    border: 1.5px solid #dbe4f0;
    border-radius: 16px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: #f8fafc;
    color: var(--cor-texto);
}

.form-group select:focus {
    outline: none;
    border-color: var(--cor-primary);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-group label i {
    margin-right: 0.5rem;
    color: var(--cor-primary);
    width: 18px;
    text-align: center;
}

.form-group input,
.form-group select,
.cidade-selector-btn {
    width: 100%;
    padding: 0.95rem 1rem;
    border: 1.5px solid #dbe4f0;
    border-radius: 16px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: #f8fafc;
    font-family: inherit;
    color: var(--cor-texto);
}

.form-group input:focus,
.form-group select:focus,
.cidade-selector-btn:focus {
    outline: none;
    border-color: var(--cor-primary);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.cidade-selector-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    text-align: left;
}

.cidade-selector-btn .city-display-text {
    flex: 1;
}

.password-container {
    position: relative;
    display: flex;
    align-items: center;
}

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

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--cor-texto-claro);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 5;
}

.password-toggle:hover {
    color: var(--cor-primary);
}

.field-help {
    color: var(--cor-texto-claro);
    font-size: 0.84rem;
    margin-top: 0.45rem;
    display: block;
    line-height: 1.5;
}

.is-hidden {
    display: none;
}

.btn-criar-conta {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--cor-accent), #fb923c);
    color: var(--cor-branco);
    border: none;
    border-radius: 18px;
    font-size: 1.03rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    box-shadow: 0 14px 24px rgba(249, 115, 22, 0.25);
}

.btn-criar-conta:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(249, 115, 22, 0.32);
}

.btn-criar-conta:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.form-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.login-link {
    color: var(--cor-texto-claro);
    font-size: 0.95rem;
}

.login-link a {
    color: var(--cor-primary);
    text-decoration: none;
    font-weight: 700;
}

.login-link a:hover {
    text-decoration: underline;
}

@media (max-width: 1100px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .auth-shell {
        padding: 1rem;
        gap: 1rem;
    }

    .auth-brand-panel,
    .auth-card {
        border-radius: 24px;
    }

    .auth-brand-panel,
    .form-container {
        padding: 1.5rem;
    }

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

@media (max-width: 480px) {
    body {
        background: #f8fafc;
    }

    .auth-shell {
        padding: 0;
        gap: 0;
    }

    .auth-brand-panel {
        border-radius: 0;
        min-height: auto;
        padding: 1.25rem;
    }

    .form-container {
        border-radius: 0;
        box-shadow: none;
        border: none;
        padding: 1.5rem 1.25rem 2rem;
        background: #fff;
    }

    .form-header h1 {
        font-size: 1.55rem;
    }

    .form-group input,
    .form-group select,
    .cidade-selector-btn {
        font-size: 16px;
    }
}

@media (max-width: 360px) {
    .auth-brand-logo-wrap {
        width: 60px;
        height: 60px;
    }

    .auth-brand-logo {
        width: 44px;
        height: 44px;
    }

    .auth-highlight {
        padding: 0.85rem 0.9rem;
    }

    .form-container {
        padding: 1.25rem 1rem 1.6rem;
    }

    .btn-criar-conta i {
        display: none;
    }
}
