/*
 * LOC VEÍCULOS - Estilos compartilhados de autenticação
 * Esta folha concentra o visual das páginas de login, cadastro e política.
 * Se futuramente quiser alterar aparência dessas telas, comece por aqui.
 */

:root {
    --auth-bg: #eff4fb;
    --auth-surface: #ffffff;
    --auth-surface-alt: #f8fafc;
    --auth-text: #101828;
    --auth-muted: #475467;
    --auth-border: rgba(16, 24, 40, 0.1);
    --auth-primary: #5b3df5;
    --auth-primary-2: #22b7f2;
    --auth-success: #16a34a;
    --auth-danger: #dc2626;
    --auth-warning: #d97706;
    --auth-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

html[data-theme="dark"] {
    --auth-bg: #060912;
    --auth-surface: #101827;
    --auth-surface-alt: #111c2d;
    --auth-text: #f8fafc;
    --auth-muted: #cbd5e1;
    --auth-border: rgba(148, 163, 184, 0.16);
    --auth-primary: #8b5cf6;
    --auth-primary-2: #22d3ee;
    --auth-success: #22c55e;
    --auth-danger: #f87171;
    --auth-warning: #f59e0b;
    --auth-shadow: 0 22px 50px rgba(2, 8, 23, 0.45);
}

* { box-sizing: border-box; }
body.auth-body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background:
        radial-gradient(circle at top right, rgba(91, 61, 245, .12), transparent 26%),
        radial-gradient(circle at bottom left, rgba(34, 183, 242, .10), transparent 22%),
        var(--auth-bg);
    color: var(--auth-text);
    min-height: 100vh;
    transition: background .3s ease, color .3s ease;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.auth-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 44px;
}

.auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.05rem;
}

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

.auth-brand .logo-dark { display: none; }
html[data-theme="dark"] .auth-brand .logo-light { display: none; }
html[data-theme="dark"] .auth-brand .logo-dark { display: block; }

.auth-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-btn,
.auth-theme-toggle {
    border-radius: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 700;
    transition: .25s ease;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
}

.auth-btn.primary {
    color: #fff;
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-2));
    box-shadow: var(--auth-shadow);
}

.auth-btn.secondary {
    color: var(--auth-text);
    background: var(--auth-surface);
    border-color: var(--auth-border);
}

.auth-theme-toggle {
    width: 46px;
    height: 46px;
    background: var(--auth-surface);
    color: var(--auth-text);
    border-color: var(--auth-border);
    box-shadow: var(--auth-shadow);
}

.auth-grid {
    display: grid;
    grid-template-columns: .95fr 1.05fr;
    gap: 26px;
    align-items: stretch;
}

.auth-panel,
.auth-card {
    background: color-mix(in srgb, var(--auth-surface) 92%, transparent);
    border: 1px solid var(--auth-border);
    border-radius: 28px;
    padding: 30px;
    box-shadow: var(--auth-shadow);
}

.auth-panel h1,
.auth-card h1,
.policy-card h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    margin: 0 0 14px;
}

.auth-panel p,
.auth-card p,
.policy-card p,
.policy-card li {
    color: var(--auth-muted);
}

.auth-badge,
.info-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
    margin-bottom: 18px;
}

.auth-badge {
    background: rgba(91, 61, 245, .1);
    color: var(--auth-primary);
}

.info-chip {
    background: rgba(22, 163, 74, .12);
    color: var(--auth-success);
}

.panel-points,
.auth-highlights,
.policy-list {
    display: grid;
    gap: 14px;
}

.panel-item,
.highlight-item,
.policy-item {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 14px;
    align-items: start;
    padding: 18px;
    border-radius: 20px;
    background: var(--auth-surface-alt);
    border: 1px solid var(--auth-border);
}

.panel-item i,
.highlight-item i,
.policy-item i {
    color: var(--auth-primary);
    margin-top: 4px;
}

.panel-item h3,
.highlight-item h3,
.policy-item h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.panel-item p,
.highlight-item p,
.policy-item p { margin: 0; }

.code-note {
    margin-top: 18px;
    padding: 14px 16px;
    border-left: 4px solid var(--auth-primary);
    background: rgba(91, 61, 245, .08);
    border-radius: 14px;
    color: var(--auth-muted);
}

.form-grid { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: grid; gap: 8px; }
.form-label { font-weight: 700; font-size: .96rem; }
.form-label .required { color: var(--auth-danger); }

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--auth-muted);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--auth-border);
    background: var(--auth-surface-alt);
    color: var(--auth-text);
    padding: 14px 16px 14px 46px;
    font-size: .98rem;
    outline: none;
    transition: .25s ease;
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
    padding-left: 16px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(91, 61, 245, .12);
}

