/* Here, the content of the common custom CSS defined into Home - Setup - Display - CSS*/
/* =========================
 AINSAM EXECUTIVE THEME
 ========================= */

/* Fondo general */
body {
 font-family: "Segoe UI", Arial, sans-serif !important;
 background-color: #f3f5f7 !important;
 color: #1f2937 !important;
 font-size: 14px !important;
}

/* Barra superior */
div#id-top {
 background: linear-gradient(90deg, #4b0082, #6a0dad) !important;
 box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}

/* Menú lateral */
div.vmenu, 
div.leftmenu {
 background-color: #ffffff !important;
 border-right: 1px solid #d9dee5;
}

/* Links menú lateral */
a.vsmenu, 
a.tmenu {
 font-weight: 500 !important;
 transition: all 0.2s ease;
}

/* Hover menú */
a.vsmenu:hover, 
a.tmenu:hover {
 background-color: #f1ebff !important;
 color: #5f0fbd !important;
 border-radius: 6px;
}

/* Títulos principales */
div.titre, 
div.fichecenter .fichehalfleft .underbanner.clearboth {
 font-size: 22px !important;
 font-weight: 700 !important;
 color: #4b0082 !important;
 letter-spacing: 0.4px;
}

/* Widgets dashboard */
.boxstats,
div.dashboard.box,
div.box {
 border-radius: 14px !important;
 border: 1px solid #e2e8f0 !important;
 box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
 transition: all 0.2s ease;
}

/* Hover widgets */
.boxstats:hover,
div.dashboard.box:hover,
div.box:hover {
 transform: translateY(-2px);
 box-shadow: 0 6px 18px rgba(0,0,0,0.12) !important;
}

