/* ========================================
   GestãoBLZ - Login e Cadastro v2
   Carregado depois de login.css / cadastro.css.
   - Computador: painel da marca à esquerda (laranja GestãoBLZ) e formulário
     à direita, em cartão branco.
   - Celular: só o formulário, com o logo em cima.
   - Campos com o rótulo EM CIMA (em vez do rótulo flutuante do Bootstrap),
     obrigatório/opcional sempre visível.
   Os campos continuam dentro de .form-floating porque o JS usa essa classe
   para mostrar as mensagens de erro; aqui só muda a aparência.
   ======================================== */

:root {
    --au-brand: #f67537;
    --au-brand-dark: #e5642e;
    --au-brand-tint: rgba(246, 117, 55, 0.1);
    --au-ring: rgba(246, 117, 55, 0.2);
    --au-text: #111827;
    --au-text-2: #374151;
    --au-muted: #6b7482;
    --au-border: #dfe2e7;
    --au-page: #f6f5f3;
}

body {
    margin: 0;
    background: var(--au-page);
    color: var(--au-text);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
}

/* esconde o fundo antigo (foto/degradê) */
.login-container .login-background,
.login-container .background-overlay {
    display: none !important;
}

.au-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
}

/* ---- painel da marca ---- */
.au-side {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    padding: 48px 56px;
    overflow: hidden;
    background: var(--au-brand);
    color: #ffffff;
}

.au-side::before,
.au-side::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.au-side::before {
    right: -120px;
    bottom: -120px;
    width: 420px;
    height: 420px;
    background: rgba(255, 255, 255, 0.1);
}

.au-side::after {
    right: 90px;
    bottom: 170px;
    width: 180px;
    height: 180px;
    border: 2px solid rgba(255, 255, 255, 0.25);
}

.au-side-logo {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-self: flex-start;
    padding: 10px 16px;
    border-radius: 12px;
    background: #ffffff;
}

.au-side-logo img {
    display: block;
    height: 30px;
    width: auto;
}

.au-side-body {
    position: relative;
    z-index: 1;
    max-width: 460px;
}

.au-side-kicker {
    display: inline-block;
    margin-bottom: 18px;
    padding: 5px 12px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.au-side-title {
    margin: 0 0 14px;
    font-size: clamp(32px, 3.4vw, 46px);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.au-side-title span {
    color: #111827;
}

.au-side-text {
    margin: 0 0 28px;
    font-size: 16px;
    line-height: 1.55;
    opacity: 0.95;
}

.au-side-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.au-side-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
}

.au-side-list i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 14px;
}

.au-side-foot {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 12.5px;
    opacity: 0.85;
}

/* ---- área do formulário ---- */
.au-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.au-card {
    width: 100%;
    max-width: 420px;
}

.au-card-wide {
    max-width: 560px;
}

.au-card-logo {
    display: none;
    margin-bottom: 24px;
}

.au-card-logo img {
    height: 34px;
    width: auto;
}

.au-title {
    margin: 0 0 6px;
    color: var(--au-text);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.au-subtitle {
    margin: 0 0 28px;
    color: var(--au-muted);
    font-size: 15px;
    line-height: 1.5;
}

/* ---- campos: rótulo em cima ---- */
.au-field.form-floating {
    display: flex;
    flex-direction: column;
    position: relative;
    margin-bottom: 16px;
}

.au-field.form-floating > label {
    order: -1;
    position: static;
    display: flex;
    align-items: center;
    gap: 8px;
    width: auto;
    height: auto;
    margin: 0 0 7px;
    padding: 0;
    border: 0;
    color: var(--au-text-2);
    font-size: 13.5px;
    font-weight: 500;
    opacity: 1;
    transform: none !important;
    white-space: normal;
    pointer-events: auto;
}

.au-field.form-floating > label::after {
    display: none;
}

.au-field .au-req {
    color: #dc2626;
}

.au-field .au-opt {
    padding: 2px 8px;
    border-radius: 6px;
    background: #eef6ff;
    color: #1d4ed8;
    font-size: 11.5px;
    font-weight: 500;
}

.au-field.form-floating > .form-control,
.au-field.form-floating > .form-select {
    height: 48px;
    min-height: 48px;
    padding: 11px 14px;
    border: 1px solid var(--au-border);
    border-radius: 10px;
    background-color: #ffffff;
    color: var(--au-text);
    font-size: 15px;
    line-height: 1.4;
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.au-field.form-floating > textarea.form-control {
    height: auto;
    min-height: 76px;
    resize: vertical;
}

.au-field.form-floating > .form-control::placeholder {
    color: #a3a9b3;
}

.au-field.form-floating > .form-control:hover,
.au-field.form-floating > .form-select:hover {
    border-color: #c9ced6;
}

.au-field.form-floating > .form-control:focus,
.au-field.form-floating > .form-select:focus {
    border-color: var(--au-brand);
    box-shadow: 0 0 0 3px var(--au-ring);
    outline: none;
}

.au-field.form-floating > .form-control.is-invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
    background-image: none;
}

.au-field.form-floating > .form-control.is-valid {
    border-color: #16a34a;
    background-image: none;
}

.au-field .invalid-feedback {
    display: block;
    margin-top: 6px;
    font-size: 12.5px;
}

.au-help {
    display: block;
    margin-top: 6px;
    color: var(--au-muted);
    font-size: 12.5px;
    line-height: 1.45;
}

/* botão de mostrar senha dentro do campo */
.au-field .password-toggle {
    position: absolute;
    right: 6px;
    bottom: 6px;
    top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--au-muted);
    transform: none;
}

