/* ============================================================
   login.css — Estilos exclusivos da tela de login
   Glassmorphism sobre imagem de fundo
   ============================================================ */

:root {
    --atena-azul: #0e6efd;
    --atena-azul-hover: #0b5ed7;
    --glass-bg: rgba(20, 25, 35, 0.55);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-input-bg: rgba(255, 255, 255, 0.06);
    --glass-input-bg-hover: rgba(255, 255, 255, 0.10);
}

* { box-sizing: border-box; }

/* ============================================
   FUNDO DA TELA DE LOGIN
   ============================================ */
html[data-bs-theme="dark"] body,
body {
    min-height: 100vh;
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #fff;
    background: url('/img/login-bg.jpg') center/cover fixed no-repeat !important;
    position: relative;
}

/* Overlay escuro para contraste */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 10, 30, 0.6) 100%);
    z-index: 0;
}

/* ============================================
   GLASSMORPHISM - Card vidro fosco
   ============================================ */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    color: #fff;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    overflow: hidden;
}

/* Inputs sobre o glass */
.glass-card .form-control,
.glass-card .input-group-text {
    background: var(--glass-input-bg);
    border: 1px solid var(--glass-border);
    color: #fff;
    transition: all 0.2s ease;
}

.glass-card .form-control::placeholder { color: rgba(255, 255, 255, 0.45); }
.glass-card .form-control:hover { background: var(--glass-input-bg-hover); }

.glass-card .form-control:focus {
    background: var(--glass-input-bg-hover);
    border-color: #ff3d06;
    box-shadow: 0 0 0 3px rgba(188, 45, 5, 0.25);
    color: #fff;
}

.glass-card .form-label {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 13px;
    margin-bottom: 4px;
}

.glass-card .form-label.required::after { content: ' *'; color: #ff3d06; }

.glass-card .form-check-input {
    background-color: var(--glass-input-bg);
    border-color: var(--glass-border);
}

.glass-card .form-check-input:checked {
    background-color: #ff3d06;
    border-color: #ff3d06;
}

.glass-card .form-check-label { color: rgba(255, 255, 255, 0.8); }
.glass-card .form-hint { color: rgba(255, 255, 255, 0.55); font-size: 12px; }
.glass-card hr { border-color: rgba(255, 255, 255, 0.15); }
.glass-card h2, .glass-card h3, .glass-card h4, .glass-card h5 { color: #fff; }
.glass-card .text-secondary { color: rgba(255, 255, 255, 0.65) !important; }
.glass-card .input-group-text a { color: rgba(255, 255, 255, 0.7); }
.glass-card .input-group-text a:hover { color: #ff3d06; }

/* Botão azul */
.btn-atena,
.btn-atena:link,
.btn-atena:visited {
    background-color: #ff3d06 !important;
    color: #fff !important;
    border: 1px solid #ff3d06 !important;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
}

    .btn-atena:hover,
    .btn-atena:focus,
    .btn-atena:active {
        background-color: #dc3813 !important;
        border-color: #dc3813 !important;
        color: #fff !important;
        transform: translateY(-1px);
        box-shadow: 0 8px 20px rgb(233, 104, 19, 0,45);
    }

.btn-atena i, .btn-atena .ti { color: #fff !important; }

/* Links */
.glass-card a { color: #ff3d06; text-decoration: none; transition: opacity 0.2s ease; }
.glass-card a:hover { opacity: 0.8; }

/* Logo flutuante */
.login-logo-wrapper { text-align: center; margin-bottom: 1.25rem; }
.login-logo {
    max-height: 56px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.login-tagline {
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 300;
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.login-tagline strong { color: #ff3d06; font-weight: 700; }

/* Botão flutuante "Assistir tutorial" */
.btn-tutorial-fab {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 1055;
    display: inline-flex;
    align-items: center;
    height: 48px;
    width: 48px;
    border-radius: 50px;
    overflow: hidden;
    white-space: nowrap;
    border: 1px solid rgba(255, 61, 6, 0.55);
    background: rgba(30, 20, 18, 0.55);
    backdrop-filter: blur(6px);
    color: #fff !important;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    transition: width 0.3s ease, background 0.2s ease, box-shadow 0.2s ease;
}

    .btn-tutorial-fab:hover {
        width: 190px;
        background: #ff3d06;
        border-color: #ff3d06;
        box-shadow: 0 8px 22px rgba(255, 61, 6, 0.45);
    }

    .btn-tutorial-fab .tutorial-icon {
        width: 46px;
        height: 46px;
        border-radius: 50%;
        background: #ff3d06;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        position: relative;
        flex-shrink: 0;
    }

    .btn-tutorial-fab:hover .tutorial-icon {
        background: #fff;
        color: #ff3d06;
    }

    .btn-tutorial-fab .tutorial-icon::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 50%;
        box-shadow: 0 0 0 0 rgba(255, 61, 6, 0.55);
        animation: tutorialPulse 2s infinite;
    }

    .btn-tutorial-fab:hover .tutorial-icon::after { animation: none; box-shadow: none; }

    .btn-tutorial-fab .tutorial-text {
        padding-left: .6rem;
        padding-right: 1.1rem;
        font-weight: 600;
        font-size: 13px;
        opacity: 0;
        transition: opacity 0.15s ease;
    }

    .btn-tutorial-fab:hover .tutorial-text {
        opacity: 1;
        transition: opacity 0.2s ease 0.1s;
    }

@keyframes tutorialPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 61, 6, 0.55); }
    70% { box-shadow: 0 0 0 10px rgba(255, 61, 6, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 61, 6, 0); }
}

/* Popup do tutorial */
#modalTutorialLogin .modal-content {
    border: 2px solid #ff3d06;
    box-shadow: 0 0 24px rgba(255, 61, 6, 0.35);
}

/* ============================================
   ANIMAÇÃO DAS TABS (transição entre telas)
   ============================================ */
.login-tabs-container {
    position: relative;
    transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-tab { display: none; }

.login-tab.active {
    display: block;
    animation: tabFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-tab.exiting {
    animation: tabFadeOut 0.15s ease forwards;
    display: block;
}

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes tabFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-12px); }
}

/* Footer */
.login-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    padding: 1rem;
    z-index: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.login-footer a { color: rgba(255, 255, 255, 0.8); text-decoration: none; }
.login-footer a:hover { color: #ff3d06; }

/* Validação visual */
.glass-card .is-invalid {
    border-color: #d63939 !important;
    background-color: rgba(214, 57, 57, 0.1) !important;
}

.glass-card .invalid-feedback { color: #ff8a8a; font-size: 12px; }

/* Alerts customizados */
.glass-card .alert { border: 1px solid; backdrop-filter: blur(10px); }

.glass-card .alert-danger {
    background: rgba(214, 57, 57, 0.2);
    border-color: rgba(214, 57, 57, 0.4);
    color: #ffb3b3;
}

.glass-card .alert-success {
    background: rgba(46, 184, 92, 0.2);
    border-color: rgba(46, 184, 92, 0.4);
    color: #b3ffcc;
}

/* Responsividade */
@media (max-width: 576px) {
    .glass-card { border-radius: 12px; }
}
