/* ======================================
   LOGIN PAGE - Premium Redesign
   ====================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.login-page {
    min-height: 100vh;
    display: flex;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0f1117;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-text-size-adjust: none;
    overflow: hidden;
}

/* Container principal */
.login-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* =============================
   PAINEL ESQUERDO - Decorativo
   ============================= */
.login-side-panel {
    flex: 1;
    background: linear-gradient(135deg, #1a1c2e 0%, #2d1b69 40%, #4e73df 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

/* Elementos decorativos de fundo */
.login-side-panel::before {
    content: '';
    position: absolute;
    top: -150px;
    right: -150px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(78, 115, 223, 0.15);
    animation: float 6s ease-in-out infinite;
}

.login-side-panel::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-30px) rotate(5deg);
    }
}

.side-panel-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 400px;
}

.side-panel-content .side-icon {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.15);
    margin-bottom: 2rem;
}

.side-panel-content h2 {
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.side-panel-content h2 span {
    background: linear-gradient(135deg, #a78bfa, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.side-panel-content p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.7;
}

/* =============================
   PAINEL DIREITO - Formulário
   ============================= */
.login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #0f1117;
    position: relative;
}

/* Padrão decorativo sutil no fundo */
.login-form-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 80%, rgba(78, 115, 223, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(167, 139, 250, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.login-form-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 2;
}

/* Card de Login */
.login-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2.5rem;
    border-radius: 24px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
}

.login-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo e Título */
.login-logo {
    text-align: center;
    margin-bottom: 2rem;
    padding: 0;
    background: none;
    border-radius: 0;
}

.login-logo img {
    max-width: 220px;
    height: auto;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.login-logo img:hover {
    opacity: 1;
}

.login-logo h4 {
    color: #fff;
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
}

.login-logo p {
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Separador */
.login-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin-bottom: 2rem;
}

/* Labels */
.form-label-custom {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    display: block;
}

/* Campos do Formulário */
.input-group-text {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    width: 48px;
    justify-content: center;
    border-radius: 12px 0 0 12px;
    transition: all 0.3s ease;
}

.form-control {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    border-radius: 0 12px 12px 0;
    transition: all 0.3s ease;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(78, 115, 223, 0.5);
    box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.15);
    color: #fff;
}

.input-group:focus-within .input-group-text {
    border-color: rgba(78, 115, 223, 0.5);
    color: #4e73df;
}

/* Botão Mostrar/Ocultar Senha */
.toggle-password {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: none;
    color: rgba(255, 255, 255, 0.4);
    border-radius: 0 12px 12px 0;
    transition: all 0.3s ease;
    padding: 0 0.9rem;
}

.toggle-password:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Quando tem toggle-password, o input do meio perde o border-radius */
.input-group .form-control:not(:last-child) {
    border-radius: 0;
}

/* Botão de Login */
.btn-login {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    border: none;
    color: #fff;
    padding: 0.9rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(78, 115, 223, 0.4);
    color: #fff;
}

.btn-login:hover::before {
    left: 100%;
}

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

/* Alertas */
.alert {
    border: none;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    padding: 0.9rem 1.2rem;
    animation: fadeInUp 0.3s ease-out;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.15);
    color: #f8a4ad;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.alert-success {
    background: rgba(40, 167, 69, 0.15);
    color: #86efac;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.alert .btn-close {
    filter: invert(1);
    opacity: 0.5;
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.8rem;
}

/* Validation */
.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: rgba(220, 53, 69, 0.5);
}

.invalid-feedback {
    color: #f8a4ad;
    font-size: 0.8rem;
}

/* =============================
   RESPONSIVIDADE
   ============================= */
@media (max-width: 991px) {
    .login-wrapper {
        flex-direction: column;
    }

    .login-side-panel {
        display: none;
    }

    .login-form-panel {
        flex: 1;
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 576px) {
    .login-side-panel {
        padding: 2rem 1.5rem;
    }

    .login-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .login-logo img {
        max-width: 220px;
    }

    .login-logo h4 {
        font-size: 1.2rem;
    }

    .side-panel-content h2 {
        font-size: 1.3rem;
    }
}