:root {
            --bg-app: #f4f7f9;
            --sidebar-bg: #ffffff;
            
            /* Colores de marca */
            --brand-red: #FF416C;
            --brand-orange: #FF4B2B;
            --brand-yellow: #FFD93D;
            
            --navy: #0B2447;
            --navy-light: #193D71;
            --text-main: #1e293b;
            --text-muted: #64748b;
            --card-bg: #ffffff;
            --border-color: #e2e8f0;
            --radius: 16px;
            
            --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.03);
            --shadow-md: 0 10px 25px -5px rgba(11, 36, 71, 0.08);
        }

        * { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', system-ui, sans-serif; }

        body { background-color: var(--bg-app); color: var(--text-main); display: flex; height: 100vh; overflow: hidden; }

        /* Clases Globales para Iconos Vectoriales (SVG) */
        .svg-icon {
            width: 24px; height: 24px;
            fill: none; stroke: currentColor;
            stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
        }
        .svg-sm { width: 18px; height: 18px; }
        .svg-lg { width: 32px; height: 32px; }

        /* ==========================================
           0. PANTALLA DE LOGIN (NUEVO - AISLADO)
           ========================================== */
        #login-screen, #password-change-screen {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: linear-gradient(135deg, var(--navy), #193D71);
            display: flex; align-items: center; justify-content: center; z-index: 9999;
        }
        #password-change-screen { display: none; }
        .login-card { background: white; width: 420px; padding: 40px; border-radius: 24px; box-shadow: 0 25px 50px rgba(0,0,0,0.3); text-align: center; }
        .login-logo { background: linear-gradient(135deg, var(--brand-red), var(--brand-orange)); color: white; font-weight: 900; font-size: 1.5rem; padding: 12px 20px; border-radius: 16px; display: inline-block; margin-bottom: 20px; box-shadow: 0 8px 20px rgba(255, 65, 108, 0.4); }
        .role-btn { width: 100%; padding: 16px; margin-top: 15px; border-radius: 14px; font-weight: 800; font-size: 1rem; cursor: pointer; border: 2px solid var(--border-color); display: flex; align-items: center; justify-content: center; gap: 12px; transition: all 0.2s; background: #f8fafc; color: var(--navy); }
        .role-btn:hover { border-color: var(--brand-red); background: #fff5f7; transform: translateY(-2px); }
        .login-card h2 { color: var(--navy); font-size: 1.35rem; margin-bottom: 7px; }
        .login-card>p { color: var(--text-muted); font-size: .86rem; line-height: 1.45; margin-bottom: 20px; }
        .login-card label { display: grid; gap: 6px; text-align: left; color: var(--navy); font-size: .78rem; font-weight: 800; margin-top: 12px; }
        .login-card input { width: 100%; height: 44px; border: 1px solid #cbd5e1; border-radius: 10px; padding: 0 12px; color: var(--navy); font-size: .95rem; outline: none; }
        .login-card input:focus { border-color: #0284c7; box-shadow: 0 0 0 3px #0284c71c; }
        .login-submit { width: 100%; height: 46px; margin-top: 8px; border: 0; border-radius: 11px; background: linear-gradient(115deg, var(--brand-orange), var(--brand-red)); color: white; font-weight: 900; cursor: pointer; box-shadow: 0 4px 0 #b4233b; }
        .login-error { min-height: 19px; margin: 10px 0 0!important; color: #dc2626!important; font-weight: 800; }
        .login-error.login-success { color: #15803d!important; }
        .recover-access { margin-top: 10px; border: 0; background: transparent; color: #34516f; font-weight: 750; text-decoration: underline; cursor: pointer; }
        .initial-access { display: block; margin-top: 16px; color: var(--text-muted); }

        /* ==========================================
           1. PANEL LATERAL IZQUIERDO (ORIGINAL INTACTO)
           ========================================== */
        aside { width: 290px; background-color: var(--sidebar-bg); display: flex; flex-direction: column; box-shadow: 4px 0 24px rgba(0,0,0,0.04); z-index: 100; border-right: 1px solid var(--border-color); transition: width 0.3s ease; }
        aside.collapsed { width: 0; overflow: hidden; border: none; box-shadow: none; } /* Agregado para ocultar panel al cajero */
        
        .sidebar-brand { padding: 24px 20px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--border-color); background: #ffffff; }
        .logo-box-mini { background: linear-gradient(135deg, var(--brand-red), var(--brand-orange)); color: white; font-weight: 900; font-size: 1.1rem; padding: 8px 12px; border-radius: 12px; box-shadow: 0 4px 12px rgba(255, 65, 108, 0.3); letter-spacing: -0.5px; }
        .brand-text-mini h2 { color: var(--navy); font-size: 1.1rem; font-weight: 900; }
        .brand-text-mini p { color: var(--text-muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 600;}
        .sidebar-menu { list-style: none; padding: 20px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; overflow-y: auto; }
        .menu-category { color: #94a3b8; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.2px; padding: 10px 14px 4px 14px; font-weight: 800; }
        .menu-item { display: flex; align-items: center; gap: 14px; padding: 12px 16px; color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 0.9rem; border-radius: 12px; cursor: pointer; transition: all 0.2s ease; border: 1px solid transparent; }
        .menu-item:hover { background-color: #f8fafc; color: var(--navy); border-color: #e2e8f0; transform: translateX(4px); }
        .menu-item.active { background: linear-gradient(135deg, rgba(255, 65, 108, 0.08), rgba(255, 75, 43, 0.08)); color: var(--brand-red); font-weight: 800; border: 1px solid rgba(255, 65, 108, 0.2); box-shadow: 0 4px 10px rgba(255, 65, 108, 0.05); }
        .menu-item.active .menu-icon-side { transform: scale(1.1); color: var(--brand-red); }
        .menu-icon-side { transition: transform 0.2s; display: flex; align-items: center; justify-content: center; }
        .sidebar-footer { padding: 18px 24px; border-top: 1px solid var(--border-color); background: #f8fafc; color: var(--text-muted); font-size: 0.8rem; display: flex; justify-content: space-between; align-items: center; font-weight: 600; }

        /* ==========================================
           2. CONTENEDOR PRINCIPAL DERECHO (ORIGINAL INTACTO)
           ========================================== */
        .main-container { flex: 1; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
        header { background-color: var(--card-bg); padding: 18px 32px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,0.02); z-index: 10; }
        header h1 { font-size: 1.4rem; font-weight: 800; color: var(--navy); display: flex; align-items: center; gap: 10px; }
        
        .user-badge { font-weight: 700; color: var(--navy); font-size: 0.85rem; background: #f1f5f9; padding: 8px 16px; border-radius: 20px; border: 1px solid var(--border-color); display: flex; align-items: center; gap: 8px; cursor:pointer; }
        .user-badge span { display:block; text-align:left; }
        .user-badge span small { display:block; margin-top:2px; color:var(--text-muted); font-size:.64rem; font-weight:700; }
        .main-workspace { flex: 1; padding: 32px; overflow-y: auto; position: relative; }
        .view-section { width: 100%; display: none; flex-direction: column; animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
        .view-section.active { display: flex; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

        /* Dashboard Principal */
        .dashboard-header { margin-bottom: 25px; }
        .dashboard-header h2 { font-size: 1.7rem; color: var(--navy); font-weight: 800; }
        .dashboard-header p { color: var(--text-muted); font-size: 0.95rem; margin-top: 4px; }
        
        .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; margin-bottom: 35px; }
        .stat-card { background: var(--card-bg); border-radius: 16px; padding: 22px; border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); display: flex; align-items: flex-start; gap: 15px; transition: all 0.2s; }
        .stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: #cbd5e1; }
        .stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
        .stat-info h4 { font-size: 0.8rem; color: var(--text-muted); font-weight: 700; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px;}
        .stat-info h3 { font-size: 1.6rem; color: var(--navy); font-weight: 800; margin-bottom: 2px; }
        .stat-info p { font-size: 0.78rem; color: var(--text-muted); }

        .section-label { font-size: 1.2rem; font-weight: 800; color: var(--navy); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
        
        /* Accesos Principales */
        .access-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
        .access-card { background: var(--card-bg); border-radius: 16px; padding: 18px 22px; border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 16px; transition: all 0.25s ease; cursor: pointer; }
        .access-card:hover { border-color: rgba(11, 36, 71, 0.2); box-shadow: var(--shadow-md); transform: translateY(-3px); }
        .access-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: white; flex-shrink: 0; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
        .access-info { flex: 1; }
        .access-info h4 { font-size: 1.05rem; color: var(--navy); font-weight: 800; margin-bottom: 3px; }
        .access-info p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.3; }
        .btn-abrir { padding: 8px 16px; border-radius: 10px; font-weight: 800; font-size: 0.85rem; cursor: pointer; border: none; color: white; transition: transform 0.2s, box-shadow 0.2s; }
        .btn-abrir:hover { transform: scale(1.05); box-shadow: 0 4px 10px rgba(0,0,0,0.15); }

        /* Fondos Vibrantes */
        .c-red { background: linear-gradient(135deg, #FF416C, #FF4B2B); }
        .c-green { background: linear-gradient(135deg, #11998e, #38ef7d); }
        .c-purple { background: linear-gradient(135deg, #8e2de2, #4a00e0); }
        .c-blue { background: linear-gradient(135deg, #3a7bd5, #3a6073); }
        .c-orange { background: linear-gradient(135deg, #f7971e, #FFD93D); color: var(--navy) !important; }
        .c-teal { background: linear-gradient(135deg, #00b4db, #0083b0); }
        
        .bg-soft-blue { background: #e0f2fe; color: #0284c7; }
        .bg-soft-green { background: #dcfce7; color: #16a34a; }
        .bg-soft-orange { background: #ffedd5; color: #ea580c; }
        .bg-soft-purple { background: #f3e8ff; color: #9333ea; }

        /* Submenús */
        .back-nav { display: flex; align-items: center; gap: 15px; margin-bottom: 25px; }
        .btn-back { background: white; border: 1px solid var(--border-color); color: var(--navy); padding: 10px 20px; border-radius: 12px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 8px; transition: all 0.2s; }
        .btn-back:hover { background: var(--navy); color: white; border-color: var(--navy); }
        .sub-menu-title { font-size: 1.5rem; font-weight: 800; color: var(--navy); display: flex; align-items: center; gap: 10px;}
        .sub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
        .sub-card { background: var(--card-bg); border-radius: 16px; padding: 18px; display: flex; align-items: center; gap: 18px; border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); cursor: pointer; transition: all 0.2s; }
        .sub-card:hover { transform: translateY(-4px); border-color: rgba(11, 36, 71, 0.2); box-shadow: var(--shadow-md); }
        .sub-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; flex-shrink: 0; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
        .sub-text h4 { font-size: 1.05rem; font-weight: 800; color: var(--navy); margin-bottom: 2px; }
        .sub-text p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.3; }

        /* 3. BARRA INFERIOR (ORIGINAL INTACTO) */
        .bottom-bar { background: white; height: 55px; display: flex; justify-content: space-between; align-items: center; padding: 0 32px; border-top: 1px solid var(--border-color); z-index: 10; }
        .bottom-tools { display: flex; gap: 12px; }
        .tool-btn { background: #f8fafc; border: 1px solid var(--border-color); padding: 6px 14px; border-radius: 8px; color: var(--text-muted); font-size: 0.85rem; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all 0.2s; }
        .tool-btn:hover { color: var(--navy); background: #e2e8f0; border-color: #cbd5e1; }
        .system-status { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 700; color: var(--text-muted); }
        .status-dot { width: 10px; height: 10px; background: #10b981; border-radius: 50%; box-shadow: 0 0 8px rgba(16, 185, 129, 0.6); }

