:root {
    /* Tu color azul corporativo exacto */
    --hs-blue: #1c75bc; 
    --hs-blue-hover: #155a91;
    --bg-gradient: linear-gradient(135deg, #f2f6fc 0%, #eef2f8 100%);
    --corporate-blue: #1472B9;
    --corporate-purple: #7C3AED; /* Para igualar el morado de tu captura */
    --bg-light: #F8FAFC;
    --border-color: #E2E8F0;
}

.text-corporate {
    color: var(--hs-blue);
}

.body-login {
    font-family: 'Metropolis', sans-serif;
    background: var(--bg-gradient);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* --- Estilo de la Tarjeta (Card) --- */
.card-custom {
    border: none;
    border-radius: 10px;
    /* El borde azul superior característico */
    border-top: 5px solid var(--hs-blue);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.08);
}
.card-body {
    padding: 3rem 2.5rem; /* Más espacio interno */
}
/* --- Logo --- */
.login-logo {
    height: 40px; /* Ajustar tamaño visualmente */
    margin-bottom: 1.5rem;
}
/* --- Inputs con estilo "Seamless" (Icono integrado) --- */
/* Quitamos el borde derecho al icono y el izquierdo al input para que parezcan uno solo */
.input-group-text-custom {
    background-color: #fff;
    border-right: none;
    border-color: #ced4da;
    color: #adb5bd; /* Color gris suave para el icono */
}
.form-control-custom {
    border-left: none;
    border-color: #ced4da;
    padding-left: 0; /* Pegar texto al icono */
}
/* Efecto Focus: Iluminar todo el grupo cuando se hace click en el input */
.form-control-custom:focus {
    box-shadow: none;
    border-color: var(--hs-blue);
}
.form-control-custom:focus + .input-group-text-custom,
.input-group:focus-within .input-group-text-custom {
    border-color: var(--hs-blue);
    color: var(--hs-blue);
}
/* --- Botón --- */
.btn-custom {
    background-color: var(--hs-blue);
    border-color: var(--hs-blue);
    padding: 0.75rem;
    font-weight: 500;
}
.btn-custom:hover {
    background-color: var(--hs-blue-hover);
    border-color: var(--hs-blue-hover);
}
/* --- Textos --- */
.text-small-footer {
    font-size: 0.75rem;
    color: #adb5bd;
}

.login-title {
    font-weight: 700;
    color: #333;
    margin-bottom: 0.2rem;
}

.login-subtitle {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 2rem;
}

.info-card {
        background: white;
        border-radius: 8px;
        padding: 20px;
        box-shadow: 0 0.15rem 1.75rem 0 rgba(33, 40, 50, 0.15);
        margin-bottom: 20px;
}

.info-card h5 {
    color: #1472B9;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #B8D4E8;
}

.info-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #69707a;
    width: 200px;
    flex-shrink: 0;
}

.info-value {
    color: #212832;
    flex-grow: 1;
}

.badge-sector {
    background-color: #B8D4E8;
    color: #1472B9;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1472B9;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 20px;
    transition: all 0.2s;
}

.back-button:hover {
    color: #0d5a94;
    gap: 12px;
}

.list-group-item {
    border-left: 3px solid #B8D4E8;
    margin-bottom: 10px;
    border-radius: 4px;
}

.member-name {
    font-weight: 600;
    color: #212832;
}

.member-role {
    color: #69707a;
    font-size: 0.875rem;
}

.member-id {
    color: #1472B9;
    font-size: 0.875rem;
}

/* Ajuste para que el tema Quartz coincida con tu azul corporativo */
.ag-theme-quartz {
    --ag-active-color: #1c75bc; /* Azul HS&Co. */
    --ag-selected-row-background-color: rgba(28, 117, 188, 0.1);
    --ag-header-background-color: #f8f9fa;
    font-family: 'Inter', sans-serif;
}

/* Aseguramos que el contenedor tenga fondo blanco y bordes redondeados */
.grid-wrapper {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(33, 40, 50, 0.15);
}

