/* =====================================================================
   GESMART - Estilo moderno global
   - Solo afecta el area de trabajo (#cont-main-sys).
   - Formas (bordes redondeados, espaciados) aplican en claro y oscuro.
   - Colores solo en modo claro: el modo oscuro conserva dark_theme.css.
   - Emitir (.gs-emitir) tiene su propio estilo y no se toca.
   ===================================================================== */

/* ---------- Fondo del area de trabajo ---------- */
body:not(.theme-dark) #cont-main-sys {
    background: linear-gradient(180deg, #eef3fb 0%, #f6f8fc 260px) !important;
}
#cont-main-sys > .tab-pane { padding-top: 6px; }

/* ---------- Breadcrumb (ruta de la opcion) ---------- */
#cont-main-sys .lv-breadcrumb { padding: 4px 2px 6px; }
#cont-main-sys .lv-breadcrumb li { margin: 0 2px 0 0; display: flex; align-items: center; }
#cont-main-sys .lv-breadcrumb li + li:before {
    content: '\203A'; margin: 0 6px 0 4px; font-size: 16px; line-height: 1; color: #94a3b8;
}
#cont-main-sys .lv-breadcrumb a {
    padding: 5px 12px; border-radius: 999px; text-shadow: none;
    font-size: 12px; font-weight: 600; transition: background .15s, color .15s;
}
#cont-main-sys .lv-breadcrumb a:before,
#cont-main-sys .lv-breadcrumb a:after { display: none !important; }
body:not(.theme-dark) #cont-main-sys .lv-breadcrumb a { background: transparent; color: #64748b; }
body:not(.theme-dark) #cont-main-sys .lv-breadcrumb a:hover { background: #e2e8f5; color: #1e293b; }
body:not(.theme-dark) #cont-main-sys .lv-breadcrumb li:first-child a { color: #4f46e5; }
body:not(.theme-dark) #cont-main-sys .lv-breadcrumb li:nth-last-child(1) a {
    background: #fff; color: #0f172a; box-shadow: 0 1px 3px rgba(15,23,42,.10);
}
body.theme-dark #cont-main-sys .lv-breadcrumb a { background: transparent; color: #a0aec0; }
body.theme-dark #cont-main-sys .lv-breadcrumb li:nth-last-child(1) a { background: #1e2535; color: #e2e8f0; }

/* ---------- Tarjetas (jarviswidget) ---------- */
#cont-main-sys .jarviswidget {
    border-radius: 16px !important;
    overflow: visible;
    margin-bottom: 18px;
}
body:not(.theme-dark) #cont-main-sys .jarviswidget {
    border: 1px solid #e6ebf3 !important;
    box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06) !important;
    background: #fff;
}
#cont-main-sys .jarviswidget > header {
    height: 46px !important;
    border-radius: 16px 16px 0 0 !important;
    border: 0 !important;
}
body:not(.theme-dark) #cont-main-sys .jarviswidget > header {
    background: #fff !important;
    border-bottom: 1px solid #eef2f7 !important;
}
#cont-main-sys .jarviswidget > header > h2 {
    line-height: 46px !important; height: 46px;
    font-size: 15px !important; font-weight: 700 !important; letter-spacing: -.01em;
    margin-left: 6px;
}
body:not(.theme-dark) #cont-main-sys .jarviswidget > header > h2 { color: #0f172a !important; }
#cont-main-sys .jarviswidget > header > .widget-icon {
    width: 30px; height: 30px; line-height: 30px !important;
    margin: 8px 0 0 10px !important; padding: 0 !important;
    border-radius: 9px; text-align: center;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    box-shadow: 0 4px 10px rgba(99,102,241,.25);
}
#cont-main-sys .jarviswidget > header > .widget-icon i,
#cont-main-sys .jarviswidget > header > .widget-icon .fa {
    color: #fff !important; font-size: 14px; line-height: 30px !important;
}
#cont-main-sys .jarviswidget > header .widget-toolbar,
#cont-main-sys .jarviswidget > header .jarviswidget-ctrls { height: 46px; line-height: 46px; border: 0 !important; }
#cont-main-sys .jarviswidget > header .jarviswidget-ctrls a { margin-top: 10px; }
#cont-main-sys .jarviswidget > div {
    border: 0 !important;
    border-radius: 0 0 16px 16px !important;
}
body:not(.theme-dark) #cont-main-sys .jarviswidget > div { background: #fff; }

