/* ============================================
   Visiio - Login Screen
   Design System: Tech AI / Corporate Futurista
   ============================================ */

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

:root {
    /* Cores do Design System */
    --color-primary: #0099ff;
    --color-primary-light: #00ccff;
    --color-primary-dark: #0077cc;
    
    --color-secondary: #00ffb3;
    --color-secondary-light: #00ff88;
    
    --bg-base: #05080f;
    --bg-elevated: #0a1020;
    --bg-surface: #0c101c;
    --bg-overlay: rgba(10, 15, 25, 0.8);
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-tertiary: rgba(255, 255, 255, 0.6);
    --text-muted: rgba(255, 255, 255, 0.45);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: relative;
    color: var(--text-primary);
    background: var(--bg-base);
}

/* ============================================
   Background Animado
   ============================================ */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0, 153, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(0, 255, 179, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 10% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, #05080f 0%, #0a1020 50%, #05080f 100%);
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image: 
        linear-gradient(rgba(0, 153, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 153, 255, 0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 0%, transparent 70%);
    pointer-events: none;
}

/* Glow Orbs */
.login-split-container::before,
.login-split-container::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    animation: visiio-float 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.login-split-container::before {
    width: 400px;
    height: 400px;
    background: rgba(0, 153, 255, 0.2);
    top: 10%;
    left: 20%;
}

.login-split-container::after {
    width: 300px;
    height: 300px;
    background: rgba(0, 255, 179, 0.12);
    bottom: 20%;
    right: 15%;
    animation-delay: -4s;
}

@keyframes visiio-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -20px) scale(1.1); }
}

/* ============================================
   Vídeo Background Full Width
   ============================================ */
.login-video-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* ============================================
   Container Principal
   ============================================ */
.login-split-container {
    display: flex;
    width: 100%;
    height: 100vh;
    position: relative;
    z-index: 1;
}

/* ============================================
   Box de Login
   ============================================ */
.login-box-container {
    position: fixed;
    top: 50%;
    right: 80px;
    transform: translateY(-50%);
    z-index: 10;
}

.login-box {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0 24px 0 24px;
    padding: 60px 80px;
    min-width: 420px;
    max-width: 500px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.login-content {
    width: 100%;
    max-width: 420px;
    animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Logo */
.login-logo {
    margin-bottom: 48px;
    text-align: center;
}

.login-logo-symbol {
    display: block;
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin: 0 auto 12px;
}

.logo-subtitle {
    font-size: 20px;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin: 0 0 8px;
}

.logo-tagline {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    letter-spacing: 0.3px;
    margin: 0;
}

/* Formulário */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.login-input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 400;
    transition: all 0.3s ease;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.login-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
    font-weight: 400;
}

.login-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 153, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 153, 255, 0.15);
    transform: translateY(-1px);
}

.form-options {
    display: flex;
    align-items: center;
    font-size: 13px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    user-select: none;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #0099ff;
}

/* Botão de Login */
.login-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #0099ff 0%, #0077cc 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    outline: none;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    box-shadow: 0 4px 15px rgba(0, 153, 255, 0.3);
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 153, 255, 0.4);
    background: linear-gradient(135deg, #00aaff 0%, #0088dd 100%);
}

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

.login-button.loading {
    pointer-events: none;
}

.login-button.loading .button-text {
    opacity: 0;
}

.login-button.loading .infinity-loader {
    display: block;
}

.infinity-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.infinity-icon {
    width: 24px;
    height: 24px;
    color: rgba(255, 255, 255, 0.9);
    animation: infinity-rotate 1.5s ease-in-out infinite;
}

@keyframes infinity-rotate {
    0%, 100% {
        transform: rotate(0deg);
        opacity: 0.8;
    }
    50% {
        transform: rotate(180deg);
        opacity: 1;
    }
}

/* Transição de Login */
.login-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-base);
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-out;
}

.login-transition-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Footer do Login */
.login-footer {
    margin-top: 24px;
    text-align: center;
}

.forgot-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #0099ff;
}

/* ============================================
   Conteúdo Promocional sobre Vídeo
   ============================================ */
.promo-content {
    position: fixed;
    top: 50%;
    left: 80px;
    transform: translateY(-50%);
    z-index: 5;
    text-align: center;
}

.promo-inner {
    animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.promo-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-base);
    z-index: -2;
}

/* Tenta carregar wallpaper se existir */
.promo-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../../custom/bkg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.has-wallpaper .promo-background::after {
    opacity: 0.3;
}

.promo-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(0, 153, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 255, 179, 0.08) 0%, transparent 50%);
    z-index: -1;
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.promo-inner {
    text-align: center;
    padding: 60px;
    max-width: 600px;
    animation: slideInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
    position: relative;
    z-index: 1;
}

.promo-inner .promo-logo {
    display: none;
}

.promo-inner .promo-features {
    display: none;
}

.promo-page-logo {
    display: block;
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.promo-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 153, 255, 0.2), rgba(0, 255, 179, 0.15));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 2px solid rgba(0, 153, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    animation: pulse-logo 3s ease-in-out infinite;
    box-shadow: 0 0 40px rgba(0, 153, 255, 0.2);
}

@keyframes pulse-logo {
    0%, 100% {
        box-shadow: 0 0 40px rgba(0, 153, 255, 0.2);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 60px rgba(0, 153, 255, 0.4);
        transform: scale(1.05);
    }
}

.promo-logo svg {
    width: 60px;
    height: 60px;
    color: #0099ff;
}

.promo-title {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #0099ff 0%, #00ffb3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.promo-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    letter-spacing: 0.5px;
    margin-bottom: 48px;
}

.promo-features {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 48px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out both;
}

.feature-item:nth-child(1) { animation-delay: 0.3s; }
.feature-item:nth-child(2) { animation-delay: 0.4s; }
.feature-item:nth-child(3) { animation-delay: 0.5s; }

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

.feature-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 153, 255, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 153, 255, 0.15);
}

.feature-icon {
    font-size: 40px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 153, 255, 0.15), rgba(0, 255, 179, 0.1));
    border-radius: 12px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 153, 255, 0.2);
}

.feature-text {
    text-align: left;
    flex: 1;
}

.feature-text h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.95);
}

.feature-text p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

/* ============================================
   Loading Overlay
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 8, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.loading-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.infinity-container {
    text-align: center;
}

.infinity-large {
    width: 60px;
    height: 60px;
    color: #0099ff;
    animation: infinity-rotate-large 2s ease-in-out infinite;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(0, 153, 255, 0.5));
}

@keyframes infinity-rotate-large {
    0%, 100% {
        transform: rotate(0deg) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: rotate(180deg) scale(1.1);
        opacity: 1;
    }
}

.loading-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    letter-spacing: 1px;
    animation: pulse-text 2s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .login-left {
        width: 50%;
        min-width: 350px;
        padding: 40px 60px;
    }

    .login-right {
        width: 50%;
    }

    .promo-title {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .login-split-container {
        flex-direction: column;
    }

    .login-left {
        width: 100%;
        min-width: auto;
        padding: 40px 30px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .login-right {
        width: 100%;
        min-height: 50vh;
    }

    .promo-inner {
        padding: 40px 30px;
    }

    .promo-title {
        font-size: 28px;
    }

    .promo-subtitle {
        font-size: 16px;
    }

    .promo-features {
        gap: 16px;
    }

    .feature-item {
        padding: 16px;
    }
}