/* Modal personalizado */
.custom-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content-custom {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 70%;
    max-width: 800px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: #000;
}

.badge-count {
    background-color: #B8D4E8; /* Color pastel del corporativo #1472B9 */
    color: #1472B9;
    width: 32px;
    height: 32px;
    border-radius: 50%; /* Círculo perfecto */
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.badge-count:hover {
    background-color: #A0C4E0;
    transform: scale(1.1);
}

.detail-table {
    width: 100%;
    margin-top: 15px;
    border-collapse: collapse;
}

.detail-table th,
.detail-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.detail-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.detail-table tr:hover {
    background-color: #f5f5f5;
}

/* Detalle Cliente Styles */
.card-header-custom {
    background-color: transparent;
    border-bottom: 1px solid #e2e8f0;
    color: #1472B9;
    font-weight: 600;
    font-size: 1.25rem;
}

.card-body {
    font-size: 1rem;
}

.card-body dl {
    font-size: 0.95rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    color: #1472B9;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
    line-height: 1.5;
    font-size: 0.9rem;
}

.back-button:hover {
    color: #0d5a94;
}

.back-button i {
    width: 16px;
    height: 16px;
    margin-right: 0.25rem;
}

.list-group-item-custom {
    border-left: 3px solid #B8D4E8 !important;
    font-size: 0.95rem;
}

.badge-sector {
    background-color: #B8D4E8;
    color: #1472B9;
}

.badge-cargo {
    background-color: #B8D4E8;
    color: #1472B9;
    font-weight: 600;
}

.percentage-display {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1472B9;
}

/* Breadcrumb responsive styles */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    line-height: 1.5;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    line-height: 1.5;
}

.breadcrumb-item a {
    color: #1472B9;
    font-weight: 500;
}

.breadcrumb-item a:hover {
    color: #0d5a94;
}

.breadcrumb-item.active {
    color: #6c757d;
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "<";
    color: #6c757d;
    padding: 0 0.5rem;
    font-weight: 400;
}

/* Horizontal scroll for long breadcrumbs on mobile */
@media (max-width: 768px) {
    .breadcrumb {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .breadcrumb::-webkit-scrollbar {
        height: 4px;
    }
    
    .breadcrumb::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }
    
    .breadcrumb::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 4px;
    }
    
    .breadcrumb::-webkit-scrollbar-thumb:hover {
        background: #555;
    }
}

.drop-zone {
    border: 2px dashed #B8D4E8;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-zone:hover {
    border-color: #1472B9;
    background-color: #f0f7fc;
}

.drop-zone.drag-over {
    border-color: #1472B9;
    background-color: #e3f2fd;
    border-style: solid;
}

.drop-zone-content {
    pointer-events: none;
}

.drop-zone.file-selected {
    border-color: #28a745;
    background-color: #f0fff4;
}

/* --- Toolbar del Periodo (Mantenemos tu versión corregida) --- */
.toolbar-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.period-toggle {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 4px;
    display: inline-flex;
    height: 40px;
    align-items: center;
}
.btn-period {
    color: #64748b;
    font-weight: 500;
    font-size: 0.85rem;
    border: none;
    padding: 0 16px;
    height: 30px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}
