@charset "utf-8";
/* ================================================================
   TEMA PROFESIONAL - Rediseño visual 2026-11
   Se carga DESPUES de estilo.css y responsive-mobile.css.
   Solo cambios visuales: no altera estructura ni funcionalidad.
   ================================================================ */

:root {
    --brand: #1e3a8a;            /* azul profundo */
    --brand-2: #2563eb;          /* azul brillante */
    --accent: #f59e0b;           /* ambar */
    --sidebar-bg: #0f172a;       /* casi negro azulado */
    --sidebar-hover: #1e293b;
    --sidebar-text: #cbd5e1;
    --ok: #10b981;
    --danger: #ef4444;
    --radius: 10px;
    --shadow-sm: 0 1px 3px rgba(15,23,42,.10);
    --shadow-md: 0 6px 18px rgba(15,23,42,.14);
    --shadow-lg: 0 12px 30px rgba(15,23,42,.20);
}

/* ---------- Tipografia base ---------- */
body {
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    background-color: #f1f5f9;
}
h1,h2,h3,h4,.content-header h1 { font-weight: 600; letter-spacing: .2px; }

/* ---------- Barra superior (navbar) ---------- */
.main-header .logo {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%) !important;
    color: #fff !important;
    font-weight: 700;
    letter-spacing: .5px;
    border-bottom: 0;
}
.main-header .logo:hover { background: linear-gradient(135deg, #172e6e 0%, var(--brand) 100%) !important; }
.main-header .navbar {
    background: linear-gradient(90deg, #1e3a8a 0%, #2563eb 55%, #0ea5e9 100%) !important;
    box-shadow: var(--shadow-md);
    border-bottom: 0;
}
.main-header .navbar .nav > li > a { color: #e0e9ff; }
.main-header .navbar .nav > li > a:hover,
.main-header .navbar .nav > li > a:focus,
.main-header .navbar .nav .open > a { background: rgba(255,255,255,.14); color: #fff; }
.main-header .navbar .nav > li > .dropdown-menu { border-radius: 8px; box-shadow: var(--shadow-lg); border:0; }
.main-header .sidebar-toggle { color: #e0e9ff; }
.main-header .sidebar-toggle:hover { background: rgba(255,255,255,.14); color: #fff; }

/* ---------- Sidebar ---------- */
.main-sidebar, .left-side {
    background: linear-gradient(180deg, #0b1220 0%, var(--sidebar-bg) 40%, #111c33 100%);
}
.sidebar { padding-bottom: 20px; }

/* Panel de usuario */
.user-panel {
    margin: 14px 12px 8px;
    padding: 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(37,99,235,.22), rgba(14,165,233,.10));
    border: 1px solid rgba(255,255,255,.08);
}
.user-panel > .image img, .user-panel > .pull-left.image img {
    border-radius: 50%;
    border: 2px solid var(--accent);
    box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.user-panel .info { color: #e2e8f0; padding-top: 4px; }
.user-panel .info p { font-weight: 600; letter-spacing: .3px; margin-bottom: 2px; }
.user-panel .info a { color: #94a3b8; font-size: 11.5px; }
.user-panel .info a .fa { color: var(--ok); }

/* Titulos de seccion */
.sidebar-menu > li.header {
    color: #5b6b85;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 16px 20px 8px;
}

/* Items principales: pastillas redondeadas */
.sidebar-menu > li > a {
    color: var(--sidebar-text);
    margin: 2px 10px;
    padding: 11px 14px;
    border-radius: 10px;
    border-left: 0;
    font-size: 13.5px;
    font-weight: 500;
    transition: all .18s ease;
    position: relative;
}
.sidebar-menu > li > a:hover {
    color: #fff;
    background: rgba(255,255,255,.08);
}
.sidebar-menu > li.active > a,
.sidebar-menu > li.menu-open > a {
    color: #fff;
    background: linear-gradient(90deg, var(--brand-2), #0ea5e9);
    box-shadow: 0 4px 14px rgba(37,99,235,.35);
}
.sidebar-menu > li > a > .fa {
    color: #7d8aa5;
    width: 22px;
    text-align: center;
    transition: color .18s;
}
.sidebar-menu > li.active > a > .fa,
.sidebar-menu > li.menu-open > a > .fa,
.sidebar-menu > li > a:hover > .fa { color: #fff; }
.sidebar-menu > li > a > .pull-right-container { margin-top: 1px; }
.sidebar-menu > li > a .fa-angle-left { color: #64748b; }
.sidebar-menu > li.menu-open > a .fa-angle-left { color: #fff; }

/* Submenus: guia vertical + items compactos */
.sidebar-menu .treeview-menu {
    background: transparent;
    margin: 2px 10px 6px 20px;
    padding-left: 10px;
    border-left: 2px solid rgba(255,255,255,.10);
}
.sidebar-menu .treeview-menu > li > a {
    color: #8fa1bd;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all .15s ease;
}
.sidebar-menu .treeview-menu > li > a > .fa { color: #5b6b85; width: 18px; }
.sidebar-menu .treeview-menu > li > a:hover {
    color: #fff;
    background: rgba(255,255,255,.06);
    padding-left: 16px;
}
.sidebar-menu .treeview-menu > li > a:hover > .fa { color: var(--accent); }
.sidebar-menu .treeview-menu > li.active > a {
    color: #fff;
    background: rgba(37,99,235,.28);
    font-weight: 600;
}
.sidebar-menu .treeview-menu > li.active > a > .fa { color: var(--accent); }
.sidebar-menu .treeview-menu > li.active > a:before {
    content: ""; margin: 0;
}

/* Submenu de segundo nivel: fondo mas oscuro */
.sidebar-menu .treeview-menu .treeview-menu {
    margin-left: 14px;
    border-left-color: rgba(245,158,11,.25);
}

/* Scrollbar del sidebar */
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 3px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.25); }

/* Sidebar colapsado (sidebar-mini): menu flotante */
.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > .treeview-menu,
.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > span,
.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > .pull-right-container {
    background: var(--sidebar-bg) !important;
    border-radius: 0 10px 10px 0;
    box-shadow: var(--shadow-lg);
}
.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > span {
    border-radius: 0 10px 0 0;
    color: #fff;
    font-weight: 600;
}
.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > .treeview-menu {
    margin: 0; padding: 8px 0;
    border-left: 0;
}
.sidebar-mini.sidebar-collapse .sidebar-menu > li > a {
    margin: 2px 6px;
    border-radius: 10px;
}
.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > .treeview-menu > li > a { color: #8fa1bd; }
.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > .treeview-menu > li > a:hover { color: #fff; background: rgba(255,255,255,.06); }

/* Skin vieja de AdminLTE: sobrescribir su fondo con el degradado propio */
.skin-blue .main-sidebar, .skin-blue .left-side,
.skin-black .main-sidebar, .skin-black .left-side,
.skin-green .main-sidebar, .skin-green .left-side {
    background: linear-gradient(180deg, #0b1220 0%, var(--sidebar-bg) 40%, #111c33 100%) !important;
}
.skin-blue .sidebar-menu > li.header,
.skin-black .sidebar-menu > li.header,
.skin-green .sidebar-menu > li.header { background: transparent; color: #5b6b85; }
.skin-blue .sidebar-menu > li > a,
.skin-black .sidebar-menu > li > a,
.skin-green .sidebar-menu > li > a { border-left: 0; }
.skin-blue .wrapper, .skin-blue .main-sidebar, .skin-blue .left-side { background-color: transparent; }
.skin-blue .main-sidebar { background: linear-gradient(180deg, #0b1220 0%, var(--sidebar-bg) 40%, #111c33 100%) !important; }

/* ---------- Contenido ---------- */
.content-wrapper, .right-side { background: #f1f5f9; }
.content-header { padding: 18px 18px 0; }
.content-header h1 { color: #0f172a; font-size: 22px; }
.content-header h1 small { color: #64748b; }
.content-header > .breadcrumb {
    background: transparent; padding: 8px 0;
}
.breadcrumb > li + li:before { color: #94a3b8; }
.breadcrumb > li > a { color: var(--brand-2); }

/* ---------- Cajas / cards ---------- */
.box {
    border-radius: var(--radius);
    border-top: 3px solid var(--brand-2);
    box-shadow: var(--shadow-sm);
    border-left: 0; border-right: 0; border-bottom: 1px solid #e2e8f0;
}
.box:hover { box-shadow: var(--shadow-md); }
.box.box-danger { border-top-color: var(--danger); }
.box.box-success { border-top-color: var(--ok); }
.box.box-info { border-top-color: #06b6d4; }
.box.box-warning { border-top-color: var(--accent); }
.box.box-primary { border-top-color: var(--brand-2); }
.box-header.with-border {
    border-bottom: 1px solid #eef2f7;
    padding: 14px 16px;
}
.box-header .box-title { font-weight: 600; color: #0f172a; }
.box-body { padding: 16px; }
.small-box { border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.small-box:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); transition: all .2s; }
.small-box .inner h3 { font-weight: 700; }

/* ---------- Botones ---------- */
.btn {
    border-radius: 6px;
    font-weight: 600;
    letter-spacing: .2px;
    transition: all .15s ease;
    border-width: 1px;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-primary { background: var(--brand-2); border-color: var(--brand-2); }
.btn-primary:hover { background: var(--brand); border-color: var(--brand); }
.btn-success { background: var(--ok); border-color: var(--ok); }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-info { background: #06b6d4; border-color: #06b6d4; }
.btn-warning { background: var(--accent); border-color: var(--accent); color:#fff; }
.btn-grad { border-radius: 6px; }

/* ---------- Tablas ---------- */
.table > thead > tr > th {
    background: #f8fafc;
    color: #334155;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-bottom: 2px solid #e2e8f0 !important;
}
.table-striped > tbody > tr:nth-of-type(odd) { background: #f8fafc; }
.table-hover > tbody > tr:hover { background: #eff6ff; }
.table-bordered { border-color: #e2e8f0; }
.table-bordered > thead > tr > th, .table-bordered > tbody > tr > td { border-color: #e2e8f0; }

/* ---------- Formularios ---------- */
.form-control {
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    box-shadow: none;
    padding: 7px 12px;
}
.form-control:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
label { color: #334155; font-weight: 600; font-size: 13px; }
.input-group-addon {
    background: #f8fafc; color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 6px 0 0 6px;
}

/* ---------- DataTables ---------- */
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--brand-2); color: #fff !important;
    border-color: var(--brand-2); border-radius: 6px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #eff6ff; color: var(--brand-2) !important;
    border-color: #bfdbfe; border-radius: 6px;
}
div.dataTables_filter input, div.dataTables_length select { border-radius: 6px; border: 1px solid #cbd5e1; }

/* ---------- Modales ---------- */
.modal-content { border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 0; }
.modal-header {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
    color: #fff; border-radius: var(--radius) var(--radius) 0 0;
}
.modal-header .modal-title { color: #fff; font-weight: 600; }
.modal-header .close { color: #fff; opacity: .8; text-shadow: none; }
.modal-footer { border-top: 1px solid #eef2f7; }

/* ---------- Login (auth.php usa .login) ---------- */
.login {
    border-radius: 14px !important;
    background: rgba(255,255,255,.96) !important;
    box-shadow: var(--shadow-lg) !important;
    border: none !important;
    padding: 24px;
}
.login h3, .login .animated { color: #0f172a !important; }
.login .form-control { border-radius: 8px; padding: 10px 14px; height: auto; font-size: 14px; }
.login .btn-primary {
    border-radius: 8px; font-weight: 700; letter-spacing: .5px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
    border: 0; padding: 10px;
}
.login .btn-primary:hover { filter: brightness(1.08); }
.copyright { color: #475569; font-size: 12px; }
.copyright a { color: var(--brand-2); font-weight: 600; }

/* ---------- Fancybox ---------- */
#fancybox-wrap, .fancybox-skin { border-radius: var(--radius); }
.fancybox-skin { box-shadow: var(--shadow-lg) !important; }

/* ---------- Alertas/labels ---------- */
.alert { border-radius: 8px; }
.label { border-radius: 5px; padding: 3px 8px; font-weight: 600; }
.progress { border-radius: 8px; }

/* ---------- Footer ---------- */
.main-footer {
    background: #fff; color: #64748b;
    border-top: 1px solid #e2e8f0;
    font-size: 12.5px;
}
.main-footer a { color: var(--brand-2); font-weight: 600; }

/* ================================================================
   DASHBOARD - Cards de menu coloridos y dinamicos
   ================================================================ */
.caja-escritorio .box {
    border: 0 !important;
    border-radius: 16px;
    color: #fff;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(15,23,42,.18);
    transition: transform .22s ease, box-shadow .22s ease;
    position: relative;
    min-height: 150px;
}
.caja-escritorio .box::after {
    content: "";
    position: absolute; right: -30px; top: -30px;
    width: 110px; height: 110px; border-radius: 50%;
    background: rgba(255,255,255,.10);
}
.caja-escritorio .box:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 16px 34px rgba(15,23,42,.28);
}
.caja-escritorio .box h3 { position: relative; z-index: 1; }
.caja-escritorio .box h3 a,
.caja-escritorio .box a { color: #fff !important; text-decoration: none; }
.caja-escritorio .box h3 a:hover { color: #fff !important; }
.caja-escritorio .box .fa { color: rgba(255,255,255,.92) !important; position: relative; z-index: 1; transition: transform .25s ease; }
.caja-escritorio .box:hover .fa { transform: scale(1.12) rotate(-4deg); }

/* Paleta viva alternada por columna */
.caja-escritorio .row > div:nth-child(4n+1) .box { background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); }
.caja-escritorio .row > div:nth-child(4n+2) .box { background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%); }
.caja-escritorio .row > div:nth-child(4n+3) .box { background: linear-gradient(135deg, #059669 0%, #34d399 100%); }
.caja-escritorio .row > div:nth-child(4n+4) .box { background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%); }
.caja-escritorio .row > div:nth-child(4n+5) .box { background: linear-gradient(135deg, #e11d48 0%, #fb7185 100%); }
.caja-escritorio .row > div:nth-child(4n+6) .box { background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%); }
.caja-escritorio .row > div:nth-child(4n+7) .box { background: linear-gradient(135deg, #0d9488 0%, #2dd4bf 100%); }
.caja-escritorio .row > div:nth-child(4n+8) .box { background: linear-gradient(135deg, #9333ea 0%, #c084fc 100%); }

/* ================================================================
   LOGIN - fondo moderno (reemplaza la foto de fondo)
   ================================================================ */
body[background] {
    background:
        url("../img/login/fondo-facturacion.svg") center / cover no-repeat fixed,
        linear-gradient(135deg, #0f172a 0%, #1e3a8a 45%, #0ea5e9 100%) !important;
}
body[background]::before {
    content: "";
    position: fixed; inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,.07), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(14,165,233,.18), transparent 45%);
    pointer-events: none;
}
body[background] .login {
    border-radius: 18px !important;
    background: rgba(255,255,255,.97) !important;
    box-shadow: 0 24px 60px rgba(2,6,23,.45) !important;
    border: 0 !important;
}
body[background] h3, body[background] .animated { text-shadow: none; }

/* ================================================================
   MENU DE USUARIO (header) - dropdown profesional
   ================================================================ */
.navbar-nav > .user-menu > .dropdown-menu {
    border-radius: 12px;
    border: 0;
    box-shadow: 0 16px 40px rgba(15,23,42,.30);
    overflow: hidden;
    width: 280px;
    padding: 0;
}
.navbar-nav > .user-menu > .dropdown-menu > .user-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #0ea5e9 100%);
    padding: 26px 15px;
    height: auto;
}
.navbar-nav > .user-menu > .dropdown-menu > .user-header img {
    border: 3px solid rgba(255,255,255,.85);
    box-shadow: 0 4px 14px rgba(0,0,0,.35);
    width: 90px; height: 90px;
}
.navbar-nav > .user-menu > .dropdown-menu > .user-header p {
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    margin-top: 8px;
    text-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.navbar-nav > .user-menu > .dropdown-menu > .user-header p > small { color: #dbeafe; }
.navbar-nav > .user-menu > .dropdown-menu > .user-footer {
    background: #f8fafc;
    padding: 12px;
    border-top: 1px solid #e2e8f0;
}
/* Boton Salir: oscuro elegante, no rojo plano */
.user-footer .btn.btn-danger,
.user-footer .btn-danger {
    background: linear-gradient(135deg, #0f172a, #334155) !important;
    border: 0 !important;
    color: #f1f5f9 !important;
    border-radius: 8px !important;
    font-weight: 600;
    letter-spacing: .4px;
    padding: 9px 26px;
    box-shadow: 0 4px 12px rgba(15,23,42,.25);
    transition: all .18s ease;
}
.user-footer .btn.btn-danger:hover {
    background: linear-gradient(135deg, #b91c1c, #ef4444) !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(239,68,68,.35);
}
.user-footer .btn.btn-danger .fa { color: #f87171; }
.user-footer .btn.btn-danger:hover .fa { color: #fff; }

/* ================================================================
   NOTIFICACIONES - alertify y callouts con diseno profesional
   ================================================================ */
.alertify-notifier .ajs-message,
.alertify-notifier .ajs-message.ajs-visible {
    border-radius: 12px !important;
    padding: 14px 18px !important;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    letter-spacing: .2px;
    box-shadow: 0 10px 30px rgba(15,23,42,.28) !important;
    border: 0 !important;
    min-width: 260px;
    max-width: 360px;
}
.alertify-notifier .ajs-message.ajs-success {
    background: linear-gradient(135deg, #059669, #34d399) !important;
    color: #fff !important;
}
.alertify-notifier .ajs-message.ajs-error {
    background: linear-gradient(135deg, #b91c1c, #ef4444) !important;
    color: #fff !important;
}
.alertify-notifier .ajs-message.ajs-warning,
.alertify-notifier .ajs-message:not(.ajs-success):not(.ajs-error) {
    background: linear-gradient(135deg, #1e3a8a, #2563eb) !important;
    color: #fff !important;
}
.alertify-notifier .ajs-message::before {
    font-family: FontAwesome;
    margin-right: 9px;
    font-size: 15px;
    vertical-align: -1px;
}
.alertify-notifier .ajs-message.ajs-success::before { content: "\f00c"; }
.alertify-notifier .ajs-message.ajs-error::before { content: "\f071"; }
.alertify-notifier .ajs-message:not(.ajs-success):not(.ajs-error)::before { content: "\f05a"; }

/* Callouts (avisos dentro de paginas) */
.callout {
    border-radius: 10px !important;
    border-left-width: 5px !important;
    box-shadow: var(--shadow-sm);
    padding: 14px 18px !important;
}
.callout.callout-danger {
    background: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #7f1d1d !important;
}
.callout.callout-info {
    background: #eff6ff !important;
    border-color: #2563eb !important;
    color: #1e3a8a !important;
}
.callout.callout-warning {
    background: #fffbeb !important;
    border-color: #f59e0b !important;
    color: #78350f !important;
}
.callout.callout-success {
    background: #ecfdf5 !important;
    border-color: #10b981 !important;
    color: #064e3b !important;
}
.callout h4 { font-weight: 600; }

/* ================================================================
   DASHBOARD - fondo profesional del tablero principal
   ================================================================ */
.caja-escritorio.img_res,
section.caja-escritorio {
    background: url("../img/login/fondo-dashboard.svg") center / cover no-repeat fixed !important;
    min-height: 85vh;
    border-radius: 0;
    padding: 10px 5px;
}
