:root {
    /* Paleta de Colores (Inspirada en la Imagen) */
    --bg-body: #f4f7fa;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --primary-blue: #113458; /* Azul profundo de las tarjetas y botones */
    --primary-blue-hover: #0a223c;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    /* Estados y Alertas */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Sombras y Radios */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 10px 30px rgba(17, 52, 88, 0.08);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    
    /* Tipografía */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-body);
    font-family: var(--font-family);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar Flotante (Inspirado en la imagen) */
.sidebar {
    width: 70px;
    background-color: var(--bg-sidebar);
    margin: 15px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    gap: 20px;
    position: fixed;
    height: calc(100vh - 30px);
    z-index: 100;
}

.sidebar .nav-item {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    text-decoration: none;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-muted);
}

.sidebar .nav-item:hover {
    background-color: rgba(17, 52, 88, 0.05);
    color: var(--primary-blue);
    transform: translateY(-2px);
}

.sidebar .nav-item.active {
    background-color: var(--bg-body);
    color: var(--primary-blue);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.sidebar .nav-item.fab {
    background-color: var(--primary-blue);
    color: white;
    box-shadow: 0 4px 12px rgba(17, 52, 88, 0.3);
}
.sidebar .nav-item.fab:hover {
    background-color: var(--primary-blue-hover);
    transform: scale(1.05);
}

/* Contenido Principal */
.main-content {
    margin-left: 100px; /* Compensa el sidebar fijo */
    padding: 25px;
    width: 100%;
    max-width: 1400px;
}

/* Header (Logo, Saludo y Perfil) */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-text {
    font-weight: 800;
    color: var(--primary-blue);
    font-size: 24px;
    letter-spacing: -1px;
}

.greeting h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}
.greeting p {
    color: var(--text-muted);
    font-size: 14px;
}

.profile-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: transform 0.2s ease;
}
.profile-btn:hover {
    transform: scale(1.05);
}

/* Barra de Búsqueda */
.search-bar {
    background-color: white;
    border-radius: var(--radius-md);
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 40px;
}
.search-bar input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 15px;
    font-family: inherit;
}
.search-bar svg {
    color: var(--text-muted);
}

/* Tarjeta Azul Profundo (Inspirado en "Trámites en Progreso") */
.section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-blue);
}

.blue-card {
    background-color: var(--primary-blue);
    border-radius: var(--radius-lg);
    padding: 30px;
    color: white;
    width: fit-content;
    min-width: 380px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

/* Efecto de gradiente sutil dentro de la tarjeta azul */
.blue-card::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.blue-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
}

.badge {
    background-color: rgba(255,255,255,0.15);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
}

.blue-card h2 {
    font-size: 22px;
    margin-bottom: 5px;
}
.blue-card p {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    margin-bottom: 25px;
}

/* Barra de Progreso */
.progress-container {
    margin-bottom: 25px;
}
.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 8px;
    font-weight: 600;
}
.progress-bar {
    height: 6px;
    background-color: rgba(255,255,255,0.2);
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background-color: white;
    border-radius: 4px;
    width: 100%;
}

/* Botones de acción dentro de la tarjeta */
.card-actions {
    display: flex;
    gap: 15px;
}
.btn-outline, .btn-solid {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
}
.btn-outline:hover {
    background: rgba(255,255,255,0.1);
}
.btn-solid {
    background: white;
    border: none;
    color: var(--primary-blue);
}
.btn-solid:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Tarjeta Blanca (Ayuda) */
.white-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease;
}
.white-card:hover {
    transform: translateY(-3px);
}
.white-card-content h3 {
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--primary-blue);
}
.white-card-content p {
    font-size: 14px;
    color: var(--text-muted);
}
.icon-box {
    width: 48px;
    height: 48px;
    background-color: var(--bg-body);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
}

/* -------------------------------------
   PANTALLA DIVIDIDA (CONCILIACIÓN)
-------------------------------------- */
.action-bar { display: flex; gap: 15px; }

.alert-banner {
    background-color: #fff1f2;
    border-left: 4px solid var(--danger);
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    color: #9f1239;
    box-shadow: var(--shadow-soft);
}

.split-screen {
    display: flex;
    gap: 30px;
    width: 100%;
}

.document-panel {
    flex: 1;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 30px;
    border: 1px solid var(--border-color);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}
.panel-header h2 { font-size: 18px; color: var(--primary-blue); }

.badge.blue { background-color: rgba(17, 52, 88, 0.1); color: var(--primary-blue); font-weight: 700; }
.badge-danger { background-color: var(--danger); color: white; padding: 2px 8px; border-radius: 12px; font-size: 11px; margin-top: 5px; display: inline-block;}

.panel-meta {
    background-color: var(--bg-body);
    padding: 15px;
    border-radius: var(--radius-md);
    margin-bottom: 25px;
    font-size: 13px;
    color: var(--text-muted);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}
.item-row:hover { background-color: var(--bg-body); }

.item-info h4 { font-size: 14px; margin-bottom: 3px; }
.item-info p { font-size: 12px; color: var(--text-muted); }

.item-values { text-align: right; font-size: 13px; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.old-price { text-decoration: line-through; color: var(--text-muted); font-size: 11px; margin-left: 5px;}

.status-icon.success {
    background: #d1fae5; color: var(--success);
    width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: bold;
}

.discrepancy-critical {
    background-color: #fff1f2;
    border-left: 3px solid var(--danger);
}
.highlight-reference {
    background-color: #f8fafc;
    border-left: 3px solid var(--text-muted);
}

.btn-mini-approve {
    background: var(--primary-blue); color: white;
    border: none; padding: 6px 12px; border-radius: 6px;
    font-size: 11px; font-weight: 600; cursor: pointer;
    margin-left: 15px;
}
.btn-mini-approve:hover { background: var(--primary-blue-hover); }

/* -------------------------------------
   GESTOR DE EXPEDIENTES (DRAG & DROP Y TIMELINE)
-------------------------------------- */
.drag-drop-zone {
    background-color: white;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 50px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}
.drag-drop-zone:hover {
    border-color: var(--primary-blue);
    background-color: rgba(17, 52, 88, 0.02);
}
.drag-drop-zone h3 { margin: 15px 0 5px 0; font-size: 16px; color: var(--primary-blue); }
.drag-drop-zone p { font-size: 13px; color: var(--text-muted); }

.file-list-item {
    background-color: white;
    padding: 15px;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    border: 1px solid var(--border-color);
}
.file-info { display: flex; align-items: center; gap: 15px; }
.file-info h4 { font-size: 13px; margin-bottom: 2px; }
.file-info p { font-size: 11px; color: var(--text-muted); }

/* Timeline */
.timeline {
    position: relative;
    padding-left: 20px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--border-color);
}
.timeline-step {
    position: relative;
    margin-bottom: 30px;
}
.timeline-step:last-child { margin-bottom: 0; }
.timeline-dot {
    position: absolute;
    left: -20px;
    top: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--border-color);
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--border-color);
}
.timeline-step.completed .timeline-dot { background-color: var(--success); box-shadow: 0 0 0 2px var(--success); }
.timeline-step.active .timeline-dot { background-color: var(--primary-blue); box-shadow: 0 0 0 2px var(--primary-blue); }
.timeline-content h4 { font-size: 14px; margin-bottom: 3px; color: var(--text-main); }
.timeline-content p { font-size: 12px; color: var(--text-muted); }