.btn-period:hover { color: var(--corporate-blue); }
.btn-check:checked + .btn-period {
    background-color: white;
    color: var(--corporate-blue);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-weight: 600;
    cursor: default;
}
/* Inputs Uniformes */
.input-uniform {
    height: 40px !important;
    border: 1px solid var(--border-color);
    background-color: #fff;
    font-size: 0.9rem;
    box-shadow: none;
    transition: border-color 0.2s;
}
.input-uniform:focus, .input-uniform:focus-within {
    border-color: var(--corporate-blue);
    box-shadow: 0 0 0 3px rgba(20, 114, 185, 0.1);
    outline: none;
}
.year-wrapper {
    display: flex;
    align-items: center;
    border-radius: 6px;
    padding: 0 0 0 12px;
    overflow: hidden;
    width: 110px;
}
.year-input-clean {
    border: none !important;
    height: 100%;
    padding-left: 8px;
    font-weight: 600;
    color: #334155;
    background: transparent;
}
.year-input-clean:focus { box-shadow: none !important; }
.wrapper-mes {
    overflow: hidden;
    max-width: 0;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.wrapper-mes.show { max-width: 160px; opacity: 1; }
.mes-select { width: 100%; border-radius: 6px; cursor: pointer; }
/* --- ESTILOS DE LAS CARDS (Diseño Foto + Hover) --- */

.upload-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px; /* Bordes más redondeados */
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Transición suave */
    position: relative;
    overflow: hidden;
}
/* EFECTO HOVER EN LA CARD ENTERA */
.upload-card:hover {
    transform: translateY(-8px); /* Se levanta */
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.1); /* Sombra suave */
    border-color: #cbd5e1;
}
/* Header de la Card (Limpio y centrado) */
.card-header-clean {
    padding: 1.5rem 1rem 0.5rem 1rem;
    text-align: center;
    background: transparent;
    border: none;
}
/* Badges Personalizados */
.badge-custom {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
    display: inline-block;
}
.badge-req { background-color: #E0F2FE; color: #0369A1; } /* Azul claro */
.badge-xlsx { background-color: #D4EDDA; color: #1D6F42; } /* Verde claro con letra verde Excel */
.badge-opt { background-color: #F1F5F9; color: #64748B; } /* Gris claro */
.card-title-custom {
    font-weight: 600;
    color: #1e293b;
    font-size: 1.1rem;
    margin-bottom: 0;
}
/* Zona Drag & Drop (Estilo captura) */
.drop-zone-container {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.drop-zone {
    flex-grow: 1;
    border: 2px dashed #CBD5E1;
    border-radius: 12px;
    background-color: var(--bg-light);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}
/* Hover en la zona de drop */
.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--corporate-blue);
    background-color: #F0F9FF;
}
.drop-zone.file-selected {
    border-style: solid;
    border-color: var(--border-color);
    background-color: white;
}
/* Elementos internos */
.icon-placeholder {
    margin-bottom: 1rem;
    transition: transform 0.3s;
}
.drop-zone:hover .icon-placeholder { transform: scale(1.1); }
.text-instruction {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}
/* Botones tipo Pill (Examinar) */
.btn-pill-custom {
    border-radius: 50px;
    padding: 6px 24px;
    font-size: 0.9rem;
    background: white;
    transition: all 0.2s;
}

/* Botón Azul (Requerido) */
.btn-outline-blue {
    border: 1px solid var(--corporate-blue);
    color: var(--corporate-blue);
}
.btn-outline-blue:hover, .drop-zone:hover .btn-outline-blue {
    background-color: var(--corporate-blue);
    color: white;
}
/* Botón Morado (Opcionales - Según foto) */
.btn-outline-purple {
    border: 1px solid var(--corporate-purple);
    color: var(--corporate-purple);
}
.btn-outline-purple:hover, .drop-zone:hover .btn-outline-purple {
    background-color: var(--corporate-purple);
    color: white;
}
/* Preview del archivo */
.file-preview { display: none; width: 100%; padding: 0 1rem; animation: fadeIn 0.3s ease; }
.file-info-box {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.btn-remove-file { color: #94a3b8; cursor: pointer; }
.btn-remove-file:hover { color: #ef4444; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }


/* KPI Cards - Los estilos se han movido a financial-views.css */

/* Filtros toolbar */
.filters-toolbar {
    background: white;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filters-toolbar select,
.filters-toolbar .btn {
    height: 38px;
}

.empresa-badge {
    background: rgba(20, 114, 185, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Formato de números en AG Grid */
.ag-cell-number {
    text-align: right !important;
}

.ag-cell-negative {
    color: #dc3545;
}

.ag-cell-cuenta {
    font-weight: 600;
    color: #1472B9;
}

/* Estado vacío */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.empty-state-icon {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1.5rem;
}

.empty-state h4 {
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #adb5bd;
    margin-bottom: 1.5rem;
}