/* Encabezados widgets */
.boxtitle,
div.box div.box-title {
 background: linear-gradient(90deg, #0f5132, #198754) !important;
 color: white !important;
 font-weight: 600 !important;
 border-radius: 10px 10px 0 0;
}

/* Tablas */
table.liste {
 border-radius: 10px !important;
 overflow: hidden;
 background-color: white !important;
}

/* Encabezados tablas */
table.liste th {
 background-color: #4b0082 !important;
 color: white !important;
 font-size: 14px !important;
 font-weight: 600 !important;
}

/* Hover filas */
table.liste tr:hover td {
 background-color: #f4efff !important;
}

/* Texto tablas más grande */
table.liste td {
 font-size: 14px !important;
 padding-top: 10px !important;
 padding-bottom: 10px !important;
}

/* Botones */
.button,
.buttoninput,
.butAction {
 background: linear-gradient(90deg, #4b0082, #6a0dad) !important;
 border: none !important;
 border-radius: 8px !important;
 color: white !important;
 font-weight: 600 !important;
 padding: 8px 14px !important;
 transition: all 0.2s ease;
}

/* Hover botones */
.button:hover,
.buttoninput:hover,
.butAction:hover {
 transform: translateY(-1px);
 opacity: 0.92;
}

/* Inputs */
input,
select,
textarea {
 border-radius: 8px !important;
 border: 1px solid #cbd5e1 !important;
 font-size: 14px !important;
}

/* Estados importantes */
.badge-status1 {
 background-color: #198754 !important;
 color: white !important;
}

.badge-status4 {
 background-color: #c62828 !important;
 color: white !important;
}

.badge-status6 {
 background-color: #ff9800 !important;
 color: white !important;
}

/* Dashboard más limpio */
div.box {
 margin-bottom: 14px !important;
}

/* Footer */
div#footer {
 background-color: #f8fafc !important;
 color: #6b7280 !important;
 border-top: 1px solid #e5e7eb;
}

/* Animación suave */
* {
 transition: background-color 0.15s ease,
 color 0.15s ease,
 border-color 0.15s ease;
}

/* =========================
 FIX AINSAM - ENCABEZADOS DE TABLAS
 Mejora contraste y legibilidad
 ========================= */

/* Encabezados principales de tablas */
table.liste th,
table.liste th a,
table.liste th span,
table.liste thead th,
table.liste thead th a,
table.liste thead th span,
tr.liste_titre th,
tr.liste_titre th a,
tr.liste_titre th span,
.liste_titre,
.liste_titre a,
.liste_titre span {
 background-color: #f4f0fa !important;
 color: #2f174f !important;
 font-size: 14px !important;
 font-weight: 700 !important;
 text-shadow: none !important;
}

/* Segunda línea de filtros arriba de tablas */
tr.liste_titre_filter th,
tr.liste_titre_filter td,
.liste_titre_filter,
.liste_titre_filter a,
.liste_titre_filter span {
 background-color: #ffffff !important;
 color: #2f174f !important;
 font-size: 14px !important;
 font-weight: 600 !important;
}

/* Inputs de filtro */
tr.liste_titre_filter input,
tr.liste_titre_filter select,
.liste_titre_filter input,
.liste_titre_filter select {
 background-color: #ffffff !important;
 color: #111827 !important;
 border: 1px solid #b8a8d6 !important;
 border-radius: 7px !important;
 font-size: 14px !important;
}

/* Íconos y checkboxes en encabezados */
table.liste th img,
table.liste th svg,
.liste_titre img,
.liste_titre svg {
 opacity: 1 !important;
 filter: none !important;
}

/* Encabezado superior de filtros */
div.div-table-responsive table.liste tr:first-child th,
div.div-table-responsive table.liste tr:first-child td {
 color: #2f174f !important;
}

/* Links de ordenamiento */
table.liste th a:hover,
.liste_titre a:hover {
 color: #0f5132 !important;
 text-decoration: underline !important;
}

/* =========================
 AINSAM STATUS COLORS
 Estados de facturas
 ========================= */

/* PAGADO - Verde institucional */
.badge-status6,
span.badge-status6,
span.status6,
span.statuspaid {
 background: #198754 !important;
 color: #ffffff !important;
 border: 1px solid #146c43 !important;
 font-weight: 700 !important;
 border-radius: 7px !important;
 padding: 4px 8px !important;
}

/* ABANDONADA / CANCELADA - Gris elegante */
.badge-status7,
span.badge-status7,
span.status7,
span.statusabandoned {
 background: #6c757d !important;
 color: #ffffff !important;
 border: 1px solid #565e64 !important;
 font-weight: 700 !important;
 border-radius: 7px !important;
 padding: 4px 8px !important;
}

/* NO PAGADA - Amarillo ejecutivo */
.badge-status1,
span.badge-status1,
span.status1,
span.statusunpaid {
 background: #ffc107 !important;
 color: #212529 !important;
 border: 1px solid #d39e00 !important;
 font-weight: 700 !important;
 border-radius: 7px !important;
 padding: 4px 8px !important;
}

/* VENCIDA - Rojo crítico */
.badge-status4,
span.badge-status4,
span.status4,
span.statuslate {
 background: #dc3545 !important;
 color: #ffffff !important;
 border: 1px solid #b02a37 !important;
 font-weight: 700 !important;
 border-radius: 7px !important;
 padding: 4px 8px !important;
}

/* BORRADOR / INICIADO */
.badge-status0,
span.badge-status0,
span.status0 {
 background: #e9ecef !important;
 color: #495057 !important;
 border: 1px solid #ced4da !important;
 font-weight: 700 !important;
 border-radius: 7px !important;
 padding: 4px 8px !important;
}

/* Hover suave */
span[class*="status"]:hover,
span[class*="badge-status"]:hover {
 filter: brightness(1.05);
 transition: all 0.15s ease;
}

/* =========================
 AINSAM PRODUCT STATUS
 Venta / Compra
 ========================= */

/* EN VENTA / EN COMPRA = Verde claro elegante */
.badge-status8,
.badge-status9,
span.statusonsale,
span.statusbuy,
span.statussale,
span[class*="venta"],
span[class*="compra"] {
 background: #b7f5c5 !important;
 color: #0f5132 !important;
 border: 1px solid #7edc95 !important;
 font-weight: 700 !important;
 border-radius: 8px !important;
 padding: 4px 9px !important;
 box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* FUERA DE VENTA / FUERA DE COMPRA = Rojo */
span[class*="Fuera"],
span.statusnotsale,
span.statusnotbuy {
 background: #dc3545 !important;
 color: #ffffff !important;
 border: 1px solid #b02a37 !important;
 font-weight: 700 !important;
 border-radius: 8px !important;
 padding: 4px 9px !important;
 box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* Hover suave */
span.statusonsale:hover,
span.statusbuy:hover,
span.statussale:hover,
span.statusnotsale:hover,
span.statusnotbuy:hover {
 filter: brightness(1.05);
 transition: all 0.15s ease;
}