/* ======================================================
   TOKENS GLOBAIS – HERDAM DO THEME
   ====================================================== */

:root {
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;

    --primary: #2563eb;
    --primary-600: #1d4ed8;
    --primary-soft: #eff6ff;

    --success: #16a34a;
    --danger: #dc2626;

    --radius-lg: 18px;
    --radius-md: 12px;

    --transition: all .35s cubic-bezier(.4,0,.2,1);
}

/* DARK MODE GLOBAL (themePublic) */
[data-theme="dark"] {
    --bg: #0f172a;
    --card: #020617;
    --text: #e5e7eb;
    --muted: #94a3b8;
    --line: #1e293b;

    --primary: #3b82f6;
    --primary-600: #2563eb;
    --primary-soft: #0b1220;
}

/* ======================================================
   LAYOUT
   ====================================================== */

.login-wrapper {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 40px 16px;
    transition: var(--transition);
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    animation: fadeUp .6s ease;
    box-shadow: 
        0 20px 45px rgba(0,0,0,.12),
        inset 0 1px 0 rgba(255,255,255,.03);
    transition: var(--transition);
}

/* ======================================================
   ANIMAÇÃO DE ENTRADA
   ====================================================== */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(.98);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ======================================================
   TÍTULOS
   ====================================================== */

.login-card h2 {
    font-family: "Montserrat";
    font-size: 1.85rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.login-card p {
    color: var(--muted);
    margin-bottom: 26px;
    font-size: .95rem;
}

/* ======================================================
   SWITCH USUÁRIO / ADMIN (ANIMAÇÃO PREMIUM)
   ====================================================== */

.login-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 22px;
    user-select: none;
}

.login-switch span {
    font-weight: 600;
    font-size: .95rem;
    opacity: .45;
    transition: var(--transition);
}

.login-switch span.active {
    opacity: 1;
    color: var(--primary);
}

.switch {
    width: 54px;
    height: 28px;
    border-radius: 999px;
    background: var(--line);
    position: relative;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}

.switch::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,.25),
        rgba(255,255,255,0)
    );
    pointer-events: none;
}

.switch-ball {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--card);
    position: absolute;
    top: 3px;
    left: 3px;
    transition: var(--transition);
    box-shadow:
        0 4px 10px rgba(0,0,0,.25),
        inset 0 1px 0 rgba(255,255,255,.4);
}

.switch.active {
    background: var(--primary);
}

.switch.active .switch-ball {
    transform: translateX(26px);
}

/* ======================================================
   FORMULÁRIO
   ====================================================== */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
    text-align: left;
}

label {
    font-weight: 600;
    font-size: .9rem;
    color: var(--text);
}

input {
    padding: 13px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text);
    font-size: .95rem;
    transition: var(--transition);
}

input::placeholder {
    color: var(--muted);
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,.25);
}

/* ======================================================
   BOTÃO
   ====================================================== */

.btn {
    width: 100%;
    padding: 13px 18px;
    border-radius: var(--radius-md);
    border: none;
    font-weight: 700;
    letter-spacing: .04em;
    font-family: "Montserrat";
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(
        135deg,
        var(--primary),
        var(--primary-600)
    );
    color: #fff;
    margin-top: 18px;
    box-shadow: 0 10px 30px rgba(37,99,235,.45);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 35px rgba(37,99,235,.6);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ======================================================
   LINKS AUXILIARES
   ====================================================== */

.links-auxiliares {
    margin-top: 22px;
    font-size: .95rem;
}

.links-auxiliares a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    position: relative;
}

.links-auxiliares a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.links-auxiliares a:hover::after {
    width: 100%;
}
