﻿/* Arquivo: wwwroot/css/login.css */

/* =========================
   Reset básico
   ========================= */
html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #000;
}

/* =========================
   Layout principal
   ========================= */

.login-shell {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
    background: radial-gradient(circle at top, #141727 0, var(--bg-color) 45%, #000 100%);
    color: #f5f5f5;
}

/* =========================
   Fundo animado leve
   ========================= */

.bg-layer {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

/* Orbs coloridos */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(26px);
    opacity: 0.55;
    background: radial-gradient(circle, var(--accent-color) 0%, transparent 65%);
    transform: translate3d(0, 0, 0);
}

.orb-1 {
    width: 260px;
    height: 260px;
    top: -8%;
    left: -5%;
    animation: orbFloat1 26s ease-in-out infinite alternate;
}

.orb-2 {
    width: 220px;
    height: 220px;
    bottom: -10%;
    right: -8%;
    animation: orbFloat2 24s ease-in-out infinite alternate;
}

.orb-3 {
    width: 180px;
    height: 180px;
    top: 45%;
    left: 60%;
    opacity: 0.38;
    animation: orbFloat3 30s ease-in-out infinite alternate;
}

@keyframes orbFloat1 {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }

    50% {
        transform: translate3d(10%, 12%, 0) scale(1.05);
    }

    100% {
        transform: translate3d(4%, 18%, 0) scale(1.08);
    }
}

@keyframes orbFloat2 {
    0% {
        transform: translate3d(0, 0, 0) scale(1.05);
    }

    50% {
        transform: translate3d(-8%, -10%, 0) scale(1.1);
    }

    100% {
        transform: translate3d(-16%, -4%, 0) scale(1.15);
    }
}

@keyframes orbFloat3 {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }

    100% {
        transform: translate3d(-6%, -10%, 0) scale(1.12);
    }
}

/* Linhas de grid sutis */
.grid-line {
    position: absolute;
    border-radius: 999px;
    opacity: 0.16;
    background: linear-gradient( 90deg, transparent 0, rgba(255, 255, 255, 0.22) 30%, rgba(255, 255, 255, 0.22) 70%, transparent 100% );
}

.grid-line-h {
    left: -20%;
    right: -20%;
    top: 55%;
    height: 1px;
    animation: gridMoveH 18s linear infinite;
}

.grid-line-v {
    top: -20%;
    bottom: -20%;
    left: 48%;
    width: 1px;
    background: linear-gradient( 180deg, transparent 0, rgba(255, 255, 255, 0.18) 30%, rgba(255, 255, 255, 0.18) 70%, transparent 100% );
    animation: gridMoveV 22s linear infinite;
}

@keyframes gridMoveH {
    0% {
        transform: translateX(-4%);
    }

    50% {
        transform: translateX(4%);
    }

    100% {
        transform: translateX(-4%);
    }
}

@keyframes gridMoveV {
    0% {
        transform: translateY(6%);
    }

    50% {
        transform: translateY(-4%);
    }

    100% {
        transform: translateY(6%);
    }
}

/* =========================
   Loader overlay
   ========================= */

.loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1.4rem;
    border-radius: 999px;
    background: rgba(15, 15, 25, 0.94);
    color: #f5f5f5;
    font-size: 0.95rem;
}

/* =========================
   Card de login
   ========================= */

.login-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;
    margin: 1.5rem;
    padding: 2.5rem 2.25rem 2rem;
    border-radius: 20px;
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.86));
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

    .login-logo img {
        max-width: 210px;
        max-height: 80px;
        object-fit: contain;
    }

.login-title {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.login-subtitle {
    text-align: center;
    font-size: 0.9rem;
    color: #b8bed8;
    margin-bottom: 1.6rem;
}

.login-error {
    margin-bottom: 0.85rem;
    padding: 0.65rem 0.8rem;
    border-radius: 12px;
    background: rgba(255, 92, 92, 0.14);
    border: 1px solid rgba(255, 92, 92, 0.5);
    color: #ffeaea;
    font-size: 0.9rem;
}

/* =========================
   Formulário
   ========================= */

.login-form .form-group {
    margin-bottom: 0.9rem;
}

.login-form label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    color: #d5daf3;
}

.login-form .form-control {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(183, 187, 216, 0.25);
    background-color: rgba(7, 9, 22, 0.9);
    color: #f5f5f5;
    padding: 0.55rem 0.7rem;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

    .login-form .form-control:focus {
        border-color: var(--accent-color);
        box-shadow: 0 0 0 1px var(--accent-color);
        background-color: rgba(10, 12, 28, 0.95);
    }

/* Captcha */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

    .captcha-row img {
        height: 44px;
        border-radius: 10px;
        border: 1px solid rgba(183, 187, 216, 0.4);
        background: #fff;
    }

.btn-reload {
    border-radius: 999px;
    border: 1px solid rgba(183, 187, 216, 0.6);
    background: transparent;
    color: #e0e4ff;
    padding: 0.35rem 0.75rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

    .btn-reload:hover {
        background: rgba(183, 187, 216, 0.2);
        transform: translateY(-1px);
    }

/* Botão principal */
.btn-login {
    width: 100%;
    margin-top: 0.35rem;
    border: none;
    border-radius: 999px;
    padding: 0.7rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    background: linear-gradient(90deg, var(--accent-color), #7f5dff);
    color: #050616;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.65);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

    .btn-login:hover {
        transform: translateY(-1px);
        box-shadow: 0 12px 26px rgba(0, 0, 0, 0.75);
        filter: brightness(1.05);
    }

    .btn-login:active {
        transform: translateY(1px) scale(0.99);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.7);
    }

/* Rodapé */
.login-footer {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

.link-forgot {
    font-size: 0.85rem;
    color: #c0d9ff;
    text-decoration: none;
    position: relative;
}

    .link-forgot::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -2px;
        width: 0;
        height: 1px;
        background: var(--accent-color);
        transition: width 0.2s ease;
    }

    .link-forgot:hover::after {
        width: 100%;
    }

/* =========================
   Cachorro correndo
   ========================= */

.dog-layer {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.dog-run {
    position: absolute;
    bottom: 8%;
    left: -20%;
    width: 140px; /* ajusta o tamanho do cachorro aqui */
    animation: dogRunAcross 10s linear infinite;
}

@keyframes dogRunAcross {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(140vw);
    }
}

/* =========================
   Responsivo
   ========================= */

@media (max-width: 576px) {
    .login-card {
        padding: 2rem 1.4rem 1.6rem;
        margin: 1.2rem;
    }

    .login-title {
        font-size: 1.3rem;
    }

    .login-subtitle {
        font-size: 0.85rem;
    }
}