/* ---------- Formularios ---------- */
body:not(.theme-dark) #cont-main-sys .smart-form .label {
    text-transform: uppercase; font-size: 11px; font-weight: 600;
    letter-spacing: .03em; color: #64748b;
}
#cont-main-sys .smart-form .input input,
#cont-main-sys .smart-form .select select,
#cont-main-sys .smart-form .textarea textarea,
#cont-main-sys .form-control,
#cont-main-sys .chosen-container-single .chosen-single,
#cont-main-sys .chosen-container-multi .chosen-choices {
    border-radius: 10px !important;
}
body:not(.theme-dark) #cont-main-sys .smart-form .input input,
body:not(.theme-dark) #cont-main-sys .smart-form .select select,
body:not(.theme-dark) #cont-main-sys .smart-form .textarea textarea,
body:not(.theme-dark) #cont-main-sys .form-control {
    border-color: #dbe3ee;
    transition: border-color .15s, box-shadow .15s;
}
body:not(.theme-dark) #cont-main-sys .smart-form .input input:focus,
body:not(.theme-dark) #cont-main-sys .smart-form .select select:focus,
body:not(.theme-dark) #cont-main-sys .smart-form .textarea textarea:focus,
body:not(.theme-dark) #cont-main-sys .form-control:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99,102,241,.15) !important;
}
/* iconos dentro de inputs: centrados con el nuevo radio */
#cont-main-sys .smart-form .input .icon-append { border-radius: 0 10px 10px 0; }
#cont-main-sys .smart-form .input .icon-prepend { border-radius: 10px 0 0 10px; }
#cont-main-sys .smart-form footer { border-radius: 0 0 16px 16px; }

/* ---------- Pestanas internas (nav-tabs.bordered) como segmentos ---------- */
#cont-main-sys .nav-tabs.bordered {
    border: 0 !important; display: inline-flex; flex-wrap: wrap; gap: 2px;
    padding: 4px; border-radius: 12px; margin-bottom: 10px;
}
body:not(.theme-dark) #cont-main-sys .nav-tabs.bordered { background: #e6ecf5; }
body.theme-dark #cont-main-sys .nav-tabs.bordered { background: #1e2535; }
#cont-main-sys .nav-tabs.bordered > li { margin: 0 !important; float: none; }
#cont-main-sys .nav-tabs.bordered > li > a {
    border: 0 !important; border-radius: 9px !important; margin: 0 !important;
    padding: 6px 14px; font-weight: 600; box-shadow: none !important;
}
body:not(.theme-dark) #cont-main-sys .nav-tabs.bordered > li > a { background: transparent; color: #475569; }
body:not(.theme-dark) #cont-main-sys .nav-tabs.bordered > li > a:hover { background: rgba(255,255,255,.6); }
body:not(.theme-dark) #cont-main-sys .nav-tabs.bordered > li.active > a,
body:not(.theme-dark) #cont-main-sys .nav-tabs.bordered > li.active > a:hover,
body:not(.theme-dark) #cont-main-sys .nav-tabs.bordered > li.active > a:focus {
    background: #fff !important; color: #2563eb !important;
    box-shadow: 0 1px 3px rgba(15,23,42,.12) !important;
}
#cont-main-sys .nav-tabs.bordered + .tab-content { border: 0 !important; }

/* ---------- Emitir conserva su propio estilo ---------- */
#cont-main-sys .gs-emitir .jarviswidget > header { height: 52px !important; }
#cont-main-sys .gs-emitir .jarviswidget > header > h2 {
    margin: 0 !important; height: auto; line-height: 52px !important;
}
#cont-main-sys .gs-emitir .jarviswidget > header > .widget-icon {
    width: 32px; height: 32px; line-height: normal !important;
    margin: 0 10px 0 12px !important; border-radius: 10px;
}
#cont-main-sys .gs-emitir .jarviswidget > header > .widget-icon i,
#cont-main-sys .gs-emitir .jarviswidget > header > .widget-icon .fa { line-height: normal !important; }
#cont-main-sys .gs-emitir .jarviswidget > header .widget-toolbar,
#cont-main-sys .gs-emitir .jarviswidget > header .jarviswidget-ctrls { height: auto; line-height: normal; }

