/* AUTH — 19/10/2026 10:26 */

/* ===== auth.css ===== */
/* static/css/modules/pasta_auth/auth.css
============================================
AUTH — Blue Cosmic (compacto)
============================================ */

/* ==================== BODY ==================== */
.auth-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #050810;
    position: relative;
    overflow-x: hidden;
    font-family: var(--fonte-principal);
}

/* GRID CÓSMICO */
.auth-body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 60s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes gridMove {
    from { transform: translate(0, 0); }
    to   { transform: translate(60px, 60px); }
}

/* AURORAS */
.auth-body::after {
    content: '';
    position: fixed;
    inset: -50%;
    background:
        radial-gradient(ellipse 600px 400px at 20% 30%, rgba(59, 130, 246, 0.15), transparent 50%),
        radial-gradient(ellipse 500px 500px at 80% 70%, rgba(6, 182, 212, 0.10), transparent 50%),
        radial-gradient(ellipse 400px 300px at 50% 90%, rgba(96, 165, 250, 0.08), transparent 50%);
    animation: auroraMove 25s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
    filter: blur(40px);
}

@keyframes auroraMove {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(-30px, 20px) scale(1.1); }
    100% { transform: translate(20px, -10px) scale(1.05); }
}

/* ==================== LAYOUT ==================== */
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 2;
}

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

/* ==================== CARD ==================== */
.auth-card {
    position: relative;
    background: rgba(10, 15, 30, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 18px;
    padding: 28px 28px 24px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.02),
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(59, 130, 246, 0.08);
    animation: cardFadeIn 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(59, 130, 246, 0.8),
        rgba(6, 182, 212, 0.8),
        transparent);
    animation: cardShine 4s ease-in-out infinite;
}

@keyframes cardShine {
    0%, 100% { opacity: 0.3; }
    50%      { opacity: 1; }
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==================== HEADER ==================== */
.auth-card-header {
    text-align: center;
    margin-bottom: 22px;
}

.auth-titulo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.55rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.auth-titulo i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    color: #ffffff;
    font-size: 0.95rem;
    box-shadow:
        0 0 16px rgba(59, 130, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% {
        box-shadow:
            0 0 16px rgba(59, 130, 246, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow:
            0 0 26px rgba(6, 182, 212, 0.6),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
}

.auth-titulo .text-accent {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 50%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientText 4s ease infinite;
}

@keyframes gradientText {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

.auth-subtitulo {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.8rem;
    line-height: 1.4;
    font-weight: 400;
}

/* ==================== FORM ==================== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-grupo {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
    position: relative;
}

.form-grupo label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* INPUTS COMPACTOS */
.auth-form .form-input,
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="tel"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 10px 13px;
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    background-color: rgba(255, 255, 255, 0.03);
    color: #ffffff;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.auth-form .form-input::placeholder,
.auth-form input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
}

.auth-form .form-input:focus,
.auth-form input:focus {
    border-color: rgba(59, 130, 246, 0.6);
    background-color: rgba(59, 130, 246, 0.05);
    box-shadow:
        0 0 0 3px rgba(59, 130, 246, 0.1),
        0 0 16px rgba(59, 130, 246, 0.15);
}

/* ==================== BOTÃO ==================== */
.btn-primary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    background-size: 200% 200%;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: gradientShift 5s ease infinite;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    margin-top: 4px;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.btn-primary:hover::before {
    transform: translateX(100%);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 30px rgba(59, 130, 246, 0.6),
        0 0 40px rgba(6, 182, 212, 0.3);
}

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-block {
    width: 100%;
}

/* ==================== BOTÃO SECUNDÁRIO ==================== */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(59, 130, 246, 0.2);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
}

.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.4);
    color: #ffffff;
    transform: translateY(-1px);
}

/* ==================== AÇÕES ==================== */
.auth-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 0.8rem;
}

.auth-link {
    color: rgba(96, 165, 250, 0.9);
    font-weight: 500;
    transition: color 0.2s;
    text-decoration: none;
}

.auth-link:hover {
    color: #06b6d4;
    text-shadow: 0 0 12px rgba(6, 182, 212, 0.5);
}

.auth-sep {
    color: rgba(255, 255, 255, 0.3);
}

/* ==================== DIVISOR ==================== */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 16px 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
}

/* ==================== RODAPÉ DO CARD ==================== */
.auth-footer-botoes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ==================== STATUS BAR ==================== */
.auth-status-bar {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid rgba(59, 130, 246, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--fonte-mono);
    font-size: 0.68rem;
    color: rgba(96, 165, 250, 0.6);
    letter-spacing: 0.5px;
}

