:root {
    --bg-main: #060913;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.2);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --border: rgba(255, 255, 255, 0.08);
    --danger: #f87171;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --font-display: 'Outfit', sans-serif;
    --font-sans: 'Plus Jakarta Sans', sans-serif;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-sans);
    height: 100vh;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
}

/* LADO ESQUERDO: BANNER & SIMULAÇÃO DE TV */
.banner-side {
    background: radial-gradient(circle at 10% 20%, #1e1b4b 0%, #090d16 90%);
    border-right: 1px solid var(--border);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4rem;
    overflow: hidden;
}

/* Efeitos luminosos em segundo plano no lado esquerdo */
.banner-side::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.15) 0%, rgba(0,0,0,0) 75%);
    top: -100px;
    left: -100px;
    filter: blur(50px);
    pointer-events: none;
}

.banner-side::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(0,0,0,0) 75%);
    bottom: -50px;
    right: -50px;
    filter: blur(50px);
    pointer-events: none;
}

/* Cabeçalho do lado esquerdo */
.banner-header {
    z-index: 10;
}

.banner-logo {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
}

.banner-logo img {
    max-height: 75px;
    width: auto;
    object-fit: contain;
}

.banner-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.25;
    max-width: 520px;
    background: linear-gradient(to right, #ffffff, #c7d2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.banner-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 480px;
}

/* Maquete Realista de TV em CSS */
.tv-mockup-wrapper {
    margin: auto 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.tv-bezel {
    width: 100%;
    max-width: 580px;
    aspect-ratio: 16/9;
    background-color: #0c0e14;
    border: 10px solid #1e293b;
    border-radius: 14px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 
                0 0 30px rgba(99, 102, 241, 0.15);
    position: relative;
    overflow: hidden;
}

.tv-screen {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-image: url('https://images.unsplash.com/photo-1555396273-367ea4eb4db5?auto=format&fit=crop&w=800&q=80');
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.25rem;
    position: relative;
}

/* Overlay escuro na TV */
.tv-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 60%);
    z-index: 2;
}

/* Camadas de Slide com Animação Smooth Crossfade */
.tv-slide-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    will-change: opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
    z-index: 1;
}
.tv-slide-layer.active {
    opacity: 1;
}

.tv-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    background-color: var(--primary);
    width: 0%;
    z-index: 10;
    animation: tv-progress 15s linear infinite;
}

@keyframes tv-progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

.tv-clock {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
    z-index: 10;
}

.tv-ticker {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 0;
    overflow: hidden;
    white-space: nowrap;
    z-index: 10;
}

.tv-ticker-text {
    display: inline-block;
    padding-left: 100%;
    animation: tv-ticker-scroll 20s linear infinite;
}

@keyframes tv-ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.tv-screen-content {
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 35px; /* Evitar que o ticker cubra o conteúdo */
}

.tv-ad-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tv-ad-badge {
    background-color: var(--primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tv-ad-title {
    font-size: 0.95rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.tv-status-badge {
    background-color: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 9999px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tv-status-badge span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #10b981;
    box-shadow: 0 0 6px #10b981;
}

/* Informações do rodapé esquerdo */
.banner-footer {
    z-index: 10;
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.banner-footer span {
    display: flex;
    align-items: center;
    gap: 6px;
}


/* LADO DIREITO: FORMULÁRIO DE LOGIN COM FUNDO DE VIDRO */
.login-side {
    background-color: #070a13;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: clamp(2rem, 10vh, 6rem);
    padding-bottom: 3rem;
    padding-left: 2rem;
    padding-right: 2rem;
    position: relative;
    overflow-y: auto;
}

/* Luzes de fundo específicas para o lado direito refletirem no vidro */
.login-glow-1 {
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(0,0,0,0) 70%);
    top: 15%;
    right: 10%;
    z-index: 1;
    filter: blur(50px);
    pointer-events: none;
}

.login-glow-2 {
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.1) 0%, rgba(0,0,0,0) 70%);
    bottom: 15%;
    left: 10%;
    z-index: 1;
    filter: blur(50px);
    pointer-events: none;
}

/* Cartão com Efeito de Vidro (Glassmorphic) */
.login-card {
    width: 100%;
    max-width: 410px;
    background: rgba(13, 17, 30, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 
                0 0 40px rgba(99, 102, 241, 0.03);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: card-fade-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.alert-container {
    width: 100%;
}

@keyframes card-fade-in {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Centralizar o cabeçalho do login e logo */
.login-card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

.login-card-logo-wrapper {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    width: 100%;
}

.login-card-logo-wrapper img {
    max-height: 90px; /* Bem maior */
    width: auto;
    object-fit: contain;
}

.login-card-title {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 60%, #c7d2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-card-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Inputs de formulário */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 1.25rem;
}

.input-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left; /* Manter os labels alinhados à esquerda para os campos */
}

.input-box-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-box-wrapper i.field-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-size: 1.05rem;
    pointer-events: none;
    transition: color 0.3s;
}

.input-box-wrapper input {
    width: 100%;
    padding: 16px 16px 16px 46px;
    background-color: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: white;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-box-wrapper input:focus {
    border-color: var(--primary);
    background-color: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 15px var(--primary-glow);
}

.input-box-wrapper input:focus ~ i.field-icon {
    color: var(--primary);
}

.btn-toggle-eye {
    position: absolute;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    outline: none;
    padding: 4px;
    font-size: 1rem;
    transition: color 0.2s;
}

.btn-toggle-eye:hover {
    color: white;
}

/* Botão Voltar para o site no topo do login */
.btn-back-to-site {
    position: absolute;
    top: 24px;
    right: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(14, 19, 34, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    backdrop-filter: blur(12px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 20;
}

.btn-back-to-site:hover {
    color: #FFFFFF;
    border-color: rgba(139, 92, 246, 0.4);
    background: rgba(139, 92, 246, 0.15);
    transform: translateX(-3px);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.25);
}

.btn-back-to-site i {
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.btn-back-to-site:hover i {
    transform: translateX(-2px);
}

/* Checkbox Lembrar-me e Esqueci Senha */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    user-select: none;
}

/* Checkbox Moderno Estilizado (Neon Cyan) */
.custom-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
}

.custom-checkbox-label:hover {
    color: #FFFFFF;
}

.custom-checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkbox-box {
    width: 20px;
    height: 20px;
    background: #090e1a;
    border: 2px solid #00D8F6;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 8px rgba(0, 216, 246, 0.2);
    flex-shrink: 0;
    position: relative;
}

.custom-checkbox-label:hover .custom-checkbox-box {
    box-shadow: 0 0 12px rgba(0, 216, 246, 0.45);
    border-color: #38BDF8;
}

.custom-checkbox-box::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #00E5FF;
    border-radius: 3px;
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 8px #00E5FF;
}

.custom-checkbox-label input:checked ~ .custom-checkbox-box {
    border-color: #00E5FF;
    background: rgba(0, 229, 255, 0.12);
    box-shadow: 0 0 14px rgba(0, 229, 255, 0.6);
}

.custom-checkbox-label input:checked ~ .custom-checkbox-box::after {
    transform: scale(1);
}

.checkbox-text {
    font-size: 0.85rem;
    font-weight: 500;
}

.forgot-link {
    color: #818CF8;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s, text-shadow 0.2s;
}

.forgot-link:hover {
    color: #A78BFA;
    text-decoration: underline;
    text-shadow: 0 0 10px rgba(167, 139, 250, 0.4);
}

/* Botão Acessar */
.btn-login {
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    border: none;
    color: white;
    padding: 16px;
    border-radius: 12px;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-login:hover {
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.35);
    background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 100%);
}

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

/* Mensagens de Alerta */
.alert-error {
    background-color: var(--danger-bg);
    border: 1px solid rgba(248, 113, 113, 0.15);
    color: var(--danger);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.5;
    display: flex;
    gap: 10px;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    15%, 45%, 75% { transform: translateX(-5px); }
    30%, 60%, 90% { transform: translateX(5px); }
}

.alert-error i {
    margin-top: 2px;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.18);
    color: #10b981;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 10px;
    max-height: 100px;
    opacity: 1;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    animation: fade-in-slide 0.4s ease;
}

