﻿/* ============================================================
   FiscalTech - Estilos das telas de autenticação
   Layout split-screen moderno reutilizável por:
   - app/Views/login/login.php
   - app/Views/login/alterar_senha_obrigatoria.php
   ============================================================ */

:root {
    --auth-primary: #1572e8;
    --auth-primary-600: #1268d6;
    --auth-ink: #1f2a44;
    --auth-muted: #6b7385;
    --auth-border: #e4e8f0;
    --auth-bg: #eef1f7;
    --auth-card-bg: #ffffff;
    --auth-radius: 18px;
    --auth-shadow: 0 24px 60px rgba(18, 38, 73, 0.12);
    --auth-ring: 0 0 0 4px rgba(21, 114, 232, 0.15);
}

* {
    box-sizing: border-box;
}

html,
body.auth-page {
    height: 100%;
    margin: 0;
    padding: 0;
}

body.auth-page {
    font-family: "Inter", "Segoe UI", Tahoma, sans-serif;
    color: var(--auth-ink);
    background: var(--auth-bg);
    -webkit-font-smoothing: antialiased;
    overflow: hidden; /* a rolagem fica nos painéis internos, não na página */
}

/* ---------- Estrutura split-screen ---------- */
.auth-split {
    display: flex;
    align-items: stretch; /* garante que os painéis ocupem 100% da altura */
    height: 100vh;
    width: 100%;
}

.auth-aside,
.auth-main {
    flex: 1 1 50%;
    min-height: 100vh; /* o painel azul cola no topo e na base */
    overflow-y: auto;  /* rolagem interna apenas se o conteúdo exceder a tela */
}

/* ---------- Painel da marca (lado esquerdo) ---------- */
.auth-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(140deg, #0f1f5c 0%, #1c46c2 55%, #1572e8 100%);
}

/* Bolhas decorativas */
.auth-aside::before,
.auth-aside::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
}

.auth-aside::before {
    width: 420px;
    height: 420px;
    top: -120px;
    right: -120px;
}

.auth-aside::after {
    width: 320px;
    height: 320px;
    bottom: -100px;
    left: -80px;
}

.auth-aside__logo {
    position: relative;
    z-index: 1;
    max-width: 220px;
    height: auto;
}

.auth-aside__content {
    position: relative;
    z-index: 1;
    max-width: 460px;
}

.auth-aside__content h2 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 14px;
}

.auth-aside__content p {
    font-size: 1.02rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
    margin: 0 0 28px;
}

.auth-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.96rem;
    color: rgba(255, 255, 255, 0.92);
}

.auth-features li i {
    flex: none;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 0.95rem;
}

.auth-aside__footer {
    position: relative;
    z-index: 1;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ---------- Área do formulário (lado direito) ---------- */
.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

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

.auth-card__logo-mobile {
    display: none;
    max-width: 170px;
    margin: 0 auto 26px;
}

.auth-card__head {
    margin-bottom: 26px;
}

.auth-card__head h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 6px;
}

.auth-card__head p {
    color: var(--auth-muted);
    margin: 0;
    font-size: 0.96rem;
}

/* ---------- Campos ---------- */
.auth-field {
    margin-bottom: 18px;
}

.auth-field > label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--auth-ink);
}

.input-icon {
    position: relative;
}

.input-icon > .lead-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa4b8;
    font-size: 0.95rem;
    pointer-events: none;
}

.input-icon .form-control {
    height: 50px;
    border-radius: 12px;
    border: 1px solid var(--auth-border);
    padding-left: 44px;
    font-size: 0.98rem;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-icon .form-control:focus {
    border-color: var(--auth-primary);
    box-shadow: var(--auth-ring);
}

.input-icon.has-toggle .form-control {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: #9aa4b8;
    border-radius: 9px;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.password-toggle:hover {
    color: var(--auth-primary);
    background: rgba(21, 114, 232, 0.08);
}

.auth-help {
    font-size: 0.82rem;
    color: var(--auth-muted);
    margin-top: 6px;
}

/* ---------- Botão ---------- */
.auth-submit {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-600) 100%);
    box-shadow: 0 10px 24px rgba(21, 114, 232, 0.28);
    transition: transform 0.12s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.auth-submit:hover {
    box-shadow: 0 14px 30px rgba(21, 114, 232, 0.34);
    transform: translateY(-1px);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-submit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

/* ---------- Rodapé do card ---------- */
.auth-footer {
    margin-top: 28px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--auth-muted);
    line-height: 1.7;
}

.auth-footer .auth-footer__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    justify-content: center;
    margin-bottom: 8px;
}

.auth-footer .auth-footer__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-footer__version {
    border-top: 1px solid var(--auth-border);
    padding-top: 12px;
    margin-top: 4px;
}

/* ---------- Indicador de senhas iguais ---------- */
.match-hint {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    margin-top: 6px;
}

.match-hint.is-visible {
    display: inline-flex;
}

.match-hint.is-ok {
    color: #1a9d6a;
}

.match-hint.is-bad {
    color: #d6336c;
}

/* ---------- Responsivo ---------- */
@media (max-width: 991.98px) {
    .auth-aside {
        display: none;
    }

    .auth-card__logo-mobile {
        display: block;
    }

    .auth-main {
        background: linear-gradient(180deg, #eef2fb 0%, #f7f9fd 100%);
    }
}

@media (max-width: 575.98px) {
    .auth-main {
        padding: 28px 18px;
    }
}
