/* === VARIABLES DE COLOR Y DISEÑO === */
        :root {
            --navy: #0A192F;
            --navy-light: #172A45;
            --burgundy: #720017;
            --anthracite: #2D3142;
            --ivory: #FDFCF0;
            --white: #FFFFFF;
            --gold: #C5A059;
            --gold-light: #E8D399;
            --green: #2E8B57; /* Solo procesos favorables */
            --red: #A10000;   /* Solo plazos críticos */
            --yellow: #D4AF37;
            --text-dark: #1A1A1A;
            --text-muted: #6B7280;
            --border-color: #E5E7EB;
            
            --shadow-subtle: 0 4px 20px rgba(10, 25, 47, 0.04);
            --shadow-elegant: 0 10px 30px rgba(0, 0, 0, 0.08);
            --radius: 4px; /* Bordes menos redondeados para mayor seriedad */
            --transition-slow: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
        }

        /* === RESET Y BASE === */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', sans-serif;
            background-color: var(--ivory);
            color: var(--text-dark);
            line-height: 1.6;
            overflow-x: hidden;
        }

        h1, h2, h3, h4, h5, .serif {
            font-family: 'Playfair Display', serif;
        }

        /* === HEADER === */
        header {
            background-color: var(--white);
            border-bottom: 2px solid var(--gold);
            padding: 1rem 3rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: var(--shadow-subtle);
        }

        .brand {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .brand i {
            font-size: 2rem;
            color: var(--navy);
        }

        .brand h1 {
            font-size: 1.4rem;
            color: var(--navy);
            letter-spacing: 1px;
            text-transform: uppercase;
        }

        .brand span {
            font-size: 0.75rem;
            color: var(--gold);
            font-weight: 600;
            letter-spacing: 2px;
            text-transform: uppercase;
        }

        .header-controls {
            display: flex;
            align-items: center;
            gap: 2rem;
        }

        .datetime {
            text-align: right;
            font-size: 0.85rem;
            color: var(--anthracite);
            border-right: 1px solid var(--border-color);
            padding-right: 2rem;
        }

        .datetime strong {
            display: block;
            font-family: 'Playfair Display', serif;
            font-size: 1.1rem;
            color: var(--navy);
        }

        .actions {
            display: flex;
            gap: 1.5rem;
            color: var(--navy);
            font-size: 1.2rem;
        }

        .actions i {
            cursor: pointer;
            transition: color 0.3s ease;
        }

        .actions i:hover { color: var(--gold); }

        .profile {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .profile img {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: 2px solid var(--gold);
            object-fit: cover;
        }

        .profile-info h4 {
            font-size: 0.9rem;
            margin-bottom: -3px;
        }

        .profile-info span {
            font-size: 0.75rem;
            color: var(--text-muted);
        }

        /* === MAIN LAYOUT === */
        main {
            padding: 2rem 3rem;
            max-width: 1800px;
            margin: 0 auto;
        }

        /* === HERO PRINCIPAL === */
        .hero {
            background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
            border-radius: var(--radius);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 3rem;
            margin-bottom: 2rem;
            box-shadow: var(--shadow-elegant);
            position: relative;
            overflow: hidden;
            border-left: 5px solid var(--gold);
        }

        /* Marble texture overlay */
        .hero::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.015" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)" opacity="0.05"/></svg>');
            pointer-events: none;
        }

        .hero-content {
            flex: 1;
            max-width: 60%;
            position: relative;
            z-index: 2;
        }

        .hero-content h2 {
            color: var(--gold);
            font-size: 1.8rem;
            margin-bottom: 1.5rem;
            font-weight: 400;
        }

        .hero-content p {
            color: var(--ivory);
            font-size: 1.1rem;
            line-height: 1.8;
            margin-bottom: 2rem;
            font-weight: 300;
        }

        .btn-gold {
            background-color: transparent;
            color: var(--gold);
            border: 1px solid var(--gold);
            padding: 0.8rem 2rem;
            font-size: 0.9rem;
            font-family: 'Inter', sans-serif;
            text-transform: uppercase;
            letter-spacing: 1px;
            cursor: pointer;
            transition: all 0.4s ease;
        }

        .btn-gold:hover {
            background-color: var(--gold);
            color: var(--navy);
        }

        .hero-illustration {
            flex: 0 0 35%;
            display: flex;
            justify-content: center;
            align-items: center;
            position: relative;
            z-index: 2;
        }

        .hero-illustration i {
            font-size: 10rem;
            color: rgba(255, 255, 255, 0.05);
            background: -webkit-linear-gradient(var(--gold), var(--navy));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            opacity: 0.8;
        }

        /* === KPIS === */
        .kpis {
            display: grid;
            grid-template-columns: repeat(8, 1fr);
            gap: 1rem;
            margin-bottom: 2rem;
        }

        .kpi-card {
            background: var(--white);
            padding: 1.5rem;
            border-radius: var(--radius);
            box-shadow: var(--shadow-subtle);
            border-top: 3px solid var(--anthracite);
            transition: var(--transition-slow);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .kpi-card:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow-elegant);
        }

        .kpi-card h5 {
            font-family: 'Inter', sans-serif;
            font-size: 0.75rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 0.5rem;
        }

        .kpi-card .value {
            font-family: 'Playfair Display', serif;
            font-size: 2rem;
            font-weight: 700;
        }

        /* Colores Específicos de KPI */
        .kpi-expedientes { border-color: var(--navy); }
        .kpi-expedientes .value { color: var(--navy); }
        
        .kpi-audiencias { border-color: var(--burgundy); }
        .kpi-audiencias .value { color: var(--burgundy); }
        
        .kpi-clientes { border-color: var(--green); }
        .kpi-clientes .value { color: var(--green); }
        
        .kpi-documentos { border-color: var(--yellow); }
        .kpi-documentos .value { color: var(--yellow); }
        
        .kpi-abogados { border-color: var(--navy-light); }
        .kpi-abogados .value { color: var(--navy-light); }
        
        .kpi-ganados { border-color: var(--green); }
        .kpi-ganados .value { color: var(--green); }
        
        .kpi-plazos { border-color: var(--red); background-color: #FFF5F5;}
        .kpi-plazos .value { color: var(--red); }

        .kpi-indice {
            background: var(--navy);
            border-color: var(--gold);
        }
        .kpi-indice h5 { color: var(--gold); }
        .kpi-indice .value { color: var(--white); }

        /* === GRID PRINCIPAL === */
        .section-title {
            font-size: 1.4rem;
            color: var(--navy);
            margin-bottom: 1.5rem;
            display: flex;
            align-items: center;
            gap: 10px;
            border-bottom: 1px solid var(--border-color);
            padding-bottom: 0.5rem;
        }
        
        .section-title i { color: var(--gold); font-size: 1rem; }

        .grid-2 {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 2rem;
            margin-bottom: 2rem;
        }

        .grid-3 {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 2rem;
            margin-bottom: 2rem;
        }

        /* === SIMIAN SAGE CARD === */
        .simian-card {
            background: var(--anthracite);
            color: var(--white);
            border-radius: var(--radius);
            padding: 2.5rem;
            position: relative;
            box-shadow: var(--shadow-elegant);
            border-left: 4px solid var(--gold);
            display: flex;
            flex-direction: column;
            justify-content: center;
            min-height: 250px;
        }

        .simian-header {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 2rem;
        }

        .simian-header i {
            color: var(--gold);
            font-size: 1.8rem;
        }

        .simian-header h3 {
            font-family: 'Inter', sans-serif;
            font-size: 0.9rem;
            letter-spacing: 3px;
            color: var(--gold);
        }

        .simian-header h3 span {
            display: block;
            font-family: 'Playfair Display', serif;
            font-size: 1.5rem;
            color: var(--white);
            letter-spacing: 0;
        }

        .simian-message-container {
            position: relative;
            height: 80px;
        }

        .simian-message {
            position: absolute;
            top: 0; left: 0; width: 100%;
            font-family: 'Playfair Display', serif;
            font-size: 1.3rem;
            font-style: italic;
            line-height: 1.5;
            color: var(--ivory);
            opacity: 0;
            transition: opacity 1.5s ease-in-out;
        }

        .simian-message.active {
            opacity: 1;
        }

        /* === CALENDARIO JUDICIAL (TIMELINE) === */
        .calendar-card {
            background: var(--white);
            padding: 2rem;
            border-radius: var(--radius);
            box-shadow: var(--shadow-subtle);
        }

        .timeline {
            position: relative;
            padding-left: 2rem;
        }

        .timeline::before {
            content: '';
            position: absolute;
            left: 0; top: 0; bottom: 0;
            width: 2px;
            background: var(--border-color);
        }

        .timeline-item {
            position: relative;
            margin-bottom: 1.5rem;
        }

        .timeline-item::before {
            content: '';
            position: absolute;
            left: -2.35rem;
            top: 5px;
            width: 12px; height: 12px;
            border-radius: 50%;
            background: var(--navy);
            border: 2px solid var(--white);
            box-shadow: 0 0 0 2px var(--navy);
        }

        .timeline-item.urgente::before { background: var(--red); box-shadow: 0 0 0 2px var(--red); }
        .timeline-item.reunion::before { background: var(--gold); box-shadow: 0 0 0 2px var(--gold); }

        .time-meta {
            font-size: 0.8rem;
            color: var(--burgundy);
            font-weight: 600;
            margin-bottom: 0.2rem;
        }

        .timeline-content h4 {
            font-family: 'Inter', sans-serif;
            font-size: 1rem;
            color: var(--navy);
        }

        .timeline-content p {
            font-size: 0.85rem;
            color: var(--text-muted);
        }

        /* === EXPEDIENTES === */
        .expedientes-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 1.5rem;
            margin-bottom: 2rem;
        }

        .expediente-card {
            background: var(--white);
            border: 1px solid var(--border-color);
            border-radius: var(--radius);
            padding: 1.5rem;
            transition: var(--transition-slow);
            position: relative;
        }

        .expediente-card:hover {
            box-shadow: var(--shadow-elegant);
            border-color: var(--navy);
        }

        .exp-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }

        .exp-number {
            font-family: 'Playfair Display', serif;
            font-weight: 600;
            color: var(--navy);
            font-size: 1.1rem;
        }

        .exp-status {
            font-size: 0.7rem;
            text-transform: uppercase;
            padding: 0.3rem 0.6rem;
            border-radius: 20px;
            font-weight: 600;
            letter-spacing: 0.5px;
        }

        .status-proceso { background: #EBF5FF; color: var(--navy); }
        .status-revision { background: #FFF8E1; color: #B8860B; }
        .status-critico { background: #FEE2E2; color: var(--red); }

        .exp-body h4 {
            font-size: 0.95rem;
            margin-bottom: 0.5rem;
            font-family: 'Inter', sans-serif;
        }

        .exp-body p {
            font-size: 0.85rem;
            color: var(--text-muted);
            margin-bottom: 0.3rem;
        }

        .exp-footer {
            margin-top: 1.5rem;
            padding-top: 1rem;
            border-top: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            font-size: 0.8rem;
            align-items: center;
        }

        .exp-action {
            color: var(--burgundy);
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        /* === ÁREAS DEL DESPACHO === */
        .areas-grid {
            display: grid;
            grid-template-columns: repeat(6, 1fr);
            gap: 1rem;
            margin-bottom: 2rem;
        }

        .area-card {
            background: var(--white);
            padding: 1.5rem;
            border-radius: var(--radius);
            text-align: center;
            border: 1px solid var(--border-color);
            transition: var(--transition-slow);
        }

        .area-card i {
            font-size: 1.5rem;
            margin-bottom: 1rem;
        }

        .area-card h4 {
            font-size: 0.9rem;
            font-family: 'Inter', sans-serif;
            color: var(--navy);
            margin-bottom: 0.5rem;
        }

        .area-card span {
            font-size: 0.8rem;
            color: var(--text-muted);
            display: block;
        }

        .area-corp { border-bottom: 3px solid var(--navy); }
        .area-corp i { color: var(--navy); }
        .area-lab { border-bottom: 3px solid var(--burgundy); }
        .area-lab i { color: var(--burgundy); }
        .area-civ { border-bottom: 3px solid var(--anthracite); }
        .area-civ i { color: var(--anthracite); }
        .area-pen { border-bottom: 3px solid var(--red); }
        .area-pen i { color: var(--red); }
        .area-trib { border-bottom: 3px solid var(--gold); }
        .area-trib i { color: var(--gold); }
        .area-arb { border-bottom: 3px solid var(--green); }
        .area-arb i { color: var(--green); }

        /* === LISTADOS ELEGANTES (AUDIENCIAS Y CLIENTES) === */
        .list-card {
            background: var(--white);
            border-radius: var(--radius);
            padding: 2rem;
            box-shadow: var(--shadow-subtle);
        }

        .list-item {
            display: flex;
            align-items: center;
            padding: 1rem 0;
            border-bottom: 1px solid var(--border-color);
        }
        
        .list-item:last-child { border-bottom: none; }

        .list-icon {
            width: 40px; height: 40px;
            border-radius: 50%;
            background: var(--ivory);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--navy);
            margin-right: 15px;
            font-size: 1.2rem;
        }

        .list-info flex { flex: 1; }
        .list-info h5 { font-family: 'Inter', sans-serif; font-size: 0.95rem; }
        .list-info p { font-size: 0.8rem; color: var(--text-muted); }

        .list-status {
            text-align: right;
            font-size: 0.8rem;
        }
        .list-status span {
            display: block;
            color: var(--navy);
            font-weight: 600;
        }

        /* === FACTURACIÓN === */
        .finance-chart {
            margin-top: 1rem;
        }
        .bar-container {
            margin-bottom: 1.2rem;
        }
        .bar-label {
            display: flex;
            justify-content: space-between;
            font-size: 0.85rem;
            margin-bottom: 0.3rem;
            color: var(--anthracite);
        }
        .bar-label strong { font-family: 'Playfair Display', serif; color: var(--navy); }
        .bar-bg {
            height: 8px;
            background: var(--border-color);
            border-radius: 4px;
            overflow: hidden;
        }
        .bar-fill {
            height: 100%;
        }

        /* === ALERTAS MINIMALISTAS === */
        .alert-item {
            display: flex;
            align-items: flex-start;
            gap: 15px;
            padding: 1rem;
            background: var(--ivory);
            border-left: 3px solid var(--navy);
            margin-bottom: 1rem;
            border-radius: 0 var(--radius) var(--radius) 0;
        }
        .alert-item.urgent { border-left-color: var(--red); background: #FFF5F5; }
        .alert-item.warning { border-left-color: var(--yellow); }
        
        .alert-item i { margin-top: 3px; font-size: 1.1rem; }
        .alert-item.urgent i { color: var(--red); }
        
        .alert-item div h5 { font-family: 'Inter', sans-serif; font-size: 0.9rem; margin-bottom: 0.2rem; }
        .alert-item div p { font-size: 0.8rem; color: var(--text-muted); }

        /* Detalles diferenciadores */
        .tag-legal {
            font-size: 0.65rem;
            border: 1px solid var(--gold);
            color: var(--gold);
            padding: 2px 6px;
            border-radius: 2px;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-left: 10px;
        }

        /* === RESPONSIVE === */
        @media (max-width: 1400px) {
            .kpis { grid-template-columns: repeat(4, 1fr); }
            .areas-grid { grid-template-columns: repeat(3, 1fr); }
        }

        @media (max-width: 1024px) {
            .grid-3 { grid-template-columns: 1fr; }
            .grid-2 { grid-template-columns: 1fr; }
            .hero { flex-direction: column; padding: 2rem; }
            .hero-content { max-width: 100%; margin-bottom: 2rem; }
            .hero-illustration { display: none; }
        }

        @media (max-width: 768px) {
            header { flex-direction: column; gap: 1rem; padding: 1rem; }
            .datetime { border: none; padding: 0; text-align: center; }
            .header-controls { flex-direction: column-reverse; }
            main { padding: 1rem; }
            .kpis { grid-template-columns: repeat(2, 1fr); }
            .areas-grid { grid-template-columns: repeat(2, 1fr); }
            .expedientes-grid { grid-template-columns: 1fr; }
            
            /* Reorganización móvil: IA e info crítica primero */
            .hero { order: 1; }
            .kpis { order: 2; }
            .simian-card { order: 3; margin-bottom: 2rem;}
            .alertas { order: 4; margin-bottom: 2rem;}
            .grid-2, .grid-3 { display: flex; flex-direction: column; }
        }