/* ---------- Modales (todo el sistema) ---------- */
.modal .modal-content {
    border-radius: 18px !important; overflow: visible; /* GESMART: con hidden se cortaban las listas desplegables (chosen) */
    box-shadow: 0 24px 60px -12px rgba(15,23,42,.35) !important;
}
/* las esquinas redondeadas se conservan en cabecera y pie (antes las recortaba el overflow) */
.modal .modal-content > .modal-header:first-child { border-radius: 18px 18px 0 0; }
.modal .modal-content > .modal-footer:last-child { border-radius: 0 0 18px 18px; }
body:not(.theme-dark) .modal .modal-content { border: 0; }
body:not(.theme-dark) .modal-backdrop.in { opacity: .45; background: #0f172a; }
.modal .modal-header {
    display: flex; align-items: center; gap: 12px; padding: 14px 20px;
}
.modal .modal-header > * { order: 1; }
.modal .modal-header:before {
    content: '\f044'; font-family: FontAwesome; order: 0; flex: none;
    width: 34px; height: 34px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 15px;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    box-shadow: 0 4px 10px rgba(99,102,241,.3);
}
.modal .modal-header:after { display: none; }
.modal .modal-header .modal-title,
.modal .modal-header > h4 {
    flex: 1; margin: 0; font-size: 17px; font-weight: 700 !important; letter-spacing: -.01em;
}
.modal .modal-header > .close {
    order: 2; float: none; margin: 0 !important; width: 32px; height: 32px;
    border-radius: 9px; font-size: 22px; line-height: 30px;
    opacity: 1; text-shadow: none; transition: background .15s;
}
body:not(.theme-dark) .modal .modal-header { background: #fff; border-bottom: 1px solid #eef2f7; }
body:not(.theme-dark) .modal .modal-header .modal-title,
body:not(.theme-dark) .modal .modal-header > h4 { color: #0f172a; }
body:not(.theme-dark) .modal .modal-header > .close { color: #64748b; }
body:not(.theme-dark) .modal .modal-header > .close:hover { background: #f1f5f9; color: #0f172a; }

.modal .modal-body .form-control,
.modal .smart-form .input input,
.modal .smart-form .select select,
.modal .smart-form .textarea textarea,
.modal .chosen-container-single .chosen-single,
.modal .chosen-container-multi .chosen-choices { border-radius: 10px !important; }
body:not(.theme-dark) .modal .modal-body .form-control,
body:not(.theme-dark) .modal .smart-form .input input,
body:not(.theme-dark) .modal .smart-form .select select,
body:not(.theme-dark) .modal .smart-form .textarea textarea { border-color: #dbe3ee; }
body:not(.theme-dark) .modal .modal-body .form-control:focus,
body:not(.theme-dark) .modal .smart-form .input input:focus,
body:not(.theme-dark) .modal .smart-form .select select:focus,
body:not(.theme-dark) .modal .smart-form .textarea textarea:focus {
    border-color: #6366f1 !important; box-shadow: 0 0 0 3px rgba(99,102,241,.15) !important;
}
body:not(.theme-dark) .modal .modal-body label.control-label,
body:not(.theme-dark) .modal .modal-body .control-label { color: #475569; font-weight: 600; }

.modal .modal-footer {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end;
    gap: 8px; padding: 12px 20px;
}
.modal .modal-footer:before, .modal .modal-footer:after { display: none; }
.modal .modal-footer .lv-modalrequired { margin-right: auto; }
.modal .modal-footer .btn {
    border-radius: 10px !important; padding: 8px 18px; font-weight: 600; margin: 0 !important;
}
.modal .modal-footer .btn-primary {
    border: 0; background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    color: #fff !important; box-shadow: 0 6px 14px -6px rgba(79,70,229,.6) !important;
}
.modal .modal-footer .btn-primary:hover { filter: brightness(1.08); }
body:not(.theme-dark) .modal .modal-footer { background: #f8fafc; border-top: 1px solid #eef2f7; }
body:not(.theme-dark) .modal .modal-footer .lv-close {
    background: #fff !important; color: #475569 !important;
    border: 1px solid #dbe3ee !important; box-shadow: none !important;
}
body:not(.theme-dark) .modal .modal-footer .lv-close:hover { background: #f1f5f9 !important; }
body.theme-dark .modal .modal-footer .lv-close {
    background: transparent !important; color: #e8eaf6 !important;
    border: 1px solid rgba(255,255,255,.14) !important; box-shadow: none !important;
}

/* ---------- Mensajes emergentes (Tools.notify: smallBox / bigBox) ---------- */
.SmallBox {
    border: 0 !important; border-radius: 14px !important; padding: 12px 14px;
    box-sizing: border-box; width: 380px;
    display: flex; align-items: center; gap: 12px;
    background-image: linear-gradient(135deg, rgba(255,255,255,.16), rgba(0,0,0,.08)) !important;
    box-shadow: 0 14px 32px -10px rgba(15,23,42,.5) !important;
}
.SmallBox:hover { border: 0 !important; filter: brightness(1.05); }
.SmallBox .miniIcono {
    order: 0; flex: none; width: 38px; height: 38px !important; border-radius: 50%;
    background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.SmallBox .miniPic { position: static !important; }
.SmallBox .miniIcono:empty { display: none !important; }
.SmallBox .foto {
    position: static !important; order: 0; flex: none; width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.SmallBox .textoFull, .SmallBox .textoFoto {
    order: 1; float: none; width: auto; flex: 1; margin: 0 !important; padding: 0 !important; min-width: 0;
}
.SmallBox span {
    font-size: 11px !important; font-weight: 700 !important; letter-spacing: .06em !important;
    text-transform: uppercase; opacity: .85; margin: 0 0 2px !important;
}
.SmallBox p { font-size: 14px !important; font-weight: 600; line-height: 1.35; margin: 0 !important; word-wrap: break-word; }

.bigBox {
    border: 0 !important; border-radius: 16px !important; width: 360px; height: auto !important;
    padding: 14px 44px 14px 64px !important; box-sizing: border-box !important;
    background-image: linear-gradient(135deg, rgba(255,255,255,.16), rgba(0,0,0,.08)) !important;
    box-shadow: 0 18px 40px -12px rgba(15,23,42,.55) !important;
}
.bigBox span {
    font-size: 11px !important; font-weight: 700 !important; letter-spacing: .06em !important;
    text-transform: uppercase; opacity: .85; padding: 0 !important; margin: 0 0 3px;
}
.bigBox p { font-size: 14px !important; font-weight: 600; line-height: 1.4; margin: 0 !important; }
.bigBox .bigboxicon {
    top: 50% !important; left: 14px !important; transform: translateY(-50%);
    width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.22);
    font-size: 17px !important; display: flex; align-items: center; justify-content: center;
}
.bigBox .bigboxnumber { display: none; }
.bigBox .botClose {
    top: 50% !important; transform: translateY(-50%); right: 12px !important;
    width: 26px !important; height: 26px !important; border-radius: 8px;
    display: flex !important; align-items: center; justify-content: center;
    font-size: 14px !important; background: rgba(255,255,255,.18); opacity: .9;
}
#divMiniIcons .cajita { border-radius: 8px; box-shadow: 0 4px 10px -4px rgba(15,23,42,.5); }

/* ---------- Barra superior (solo modo claro) ---------- */
body:not(.theme-dark) #header {
    background: linear-gradient(90deg, #0f172a 0%, #1e1b4b 100%) !important;
    border-bottom: 1px solid rgba(255,255,255,.06) !important;
    box-shadow: 0 4px 18px -8px rgba(15,23,42,.6);
}
body:not(.theme-dark) #header .btn-header > :first-child > a,
body:not(.theme-dark) #header .header-dropdown-list > li > a.dropdown-toggle {
    background: rgba(255,255,255,.08) !important; border: 1px solid rgba(255,255,255,.10) !important;
    color: #e2e8f0 !important; border-radius: 10px !important; box-shadow: none !important;
    transition: background .15s;
}
body:not(.theme-dark) #header .btn-header > :first-child > a:hover,
body:not(.theme-dark) #header .header-dropdown-list > li > a.dropdown-toggle:hover { background: rgba(255,255,255,.16) !important; }
body:not(.theme-dark) #header .btn-header > :first-child > a i { color: #e2e8f0 !important; }
body:not(.theme-dark) #header #logout > :first-child > a {
    background: rgba(239,68,68,.18) !important; border-color: rgba(239,68,68,.35) !important;
}
body:not(.theme-dark) #header #logout > :first-child > a i { color: #fca5a5 !important; }
body:not(.theme-dark) #header .header-search > input[type=text] {
    background: rgba(255,255,255,.08) !important; border: 1px solid rgba(255,255,255,.12) !important;
    color: #f1f5f9 !important; border-radius: 10px !important;
}
body:not(.theme-dark) #header .header-search > input[type=text]::placeholder { color: #94a3b8; }
body:not(.theme-dark) #header .header-search > button { color: #cbd5e1 !important; }
@media (min-width: 992px) {
    body:not(.theme-dark) #header .header-dropdown-list > li > a.dropdown-toggle { padding: 4px 10px; }
}
@media (max-width: 991px) {
    body:not(.theme-dark) #header .header-dropdown-list > li > a.dropdown-toggle {
        background: transparent !important; border-color: transparent !important;
    }
}

/* ---------- Menu lateral (solo modo claro; el menu minimizado queda como esta) ---------- */
body:not(.theme-dark) #left-panel { background: #0f172a !important; border-right: 1px solid rgba(255,255,255,.05); }
body:not(.theme-dark) #left-panel .login-info { background: transparent !important; border-bottom: 1px solid rgba(255,255,255,.06) !important; }
body:not(.theme-dark) #left-panel .login-info a span { color: #e2e8f0 !important; font-weight: 600; }
body:not(.theme-dark) #left-panel nav ul { background: transparent !important; }
body:not(.theme-dark):not(.minified) #left-panel nav > ul > li { border: 0 !important; padding: 1px 8px; }
body:not(.theme-dark):not(.minified) #left-panel nav > ul > li > a {
    color: #cbd5e1 !important; border-radius: 10px; padding-top: 9px; padding-bottom: 9px;
    transition: background .15s, color .15s;
}
body:not(.theme-dark) #left-panel nav > ul > li > a i { color: #818cf8 !important; }
body:not(.theme-dark):not(.minified) #left-panel nav ul li a:hover { background: rgba(255,255,255,.06) !important; color: #fff !important; }
body:not(.theme-dark):not(.minified) #left-panel nav > ul > li.open > a { background: rgba(99,102,241,.16) !important; color: #fff !important; }
body:not(.theme-dark):not(.minified) #left-panel nav ul ul { margin: 2px 0 6px 18px !important; border-left: 1px solid rgba(148,163,184,.18); }
body:not(.theme-dark):not(.minified) #left-panel nav ul ul li a {
    color: #94a3b8 !important; border-radius: 8px; margin: 1px 4px 1px 6px; padding-left: 14px !important;
}
body:not(.theme-dark):not(.minified) #left-panel nav ul ul li a:before,
body:not(.theme-dark):not(.minified) #left-panel nav ul ul:before,
body:not(.theme-dark):not(.minified) #left-panel nav ul li:before { display: none !important; }
body:not(.theme-dark):not(.minified) #left-panel nav ul li.active > a {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important; color: #fff !important;
    box-shadow: 0 6px 14px -6px rgba(79,70,229,.7);
}

/* ---------- Movil ---------- */
@media (max-width: 767px) {
    #divSmallBoxes { left: 0 !important; right: 0 !important; }
    .SmallBox { width: auto !important; left: 12px !important; right: 12px !important; }
    .bigBox { width: auto !important; left: 12px !important; right: 12px !important; bottom: 16px !important; }
    #divMiniIcons { display: none !important; }
}
@media (max-width: 767px) {
    #cont-main-sys .jarviswidget { border-radius: 12px !important; margin-bottom: 12px; }
    #cont-main-sys .jarviswidget > header { border-radius: 12px 12px 0 0 !important; }
    #cont-main-sys .jarviswidget > div { border-radius: 0 0 12px 12px !important; }
    #cont-main-sys .jarviswidget > header > h2 { font-size: 14px !important; }
}
