/* Estilos responsive mejorados para páginas de autenticación */

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

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background-color: #ffffff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Contenedor principal responsive */
.main-container, .responsive-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Panel izquierdo */
.left-panel {
    width: 55%;
    background-color: rgb(26, 42, 108);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

/* Patrones decorativos del fondo */
.left-panel::before {
    content: '';
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 300px;
    height: 300px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    z-index: 1;
}

.left-panel::after {
    content: '';
    position: absolute;
    top: -5%;
    left: -5%;
    width: 200px;
    height: 200px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    z-index: 1;
}

/* Contenido del panel izquierdo */
.left-panel-content {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    width: 100%;
}

.left-panel-content h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.left-panel-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
    opacity: 0.9;
}

.welcome-title {
    color: white !important;
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.highlight-monitor {
    color: white;
}

/* Panel derecho */
.right-panel {
    width: 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: #f8fafc;
    min-height: 100vh;
    overflow-y: auto;
}

/* Tarjeta de autenticación */
.auth-card, .responsive-auth-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    padding: 24px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

/* Logo responsive */
.responsive-logo {
    max-width: 200px;
    height: auto;
    width: 100%;
}

/* Gráfico responsive */
.chart-container {
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.01);
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    margin: 2rem 0;
}

.welcome-chart, .responsive-chart {
    width: 100% !important;
    height: auto !important;
}

/* Formularios responsive */
.custom-input {
    background-color: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid #e2e8f0 !important;
}

/* Placeholder visible */
.custom-input::placeholder {
    color: #94a3b8 !important;
    opacity: 1;
}

.custom-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
    outline: none;
}

/* Botones responsive */
.action-button, .login-button, .register-button {
    background-color: rgb(26, 42, 108);
    border-color: #2563eb; 
    border-radius: 8px;
    padding: 0.85rem 1.5rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    color: white;
    width: 100%;
    border: none;
    cursor: pointer;
}

.action-button:hover, .login-button:hover, .register-button:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(29, 78, 216, 0.25);
}

/* Enlaces de autenticación */
.auth-link {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
}

.auth-link:hover {
    color: #1d4ed8;
    text-decoration: none;
    border-bottom: 1px solid #1d4ed8;
}

/* Contenedor del logo */
.logo-container {
    margin-bottom: 2rem;
    text-align: center;
}

.logo-container img {
    max-height: 40px;
    transition: transform 0.3s ease;
}

/* Títulos de formulario */
.form-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 2rem;
}

/* Contenedor de enlaces de autenticación */
.auth-links-container {
    text-align: center;
}

.demo-link {
    display: block;
    margin-top: 0.5rem;
}