.auth-status-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-status-dot::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #06b6d4;
    box-shadow: 0 0 8px #06b6d4;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(0.85); }
}

/* ==================== FOOTER DA PÁGINA ==================== */
.auth-footer {
    text-align: center;
    padding: 14px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.72rem;
    position: relative;
    z-index: 2;
}

.auth-footer strong {
    color: rgba(96, 165, 250, 0.8);
}

/* ==================== LOADING (botão) ==================== */
.btn .btn-loading {
    display: none;
    align-items: center;
    gap: 8px;
}

.btn .btn-texto {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn.loading .btn-texto {
    display: none;
}

.btn.loading .btn-loading {
    display: inline-flex;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ==================== OVERLAY DE LOADING — TELA CHEIA ==================== */
.overlay-loading {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 16, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 22px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay-loading.ativo {
    display: flex;
    opacity: 1;
}

.overlay-loading .spinner {
    width: 64px;
    height: 64px;
    border: 3px solid rgba(59, 130, 246, 0.15);
    border-top-color: #3b82f6;
    border-right-color: #06b6d4;
    border-radius: 50%;
    animation: girarSpinner 0.9s linear infinite;
    box-shadow:
        0 0 30px rgba(59, 130, 246, 0.3),
        inset 0 0 20px rgba(59, 130, 246, 0.1);
}

@keyframes girarSpinner {
    to { transform: rotate(360deg); }
}

.overlay-loading .texto {
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-align: center;
    font-family: var(--fonte-principal);
    animation: pulseTexto 1.8s ease-in-out infinite;
}

@keyframes pulseTexto {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.7; }
}

.overlay-loading .subtexto {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    font-weight: 400;
    margin-top: -10px;
    text-align: center;
}

/* BARRINHA DE PROGRESSO INFINITA */
.overlay-loading .barra-progresso {
    width: 200px;
    height: 3px;
    background: rgba(59, 130, 246, 0.15);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 4px;
}

.overlay-loading .barra-progresso::after {
    content: '';
    display: block;
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, #3b82f6, #06b6d4, #60a5fa);
    border-radius: 999px;
    animation: barraPulando 1.4s ease-in-out infinite;
}

@keyframes barraPulando {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

/* BOTÃO COM SHIMMER DURANTE LOADING */
.btn.loading {
    cursor: wait;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmerBtn 1.6s infinite;
    border-radius: inherit;
    pointer-events: none;
}

@keyframes shimmerBtn {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ==================== CAMPO USERNAME ==================== */
.form-label-hint {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    margin-left: 6px;
}

.form-label-hint strong {
    color: rgba(96, 165, 250, 0.9);
}

/* Input com prefixo visual */
.input-com-prefixo {
    display: flex;
    align-items: stretch;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.input-com-prefixo:focus-within {
    border-color: rgba(59, 130, 246, 0.6);
    background-color: rgba(59, 130, 246, 0.05);
    box-shadow:
        0 0 0 3px rgba(59, 130, 246, 0.1),
        0 0 16px rgba(59, 130, 246, 0.15);
}

.input-com-prefixo .prefixo-texto {
    display: inline-flex;
    align-items: center;
    padding: 10px 0 10px 13px;
    color: rgba(96, 165, 250, 0.6);
    font-size: 0.85rem;
    font-family: var(--fonte-mono);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.input-com-prefixo input {
    flex: 1;
    padding: 10px 13px 10px 2px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    min-width: 0;
}

.input-com-prefixo input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
}

/* Feedback */
.form-hint {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.72rem;
    margin-top: 4px;
}

.form-hint-ok {
    color: #22c55e;
}

.form-hint-erro {
    color: #ef4444;
}

.form-hint-verificando {
    color: rgba(96, 165, 250, 0.8);
}

/* ==================== OTIMIZAÇÃO ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==================== RESPONSIVO ==================== */
@media (max-height: 700px) {
    .auth-card {
        padding: 22px 22px 18px;
    }

    .auth-card-header {
        margin-bottom: 16px;
    }

    .form-grupo {
        margin-bottom: 10px;
    }

    .auth-form .form-input,
    .auth-form input {
        padding: 8px 12px;
    }
}

@media (max-width: 576px) {
    .auth-card {
        padding: 24px 20px 20px;
        border-radius: 14px;
    }

    .auth-titulo {
        font-size: 1.3rem;
    }

    .auth-titulo i {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}

