/* =================================== */
/* CSS PARA index.php (LOGIN SPLIT-SCREEN) */
/* VERSIÓN PASTEL: ROSADO, AZUL Y AMARILLO */
/* =================================== */

:root {
    --primary: #37474F; /* Gris oscuro para texto */
    --pastel-pink: #F8BBD0; /* Rosado pastel */
    --pastel-blue: #BBDEFB; /* Azul pastel */
    --pastel-yellow: #FFF9C4; /* Amarillo pastel */
    --pastel-yellow-dark: #FFF176; /* Amarillo más oscuro para hover */
    --text-dark: var(--primary);
    --text-light: #78909C; /* Gris medio para subtítulos */
    --border-color: #E3F2FD; /* Azul extremadamente claro para bordes */
    --bg-light: #ffffff;
    --error: var(--pastel-pink); /* Rosado para error */
    --accent: var(--pastel-blue); /* Azul para estado activo */
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
}

/* --- DISEÑO DE PANTALLA DIVIDIDA --- */
.split-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* --- PANEL IZQUIERDO (FORMULARIO) --- */
.left-panel {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background-color: #ffffff;
    position: relative;
    z-index: 10;
}

.login-wrapper {
    width: 100%;
    max-width: 400px;
    animation: fadeIn 0.6s ease-out;
}

/* Se eliminó el brand-logo superior según la solicitud */

/* --- CONTENEDOR Y ANIMACIÓN DEL LOGO DE USUARIO (MÁS GRANDE) --- */
.user-logo-container {
    text-align: center;
    margin-bottom: 25px;
}

.user-logo-animated {
    width: 160px; /* Tamaño más grande */
    height: 160px;
    object-fit: contain;
    /* Animación de entrada: Fade in y slide down */
    animation: logoEntrance 1.2s ease-out;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
    display: block;
    margin: 0 auto;
}

@keyframes logoEntrance {
    0% { opacity: 0; transform: translateY(-20px) scale(0.9); }
    60% { opacity: 1; transform: translateY(5px) scale(1.05); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.welcome-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    justify-content: center; /* Centrar texto */
    gap: 10px;
}

.subtitle {
    color: var(--text-light);
    font-size: 1rem;
    margin: 0 0 35px 0;
    text-align: center; /* Centrar subtítulo */
}

/* --- ANIMACIONES DE EMOJIS --- */
.emoji-animated {
    display: inline-block;
    font-size: 2.2rem;
}

@keyframes waveHand {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(14deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(10deg); }
    60% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}
.emoji-wave { animation: waveHand 2.5s infinite; transform-origin: 70% 70%; }

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px) rotate(-5deg); }
    40% { transform: translateX(5px) rotate(5deg); }
    60% { transform: translateX(-5px) rotate(-5deg); }
    80% { transform: translateX(5px) rotate(5deg); }
}
.emoji-angry {
    animation: shakeError 0.5s ease-in-out;
    filter: drop-shadow(0 0 8px rgba(248, 187, 208, 0.6)); /* Sombra rosada del logo */
}

/* --- FORMULARIO PASTEL --- */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; color: var(--text-dark); font-size: 0.9rem; }
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color); /* Azul muy claro */
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    transition: all 0.3s ease;
    background-color: #fff;
}
.form-control::placeholder { color: #9ca3af; }

/* COORDINACIÓN PASTEL: Borde AZUL al estar activo */
.form-control:focus {
    border-color: var(--accent); /* Azul pastel */
    outline: none;
    box-shadow: 0 0 0 4px rgba(187, 222, 251, 0.3); /* Sombra azul claro */
}

/* COORDINACIÓN PASTEL: Borde ROSADO en caso de error */
.has-error .form-control {
    border-color: var(--error); /* Rosado pastel */
}
.has-error .form-control:focus {
    box-shadow: 0 0 0 4px rgba(248, 187, 208, 0.3); /* Sombra rosada */
}

.error-msg {
    display: block;
    color: var(--error); /* Rosado pastel */
    font-size: 0.85rem;
    margin-top: 5px;
    font-weight: 500;
}

/* --- OPCIONES EXTRA --- */
.form-options { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; font-size: 0.9rem; }
.remember-me { display: flex; align-items: center; gap: 8px; color: var(--text-dark); font-weight: 500; cursor: pointer; }
.remember-me input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent); /* Azul pastel */ }
.forgot-password { color: var(--primary); text-decoration: none; font-weight: 600; transition: color 0.2s; }
.forgot-password:hover { color: var(--text-light); text-decoration: underline; }