.au-field .password-toggle:hover {
    background: #f3f4f6;
    color: var(--au-text);
}

.au-field:has(.password-toggle) > .form-control {
    padding-right: 48px;
}

/* feedback de erro não pode empurrar o botão do olho */
.au-field:has(.password-toggle):has(.invalid-feedback) .password-toggle {
    bottom: auto;
    top: 32px;
}

/* ---- linha "lembrar / esqueci" ---- */
.au-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 22px;
}

.au-row .form-check {
    margin: 0;
}

.au-row .form-check-label {
    color: var(--au-text-2);
    font-size: 14px;
}

.au-check .form-check-input,
.au-row .form-check-input {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border-color: #c9ced6;
    box-shadow: none;
}

.au-check .form-check-input:checked,
.au-row .form-check-input:checked {
    border-color: var(--au-brand);
    background-color: var(--au-brand);
}

.au-link,
.au-card .forgot-password {
    color: var(--au-brand-dark);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.au-link:hover,
.au-card .forgot-password:hover {
    color: #c2410c;
    text-decoration: underline;
}

/* ---- botões ---- */
.au-card .btn {
    min-height: 48px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    box-shadow: none;
    transform: none;
}

.au-card .btn-primary,
.au-card .btn-success,
.au-card .login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--au-brand);
    background: var(--au-brand);
    color: #ffffff;
}

.au-card .btn-primary:hover,
.au-card .btn-success:hover,
.au-card .login-btn:hover {
    border-color: var(--au-brand-dark);
    background: var(--au-brand-dark);
    color: #ffffff;
}

.au-card .btn-outline-secondary,
.au-card .btn-outline-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--au-border);
    background: #ffffff;
    color: var(--au-text);
}

.au-card .btn-outline-secondary:hover,
.au-card .btn-outline-primary:hover {
    border-color: #c9ced6;
    background: #f5f6f8;
    color: var(--au-text);
}

.au-card .btn::before,
.au-card .btn::after {
    display: none;
}

.au-bottom {
    margin: 26px 0 0;
    color: var(--au-muted);
    font-size: 14px;
    text-align: center;
}

.au-copy {
    margin: 32px 0 0;
    color: #9aa1ab;
    font-size: 12px;
    text-align: center;
}

/* ---- cadastro: passos ---- */
.au-steps {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 26px;
}

.au-steps .step {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-shrink: 0;
}

.au-steps .step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: 1px solid var(--au-border);
    border-radius: 50%;
    background: #ffffff;
    color: var(--au-muted);
    font-size: 13px;
    font-weight: 500;
    box-shadow: none;
}

.au-steps .step-label {
    color: var(--au-muted);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.au-steps .step.active .step-number {
    border-color: var(--au-brand);
    background: var(--au-brand);
    color: #ffffff;
}

.au-steps .step.active .step-label {
    color: var(--au-text);
}

.au-steps .step.completed .step-number {
    border-color: #16a34a;
    background: #16a34a;
    color: transparent;
    position: relative;
}

.au-steps .step.completed .step-number::after {
    content: '\f00c';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-family: 'Font Awesome 6 Free';
    font-size: 11px;
    font-weight: 900;
}

.au-steps .step-line {
    flex: 1;
    height: 2px;
    min-width: 12px;
    border-radius: 2px;
    background: #e3e6ea;
}

.cadastro-form .form-step {
    display: none;
}

.cadastro-form .form-step.active {
    display: block;
}

.au-step-title {
    margin: 0 0 4px;
    color: var(--au-text);
    font-size: 18px;
    font-weight: 600;
}

.au-step-text {
    margin: 0 0 20px;
    color: var(--au-muted);
    font-size: 14px;
    line-height: 1.5;
}

.au-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 14px;
}