.alert-success.dismiss {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
    border-color: transparent;
    transform: translateY(-8px);
}

@keyframes fade-in-slide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-card-footer {
    text-align: center;
    font-size: 0.88rem;
    color: #94A3B8;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-card-footer a,
.footer-link-highlight {
    color: #38BDF8 !important;
    text-decoration: underline !important;
    text-underline-offset: 4px;
    text-decoration-color: rgba(56, 189, 248, 0.45) !important;
    font-weight: 700 !important;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-card-footer a:hover,
.footer-link-highlight:hover {
    color: #00E5FF !important;
    text-decoration-color: #00E5FF !important;
    text-shadow: 0 0 12px rgba(0, 229, 255, 0.6);
    transform: translateX(2px);
}

.login-card-footer a i,
.footer-link-highlight i {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.login-card-footer a:hover i,
.footer-link-highlight:hover i {
    transform: translateX(3px);
}

/* Estado de loading do botão de login */
.btn-login.loading {
    background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 100%);
    opacity: 0.8;
    cursor: not-allowed;
}

.btn-login.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Portal split screen - Janela de Vidro no Login */
.glass-portal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    overflow: hidden;
}

/* Painéis de vidro esquerdo e direito */
.glass-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    background: rgba(8, 12, 22, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    transition: transform 0.8s cubic-bezier(0.85, 0, 0.15, 1);
}

.glass-left {
    left: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateX(-100%); /* Começa aberto na esquerda */
}

.glass-right {
    right: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateX(100%); /* Começa aberto na direita */
}

/* Quando fechar, as duas metades deslizam para o centro */
.glass-portal.closing .glass-left {
    transform: translateX(0);
}

.glass-portal.closing .glass-right {
    transform: translateX(0);
}

@media (max-width: 900px) {
    body {
        grid-template-columns: 1fr;
        height: auto;
        overflow: auto;
    }
    .banner-side {
        display: none;
    }
    .login-side {
        padding: 2rem 1.5rem;
    }
}

/* Animação de Janela Abrindo (Split) */
body.split-animating .banner-side {
    transform: translateX(-100%);
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}
body.split-animating .login-side {
    transform: translateX(100%);
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

/* Box de Requisitos de Senha */
.password-validation-box {
    margin-top: 10px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    backdrop-filter: blur(8px);
}

.pwd-req {
    font-size: 0.82rem;
    font-weight: 500;
    color: #EF4444; /* Vermelho por padrão */
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.pwd-req i {
    font-size: 0.9rem;
    color: #EF4444;
    transition: color 0.2s ease;
}

.pwd-req.valid {
    color: #10B981; /* Verde quando válido */
}

.pwd-req.valid i {
    color: #10B981;
}

/* Mensagem de Match */
.pwd-match-msg {
    margin-top: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    display: none;
    align-items: center;
    gap: 6px;
}

.pwd-match-msg.active {
    display: inline-flex;
}

.pwd-match-msg.error {
    color: #EF4444;
}

.pwd-match-msg.error i {
    color: #EF4444;
}

.pwd-match-msg.success {
    color: #10B981;
}

.pwd-match-msg.success i {
    color: #10B981;
}
