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

:root {
    --bg-main: #0A0A0A;        /* Negro profundo Cromatiso */
    --bg-card: #121212;        /* Gris muy oscuro para tarjetas */
    --bg-hover: #1A1A1A;       /* Gris hover */
    --primary: #4F46E5;        /* Azul eléctrico/Violeta (Acento) */
    --primary-hover: #6366F1;
    --text-dark: #FFFFFF;      /* Texto principal blanco */
    --text-muted: #A1A1AA;     /* Texto secundario gris claro */
    --border: #27272A;         /* Bordes tenues */
    --sidebar-bg: #0A0A0A;     /* Fondo lateral */
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background-color: var(--bg-main); color: var(--text-dark); display: flex; flex-direction: column; min-height: 100vh; overflow-x: hidden; }

/* Screens */
.screen { display: none; width: 100vw; height: 100vh; }
.screen.active { display: flex; }

/* Login Screen */
.login-wrapper { display: flex; width: 100%; height: 100%; }
.login-left { flex: 1; background: linear-gradient(135deg, rgba(10,10,10,0.8), rgba(18,18,18,0.9)), url('https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?q=80&w=2564&auto=format&fit=crop'); background-size: cover; background-position: center; padding: 60px; display: flex; flex-direction: column; justify-content: center; color: white; border-right: 1px solid var(--border); }
.login-left .brand { display: flex; align-items: center; gap: 15px; font-weight: 800; font-size: 1.5rem; letter-spacing: 2px; margin-bottom: 40px; }
.login-left h1 { font-size: 3.5rem; line-height: 1.2; margin-bottom: 20px; font-weight: 700; text-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.login-left p { font-size: 1.2rem; opacity: 0.8; max-width: 80%; }

.login-right { flex: 1; background: var(--bg-main); display: flex; justify-content: center; align-items: center; }
.login-card { width: 100%; max-width: 400px; padding: 40px; background: var(--bg-card); border-radius: 16px; box-shadow: 0 20px 40px rgba(0,0,0,0.4); border: 1px solid var(--border); }
.login-card h2 { font-size: 1.8rem; margin-bottom: 10px; color: var(--text-dark); }
.login-subtitle { color: var(--text-muted); margin-bottom: 30px; }

.input-group { position: relative; margin-bottom: 20px; }
.input-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.input-group input { width: 100%; padding: 15px 15px 15px 45px; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; outline: none; transition: 0.3s; background: var(--bg-main); color: var(--text-dark); }
.input-group input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2); }

.btn-primary { width: 100%; padding: 15px; background: var(--primary); color: white; border: none; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: 0.3s; display: flex; justify-content: center; align-items: center; gap: 10px; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); }

.error-msg { color: #ef4444; font-size: 0.85rem; margin-top: -10px; margin-bottom: 15px; display: none; }

/* Dashboard Sidebar */
.sidebar { width: 280px; background: var(--sidebar-bg); border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.sidebar-header { padding: 25px; border-bottom: 1px solid var(--border); display:flex; align-items:center; }
.sidebar-header .logo { font-weight: 800; font-size: 1.2rem; letter-spacing: 1px; color: var(--text-dark); display: flex; align-items: center; gap: 10px; }

.client-profile { padding: 20px 25px; display: flex; align-items: center; gap: 15px; background: var(--bg-card); border-bottom: 1px solid var(--border); }
.avatar { width: 45px; height: 45px; background: linear-gradient(135deg, var(--primary), #8b5cf6); border-radius: 50%; display: flex; justify-content: center; align-items: center; color: white; font-size: 1.2rem; }
.info { display: flex; flex-direction: column; }
.greeting { font-size: 0.8rem; color: var(--text-muted); }

.sidebar-nav { flex: 1; padding: 20px 0; overflow-y: auto; }
.sidebar-nav ul { list-style: none; }
.nav-item { padding: 15px 25px; display: flex; align-items: center; gap: 15px; color: var(--text-muted); cursor: pointer; transition: 0.2s; border-left: 3px solid transparent; font-weight: 500; }
.nav-item:hover { background: var(--bg-hover); color: var(--text-dark); }
.nav-item.active { background: rgba(79, 70, 229, 0.1); border-left-color: var(--primary); color: var(--primary); }
.nav-item i { width: 20px; text-align: center; font-size: 1.1rem; }

.sidebar-footer { padding: 20px; border-top: 1px solid var(--border); }
.support-card { background: var(--bg-card); border: 1px solid var(--border); padding: 15px; border-radius: 10px; margin-bottom: 15px; }
.support-card h4 { font-size: 0.9rem; margin-bottom: 5px; color: var(--text-dark); }
.support-card p { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 15px; }
.support-link { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-dark); text-decoration: none; margin-bottom: 10px; transition: 0.2s; }
.support-link:hover { color: var(--primary); }
.btn-logout { width: 100%; padding: 10px; background: transparent; border: 1px solid var(--border); border-radius: 6px; color: var(--text-muted); cursor: pointer; transition: 0.2s; font-weight: 500; }
.btn-logout:hover { background: #ef4444; color: white; border-color: #ef4444; }

/* Dashboard Main */
.main-content { flex: 1; background: var(--bg-main); display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.content-view { display: none; flex-direction: column; height: 100%; }
.content-view.active-view { display: flex; }
.top-header { padding: 25px 40px; background: var(--bg-main); border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.top-header h2 { font-size: 1.5rem; font-weight: 600; color: var(--text-dark); }
.iframe-container { flex: 1; padding: 20px 40px; background: var(--bg-main); overflow-y: auto; display: flex; flex-direction: column; -webkit-overflow-scrolling: touch; }

/* Utils */
.hidden { display: none !important; }

@media (max-width: 768px) {
    .login-wrapper { flex-direction: column; }
    .login-left { display: none; }
    #dashboard-screen { flex-direction: column; }
    .mobile-header { display: flex !important; }
    .sidebar { position: fixed; top: 0; left: -100%; width: 280px; height: 100vh; z-index: 1000; transition: left 0.3s ease; border-right: 1px solid var(--border); }
    .sidebar.open { left: 0; }
    .main-content { height: 100vh; }
    .top-header { display: none; }
    .iframe-container { padding: 15px; }
}
.sidebar-overlay { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.6); z-index: 999; backdrop-filter: blur(2px); }
.sidebar-overlay.open { display: block; }
.mobile-header { display: none; padding: 15px 20px; background: var(--bg-card); border-bottom: 1px solid var(--border); justify-content: space-between; align-items: center; z-index: 10; }