.au-grid > .au-span-2 {
    grid-column: 1 / -1;
}

.au-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 10px;
    margin-top: 10px;
}

.au-actions-single {
    grid-template-columns: minmax(0, 1fr);
}

/* ---- cadastro: planos ---- */
.au-card .plans-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 20px !important;
}

.au-card .plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 16px 14px 14px;
    border: 1px solid var(--au-border);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: none;
    transform: none !important;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.au-card .plan-card:hover {
    border-color: #c9ced6;
}

.au-card .plan-card.selected {
    border-color: var(--au-brand);
    box-shadow: 0 0 0 3px var(--au-ring);
}

.au-card .plan-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--au-brand);
    box-shadow: none;
    color: #ffffff;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    transform: translateX(-50%);
}

.au-card .plan-badge.savings {
    background: #16a34a;
}

.au-card .plan-header {
    margin-bottom: 10px;
    padding: 0;
    border: 0;
    text-align: left;
}

.au-card .plan-icon {
    display: none;
}

.au-card .plan-name {
    margin: 0 0 4px;
    color: var(--au-text);
    font-size: 15px;
    font-weight: 600;
}

.au-card .plan-price .price {
    color: var(--au-text);
    font-size: 20px;
    font-weight: 600;
}

.au-card .plan-price .period,
.au-card .plan-discount {
    color: var(--au-muted);
    font-size: 12.5px;
    font-weight: 400;
}

.au-card .plan-features {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 12px;
    padding: 0;
}

.au-card .plan-features .feature {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: var(--au-text-2);
    font-size: 12.5px;
    line-height: 1.35;
}

.au-card .plan-features .feature i {
    margin-top: 2px;
    color: #16a34a;
    font-size: 11px;
}

.au-card .plan-card .select-plan {
    min-height: 38px;
    font-size: 13.5px;
}

.au-card .plan-card.selected .select-plan {
    border-color: var(--au-brand);
    background: var(--au-brand);
    color: #ffffff;
}

.au-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 18px;
    padding: 0;
}

.au-check .form-check-input {
    flex-shrink: 0;
    float: none;
    margin: 2px 0 0;
}

.au-check .form-check-label {
    color: var(--au-text-2);
    font-size: 14px;
    line-height: 1.45;
}

.au-check a {
    color: var(--au-brand-dark);
    font-weight: 500;
}

/* ---- avisos (alertContainer) ---- */
.alert-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 3000;
    width: min(380px, calc(100vw - 32px));
}

.alert-container .alert {
    border: 0;
    border-left: 3px solid currentColor;
    border-radius: 0 10px 10px 0;
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.15);
    font-size: 14px;
}

/* ---- responsivo ---- */
@media (max-width: 1199.98px) {
    .au-side {
        padding: 40px;
    }
}

@media (max-width: 991.98px) {
    .au-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .au-side {
        display: none;
    }

    .au-main {
        align-items: flex-start;
        padding: 32px 20px 28px;
    }

    .au-card-logo {
        display: block;
    }
}

@media (max-width: 575.98px) {
    .au-main {
        padding: 24px 16px 24px;
    }

    .au-title {
        font-size: 23px;
    }

    .au-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .au-grid > .au-span-2 {
        grid-column: auto;
    }

    .au-field.form-floating > .form-control,
    .au-field.form-floating > .form-select {
        font-size: 16px; /* evita zoom automático do iOS */
    }

    .au-steps .step-label {
        display: none;
    }

    .au-steps .step.active .step-label {
        display: inline;
    }

    .au-card .plans-container {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .au-row {
        flex-wrap: wrap;
    }
}

/* etiquetas "Mais Popular" / "Economize 20%" não podem ser cortadas */
.au-card .plans-container,
.au-card .plan-card {
    overflow: visible !important;
}

.au-card .plans-container {
    padding-top: 10px;
}

/* painel da marca fixo enquanto o formulário comprido rola */
@media (min-width: 992px) {
    .au-side {
        position: sticky;
        top: 0;
        height: 100vh;
        height: 100dvh;
    }
}

.au-card .plan-badge {
    right: auto;
    width: max-content;
    max-width: none;
}
