/* gest — tema propio sobre Tabler. Paleta base petróleo/aguamarina; el acento (--tblr-primary) lo pone la empresa activa. */
:root {
  --gest-petroleo: #103a42;
  --gest-aguamarina: #659fa6;
  --gest-fondo: #f4f7f8;
  --tblr-font-sans-serif: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --tblr-body-bg: var(--gest-fondo);
  --tblr-border-radius: 8px;
}
body { font-feature-settings: "tnum" 1; }

.gest-cabecera { background: var(--gest-petroleo); color: #fff; border-bottom: 3px solid var(--gest-empresa); }
.gest-cabecera .nav-link, .gest-cabecera .navbar-brand { color: #fff; }
.gest-cabecera .navbar-toggler-icon { filter: invert(1); }
.gest-marca { font-weight: 700; letter-spacing: .02em; font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.gest-empresa-actual { display: flex; align-items: center; gap: 8px; font-weight: 600; padding: 6px 12px !important;
  border-radius: 999px; background: rgba(255,255,255,.08); }
.gest-empresa-actual:hover { background: rgba(255,255,255,.16); }
.gest-punto { display: inline-block; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.6); }
.dropdown-menu .gest-punto { box-shadow: 0 0 0 2px rgba(0,0,0,.08); }
.gest-avatar { background: var(--gest-empresa); color: #fff; font-weight: 700; }

/* Mensajes Flash del core como avisos de Tabler */
.flash { padding: .75rem 1rem; border-radius: var(--tblr-border-radius); margin-bottom: 1rem; border: 1px solid; background: #fff; }
.flash.valid, .flash.success { border-color: #2fb344; color: #1d6b2a; background: #eef9f0; }
.flash.error { border-color: #d63939; color: #8a1f1f; background: #fdf0f0; }
.flash.warning { border-color: #f59f00; color: #7a4f00; background: #fff8eb; }
.flash.info { border-color: var(--gest-aguamarina); color: var(--gest-petroleo); background: #eef6f7; }

/* Listados */
.gest-tabla th a { color: inherit; text-decoration: none; white-space: nowrap; }
.gest-tabla th a:hover { color: var(--tblr-primary); }
.gest-tabla td.num, .gest-tabla th.num { text-align: right; white-space: nowrap; }
.gest-tabla tbody tr[data-href] { cursor: pointer; }
.gest-tabla tbody tr[data-href]:hover { background: rgba(var(--tblr-primary-rgb), .04); }
.gest-filtros .form-control, .gest-filtros .form-select { min-width: 140px; }
.importe { font-variant-numeric: tabular-nums; white-space: nowrap; }
.text-muy-suave { color: #9aa5ad; }

/* Tarjetas de indicadores */
.gest-kpi .subheader { font-size: .72rem; }
.gest-kpi .h1 { font-size: 1.6rem; }

/* Calendarios */
.gest-cal { table-layout: fixed; }
.gest-cal td { height: 92px; vertical-align: top; padding: 4px 6px; }
.gest-cal td.fuera { background: #fafbfc; color: #b8c0c6; }
.gest-cal td.hoy { box-shadow: inset 0 0 0 2px var(--tblr-primary); }
.gest-cal td.finde { background: #f7f9fa; }
.gest-cal .dia { font-weight: 600; font-size: .8rem; }
.gest-cal .chip { display: block; font-size: .72rem; line-height: 1.25; margin-top: 3px; padding: 2px 6px; border-radius: 4px;
  background: rgba(var(--tblr-primary-rgb), .1); color: var(--gest-petroleo); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.gest-cal .chip.ok { background: #e7f6ea; color: #1d6b2a; }
.gest-cal .chip.pendiente { background: #fff4e0; color: #7a4f00; }

/* Login */
.gest-login { min-height: 100vh; background: linear-gradient(160deg, var(--gest-petroleo) 0%, #1b5660 55%, var(--gest-aguamarina) 100%); }
.gest-login .card { border: 0; box-shadow: 0 20px 50px rgba(0,0,0,.25); }

@media print {
  body { background: #fff; }
  .page-wrapper { margin: 0; }
}

/* Selector de fechas de publicación */
.gest-mini { width: 100%; border-collapse: separate; border-spacing: 2px; }
.gest-mini th { font-size: .65rem; color: #9aa5ad; text-align: center; font-weight: 600; }
.gest-mini td { padding: 0; text-align: center; }
.gest-mini button { width: 100%; aspect-ratio: 1; max-height: 34px; border: 0; border-radius: 6px; font-size: .78rem; background: transparent; color: #c5ccd1; }
.gest-mini button.hab { background: rgba(var(--tblr-primary-rgb), .08); color: var(--gest-petroleo); font-weight: 600; cursor: pointer; }
.gest-mini button.hab:hover { background: rgba(var(--tblr-primary-rgb), .2); }
.gest-mini button.on { background: var(--tblr-primary); color: #fff; font-weight: 700; }
.gest-mini button.hoy { box-shadow: inset 0 0 0 1px var(--gest-petroleo); }
.gest-linea-facturada { background: #f6faf7; }
.gest-pasos .step-item { font-size: .8rem; }
.page-header.d-flex { flex-direction: row; }
.page-header.d-flex > :first-child { flex: 1 1 auto; text-align: left; }

/* ===================== Pasada visual (11/11/2026): una sola barra, más densidad, más acabado ===================== */
:root { --tblr-page-padding-y: .9rem; --tblr-card-spacer-y: .85rem; --tblr-card-spacer-x: 1rem; }
body { font-size: .875rem; }
.gest-cabecera { min-height: 52px; padding: 0; border-bottom: 2px solid var(--gest-empresa); box-shadow: 0 2px 10px rgba(16,58,66,.18); }
.gest-cabecera .navbar-brand { font-size: 1.05rem; margin-right: .5rem; }
.gest-menu { gap: 2px; }
.gest-menu > .nav-item > .nav-link { color: rgba(255,255,255,.78); padding: .9rem .7rem !important; font-weight: 500; border-radius: 0; position: relative; }
.gest-menu > .nav-item > .nav-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.gest-menu > .nav-item.active > .nav-link { color: #fff; }
.gest-menu > .nav-item.active > .nav-link::before { content: ""; position: absolute; left: .6rem; right: .6rem; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--gest-empresa); }
.gest-menu .dropdown-menu { margin-top: 0; border-top: 2px solid var(--gest-empresa); }
@media (max-width: 991.98px) {
  .gest-menu > .nav-item > .nav-link { padding: .6rem .5rem !important; }
  .gest-menu > .nav-item.active > .nav-link::before { display: none; }
  #menu-principal { padding-bottom: .5rem; }
}
.gest-empresa-actual { padding: 5px 10px !important; font-size: .82rem; }
.page-body { margin-top: .9rem; margin-bottom: 1.5rem; }
.page-header { margin: 0 0 .75rem 0 !important; min-height: 0; }
.page-header.mb-3 { margin-bottom: .75rem !important; }
.page-title { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
.page-pretitle { font-size: .68rem; letter-spacing: .06em; }
.card { border-color: #e3e9ec; box-shadow: 0 1px 2px rgba(16,58,66,.04); }
.card-header { min-height: 2.75rem; padding-top: .55rem; padding-bottom: .55rem; }
.card-title { font-size: .95rem; font-weight: 600; }
.row-cards { --tblr-gutter-y: .9rem; --tblr-gutter-x: .9rem; }
.row-deck.mb-3, .row-cards.mb-3 { margin-bottom: .9rem !important; }
.table > :not(caption) > * > * { padding: .5rem .75rem; }
.table-sm > :not(caption) > * > * { padding: .32rem .6rem; }
.card-table thead th, .gest-tabla thead th { font-size: .66rem; letter-spacing: .05em; color: #6b7a80; background: #f7f9fa; position: sticky; top: 0; z-index: 1; }
.table-responsive { scrollbar-width: thin; }
.gest-tabla tbody tr:hover > td { background: rgba(var(--tblr-primary-rgb), .035); }
.form-label { font-size: .78rem; font-weight: 600; color: #4d5b61; margin-bottom: .25rem; }
.form-control, .form-select { font-size: .875rem; }
.btn { font-weight: 600; }
.badge { font-weight: 600; letter-spacing: .01em; }

/* Indicadores con barra de acento */
.gest-kpi { position: relative; overflow: hidden; }
.gest-kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gest-empresa); opacity: .85; }
.gest-kpi .card-body { padding: .8rem 1rem; }
.gest-kpi .subheader { font-size: .66rem; margin-bottom: .15rem; }
.gest-kpi .h1 { font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; }
.gest-kpi .h2 { font-size: 1.25rem; font-weight: 700; }
@media (max-width: 575.98px) {
  .gest-kpi .h1 { font-size: 1.2rem; }
  .page-header .col-auto { width: 100%; }
}

/* Pestañas y píldoras más finas */
.nav-pills .nav-link { padding: .35rem .75rem; font-weight: 600; font-size: .82rem; }
.nav-pills .nav-link.active { background: var(--tblr-primary); }
.card-header-tabs .nav-link { padding-top: .45rem; padding-bottom: .45rem; font-weight: 600; }

/* Login */
.gest-login .card { border-radius: 14px; }
.gest-icono { width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem;
  background: rgba(var(--tblr-primary-rgb), .1); color: var(--tblr-primary); flex-shrink: 0; }
.gest-fecha { width: 42px; border-radius: 8px; text-align: center; background: rgba(var(--tblr-primary-rgb), .08); color: var(--gest-petroleo); line-height: 1.05; padding: 4px 0; flex-shrink: 0; }
.gest-fecha span { display: block; font-size: .62rem; text-transform: uppercase; letter-spacing: .04em; color: var(--tblr-primary); font-weight: 700; }
.gest-fecha b { display: block; font-size: 1.1rem; }
.gest-leyenda { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.gest-acceso { border-radius: 18px; overflow: hidden; min-height: 460px; }
.gest-acceso-lado { color: #fff; padding: 2.5rem; background:
  radial-gradient(circle at 85% 15%, rgba(255,255,255,.12) 0, transparent 40%),
  linear-gradient(150deg, #0d3037 0%, #164e57 55%, #2f7f88 100%); }
.gest-acceso-lado .gest-punto { box-shadow: 0 0 0 2px rgba(255,255,255,.5); }
.gest-buscador > .ti { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,.55); pointer-events: none; }
.gest-buscador .form-control { width: 230px; padding-left: 32px; height: 34px; border-radius: 999px; background: rgba(255,255,255,.1); border-color: transparent; color: #fff; font-size: .82rem; transition: width .15s, background .15s; }
.gest-buscador .form-control::placeholder { color: rgba(255,255,255,.55); }
.gest-buscador .form-control:focus { width: 320px; background: rgba(255,255,255,.18); box-shadow: none; }
.gest-buscador-res { width: 380px; max-height: 70vh; overflow: auto; top: calc(100% + 6px); }
.gest-buscador-res .dropdown-item { white-space: normal; }

/* Barra a todo lo ancho: el menú cabe con la empresa, el buscador y el usuario */
.gest-menu > .nav-item > .nav-link { padding-left: .6rem !important; padding-right: .6rem !important; }
.gest-buscador .form-control { width: 190px; }
.gest-buscador .form-control:focus { width: 300px; }
@media (min-width: 992px) and (max-width: 1279.98px) { .gest-menu > .nav-item > .nav-link .ti { display: none; } .gest-empresa-actual .text-truncate { max-width: 120px !important; } }