/* Elementos que se muestran solo en móvil */
.mobile-block, .mobile-break {
    display: none;
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-input {
    padding-right: 2.8rem;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #64748b;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: #2563eb;
}

/* Tablets grandes y pantallas medianas (hasta 1200px) */
@media (max-width: 1200px) {
    .left-panel-content h2,
    .welcome-title {
        font-size: 2rem;
    }
    
    .left-panel-content p {
        font-size: 1rem;
    }
    
    .left-panel {
        padding: 2rem;
    }
    
    .right-panel {
        padding: 1.5rem;
    }
}

/* Tablets (hasta 992px) */
@media (max-width: 992px) {
    .main-container, .responsive-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    
    .left-panel, .right-panel {
        width: 100%;
    }
    
    .left-panel {
        min-height: 60vh;
        padding: 2rem 1.5rem;
        order: 1;
    }
    
    .right-panel {
        min-height: 40vh;
        padding: 2rem 1.5rem;
        order: 2;
    }
    
    .left-panel-content {
        max-width: 100%;
    }
    
    .welcome-title {
        font-size: 1.8rem;
        text-align: center;
    }
    
    .left-panel-content h2 {
        font-size: 1.8rem;
        text-align: center;
    }
    
    .left-panel-content p {
        font-size: 0.95rem;
        text-align: center;
    }
    
    .chart-container {
        margin: 1.5rem 0;
    }
    
    .responsive-chart {
        height: 250px !important;
    }
    
    .auth-card, .responsive-auth-card {
        max-width: 100%;
        margin: 1rem 0;
        padding: 1.5rem;
    }
}

/* Móviles grandes (hasta 768px) */
@media (max-width: 768px) {
    .left-panel {
        min-height: 50vh;
        padding: 1.5rem 1rem;
    }
    
    .right-panel {
        padding: 1.5rem 1rem;
        min-height: 50vh;
    }
    
    .welcome-title {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }
    
    .left-panel-content h2 {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }
    
    .left-panel-content p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .responsive-chart {
        height: 220px !important;
    }
    
    .chart-container {
        margin: 1rem 0;
    }
    
    .auth-card, .responsive-auth-card {
        padding: 1.25rem;
        border-radius: 8px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.06);
    }
    
    .responsive-logo {
        max-width: 150px;
    }
    
    .form-title {
        font-size: 1.3rem;
    }
    
    .form-subtitle {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }
    
    .custom-input {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .action-button, .login-button, .register-button {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
    
    /* Mostrar elementos específicos de móvil */
    .mobile-block {
        display: block;
        margin-bottom: 0.5rem;
    }
    
    .mobile-break {
        display: block;
    }
    
    .demo-link {
        margin-top: 1rem;
        font-size: 0.9rem;
    }
    
    /* Ajustar patrones de fondo para móvil */
    .left-panel::before {
        width: 200px;
        height: 200px;
        bottom: -5%;
        right: -5%;
    }
    
    .left-panel::after {
        width: 150px;
        height: 150px;
        top: -3%;
        left: -3%;
    }
}

/* Móviles pequeños (hasta 576px) */
@media (max-width: 576px) {
    .left-panel {
        min-height: 45vh;
        padding: 1rem 0.75rem;
    }
    
    .right-panel {
        padding: 1rem 0.75rem;
    }
    
    .welcome-title {
        font-size: 1.4rem;
        line-height: 1.3;
    }
    
    .left-panel-content h2 {
        font-size: 1.4rem;
        line-height: 1.3;
    }
    
    .left-panel-content p {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }
    
    .responsive-chart {
        height: 200px !important;
    }
    
    .chart-container {
        margin: 0.75rem 0;
    }
    
    .auth-card, .responsive-auth-card {
        padding: 1rem;
        margin: 0.5rem 0;
    }
    
    .responsive-logo {
        max-width: 120px;
    }
    
    .logo-container {
        margin-bottom: 1.5rem;
    }
    
    .form-title {
        font-size: 1.2rem;
        margin-bottom: 0.25rem;
    }
    
    .form-subtitle {
        font-size: 0.8rem;
        margin-bottom: 1.25rem;
    }
    
    .custom-input {
        padding: 0.65rem 0.85rem;
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }
    
    .action-button, .login-button, .register-button {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Texto más pequeño para móviles */
    .auth-links-container {
        font-size: 0.85rem;
    }
    
    .auth-link {
        font-size: 0.85rem;
    }
    
    .demo-link {
        font-size: 0.8rem;
    }
    
    /* Ajustar espaciado entre campos */
    .mb-3 {
        margin-bottom: 0.75rem !important;
    }
    
    .mt-4 {
        margin-top: 1rem !important;
    }
}

/* Móviles muy pequeños (hasta 375px) */
@media (max-width: 375px) {
    .left-panel {
        padding: 0.75rem 0.5rem;
        min-height: 40vh;
    }
    
    .right-panel {
        padding: 0.75rem 0.5rem;
    }
    
    .welcome-title {
        font-size: 1.2rem;
    }
    
    .left-panel-content h2 {
        font-size: 1.2rem;
    }
    
    .left-panel-content p {
        font-size: 0.8rem;
    }
    
    .responsive-chart {
        height: 180px !important;
    }
    
    .auth-card, .responsive-auth-card {
        padding: 0.75rem;
    }
    
    .responsive-logo {
        max-width: 100px;
    }
    
    .form-title {
        font-size: 1.1rem;
    }
    
    .form-subtitle {
        font-size: 0.75rem;
    }
    
    .custom-input {
        padding: 0.6rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .action-button, .login-button, .register-button {
        padding: 0.6rem 0.85rem;
        font-size: 0.85rem;
    }
}

/* Landscape orientation en móviles */
@media (max-height: 600px) and (orientation: landscape) {
    .main-container, .responsive-container {
        flex-direction: row;
    }
    
    .left-panel {
        width: 60%;
        min-height: 100vh;
        padding: 1rem;
    }
    
    .right-panel {
        width: 40%;
        min-height: 100vh;
        padding: 1rem;
    }
    
    .left-panel-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 100%;
    }
    
    .welcome-title {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }
    
    .left-panel-content h2 {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }
    
    .left-panel-content p {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .responsive-chart {
        height: 150px !important;
    }
    
    .chart-container {
        margin: 0.5rem 0;
    }
    
    .auth-card, .responsive-auth-card {
        padding: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Ajustes adicionales para mejorar la experiencia */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus visible para accesibilidad */
.custom-input:focus-visible,
.action-button:focus-visible,
.login-button:focus-visible,
.register-button:focus-visible,
.auth-link:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Preload de transiciones */
* {
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

/* Mejora de rendimiento para animaciones */
.left-panel::before,
.left-panel::after {
    will-change: transform;
}

/* Estados de carga y disabled */
.action-button:disabled,
.login-button:disabled,
.register-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.custom-input:disabled {
    background-color: #f8fafc;
    color: #64748b;
    cursor: not-allowed;
}

/* Mejorar contraste para accesibilidad */
@media (prefers-contrast: high) {
    .custom-input {
        border-color: #000;
    }
    
    .custom-input:focus {
        border-color: #000;
        box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.25);
    }
}


/* Print styles */
@media print {
    .left-panel {
        display: none;
    }
    
    .right-panel {
        width: 100%;
        background: white;
        box-shadow: none;
    }
    
    .responsive-chart {
        display: none;
    }
}