/**
 * SION - Página de Login
 * Design inspirado no SION v01 com paleta Nolasco
 */

/* Reset e base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    overflow: hidden;
    background: #0a1628;
}

/* ========== SPLASH SCREEN ========== */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0d1f3c 0%, #173557 40%, #004994 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.splash-content {
    text-align: center;
}

.splash-logo {
    width: 150px;
    height: auto;
    animation: splashPulse 1.5s ease-in-out infinite;
    filter: drop-shadow(0 4px 20px rgba(241, 137, 0, 0.3));
}

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

.splash-spinner {
    margin-top: 30px;
}

.splash-spinner .spinner-border {
    width: 30px;
    height: 30px;
    border-width: 3px;
}

.splash-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-top: 15px;
    letter-spacing: 1px;
}

/* ========== LOGIN SCREEN ========== */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* Fundo gradiente */
.login-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0d1f3c 0%, #173557 40%, #004994 100%);
    z-index: -1;
}

.login-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(241, 137, 0, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 73, 148, 0.15) 0%, transparent 50%);
}

/* Container */
.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    z-index: 1;
}

/* Card principal */
.login-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 16px;
    padding: 40px 36px 30px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

/* ========== HEADER ========== */
.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 90px;
    height: auto;
    margin-bottom: 16px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: #173557;
    margin: 0;
    letter-spacing: 2px;
}

.login-subtitle {
    font-size: 13px;
    color: #6c7a89;
    margin: 6px 0 0;
    font-weight: 400;
}

/* ========== MENSAGENS ========== */
.login-erro {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #fff5f5;
    border-left: 3px solid #DC3545;
    border-radius: 6px;
    color: #DC3545;
    font-size: 13px;
    margin-bottom: 16px;
    animation: shakeErro 0.4s ease;
}

@keyframes shakeErro {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.login-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    color: #004994;
    font-size: 14px;
    margin-bottom: 16px;
}

/* ========== FORMULÁRIO ========== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #173557;
    margin-bottom: 6px;
}

.form-group label i {
    color: #004994;
    margin-right: 2px;
}

.form-group .form-control {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 2px solid #e0e4e8;
    border-radius: 8px;
    color: #2c3e50;
    background: #fafbfc;
    transition: all 0.2s ease;
}

.form-group .form-control:focus {
    border-color: #F18900;
    box-shadow: 0 0 0 3px rgba(241, 137, 0, 0.15);
    background: #fff;
    outline: none;
}

.form-group .form-control::placeholder {
    color: #adb5bd;
    font-weight: 400;
}

/* Wrapper senha com toggle */
.input-senha-wrapper {
    position: relative;
}

.input-senha-wrapper .form-control {
    padding-right: 44px;
}

.btn-toggle-senha {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 6px 10px;
    color: #6c7a89;
    cursor: pointer;
    font-size: 16px;
    transition: color 0.2s;
}

.btn-toggle-senha:hover {
    color: #173557;
}

/* Botão entrar */
.btn-entrar {
    width: 100%;
    padding: 13px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
    background: linear-gradient(135deg, #F18900 0%, #e07800 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-top: 6px;
    box-shadow: 0 4px 15px rgba(241, 137, 0, 0.3);
}

.btn-entrar:hover {
    background: linear-gradient(135deg, #e07800 0%, #cc6b00 100%);
    box-shadow: 0 6px 20px rgba(241, 137, 0, 0.4);
}

.btn-entrar:active {
    transform: scale(0.98);
}

.btn-entrar:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
}

/* ========== FOOTER LINK ========== */
.login-footer-link {
    text-align: center;
    margin-top: 18px;
}

.login-footer-link a {
    color: #6c7a89;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
}

.login-footer-link a:hover {
    color: #004994;
}

/* ========== FOOTER ========== */
.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #e9ecef;
    font-size: 11px;
    color: #adb5bd;
}

.login-footer-sep {
    margin: 0 6px;
}

/* ========== MODAL ALTERAR SENHA ========== */
.senha-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #173557, #004994);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: #fff;
    font-size: 24px;
}

#modalAlterarSenha .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

#modalAlterarSenha .modal-title {
    font-weight: 700;
    color: #173557;
}

#modalAlterarSenha .btn-primary {
    background: linear-gradient(135deg, #F18900 0%, #e07800 100%);
    border: none;
    font-weight: 600;
    padding: 10px 30px;
    border-radius: 8px;
}

#modalAlterarSenha .btn-primary:hover {
    background: linear-gradient(135deg, #e07800 0%, #cc6b00 100%);
}

/* ========== RESPONSIVO ========== */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 24px 24px;
    }

    .login-logo {
        width: 70px;
    }

    .login-title {
        font-size: 24px;
    }
}