/* --- BOTÓN DE ENVIAR: COORDINACIÓN CON EL AMARILLO PASTEL --- */
.btn-submit {
    width: 100%;
    padding: 14px;
    background-color: var(--pastel-yellow); /* Amarillo pastel */
    color: var(--primary); /* Texto oscuro para contraste */
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.btn-submit:hover {
    background-color: var(--pastel-yellow-dark); /* Amarillo oscuro para hover */
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(255, 249, 196, 0.4); /* Sombra amarilla */
}

/* --- ALERTAS PASTEL --- */
.alert { padding: 12px 15px; border-radius: 8px; margin-bottom: 20px; font-size: 0.9rem; font-weight: 500; text-align: center; animation: fadeIn 0.3s; }
.alert-danger {
    background-color: #FFF1F1; /* Rosado extremadamente claro */
    color: #991b1b;
    border: 1px solid var(--pastel-pink);
}

/* --- LINK DE REGISTRO --- */
.register-link { text-align: center; margin-top: 30px; font-size: 0.95rem; color: var(--text-light); }
.register-link a { color: var(--primary); font-weight: 600; text-decoration: none; transition: color 0.2s; }
.register-link a:hover { color: var(--text-light); text-decoration: underline; }

/* =================================================== */
/* --- PANEL DERECHO (FONDO PASTEL CON ELEMENTOS GLASS) --- */
/* =================================================== */
.right-panel {
    flex: 1.2; 
    background: linear-gradient(135deg, var(--pastel-blue) 0%, var(--pastel-pink) 100%); /* Degradado pastel azul-rosado */
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Decoraciones estilo "Glassmorphism" pastel */
.glass-element {
    position: absolute;
    background: rgba(255, 255, 255, 0.15); /* Más visible sobre fondo claro */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: floatShape 8s infinite ease-in-out alternate;
}

.circle-1 { width: 300px; height: 300px; top: 10%; right: -50px; background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.05)); animation-delay: 0s; }
.circle-2 { width: 150px; height: 150px; bottom: 20%; left: 10%; background: linear-gradient(135deg, rgba(187, 222, 251, 0.4), rgba(255, 255, 255, 0.05)); animation-delay: -3s; }
.square-1 { width: 200px; height: 200px; border-radius: 24px; top: 50%; right: 20%; transform: rotate(45deg); background: linear-gradient(135deg, rgba(248, 187, 208, 0.4), rgba(255, 255, 255, 0.05)); animation: floatShapeSquare 10s infinite ease-in-out alternate; }

@keyframes floatShape { 0% { transform: translateY(0) scale(1); } 100% { transform: translateY(-30px) scale(1.05); } }
@keyframes floatShapeSquare { 0% { transform: translateY(0) rotate(45deg); } 100% { transform: translateY(-40px) rotate(60deg); } }

.right-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--primary); /* Texto oscuro para contraste */
    max-width: 80%;
    padding: 40px;
    background: rgba(255, 255, 255, 0.4); /* Fondo blanco translúcido */
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    backdrop-filter: blur(15px);
    animation: fadeInUp 1s ease-out;
}

/* LOGO AGREGADO AL PANEL DERECHO */
.panel-logo {
    width: 80px; /* Tamaño más pequeño que el principal */
    height: 80px;
    object-fit: contain;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.03));
}

.right-content h2 { font-size: 2.2rem; font-weight: 700; margin: 0 0 15px 0; line-height: 1.2; }
.right-content p { font-size: 1.1rem; color: var(--text-light); margin: 0; line-height: 1.6; }

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

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .right-panel { display: none; }
    .left-panel { width: 100%; background: #FFF9F9; /* Fondo rosado extremamente suave */ }
    .login-wrapper { background: white; padding: 40px; border-radius: 20px; box-shadow: 0 10px 25px rgba(0,0,0,0.05); }
}

/* ===== BRANDED REFRESH LOGIN ===== */

:root {
    --brand-blue: #1d4ed8;
    --brand-pink: #ec4899;
    --brand-yellow: #facc15;
    --brand-ink: #1f2937;
}

body {
    background: linear-gradient(135deg, #f8fbff 0%, #fff8fc 55%, #fffdf2 100%);
}

.left-panel {
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(253,248,255,.96));
}

.brand-logos-duo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    width: 100%;
    margin: 0 auto 22px;
    animation: duoFloat 5s ease-in-out infinite;
}

@keyframes duoFloat {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.brand-logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(255,255,255,0.9);
    box-shadow: 0 14px 35px rgba(31, 41, 55, 0.08);
    border-radius: 22px;
    padding: 14px;
}

.brand-logo-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-duo-brands .deluxe-brand {
    width: 104px;
    height: 104px;
    padding: 10px;
}

.login-duo-brands .cube-brand {
    width: 132px;
    height: 104px;
}

.brand-caption {
    margin: -14px 0 26px;
    text-align: center;
    color: var(--brand-blue);
    font-size: 0.9rem;
    font-weight: 700;
}

.welcome-text {
    color: var(--brand-ink);
}

.btn-submit {
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-pink) 78%, var(--brand-yellow) 120%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(29, 78, 216, 0.18);
}