.form-input.error {
    border-color: var(--auth-danger);
}

.input-action {
    position: absolute;
    right: 14px;
    border: 0;
    background: transparent;
    color: var(--auth-muted);
    cursor: pointer;
}

.form-error {
    color: var(--auth-danger);
    font-size: .86rem;
    min-height: 18px;
}

.form-hint {
    color: var(--auth-muted);
    font-size: .85rem;
}

.form-check {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.form-check-input {
    margin-top: 4px;
    width: 18px;
    height: 18px;
}

.form-check-label {
    color: var(--auth-muted);
    line-height: 1.55;
}

.form-check-label a {
    color: var(--auth-primary);
    font-weight: 700;
}

.password-strength {
    width: 100%;
}

.strength-bar {
    width: 100%;
    height: 8px;
    background: var(--auth-border);
    border-radius: 999px;
    overflow: hidden;
}

.strength-bar-fill {
    width: 25%;
    height: 100%;
    border-radius: 999px;
    transition: .25s ease;
}

.strength-bar-fill.weak { width: 30%; background: var(--auth-danger); }
.strength-bar-fill.medium { width: 65%; background: var(--auth-warning); }
.strength-bar-fill.strong { width: 100%; background: var(--auth-success); }

.auth-footer {
    margin-top: 18px;
    color: var(--auth-muted);
    text-align: center;
}

.auth-footer a { color: var(--auth-primary); font-weight: 700; }

.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 600;
}

.alert.hidden { display: none; }
.alert-danger { background: rgba(220, 38, 38, .1); color: var(--auth-danger); }
.alert-success { background: rgba(22, 163, 74, .1); color: var(--auth-success); }

.helper-box {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--auth-border);
    background: var(--auth-surface-alt);
}

.helper-box strong { display: block; margin-bottom: 6px; }
.helper-box + .helper-box { margin-top: 14px; }

.policy-card {
    width: min(980px, calc(100% - 32px));
    margin: 0 auto 36px;
    background: color-mix(in srgb, var(--auth-surface) 92%, transparent);
    border: 1px solid var(--auth-border);
    border-radius: 28px;
    padding: 34px;
    box-shadow: var(--auth-shadow);
}

.policy-card h2 { margin-top: 28px; font-size: 1.35rem; }
.policy-card ul { padding-left: 18px; }
.policy-card strong { color: var(--auth-text); }

@media (max-width: 960px) {
    .auth-grid,
    .form-row {
        grid-template-columns: 1fr;
    }

    .auth-panel,
    .auth-card,
    .policy-card {
        padding: 24px;
    }

    .auth-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-actions {
        justify-content: space-between;
    }
}

/* ==============================
   MELHORIAS RESPONSIVAS AUTH
   ============================== */
.auth-btn,
.form-input,
.input-group,
.auth-card,
.auth-panel {
    max-width: 100%;
}

.auth-topbar .auth-brand span {
    line-height: 1.15;
}

@media (max-width: 640px) {
    .auth-body {
        overflow-x: hidden;
    }

    .auth-shell {
        width: 100%;
        padding-inline: 10px;
    }

    .auth-topbar {
        gap: 12px;
        padding-top: 14px;
    }

    .auth-brand {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .auth-brand img {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    .auth-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 10px;
    }

    .auth-actions .auth-btn {
        width: 100%;
        min-height: 46px;
        padding-inline: 14px;
    }

    .auth-grid {
        width: 100%;
        gap: 18px;
        padding-block: 18px 28px;
    }

    .auth-panel,
    .auth-card {
        width: 100%;
        padding: 20px;
        border-radius: 24px;
    }

    .auth-panel h1,
    .auth-card h1 {
        font-size: clamp(1.75rem, 8vw, 2.2rem) !important;
        line-height: 1.08;
        letter-spacing: -.05em;
    }

    .auth-highlights {
        gap: 10px;
    }

    .highlight-item {
        align-items: flex-start;
    }

    .form-grid,
    .form-row {
        gap: 14px;
    }

    .form-input {
        min-height: 52px;
        font-size: 16px;
    }

    .input-icon {
        top: 17px;
    }

    .input-action {
        min-width: 46px;
        min-height: 46px;
    }

    .form-check {
        align-items: flex-start;
        gap: 10px;
    }

    .form-check-input {
        margin-top: 4px;
        flex: 0 0 auto;
    }

    .auth-footer,
    .helper-box {
        font-size: .94rem;
    }
}
