/* ═══════════════════════════════════════════════════════════
   CIFLEC Theme — modernización progresiva sobre ACE
   Carga después de ace.min.css para sobrescribir selectivamente
   ═══════════════════════════════════════════════════════════ */

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

:root {
    --ciflec-navy: #1e2d40;
    --ciflec-navy-2: #16202e;
    --ciflec-blue: #3b82c4;
    --ciflec-blue-2: #2f6fa8;
    --ciflec-blue-3: #255d8e;
    --ciflec-light: #eef1f5;
    --ciflec-text: #3a4550;
    --ciflec-muted: #64748b;
    --ciflec-border: #dde3ea;
    --ciflec-green: #4cae4c;
    --ciflec-orange: #d97706;
    --ciflec-red: #c94a44;
    --ciflec-radius: 7px;
}

body,
.navbar,
.sidebar,
.page-content,
input, button, select, textarea {
    font-family: 'Inter', 'Open Sans', sans-serif !important;
}

/* ── Fondo general ──────────────────────────────────────── */
body {
    background-color: var(--ciflec-light) !important;
    color: var(--ciflec-text);
}

/* ── Navbar ─────────────────────────────────────────────── */
.navbar {
    background: var(--ciflec-navy) !important;
    border-bottom: 1px solid var(--ciflec-navy-2) !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18) !important;
}
.navbar .navbar-brand {
    color: #fff !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px;
    width: 190px;
}
.navbar .nav > li > a {
    color: rgba(255,255,255,0.88) !important;
}
.navbar .nav > li > a:hover,
.navbar .nav > li.active > a {
    color: #fff !important;
    background: rgba(255,255,255,0.12) !important;
}

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
    background: #f5f7fa !important;
    border-right: 1px solid #dde3ea !important;
    position: fixed !important;
    top: 45px !important;
    bottom: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 1029 !important;
}
.sidebar:before {
    background: #f5f7fa !important;
}
.sidebar .nav-list > li > a {
    color: var(--ciflec-navy) !important;
    border-bottom-color: #e4e8ee !important;
    font-size: 13px;
    font-weight: 500;
}
.sidebar .nav-list > li > a:hover {
    background: #e8eef6 !important;
    color: #1e2d40 !important;
}
.sidebar .nav-list > li.active > a {
    background: #e0eaf6 !important;
    color: var(--ciflec-navy) !important;
    border-left: 3px solid var(--ciflec-blue) !important;
    font-weight: 600 !important;
}
.sidebar .nav-list > li > a .menu-icon {
    color: #4a7aaa !important;
}
.sidebar .nav-list > li.active > a .menu-icon,
.sidebar .nav-list > li > a:hover .menu-icon {
    color: var(--ciflec-blue) !important;
}
/* Íconos del sidebar sin fondo blanco */
.sidebar .nav-list li > a > [class*="icon-"],
.sidebar .nav-list li > a > [class^="icon-"] {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Submenús */
.sidebar .nav-list li .submenu {
    background: #edf1f7 !important;
}
.sidebar .nav-list li .submenu > li > a {
    color: #2c4260 !important;
    border-bottom-color: #dde3ea !important;
}
.sidebar .nav-list li .submenu > li > a:hover,
.sidebar .nav-list li .submenu > li.active > a {
    color: #1e2d40 !important;
    background: #dce6f2 !important;
}

/* ── Inputs ─────────────────────────────────────────────── */
.form-control {
    border-radius: 5px !important;
    border-color: #c4cdd8 !important;
    color: #3a4550 !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    font-size: 13px !important;
}
.form-control:focus {
    border-color: #4a90d9 !important;
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15) !important;
    outline: none !important;
}
.form-control:hover {
    border-color: #a0adb8 !important;
}

/* ── Botones ────────────────────────────────────────────── */
.btn {
    border-radius: 5px !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    transition: all 0.2s ease !important;
    letter-spacing: 0.2px;
}
.btn-primary {
    background: var(--ciflec-blue) !important;
    border-color: var(--ciflec-blue-2) !important;
}
.btn-primary:hover {
    background: var(--ciflec-blue-2) !important;
    border-color: var(--ciflec-blue-3) !important;
}
.btn-success {
    background: #4cae4c !important;
    border-color: #3d923d !important;
}
.btn-success:hover {
    background: #3d923d !important;
}
.btn-danger {
    background: #d9534f !important;
    border-color: #c0302c !important;
}
.btn-danger:hover {
    background: #c0302c !important;
}
.btn-sm {
    padding: 5px 12px !important;
}

/* ── Widgets / Cards ────────────────────────────────────── */
.widget-box {
    border-radius: var(--ciflec-radius) !important;
    box-shadow: 0 1px 5px rgba(0,0,0,0.08) !important;
    border: 1px solid var(--ciflec-border) !important;
}
.widget-header {
    border-radius: 7px 7px 0 0 !important;
    border-bottom-color: #dde3ea !important;
}
.widget-header h4,
.widget-header h5,
.widget-header h6 {
    font-weight: 600 !important;
    letter-spacing: 0.2px;
}

/* ── Área de contenido ──────────────────────────────────── */
.page-content {
    background: #fff !important;
    border-radius: 0 !important;
}

.page-header {
    border-bottom-color: var(--ciflec-border) !important;
    margin-top: 0 !important;
}
.page-header h1 {
    color: var(--ciflec-navy) !important;
    font-weight: 600 !important;
}
.page-header h1 small {
    color: var(--ciflec-muted) !important;
}

/* ── Tablas ─────────────────────────────────────────────── */
.table th {
    background: #f4f7fb !important;
    color: #4a5568 !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 2px solid #dde3ea !important;
}
.table-striped > tbody > tr:nth-child(odd) > td {
    background-color: #fafbfd !important;
}
.table > tbody > tr > td {
    color: #3a4550 !important;
    font-size: 13px !important;
}
.table > tbody > tr:hover > td {
    background-color: #f0f5ff !important;
}

/* ── Breadcrumb ─────────────────────────────────────────── */
.breadcrumb {
    background: transparent !important;
    font-size: 12px !important;
    color: var(--ciflec-muted) !important;
}

/* ── Alertas ────────────────────────────────────────────── */
.alert {
    border-radius: 5px !important;
    font-size: 13px !important;
    border-width: 1px !important;
}
.alert-info {
    background: #eef6fd !important;
    border-color: #c8dff3 !important;
    color: #255d8e !important;
}
.alert-warning {
    background: #fff8eb !important;
    border-color: #f1d39a !important;
    color: #7a4b05 !important;
}
.badge {
    border-radius: 999px !important;
    font-weight: 600 !important;
    letter-spacing: 0.2px;
    padding: 4px 9px !important;
}
.badge-info {
    background-color: var(--ciflec-blue) !important;
}
.badge-warning {
    background-color: var(--ciflec-orange) !important;
}
.modal-content {
    border-radius: var(--ciflec-radius) !important;
    border: 1px solid var(--ciflec-border) !important;
    box-shadow: 0 18px 48px rgba(22, 32, 46, 0.22) !important;
}
.modal-header {
    border-bottom-color: var(--ciflec-border) !important;
}
.modal-footer {
    background: #f8fafc !important;
    border-top-color: var(--ciflec-border) !important;
}

/* ── Login / Auth pages ─────────────────────────────────── */
body.login-layout {
    background: #eef1f5 !important;
}
.login-container .widget-box {
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.10) !important;
}
.login-container h1 {
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: -0.5px;
}