.btn-submit:hover {
    background: linear-gradient(135deg, #163fae, #d946ef 78%, #facc15 120%);
    box-shadow: 0 14px 28px rgba(236, 72, 153, 0.18);
}

.form-control:focus {
    border-color: var(--brand-pink);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.13);
}

.remember-me input[type="checkbox"] {
    accent-color: var(--brand-blue);
}

.register-link a,
.forgot-password {
    color: var(--brand-blue);
}

.right-panel {
    background:
        radial-gradient(circle at top left, rgba(29, 78, 216, 0.20), transparent 22rem),
        radial-gradient(circle at bottom right, rgba(236, 72, 153, 0.16), transparent 24rem),
        radial-gradient(circle at 85% 15%, rgba(250, 204, 21, 0.22), transparent 16rem),
        linear-gradient(135deg, #dbeafe 0%, #fdf2f8 58%, #fef9c3 100%);
}

.right-content {
    background: rgba(255,255,255,0.52);
    border-radius: 28px;
    box-shadow: 0 24px 55px rgba(31, 41, 55, 0.09);
}

.side-duo-brands {
    margin-bottom: 26px;
    gap: 20px;
}

.side-duo-brands .deluxe-brand {
    width: 120px;
    height: 120px;
    padding: 10px;
}

.side-duo-brands .cube-brand {
    width: 168px;
    height: 120px;
}

.right-content h2 {
    color: var(--brand-ink);
}

.right-content p {
    color: #475569;
}

.panel-logo { display: none; }

@media (max-width: 900px) {
    .login-duo-brands .deluxe-brand { width: 86px; height: 86px; }
    .login-duo-brands .cube-brand { width: 110px; height: 86px; }
}


/* =======================================================
   MODO RENDIMIENTO / BAJO GPU
   Desactiva animaciones, blur, filtros, sombras pesadas y efectos transform.
   Mantiene funciones y estructura visual, pero reduce consumo de GPU.
   ======================================================= */
:root {
    --shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.06) !important;
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08) !important;
    --shadow-lg: 0 6px 22px rgba(15, 23, 42, 0.10) !important;
    --transition: none !important;
}

html { scroll-behavior: auto !important; }

*,
*::before,
*::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}

body::before,
.app-header::after,
.hero-copy::before,
.metric-card::after,
.glass-element,
.circle-1,
.circle-2,
.square-1 {
    display: none !important;
    content: none !important;
}

.app-header,
.app-navbar,
.card,
.metric-card,
.hero-copy,
.user-info,
.right-content,
.login-wrapper,
.table-responsive,
.dashboard-brand-strip-inner,
.stats-bar-ranking,
.history-chip,
.brand-logo-item,
.filter-chip,
.period-label {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    filter: none !important;
    box-shadow: var(--shadow-sm) !important;
}

img,
.user-logo-animated,
.panel-logo,
.brand-logos-duo,
.brand-logo-item,
.emoji-animated,
.emoji-status,
.live-dot {
    animation: none !important;
    transform: none !important;
    filter: none !important;
}

.card:hover,
.metric-card:hover,
.btn:hover,
.btn-glass:hover,
.btn-install:hover,
.btn-logout:hover,
.nav-menu-horizontal li a:hover,
.checkbox-label:hover,
.history-check-option:hover,
.stat-pill:hover,
.emoji-status:hover {
    transform: none !important;
    box-shadow: var(--shadow-sm) !important;
}

/* Marquesina sin animación para no usar GPU: conserva la información, pero queda estática y desplazable. */
.ticker__inner {
    animation: none !important;
    transform: none !important;
    padding-left: 0 !important;
    gap: 18px !important;
}

.ticker {
    overflow-x: auto !important;
    scrollbar-width: thin;
}

.ticker__item {
    flex: 0 0 auto;
}

.live-dot {
    box-shadow: none !important;
}

/* Barras y gráficos: se muestran completos sin animación de crecimiento. */
.progress-fill,
.report-bar-fill,
.chart-bar-fill,
.chart-fill,
.daily-chart-bar,
.month-bar-fill,
.bar,
.fill-blue,
.fill-primary,
.fill-danger,
.fill-imprenta,
.fill-purple,
.fill-green {
    animation: none !important;
    transition: none !important;
    transform: none !important;
}

/* Reducir sombras y repintados en tablas grandes. */
.data-table th,
.data-table td,
.current-day-cell,
.current-day-header {
    animation: none !important;
    transition: none !important;
}

.current-day-cell {
    box-shadow: none !important;
}

/* Evita filtros costosos de flatpickr y tarjetas especiales. */
.flatpickr-calendar,
.alert,
.badge,
.history-pill,
.report-kpi-card,
.report-chart-card,
.analysis-item {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    filter: none !important;
}

@media (prefers-reduced-motion: no-preference) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}
