﻿/* ===========================
   THEME TOKENS (ajuste aqui)
   =========================== */
:root {
    /* 🔵 Azul PRINCIPAL da sua logo (troque aqui) */
    --brand: #0A5BD3;
    /* 🔵 Azul complementar (opcional, usado no degradê do botão). 
     Se não souber, deixe igual ao --brand ou use um tom um pouco mais claro. */
    --brand-2: #3388ff;
    /* Base do tema */
    --bg: #f5f7fb;
    --card-bg: #ffffff;
    --border: rgba(0,0,0,.08);
    --text: #0f172a;
    --muted: #475569;
    /* Fallbacks (NAVEGADORES SEM color-mix) — você pode ajustar à mão se quiser */
    --brand-strong-fallback: #0849a7; /* ~15% mais escuro do brand */
    --brand-weak-fallback: #e7f0ff; /* ~muito mais claro do brand */
    --ring-fallback: rgba(10, 91, 211, .35);
    --ring-strong-fallback: rgba(10, 91, 211, .55);
}

/* Geração automática da paleta (se suportar color-mix) */
@supports (color: color-mix(in srgb, white, black)) {
    :root {
        --brand-strong: color-mix(in srgb, var(--brand) 85%, #000 15%);
        --brand-weak: color-mix(in srgb, var(--brand) 12%, #fff 88%);
        --ring: color-mix(in srgb, var(--brand) 35%, transparent);
        --ring-strong: color-mix(in srgb, var(--brand) 55%, transparent);
    }
}

/* Fallback sem color-mix (se o bloco acima não rodar, usamos estes) */
@supports not (color: color-mix(in srgb, white, black)) {
    :root {
        --brand-strong: var(--brand-strong-fallback);
        --brand-weak: var(--brand-weak-fallback);
        --ring: var(--ring-fallback);
        --ring-strong: var(--ring-strong-fallback);
    }
}

/* ==============
   BASE & LAYOUT
   ============== */
html, body {
    height: 100%;
    color: var(--text);
}

    body.auth {
        background: radial-gradient(1000px 500px at 10% 10%, color-mix(in srgb, var(--brand) 30%, transparent), transparent 75%), radial-gradient(900px 480px at 90% 25%, color-mix(in srgb, var(--brand-2) 30%, transparent), transparent 75%), linear-gradient(180deg, var(--bg), var(--bg));
    }

@supports not (color: color-mix(in srgb, white, black)) {
    /* Fallback do fundo se não houver color-mix */
    body.auth {
        background: radial-gradient(1000px 500px at 10% 10%, rgba(10, 91, 211, .25), transparent 75%), radial-gradient(900px 480px at 90% 25%, rgba(51, 136, 255, .25), transparent 75%), linear-gradient(180deg, var(--bg), var(--bg));
    }
}

.auth-container {
    min-height: 100dvh; /* viewport dinâmica — melhor no mobile */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px; /* respiro nas telas menores */
}

/* =========
   BRANDING
   ========= */
.brand-badge {
    background: transparent;
    padding: .6rem 1rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
}

    .brand-badge span {
        color: var(--text);
        font-weight: 700;
    }

/* Logo nítida e responsiva */
.brand-logo {
    height: 96px;
    max-width: 100%;
    width: auto;
    display: block;
    opacity: 1 !important;
    filter: none !important;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.12));
}

@media (max-width: 400px) {
    .brand-logo {
        height: 72px;
    }
}

/* =====
   CARD
   ===== */
.card-header {
    background: #fff !important;
}

.auth-card-wrapper {
    display: grid;
    place-items: center;
    padding: clamp(24px, 6vw, 64px);
}

.auth-card {
    width: min(480px, 92vw);
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 8px 28px rgba(2,6,23,.08);
}

    .auth-card .card-header {
        border-bottom: 0;
        text-align: center;
        padding: 2rem 2rem 0;
        background: #fff;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }

    .auth-card .card-body {
        padding: 2rem;
    }

.auth-title {
    font-weight: 800;
    letter-spacing: .2px;
    color: var(--text);
}

.text-muted-2 {
    color: var(--muted);
}

/* =========
   FORM UI
   ========= */
.input-group .input-group-text {
    background: #f8fafc;
    border-right: 0;
}

.input-group .form-control {
    border-left: 0;
}

/* Campos + ícones com altura confortável (44px) */
.form-control {
    min-height: 44px;
    line-height: 1.2;
    font-size: .95rem;
    padding: .6rem .9rem;
    border-radius: 10px;
    border-color: var(--border);
}

.input-group-text {
    min-height: 44px;
    line-height: 1;
    padding: .6rem .9rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-color: var(--border);
}

/* Foco acessível */
.input-group:focus-within {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
    box-shadow: none;
    border-radius: 10px;
}

/* =======
   BUTTON
   ======= */
.btn-brand {
    min-height: 44px;
    line-height: 1.2;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    color: #fff;
    border: 0;
    box-shadow: 0 6px 14px color-mix(in srgb, var(--brand) 25%, transparent);
    transition: transform .06s ease, filter .2s ease;
}

@supports not (color: color-mix(in srgb, white, black)) {
    .btn-brand {
        box-shadow: 0 6px 14px rgba(10, 91, 211, .25);
    }
}

.btn-brand:hover {
    filter: brightness(1.02);
}

.btn-brand:active {
    transform: translateY(1px);
}

.btn-brand:focus-visible {
    outline: 3px solid var(--ring-strong);
    outline-offset: 2px;
}

.btn-brand span {
    color: #fff !important;
}

/* =====
   LINKS
   ===== */
.link-muted {
    color: var(--muted);
    text-decoration: none;
}

    .link-muted:hover {
        color: var(--brand-strong);
    }

/* ==========
   UTIL/OUTROS
   ========== */
.footer-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    font-size: .925rem;
    color: var(--muted);
}

#togglePassword {
    min-width: 44px;
    cursor: pointer;
}

    #togglePassword i {
        pointer-events: none;
    }
/* clique no span inteiro */


/* estado normal do label */
[data-btn-label] {
    display: inline-block;
    transition: opacity .18s ease, transform .18s ease;
    opacity: 1;
    transform: translateY(0);
}

    /* fade-out antes da troca */
    [data-btn-label].is-hiding {
        opacity: 0;
        transform: translateY(2px);
    }
