/* ============================================================================
   Brand Services — sistema de UI (2026)
   Tokens, chrome comun (menu lateral, barra superior) y componentes con prefijo
   bs-. Se carga DESPUES de style.css: las variables --bs-* que consume style.css
   se definen aqui. Cuatro colores de marca: rojo #bb0406, blanco, gris claro
   #c1c6c9 y gris oscuro #53565b. Esquina recta, sin sombras, Barlow.
   ========================================================================== */

:root{
  /* --- Paleta de marca --- */
  --bs-red:          #bb0406;  /* modulo activo, INGRESAR, vencidos, avisos */
  --bs-red-600:      #a30305;  /* hover */
  --bs-red-700:      #8c0204;  /* activo / texto rojo sobre claro */
  --bs-red-100:      #f9e8e8;  /* fondo de badge o alerta suave */
  --bs-white:        #ffffff;
  --bs-gray-light:   #c1c6c9;  /* bordes, iconos decorativos, texto >= 19px */
  --bs-gray-dark:    #53565b;  /* menu lateral, cabecera de tabla, cifras, boton oscuro */

  /* --- Derivados --- */
  --bs-ink:          #2b2d31;  /* texto principal */
  --bs-muted:        #63666b;  /* texto secundario (5.7:1 sobre blanco) */
  --bs-bg:           #f2f3f4;  /* fondo de la app */
  --bs-surface:      #ffffff;  /* tarjetas, tablas, modales */
  --bs-surface-2:    #f4f5f6;  /* banda de vehiculo, hover de fila */
  --bs-border:       #d5d9db;  /* linea estandar */
  --bs-border-soft:  #eceef0;  /* linea entre filas */
  --bs-gray-900:     #3d4045;  /* hover del menu y del boton oscuro */
  --bs-neutral-tag:  #e8eaec;  /* badge neutro */

  /* --- Tipografia --- */
  --bs-font-head: "Barlow Condensed", system-ui, sans-serif;
  --bs-font-body: "Barlow", system-ui, sans-serif;

  /* --- Espaciado --- */
  --bs-space-1: 4px;  --bs-space-2: 7px;  --bs-space-3: 10px;
  --bs-space-4: 14px; --bs-space-6: 20px; --bs-space-8: 28px;

  /* Esquinas (desde 27/09/2026, como Jira): etiquetas / controles / recuadros / columnas y modales */
  --bs-radius-sm: 3px;
  --bs-radius:    4px;
  --bs-radius-md: 6px;
  --bs-radius-lg: 8px;

  /* --- Layout --- */
  --bs-nav-w:            248px;
  --bs-nav-w-collapsed:   76px;
  --bs-topbar-h:          60px;
  --nav-w: var(--bs-nav-w-collapsed);
}
html.sidebar-expanded{ --nav-w: var(--bs-nav-w); }

/* ============================================================================
   Base
   ========================================================================== */
html, body{
  margin:0; width:100%; height:100%;
  font-family: var(--bs-font-body); color: var(--bs-ink); background: var(--bs-bg);
  -webkit-font-smoothing: antialiased;
}
body{ font-size:14px; line-height:1.45; }
h1,h2,h3,h4{ font-family: var(--bs-font-head); font-weight:600; line-height:1.12; margin:0; color: var(--bs-ink); }
a{ color: var(--bs-red); text-decoration:none; }
a:hover{ color: var(--bs-red-700); }
::placeholder{ color: var(--bs-muted); opacity:1; }
:focus-visible{ outline:2px solid var(--bs-red); outline-offset:2px; }
button, input, select, textarea{ font-family: inherit; }
img{ max-width:100%; }
svg{ display:inline-block; vertical-align:middle; }
.bs-ico{ width:1em; height:1em; flex:none; }

.bs-kicker{ font-family:var(--bs-font-head); font-size:11px; letter-spacing:.14em;
            text-transform:uppercase; color:var(--bs-red); }
.bs-muted{ color: var(--bs-muted); }
.bs-hide{ display:none !important; }

/* ============================================================================
   Layout: menu lateral fijo + contenido
   ========================================================================== */
.wrapper.vertical-sidebar{ min-height:100vh; }
#content{
  min-height:100vh; padding-left: var(--nav-w); position:relative;
  transition: padding-left .18s ease; box-sizing:border-box;
}
#page-content{ padding: 26px 28px 40px 40px; }
.wrapper-list{ position:relative; }
.wrapper-body{ position:relative; }

/* ============================================================================
   Menu lateral — gris oscuro, colapsado por defecto, rojo solo en el activo
   ========================================================================== */
#sidebar-left{
  position:fixed; top:0; left:0; bottom:0; z-index:1001;
  width: var(--nav-w); background: var(--bs-gray-dark); color:#fff;
  display:flex; flex-direction:column; padding:18px 0;
  transition: width .18s ease, transform .18s ease; box-sizing:border-box;
}
#sidebar-left .nav-bar{ display:flex; flex-direction:column; flex:1; min-height:0; }
#sidebar-left nav{ flex:1 1 auto; overflow-y:auto; overflow-x:hidden; }
#sidebar-left nav::-webkit-scrollbar{ width:0; }

.sidebar-toggle{
  position:absolute; top:22px; right:-13px; width:26px; height:26px;
  background:var(--bs-surface); border:1px solid var(--bs-border); color:var(--bs-gray-dark);
  font-family:var(--bs-font-head); font-size:15px; line-height:1; cursor:pointer;
  display:grid; place-items:center; padding:0; z-index:2;
}
.sidebar-toggle:hover{ border-color:var(--bs-red); color:var(--bs-red); }
.sidebar-toggle:before{ content:"\203A"; }               /* › colapsado */
.sidebar-expanded .sidebar-toggle:before{ content:"\2039"; } /* ‹ desplegado */

/* cabecera: logo + usuario */
.nav-brand{ display:flex; flex-direction:column; gap:10px; padding:0 18px 20px; }
.nav-brand .logo-full{ height:58px; width:auto; max-width:100%; display:block; }
.nav-brand .logo-mark{ width:46px; height:auto; display:none; margin:0 auto 18px; }
.nav-brand .nav-user{ font-size:11px; color:rgba(255,255,255,.5); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sidebar-collapsed .nav-brand{ padding:0; align-items:center; }
.sidebar-collapsed .nav-brand .logo-full,
.sidebar-collapsed .nav-brand .nav-user{ display:none; }
.sidebar-collapsed .nav-brand .logo-mark{ display:block; }

/* lista */
.menu-list{ list-style:none; margin:0; padding:0; }
.menu-list li{ display:block; }
.menu-list a{
  display:flex; align-items:center; gap:11px; padding:9px 18px;
  color:rgba(255,255,255,.66); font-size:14px; line-height:1.2;
  border-left:3px solid transparent; transition: background .15s, color .15s;
}
.menu-list a .bs-ico{ width:18px; height:18px; }
.menu-list a:hover{ color:#fff; background:rgba(255,255,255,.07); }
.menu-list a.active,
.menu-list a.submenu-active{ color:#fff; background:rgba(255,255,255,.09); border-left-color:var(--bs-red); }
.menu-list .ico-chevron{
  margin-left:auto; width:14px; height:14px; flex:none;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat center;
  opacity:.6; transition: transform .18s;
}
.menu-list .menu-parent.open > a .ico-chevron{ transform:rotate(180deg); }
.menu-list .submenu{ display:none; list-style:none; margin:0; padding:4px 0 8px 49px; }
.menu-list .menu-parent.open > .submenu{ display:block; }
.menu-list .submenu a{
  padding:6px 0; font-size:13px; color:rgba(255,255,255,.6); border-left:0; background:transparent;
}
.menu-list .submenu a:hover{ color:#fff; background:transparent; }
.menu-list .submenu a.active{ color:#fff; font-weight:500; background:transparent; }
.menu-list .submenu a .bs-ico{ display:none; }

/* colapsado: solo iconos, 44x44 centrados */
.sidebar-collapsed .menu-list a{
  width:44px; height:44px; padding:0; margin:0 auto; justify-content:center; gap:0;
  border-left:0; color:rgba(255,255,255,.62);
}
.sidebar-collapsed .menu-list a .bs-ico{ width:21px; height:21px; }
.sidebar-collapsed .menu-list a span,
.sidebar-collapsed .menu-list a .ico-chevron{ display:none; }
.sidebar-collapsed .menu-list a:hover{ color:#fff; background:rgba(255,255,255,.08); }
.sidebar-collapsed .menu-list a.active,
.sidebar-collapsed .menu-list a.submenu-active{ color:#fff; background:var(--bs-red); }
.sidebar-collapsed .menu-list .submenu{ display:none !important; }

/* salir */
.menu-footer{ margin-top:auto; padding-top:8px; }
.menu-footer a{
  display:flex; align-items:center; gap:11px; padding:9px 18px;
  color:rgba(255,255,255,.66); font-size:14px; border-left:3px solid transparent;
}
.menu-footer a .bs-ico{ width:18px; height:18px; }
.menu-footer a:hover{ color:#fff; background:rgba(255,255,255,.07); }
.sidebar-collapsed .menu-footer a{ width:44px; height:44px; padding:0; margin:0 auto; justify-content:center; border-left:0; }
.sidebar-collapsed .menu-footer a .bs-ico{ width:21px; height:21px; }
.sidebar-collapsed .menu-footer a span{ display:none; }
.menu-footer a .icon-loader{ display:none; }

/* cabecera movil (oculta en escritorio) */
.header-mobile{
  display:none; position:fixed; top:0; left:0; right:0; z-index:1000; height:60px;
  background:var(--bs-gray-dark); align-items:center; justify-content:space-between; padding:0 18px;
}
.header-mobile .logo{ height:30px; width:auto; display:block; }
.header-mobile #btn-menu-mobile{
  width:40px; height:40px; display:grid; place-items:center; color:#fff; border:0; background:transparent; padding:0;
}
.header-mobile #btn-menu-mobile .bs-ico{ width:24px; height:24px; }

/* ============================================================================
   Barra superior — 60px, blanca, linea inferior
   ========================================================================== */
.bs-topbar{
  position:sticky; top:0; z-index:50;
  height:var(--bs-topbar-h); display:flex; align-items:center; gap:20px;
  padding:0 28px 0 40px; background:var(--bs-surface); border-bottom:1px solid var(--bs-border);
}
.bs-crumbs{ display:flex; align-items:center; gap:8px; font-size:13px; color:var(--bs-muted); min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bs-crumbs a{ color:var(--bs-muted); }
.bs-crumbs a:hover{ color:var(--bs-ink); }
.bs-crumbs .is-current{ color:var(--bs-ink); }
.bs-topbar-spacer{ flex:1; }
.bs-search{
  display:flex; align-items:center; gap:8px; width:280px; height:36px;
  border:1px solid var(--bs-border); padding:0 10px; background:var(--bs-surface); color:var(--bs-muted);
  position:relative; box-sizing:border-box;
}
.bs-search:focus-within{ border-color:var(--bs-red); }
.bs-search .bs-ico{ width:16px; height:16px; }
.bs-search input{
  flex:1; min-width:0; height:34px; border:0; outline:none; background:transparent;
  font:inherit; font-size:13px; color:var(--bs-ink); padding:0;
}
.bs-search input::-webkit-search-cancel-button{ -webkit-appearance:none; }
.bs-search .btn-search{ display:grid; place-items:center; color:var(--bs-muted); }
.bs-search .btn-search:hover{ color:var(--bs-ink); }
/* "x" en circulo para borrar la busqueda (jquery.app.main.js): solo con texto */
.bs-search-clear{ display:none; place-items:center; flex:none; width:22px; height:22px; padding:0; border:0; border-radius:50%;
  background:transparent; color:var(--bs-muted); cursor:pointer; }
.bs-search.has-q .bs-search-clear{ display:grid; }
.bs-search-clear:hover, .bs-search-clear:focus-visible{ color:var(--bs-ink); background:var(--bs-surface-2); outline:0; }

.bs-icon-btn{
  width:36px; height:36px; display:grid; place-items:center; border:1px solid var(--bs-border);
  background:var(--bs-surface); color:var(--bs-gray-dark); position:relative; cursor:pointer; padding:0; box-sizing:border-box;
}
.bs-icon-btn:hover{ border-color:var(--bs-gray-light); background:var(--bs-surface-2); }
.bs-icon-btn .bs-ico{ width:17px; height:17px; }
.bs-badge-count{
  position:absolute; top:-5px; right:-5px; min-width:16px; height:16px;
  background:var(--bs-red); color:#fff; font-size:10px; font-family:var(--bs-font-head);
  display:grid; place-items:center; padding:0 3px; line-height:1; box-sizing:border-box;
}
#notif-qty:empty{ display:none; }
#notif-qty .notif-qty{ display:contents; }

.bs-user-chip{ display:flex; align-items:center; gap:9px; }
.bs-avatar{
  width:32px; height:32px; background:var(--bs-gray-dark); color:#fff; display:grid; place-items:center;
  font-family:var(--bs-font-head); font-size:12px; flex:none; overflow:hidden;
}
.bs-avatar img{ width:100%; height:100%; object-fit:cover; display:block; }
.bs-user-chip .bs-user-name{ font-size:13px; font-weight:500; line-height:1.15; white-space:nowrap; }
.bs-user-chip .bs-user-role{ font-size:11px; color:var(--bs-muted); line-height:1.15; }

/* dropdown de la campana (lo llena jquery.notification.admin.js) */
.space-notifiy{ position:relative; }
.dropdown-notice{
  display:none; position:absolute; right:0; top:44px; z-index:60; min-width:620px; max-width:calc(100vw - 40px);
  background:var(--bs-surface); border:1px solid var(--bs-border); padding:14px 16px; cursor:auto; text-align:left;
}
.dropdown-notice.active{ display:block; }
.dropdown-notice ul{ margin:0; padding:0; list-style:none; max-height:320px; overflow:auto; }
.dropdown-notice ul li{ display:block; font-size:13px; color:var(--bs-ink); }
.dropdown-notice ul li.header b{ display:block; font-family:var(--bs-font-head); font-size:16px; padding:0 0 8px; color:var(--bs-ink); }
.dropdown-notice ul li.item{ border-top:1px solid var(--bs-border-soft); }
.dropdown-notice ul li.item .option{ display:block; padding:7px 10px; color:var(--bs-ink); cursor:pointer; overflow:hidden; }
.dropdown-notice ul li.item .option.clickable:hover{ background:var(--bs-surface-2); }
.dropdown-notice .col-head{ cursor:default; color:var(--bs-muted); font-size:11px; text-transform:uppercase; letter-spacing:.06em; }
.dropdown-notice .col-head:hover{ background:transparent; }
.dropdown-notice .status{ display:inline-block; width:10px; height:10px; margin-top:6px; }
#highlight-background{ display:none; }

/* ============================================================================
   Cabecera de pagina
   ========================================================================== */
.bs-page-head{ display:flex; align-items:flex-end; gap:16px; flex-wrap:wrap; margin-bottom:20px; }
.bs-page-head .bs-page-title{ flex:1; min-width:0; }
.bs-page-head .bs-kicker{ margin-bottom:2px; }
.bs-page-head h1{ font-size:32px; line-height:1.05; }
.bs-page-head .bs-page-sub{ font-size:13px; color:var(--bs-muted); margin-top:3px; }
.bs-page-actions{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; justify-content:flex-end; }

/* ============================================================================
   Botones — rectos; el rojo NO es el boton por defecto
   ========================================================================== */
.bs-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  font-family:var(--bs-font-head); font-weight:600; font-size:14px; letter-spacing:.01em;
  height:36px; padding:0 14px; border:1px solid var(--bs-border); background:var(--bs-surface);
  color:var(--bs-ink); border-radius:var(--bs-radius); cursor:pointer; text-decoration:none; white-space:nowrap;
  box-sizing:border-box; line-height:1; transition: background .15s, border-color .15s, color .15s;
}
.bs-btn:hover{ background:var(--bs-surface-2); border-color:var(--bs-gray-light); color:var(--bs-ink); }
.bs-btn:active{ background:#eceef0; }
.bs-btn[disabled], .bs-btn.is-disabled{ opacity:.45; cursor:not-allowed; pointer-events:none; }
.bs-btn .bs-ico{ width:15px; height:15px; }
.bs-btn--lg{ height:40px; padding:0 16px; }
.bs-btn--sm{ height:32px; padding:0 12px; font-size:13px; }
.bs-btn--dark{ background:var(--bs-red); border-color:var(--bs-red); color:#fff; }
.bs-btn--dark:hover{ background:var(--bs-red-600); border-color:var(--bs-red-600); color:#fff; }
.bs-btn--red{ background:var(--bs-red); border-color:var(--bs-red); color:#fff; }
.bs-btn--red:hover{ background:var(--bs-red-600); border-color:var(--bs-red-600); color:#fff; }
.bs-btn--ghost{ border-color:transparent; background:transparent; }
.bs-btn--ghost:hover{ border-color:var(--bs-border); }
.bs-btn--block{ width:100%; }
.bs-btn.is-on{ background:var(--bs-gray-dark); border-color:var(--bs-gray-dark); color:#fff; }
.bs-btn-icon{ width:36px; padding:0; }
.bs-btn-icon.bs-btn--sm{ width:32px; }

/* acciones de fila: icono plano */
.bs-act{
  display:inline-grid; place-items:center; width:26px; height:26px; color:var(--bs-muted);
  background:transparent; border:0; padding:0; cursor:pointer; text-decoration:none;
}
.bs-act .bs-ico{ width:16px; height:16px; }
.bs-act:hover{ color:var(--bs-gray-dark); }
.bs-act--danger:hover{ color:var(--bs-red); }
.bs-act.is-locked{ opacity:.45; cursor:not-allowed; }
.bs-act.is-locked:hover{ color:var(--bs-muted); }
.bs-link-pdf{ display:inline-flex; align-items:center; gap:4px; font-size:12px; color:var(--bs-red); white-space:nowrap; }
.bs-link-pdf .bs-ico{ width:14px; height:14px; }
.bs-link-pdf:hover{ color:var(--bs-red-700); }

/* Segmentado (Grupos / Lista) */
.bs-seg{ display:inline-flex; border:1px solid var(--bs-border); background:var(--bs-surface); height:36px; box-sizing:border-box; }
.bs-seg > *{
  display:inline-flex; align-items:center; padding:0 14px; font-size:13px; font-family:var(--bs-font-head); font-weight:600;
  cursor:pointer; border:0; background:transparent; color:var(--bs-ink);
}
.bs-seg > * + *{ border-left:1px solid var(--bs-border); }
.bs-seg > .is-active{ background:var(--bs-gray-dark); color:#fff; }

/* Popover (Exportar / Filtrar) */
.bs-pop-wrap{ position:relative; }
.bs-pop{
  display:none; position:absolute; top:calc(100% + 6px); right:0; z-index:40;
  width:250px; background:var(--bs-surface); border:1px solid var(--bs-border); padding:12px; text-align:left; box-sizing:border-box;
}
.bs-pop-wrap.open > .bs-pop, .bs-pop.is-open{ display:block; }
.bs-pop-title{ font-family:var(--bs-font-head); font-size:11px; letter-spacing:.1em; text-transform:uppercase; color:var(--bs-muted); padding:2px 4px 8px; }
.bs-pop-option{
  display:block; width:100%; text-align:left; border:0; background:transparent; font:inherit; font-size:14px;
  padding:9px 10px; cursor:pointer; color:var(--bs-ink);
}
.bs-pop-option:hover{ background:var(--bs-surface-2); }

/* ============================================================================
   Campos
   ========================================================================== */
.bs-field{ display:flex; flex-direction:column; gap:5px; min-width:0; }
.bs-field > label{ display:block; font-size:12px; color:var(--bs-muted); float:none; width:auto; margin:0; font-weight:400; line-height:1.3; }
.bs-input, .bs-select, .bs-textarea{
  width:100%; min-height:42px; padding:0 10px; font:inherit; font-size:14px;
  background:var(--bs-surface); color:var(--bs-ink); border:1px solid var(--bs-border); border-radius:var(--bs-radius); outline:none; box-sizing:border-box;
}
.bs-textarea{ padding:10px; min-height:100px; resize:vertical; }
.bs-input:hover, .bs-select:hover, .bs-textarea:hover{ border-color:var(--bs-gray-light); }
.bs-input:focus, .bs-select:focus, .bs-textarea:focus{ border-color:var(--bs-red); }
.bs-input[readonly], .bs-input:disabled{ background:var(--bs-surface-2); color:var(--bs-muted); }
.bs-select{
  -webkit-appearance:none; appearance:none; padding-right:32px; cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2363666b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 10px center;
}
.bs-input-wrap{ display:flex; align-items:center; border:1px solid var(--bs-border); background:var(--bs-surface); }
.bs-input-wrap:focus-within{ border-color:var(--bs-red); }
.bs-input-wrap .bs-input-ico{ display:grid; place-items:center; width:40px; height:42px; color:var(--bs-muted); flex:none; }
.bs-input-wrap .bs-input-ico .bs-ico{ width:17px; height:17px; }
.bs-input-wrap input{ flex:1; min-width:0; height:42px; border:0; outline:none; font:inherit; font-size:14px; padding:0 10px 0 0; background:transparent; color:var(--bs-ink); }
.bs-input-wrap .bs-eye{ width:42px; height:42px; flex:none; border:0; background:transparent; color:var(--bs-muted); cursor:pointer; display:grid; place-items:center; padding:0; }
.bs-input-wrap .bs-eye:hover{ color:var(--bs-gray-dark); }
.bs-check{ display:flex; align-items:center; gap:8px; font-size:13px; color:var(--bs-ink); cursor:pointer; margin:0; float:none; width:auto; font-weight:400; }
.bs-check input[type="checkbox"], .bs-check input[type="radio"]{ width:16px; height:16px; margin:0 !important; float:none; accent-color:var(--bs-red); flex:none; }
.bs-form-grid{ display:grid; grid-template-columns:1fr 1fr; gap:14px 18px; }
.bs-form-grid .bs-span-2{ grid-column:1 / -1; }
.bs-form-section{ font-family:var(--bs-font-head); font-size:11px; letter-spacing:.12em; text-transform:uppercase; color:var(--bs-muted); padding-top:6px; border-top:1px solid var(--bs-border); margin-top:6px; }
.bs-help{ font-size:12px; color:var(--bs-muted); }
.warning, span.wpcf7-not-valid-tip, .msj-required{
  display:block; font-size:12px; color:var(--bs-red); margin:4px 0 0; padding:0; background:transparent; border-radius:0;
}

/* ============================================================================
   Tarjetas y KPI
   ========================================================================== */
.bs-card{ background:var(--bs-surface); border:1px solid var(--bs-border); border-radius:var(--bs-radius-md); padding:14px 16px; box-sizing:border-box; }
.bs-card--pad{ padding:20px 22px; }
.bs-card--hover:hover{ border-color:var(--bs-red); }
.bs-card-title{ font-family:var(--bs-font-head); font-size:18px; margin:0 0 12px; }
.bs-kpi-grid{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:18px; }
.bs-kpi-grid--3{ grid-template-columns:repeat(3, minmax(0,1fr)); }
.bs-kpi{ display:flex; flex-direction:column; gap:2px; }
.bs-kpi-label{ font-family:var(--bs-font-head); font-size:10px; letter-spacing:.12em; text-transform:uppercase; color:var(--bs-muted); }
.bs-kpi-row{ display:flex; align-items:baseline; gap:8px; }
.bs-kpi-value{ font-family:var(--bs-font-head); font-size:34px; line-height:1; color:var(--bs-gray-dark); }
.bs-kpi-value--alert{ color:var(--bs-red); }
.bs-kpi-note{ font-size:12px; color:var(--bs-muted); }

/* ============================================================================
   Tablas — cabecera gris oscuro, filas aireadas, badges pastel
   ========================================================================== */
.bs-panel{ background:var(--bs-surface); border:1px solid var(--bs-border); display:flex; flex-direction:column; min-width:0; }
.bs-table-scroll{ overflow-x:auto; min-height:0; }
.bs-table{ width:100%; border-collapse:collapse; font-size:14px; background:var(--bs-surface); }
.bs-table thead th{
  background:var(--bs-gray-dark); color:rgba(255,255,255,.82); font-family:var(--bs-font-body);
  font-size:11px; font-weight:500; letter-spacing:.08em; text-transform:uppercase;
  text-align:left; padding:11px 12px; border:0; white-space:nowrap; position:sticky; top:0; z-index:1;
}
.bs-table thead th.sortable{ cursor:pointer; user-select:none; }
.bs-table thead th.sortable:hover{ color:#fff; }
.bs-table thead th .sort-ind{ opacity:.5; font-size:10px; margin-left:4px; }
.bs-table thead th.is-sorted{ color:#fff; }
.bs-table thead th.is-sorted .sort-ind{ opacity:1; }
.bs-table thead th.bs-num, .bs-table td.bs-num{ text-align:right; }
.bs-table tbody td{ padding:9px 12px; border-bottom:1px solid var(--bs-border-soft); vertical-align:middle; color:var(--bs-ink); }
.bs-table tbody tr:hover > td{ background:var(--bs-surface-2); }
.bs-table td.bs-dim{ color:var(--bs-muted); }
.bs-table td.bs-idx{ color:var(--bs-muted); font-size:12px; }
.bs-table .bs-nowrap{ white-space:nowrap; }
.bs-table-actions{ display:flex; gap:10px; align-items:center; justify-content:flex-end; }
.bs-table-empty td{ padding:28px 12px; text-align:center; color:var(--bs-muted); }
.bs-table--flat thead th{ position:static; }

/* Banda de agrupacion por vehiculo (vista Grupos) */
.bs-group-row > td{ background:var(--bs-surface-2); padding:11px 12px; border-top:1px solid var(--bs-border); border-bottom:1px solid var(--bs-border); }
.bs-table tbody tr.bs-group-row:hover > td{ background:var(--bs-surface-2); }
.bs-group-inner{ display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.bs-group-serie{ font-family:var(--bs-font-head); font-size:17px; color:var(--bs-gray-dark); }
.bs-group-fields{ display:flex; gap:16px; flex-wrap:wrap; font-size:12px; color:var(--bs-muted); }
.bs-group-fields b{ font-weight:500; color:var(--bs-ink); }
.bs-group-spacer{ flex:1; }
.bs-group-count{ font-size:12px; color:var(--bs-muted); white-space:nowrap; }
.bs-group-actions{ display:flex; align-items:center; gap:10px; }
.bs-btn-mini{
  font-family:var(--bs-font-head); font-weight:600; font-size:13px; border:1px solid var(--bs-border); padding:4px 10px;
  color:var(--bs-ink); background:var(--bs-surface); cursor:pointer; text-decoration:none; line-height:1.2; white-space:nowrap;
}
.bs-btn-mini:hover{ border-color:var(--bs-red); color:var(--bs-red); }
.bs-row-inactive, .bs-row-inactive > td{ opacity:.55; }
.bs-table tbody tr.bs-empty-sub td{ color:var(--bs-muted); font-style:italic; font-size:13px; }

/* Vencimiento: el unico dato que se tine de rojo en la tabla */
.bs-status{ font-weight:500; color:var(--bs-gray-dark); white-space:nowrap; }
.bs-status--vencido{ color:var(--bs-red); }

/* Badge. Colores por tipo: product_model::typeColorsPastel(); no hardcodear aqui. */
.bs-tag{ display:inline-flex; align-items:center; font-size:11px; padding:3px 10px; line-height:1.4; border-radius:var(--bs-radius-sm); white-space:nowrap; font-weight:500; }
.bs-tag--neutral{ background:var(--bs-neutral-tag); color:var(--bs-gray-dark); }
.bs-tag--danger{ background:var(--bs-red-100); color:var(--bs-red-700); }
.bs-tag--ok{ background:#D1FAE5; color:#047857; }
.bs-tag--warn{ background:#FEF3C7; color:#B45309; }
.bs-tag--info{ background:#DBEAFE; color:#1D4ED8; }
.bs-tag--orange{ background:#FFEAD5; color:#C2410C; }

/* ============================================================================
   Paginacion (propia y DataTables)
   ========================================================================== */
.bs-pag{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 16px; border-top:1px solid var(--bs-border); flex-wrap:wrap; }
.bs-pag-info{ font-size:12px; color:var(--bs-muted); }
.bs-pag-nav{ display:flex; gap:6px; align-items:center; flex-wrap:wrap; justify-content:flex-end; }
.bs-pag-nav a, .bs-pag-nav button, .bs-pag-nav .paginate_button{
  width:30px; height:30px; min-width:30px; display:inline-grid; place-items:center; padding:0; margin:0; box-sizing:border-box;
  border:1px solid var(--bs-border) !important; background:var(--bs-surface) !important; color:var(--bs-ink) !important;
  font-family:var(--bs-font-head); font-size:13px; cursor:pointer; text-decoration:none; border-radius:var(--bs-radius) !important;
}
.bs-pag-nav a:hover, .bs-pag-nav button:hover:not(:disabled), .bs-pag-nav .paginate_button:hover{ border-color:var(--bs-gray-dark) !important; background:var(--bs-surface) !important; color:var(--bs-ink) !important; }
.bs-pag-nav .is-active, .bs-pag-nav .paginate_button.current, .bs-pag-nav .paginate_button.current:hover{
  background:var(--bs-gray-dark) !important; border-color:var(--bs-gray-dark) !important; color:#fff !important;
}
.bs-pag-nav button:disabled, .bs-pag-nav .paginate_button.disabled, .bs-pag-nav .paginate_button.disabled:hover{
  opacity:.4; cursor:default; color:var(--bs-muted) !important; border-color:var(--bs-border) !important;
}
.bs-pag-nav .bs-pag-gap, .bs-pag-nav .ellipsis{ color:var(--bs-muted); padding:0 2px; border:0 !important; background:transparent !important; width:auto; min-width:0; }
.bs-pag-nav .paginate_button.first, .bs-pag-nav .paginate_button.last{ display:none; }
/* DataTables dentro de un panel bs: la paginacion se pinta con este mismo look */
.bs-panel .dataTables_wrapper{ display:flex; flex-direction:column; min-height:0; }
.bs-panel .dataTables_paginate{ position:static !important; height:auto !important; text-align:right; display:flex; gap:6px; justify-content:flex-end; }
.bs-panel .dataTables_paginate .paginate_button{
  width:30px; height:30px; min-width:30px; display:inline-grid !important; place-items:center; padding:0 !important; margin:0 !important; box-sizing:border-box;
  border:1px solid var(--bs-border) !important; background:var(--bs-surface) !important; color:var(--bs-ink) !important;
  font-family:var(--bs-font-head); font-size:13px !important; font-weight:600; border-radius:var(--bs-radius) !important; text-indent:0 !important;
}
.bs-panel .dataTables_paginate .paginate_button.current,
.bs-panel .dataTables_paginate .paginate_button.current:hover{ background:var(--bs-gray-dark) !important; border-color:var(--bs-gray-dark) !important; color:#fff !important; }
.bs-panel .dataTables_paginate .paginate_button:hover{ border-color:var(--bs-gray-dark) !important; }
.bs-panel .dataTables_paginate .paginate_button.disabled{ opacity:.4; cursor:default; }
.bs-panel .dataTables_paginate .paginate_button.first,
.bs-panel .dataTables_paginate .paginate_button.last{ display:none !important; }
.bs-panel .dataTables_paginate .paginate_button.previous,
.bs-panel .dataTables_paginate .paginate_button.next{ display:inline-grid !important; background-image:none !important; }
.bs-panel .dataTables_paginate .ellipsis{ display:inline-grid; place-items:center; color:var(--bs-muted); padding:0 4px; }
.bs-panel .dataTables_processing{ margin:0 !important; text-indent:-9999em; background-size:80px !important; }
.bs-panel table.dataTable{ margin:0 !important; }
.bs-panel table.dataTable thead th.sorting,
.bs-panel table.dataTable thead th.sorting_asc,
.bs-panel table.dataTable thead th.sorting_desc{ background-image:none; }
.bs-panel table.dataTable.bs-table--sortable thead th.sorting:after{ content:" \21C5"; opacity:.5; font-size:11px; }
.bs-panel table.dataTable.bs-table--sortable thead th.sorting_asc:after{ content:" \2191"; }
.bs-panel table.dataTable.bs-table--sortable thead th.sorting_desc:after{ content:" \2193"; }
.bs-panel table.dataTable thead th.sorting_asc,
.bs-panel table.dataTable thead th.sorting_desc{ color:#fff; }

/* Barra de la tabla: titulo + contador + acciones */
.bs-toolbar{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:0 0 14px; }
.bs-toolbar h2, .bs-toolbar h3{ font-size:20px; }
.bs-toolbar .bs-count{ font-size:12px; color:var(--bs-muted); }
.bs-toolbar .bs-spacer{ flex:1; }

/* ============================================================================
   Estado vacio y carga
   ========================================================================== */
.bs-empty{ background:var(--bs-surface); border:1px solid var(--bs-border); padding:40px 30px; display:flex; flex-direction:column; align-items:center; gap:14px; text-align:center; }
.bs-empty-ico{ width:56px; height:56px; border:1px solid var(--bs-border); display:grid; place-items:center; color:var(--bs-muted); }
.bs-empty-ico .bs-ico{ width:26px; height:26px; }
.bs-empty-title{ font-family:var(--bs-font-head); font-size:22px; max-width:340px; }
.bs-empty-text{ font-size:14px; color:var(--bs-muted); max-width:380px; }
.bs-loading{ padding:40px 20px; text-align:center; color:var(--bs-muted); font-size:14px; }

/* ============================================================================
   Modales — panel blanco, borde fino, X arriba a la derecha
   ========================================================================== */
.modal-style .owp-qv-overlay{ background:rgba(20,20,22,.5); }
.owp-qv-content-inner{
  background:var(--bs-surface) !important; border:1px solid var(--bs-border); border-radius:var(--bs-radius-lg) !important; box-shadow:none !important;
  padding:24px 26px 26px !important; color:var(--bs-ink);
}
.modal-style .owp-qv-content-inner .owp-qv-close-inter{
  color:var(--bs-muted); font-size:28px; font-weight:300; width:34px; height:34px; line-height:34px; margin:10px 10px 0 0;
}
.modal-style .owp-qv-content-inner .owp-qv-close-inter:hover{ color:var(--bs-ink); }
.form-title{ color:var(--bs-ink) !important; font-family:var(--bs-font-head); font-size:24px !important; font-weight:600 !important; margin:0 0 16px !important; text-align:left; padding-right:30px; }
.owp-qv-content-inner .form-title + .style-form{ padding-top:2px; }

/* Campos dentro de los formularios existentes (.style-form.module_import) */
.style-form.module_import .control-field-upload,
.style-form.module_import select,
.style-form.module_import textarea,
.style-form.module_import input[type="text"],
.style-form.module_import input[type="password"],
.style-form.module_import input[type="email"],
.style-form.module_import input[type="number"],
.style-form.module_import input[type="search"]{
  height:40px; min-height:40px; margin:4px 0 12px; padding:0 12px; font-size:14px; font-weight:400; color:var(--bs-ink);
  background:var(--bs-surface) !important; border:1px solid var(--bs-border) !important; border-radius:var(--bs-radius) !important; line-height:1.4;
}
.style-form.module_import select{ -webkit-appearance:none; appearance:none; padding-right:32px; cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2363666b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat:no-repeat !important; background-position:right 10px center !important; }
.style-form.module_import .control-field-select .icon-right{ display:none; }
.style-form.module_import .control-field-upload .icon-right{ right:10px !important; top:8px !important; }
.style-form.module_import .control-field-upload .text{ line-height:38px; height:38px; color:var(--bs-muted); padding:0 30px 0 12px; font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.style-form.module_import textarea{ height:auto; min-height:96px; padding:10px 12px !important; }
.style-form.module_import input:focus, .style-form.module_import select:focus, .style-form.module_import textarea:focus{ border-color:var(--bs-red) !important; }
.style-form.module_import input::placeholder, .style-form.module_import textarea::placeholder{ color:var(--bs-muted) !important; text-transform:none !important; font-weight:400 !important; font-size:14px !important; }
.style-form.module_import input[type="text"]::placeholder,
.style-form.module_import input[type="email"]::placeholder,
.style-form.module_import input[type="password"]::placeholder{ color:var(--bs-muted); }
.style-form label{ color:var(--bs-muted); font-size:12px; font-weight:400; margin-bottom:0; line-height:1.4; }
.style-form.module_import .control-field-content .icon-right{ background:transparent; height:40px; width:40px; display:grid; place-items:center; }
.style-form.module_import .control-field-content .icon-right i{ margin:0; }
.style-form.module_import .control-field-content input{ height:40px !important; padding:0 12px 0 40px !important; background:var(--bs-surface) !important; border:1px solid var(--bs-border) !important; font-size:14px !important; }
.style-form.module_import .control-field-content input::placeholder{ text-transform:none !important; font-weight:400 !important; font-size:14px !important; color:var(--bs-muted) !important; }

/* Botones de los formularios existentes: submit = boton oscuro, button = outline */
.style-form.module_import input[type="submit"],
.style-form.module_import a.btn-type{
  font-family:var(--bs-font-head); font-size:15px; font-weight:600; text-transform:none; letter-spacing:.01em;
  line-height:38px; height:40px; padding:0 18px; color:#fff; background:var(--bs-gray-dark); border:1px solid var(--bs-gray-dark);
  border-radius:var(--bs-radius); display:inline-block; margin:8px 0 0; cursor:pointer;
}
.style-form.module_import input[type="submit"]:hover,
.style-form.module_import a.btn-type:hover{ color:#fff; background:var(--bs-gray-900); border-color:var(--bs-gray-900); }
.style-form.module_import button{
  font-family:var(--bs-font-head); font-size:15px; font-weight:600; text-transform:none; letter-spacing:.01em;
  line-height:38px; height:40px; padding:0 18px; color:var(--bs-ink); background:var(--bs-surface); border:1px solid var(--bs-border);
  border-radius:var(--bs-radius); display:inline-block; margin:8px 0 0; cursor:pointer;
}
.style-form.module_import button:hover{ color:var(--bs-ink); background:var(--bs-surface-2); border-color:var(--bs-gray-light); }
.style-form.module_import .btn-type-2{ background:var(--bs-red) !important; border-color:var(--bs-red) !important; color:#fff !important; height:46px; line-height:44px !important; font-size:15px; letter-spacing:.06em; }
.style-form.module_import .btn-type-2:hover{ background:var(--bs-red-600) !important; border-color:var(--bs-red-600) !important; color:#fff !important; }
.btn-fix-col-1{ width:40px !important; height:40px !important; line-height:38px !important; font-size:22px !important; margin:4px 0 0 !important; border-radius:var(--bs-radius) !important; }
.form-button-right{ height:40px; line-height:38px !important; font-size:15px !important; margin-top:4px !important; }
.btn-row, a.btn-primary{
  height:32px; line-height:30px; padding:0 14px; font-family:var(--bs-font-head); font-weight:600; font-size:13px;
  color:var(--bs-ink); background:var(--bs-surface); border:1px solid var(--bs-border); border-radius:var(--bs-radius);
}
.btn-row:hover, a.btn-primary:hover{ color:var(--bs-ink); background:var(--bs-surface-2); border:1px solid var(--bs-gray-light); }
.alert{ font-size:13px; line-height:1.4; padding:10px 12px; text-align:left; margin-top:12px; border:1px solid; }
.alert-success{ color:#047857; background:#D1FAE5; border-color:#a7e9cf; }
.alert-danger{ color:var(--bs-red-700); background:var(--bs-red-100); border-color:#eec5c5; }

/* jquery-confirm y toasts: mismo lenguaje */
.jconfirm.jconfirm-light .jconfirm-box{ border-radius:var(--bs-radius-lg) !important; border:1px solid var(--bs-border); box-shadow:none !important; font-family:var(--bs-font-body); }
.jconfirm .jconfirm-box div.jconfirm-title-c .jconfirm-title{ font-family:var(--bs-font-head) !important; font-weight:600 !important; font-size:22px !important; color:var(--bs-ink); }
.jconfirm .jconfirm-box .jconfirm-buttons button.btn{ border-radius:var(--bs-radius) !important; font-family:var(--bs-font-head); font-weight:600; font-size:14px; text-transform:none; box-shadow:none !important; padding:0 14px; height:36px; }
.jconfirm .jconfirm-box .jconfirm-buttons button.btn-red{ background:var(--bs-red) !important; color:#fff !important; }
.jconfirm .jconfirm-box .jconfirm-buttons button.btn-red:hover{ background:var(--bs-red-600) !important; }
.jconfirm .jconfirm-box .jconfirm-buttons button.btn-default{ background:var(--bs-surface) !important; color:var(--bs-ink) !important; border:1px solid var(--bs-border) !important; }
.jconfirm .jconfirm-box .jconfirm-buttons button.btn-blue,
.jconfirm .jconfirm-box .jconfirm-buttons button.btn-dark{ background:var(--bs-gray-dark) !important; color:#fff !important; }
.jq-toast-wrap .jq-toast-single{ border-radius:var(--bs-radius-md) !important; font-family:var(--bs-font-body); font-size:13px; box-shadow:none; }

/* ============================================================================
   Login
   ========================================================================== */
.page-login{ background:var(--bs-surface); }
.bs-login{ display:flex; min-height:100vh; background:var(--bs-surface); }
.bs-login-photo{ flex:0 0 54%; position:relative; overflow:hidden; background:#1a1a1c; min-height:100vh; }
.bs-login-photo img{ width:100%; height:100%; object-fit:cover; display:block; position:absolute; inset:0; }
.bs-login-caption{ position:absolute; inset:auto 0 0 0; padding:40px 44px; background:linear-gradient(to top, rgba(20,20,22,.88), rgba(20,20,22,0)); }
.bs-login-caption .bs-kicker{ color:rgba(255,255,255,.72); letter-spacing:.18em; margin-bottom:6px; }
.bs-login-caption h2{ font-size:34px; line-height:1.1; color:#fff; max-width:460px; }
.bs-login-side{ flex:1; min-width:0; display:flex; align-items:center; justify-content:center; padding:48px; }
.bs-login-form{ width:400px; max-width:100%; display:flex; flex-direction:column; gap:22px; }
.bs-login-form .bs-login-logo{ width:186px; height:auto; display:block; }
.bs-login-form h1{ font-size:30px; }
.bs-login-form .bs-login-sub{ font-size:14px; color:var(--bs-muted); margin-top:4px; }
.bs-login-form .bs-btn--red{ height:46px; font-size:15px; letter-spacing:.06em; }
.bs-login-foot{ display:flex; justify-content:space-between; align-items:center; font-size:13px; flex-wrap:wrap; gap:8px; }
.bs-login-foot .bs-version{ color:var(--bs-muted); }
.bs-login-form .warning{ margin-top:6px; }
.bs-login-form .space-alert:empty{ display:none; }
/* pantallas de recuperacion de clave: misma tarjeta */
.bs-login-form .bs-login-back{ font-size:13px; }

/* ============================================================================
   Inicio (home)
   ========================================================================== */
.bs-home{ display:flex; flex-direction:column; gap:34px; padding:22px 0 0; }
.bs-home-hello h1{ font-size:42px; line-height:1.05; }
.bs-home-hello .bs-kicker{ letter-spacing:.16em; margin-bottom:4px; }
.bs-home-hello .bs-home-sub{ font-size:14px; color:var(--bs-muted); margin-top:4px; }
.bs-modules{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:26px; max-width:1100px; }
.bs-module{
  background:var(--bs-surface); border:1px solid var(--bs-border); padding:30px 30px 26px; display:flex; flex-direction:column; gap:18px;
  color:var(--bs-ink); min-height:230px; box-sizing:border-box; transition: border-color .15s;
}
.bs-module:hover{ border-color:var(--bs-red); color:var(--bs-ink); }
.bs-module-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.bs-module-ico{ width:56px; height:56px; flex:none; border:1px solid var(--bs-border); display:grid; place-items:center; color:var(--bs-gray-dark); }
.bs-module-ico .bs-ico{ width:28px; height:28px; }
.bs-module-arrow{ font-family:var(--bs-font-head); font-size:22px; color:var(--bs-muted); line-height:1; }
.bs-module:hover .bs-module-arrow{ color:var(--bs-red); }
.bs-module-body{ flex:1; display:flex; flex-direction:column; gap:6px; }
.bs-module-title{ font-family:var(--bs-font-head); font-size:26px; line-height:1.1; font-weight:600; }
.bs-module-desc{ font-size:14px; color:var(--bs-muted); }
.bs-module-tags{ display:flex; gap:8px; flex-wrap:wrap; }
.bs-module-tags .bs-tag{ background:#eff0f1; color:var(--bs-gray-900); }
/* Tableros (29/09/2026): tarjetas de espacios mas compactas (el Inicio conserva las grandes) */
.page-tableros .bs-modules{ grid-template-columns:repeat(3, minmax(0,1fr)); gap:16px; max-width:1200px; }
.page-tableros .bs-module{ padding:18px 20px 16px; gap:12px; min-height:0; }
.page-tableros .bs-module-ico{ width:40px; height:40px; }
.page-tableros .bs-module-ico .bs-ico{ width:20px; height:20px; }
.page-tableros .bs-module-arrow{ font-size:18px; }
.page-tableros .bs-module-body{ gap:4px; }
.page-tableros .bs-module-title{ font-size:20px; }
.page-tableros .bs-module-desc{ font-size:13px; }
@media (max-width: 1200px){ .page-tableros .bs-modules{ grid-template-columns:repeat(2, minmax(0,1fr)); } }

/* ============================================================================
   Bloqueador de pantalla y loaders (mismo lenguaje)
   ========================================================================== */
.page-blocker .page-blocker-card{ border-radius:var(--bs-radius-md); border:1px solid var(--bs-border); box-shadow:none; }
.page-blocker .page-blocker-title{ font-family:var(--bs-font-head); font-size:18px; font-weight:600; }
.page-blocker .page-blocker-bar{ stroke:var(--bs-red); }
.icon-loader{ display:inline-grid; place-items:center; margin-left:8px; }
.icon-loader .spinner.loader{ width:18px !important; height:18px !important; position:static; display:block; background:transparent; }
.icon-loader .spinner .circle{ stroke:currentColor; stroke-width:6; stroke-dasharray:150,200; stroke-dashoffset:-10; animation: rotate 1.4s linear infinite; transform-origin:center; }

/* ============================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px){
  :root, html.sidebar-expanded{ --nav-w: 0px; }
  body{ padding-top:60px; }
  .header-mobile{ display:flex; }
  #content{ padding-left:0; min-height:calc(100vh - 60px); }
  #sidebar-left{ top:60px; width:var(--bs-nav-w); transform:translateX(-100%); z-index:1001; }
  #sidebar-left.open{ transform:none; }
  #sidebar-left.open::before{ content:""; position:fixed; top:60px; left:0; right:0; bottom:0; background:rgba(0,0,0,.4); z-index:-1; }
  #sidebar-left .sidebar-toggle{ display:none; }
  /* en movil el menu siempre se muestra desplegado, con etiquetas */
  .sidebar-collapsed .nav-brand{ padding:0 18px 20px; align-items:stretch; }
  .sidebar-collapsed .nav-brand .logo-full, .sidebar-collapsed .nav-brand .nav-user{ display:block; }
  .sidebar-collapsed .nav-brand .logo-mark{ display:none; }
  .sidebar-collapsed .menu-list a{ width:auto; height:auto; padding:9px 18px; margin:0; justify-content:flex-start; gap:11px; border-left:3px solid transparent; }
  .sidebar-collapsed .menu-list a .bs-ico{ width:18px; height:18px; }
  .sidebar-collapsed .menu-list a span, .sidebar-collapsed .menu-list a .ico-chevron{ display:inline-block; }
  .sidebar-collapsed .menu-list a.active, .sidebar-collapsed .menu-list a.submenu-active{ background:rgba(255,255,255,.09); border-left-color:var(--bs-red); }
  .sidebar-collapsed .menu-list .menu-parent.open > .submenu{ display:block !important; }
  .sidebar-collapsed .menu-list .submenu a{ border-left:0; padding:6px 0; }
  .sidebar-collapsed .menu-footer a{ width:auto; height:auto; padding:9px 18px; margin:0; justify-content:flex-start; }
  .sidebar-collapsed .menu-footer a span{ display:inline; }
  .bs-topbar{ top:60px; padding:0 16px; gap:12px; }
  .bs-topbar .bs-user-chip .bs-user-name, .bs-topbar .bs-user-chip .bs-user-role{ display:none; }
  .bs-search{ width:auto; flex:1; min-width:120px; }
  #page-content{ padding:20px 16px 32px; }
  .bs-kpi-grid, .bs-kpi-grid--3{ grid-template-columns:repeat(2, minmax(0,1fr)); gap:12px; }
  .bs-modules{ grid-template-columns:1fr; gap:20px; }
  .page-tableros .bs-modules{ grid-template-columns:1fr; gap:12px; }
  .bs-login{ flex-direction:column; }
  .bs-login-photo{ flex:none; height:230px; min-height:0; }
  .bs-login-caption{ padding:20px; }
  .bs-login-caption h2{ font-size:22px; }
  .bs-login-side{ padding:28px 24px; align-items:flex-start; }
  .bs-login-form{ width:100%; gap:20px; }
  .bs-login-form .bs-login-logo{ width:150px; }
  .bs-login-form h1{ font-size:26px; }
  .bs-input-wrap input, .bs-input-wrap .bs-input-ico, .bs-input-wrap .bs-eye, .bs-input-wrap .asis-codigo-btn{ height:48px; }
  .bs-login-form .bs-btn--red{ height:50px; }
  .dropdown-notice{ min-width:0; width:calc(100vw - 32px); right:-60px; }
}
@media (max-width: 640px){
  .bs-btn{ min-height:44px; }
  .bs-seg{ height:44px; }
  .bs-page-head h1{ font-size:28px; }
  .bs-home-hello h1{ font-size:30px; }
  .bs-kpi-value{ font-size:26px; }
  .bs-form-grid{ grid-template-columns:1fr; }
  .bs-topbar .bs-crumbs{ display:none; }
}

/* ============================================================================
   Detalle de cliente (products/product-maintenance)
   ========================================================================== */
.bs-client-head{ display:flex; align-items:flex-start; gap:20px; margin-bottom:20px; flex-wrap:wrap; }
.bs-client-avatar{
  width:56px; height:56px; flex:none; background:var(--bs-gray-dark); color:#fff; display:grid; place-items:center;
  font-family:var(--bs-font-head); font-size:20px; overflow:hidden;
}
.bs-client-avatar img{ width:100%; height:100%; object-fit:cover; display:block; background:var(--bs-surface); }
.bs-client-info{ flex:1; min-width:240px; }
.bs-client-info .bs-kicker{ margin-bottom:2px; }
.bs-client-info h1{ font-size:32px; margin:0 0 4px; line-height:1.05; }
.bs-client-meta{ display:flex; gap:18px; flex-wrap:wrap; font-size:13px; color:var(--bs-muted); }
.bs-client-kpis{ margin-bottom:20px; }
.bs-client-panel{ min-height:240px; }
.bs-client-panel #grouped-list{ min-height:120px; }
.bs-client-panel .grouped-table{ table-layout:fixed; }
.bs-client-panel .grouped-table td{ overflow-wrap:anywhere; }
.bs-client-panel .grouped-table .bs-actions-cell{ overflow:visible; }
.bs-empty--inset{ border:0; }
#lista-pagination .dataTables_info{ display:block !important; padding:0; }
#lista-pagination .dataTables_paginate{ display:flex; gap:6px; }
.bs-table--lista{ min-width:2240px; }
.bs-table--lista .bs-serie-cell{ font-family:var(--bs-font-head); font-size:15px; color:var(--bs-gray-dark); }
#view-lista .dataTables_wrapper .dataTables_processing{ position:absolute; top:60px; left:0; right:0; height:120px; margin:0; text-indent:-9999em; }
.bs-panel .dataTables_wrapper{ position:relative; }

/* popover de filtros: rejilla de dos columnas */
.bs-pop--filter{ width:560px; max-width:calc(100vw - 32px); padding:14px 16px 16px; }
.bs-filter-grid{ display:grid; grid-template-columns:1fr 1fr; gap:10px 14px; }
.bs-filter-grid .bs-field > label{ font-size:11px; }
.bs-filter-grid .bs-input, .bs-filter-grid .bs-select{ min-height:36px; font-size:13px; }
.bs-filter-grid .bs-span-2{ grid-column:1 / -1; }   /* resumen: ayuda del periodo (05/10/2026) */
.bs-pop-actions{ display:flex; justify-content:flex-end; gap:8px; margin-top:14px; }

/* jQuery UI datepicker con el mismo lenguaje */
.ui-datepicker{ font-family:var(--bs-font-body) !important; font-size:13px !important; border-radius:var(--bs-radius-md) !important; border:1px solid var(--bs-border) !important; background:var(--bs-surface) !important; padding:8px !important; z-index:10000 !important; }
.ui-datepicker .ui-datepicker-header{ background:var(--bs-gray-dark) !important; color:#fff !important; border:0 !important; border-radius:var(--bs-radius) !important; font-family:var(--bs-font-head); font-weight:600; }
.ui-datepicker .ui-datepicker-header .ui-state-hover{ background:transparent !important; border:0 !important; }
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span{ filter:invert(1); }
.ui-datepicker th{ font-weight:500; color:var(--bs-muted); font-size:11px; text-transform:uppercase; }
.ui-datepicker td a, .ui-datepicker td span{ border:0 !important; background:var(--bs-surface) !important; color:var(--bs-ink) !important; text-align:center !important; border-radius:var(--bs-radius) !important; padding:6px !important; }
.ui-datepicker td a:hover{ background:var(--bs-surface-2) !important; }
.ui-datepicker td a.ui-state-active{ background:var(--bs-gray-dark) !important; color:#fff !important; }
.ui-datepicker td a.ui-state-highlight{ box-shadow:inset 0 0 0 1px var(--bs-red); }

/* movil: la tabla agrupada se rompe en tarjetas por vehiculo */
@media (max-width: 640px){
  .bs-client-head{ gap:12px; }
  .bs-client-info h1{ font-size:26px; }
  .bs-client-head .bs-page-actions{ width:100%; justify-content:flex-start; }
  .bs-client-head .bs-page-actions .bs-btn{ flex:1 1 auto; }
  .bs-client-panel .grouped-table, .bs-client-panel .grouped-table tbody, .bs-client-panel .grouped-table tr, .bs-client-panel .grouped-table td{ display:block; width:auto; }
  .bs-client-panel .grouped-table thead{ display:none; }
  .bs-client-panel .grouped-table tr.service-row{ padding:10px 14px; border-bottom:1px solid var(--bs-border-soft); display:flex; flex-wrap:wrap; gap:4px 14px; }
  .bs-client-panel .grouped-table tr.service-row td{ padding:0; border:0; font-size:12px; color:var(--bs-muted); }
  .bs-client-panel .grouped-table tr.service-row td[data-label]:before{ content:attr(data-label) ": "; font-weight:500; color:var(--bs-ink); }
  .bs-client-panel .grouped-table tr.service-row td.bs-idx{ display:none; }
  .bs-client-panel .grouped-table tr.service-row td[data-label="Tipo"]{ flex-basis:100%; }
  .bs-client-panel .grouped-table tr.service-row td[data-label="Tipo"]:before{ content:none; }
  .bs-client-panel .grouped-table tr.service-row td.bs-actions-cell{ flex-basis:100%; padding-top:6px; }
  .bs-client-panel .grouped-table tr.service-row td.bs-actions-cell .bs-table-actions{ justify-content:flex-start; gap:16px; }
  .bs-client-panel .grouped-table .bs-group-inner{ gap:8px 14px; }
  .bs-client-panel .grouped-table .bs-group-spacer{ display:none; }
  .bs-client-panel .grouped-table .bs-group-actions{ width:100%; }
  .bs-pop--filter{ position:fixed; left:16px; right:16px; top:80px; width:auto; max-height:calc(100vh - 100px); overflow:auto; }
  .bs-filter-grid{ grid-template-columns:1fr; }
}

/* ============================================================================
   Listados de usuarios y clientes (paneles con DataTables)
   ========================================================================== */
.bs-panel-head{ display:flex; align-items:center; gap:10px; padding:14px 16px; border-bottom:1px solid var(--bs-border); }
.bs-panel-head .bs-panel-ico{ width:32px; height:32px; flex:none; border:1px solid var(--bs-border); display:grid; place-items:center; color:var(--bs-gray-dark); }
.bs-panel-head .bs-panel-title{ font-family:var(--bs-font-head); font-size:19px; }
.bs-panel-head .bs-spacer{ flex:1; }
.bs-user-av{
  width:36px; height:36px; flex:none; display:inline-grid; place-items:center; font-family:var(--bs-font-head); font-size:13px;
  background:var(--bs-neutral-tag); color:var(--bs-gray-900); overflow:hidden; box-sizing:border-box; vertical-align:middle;
}
.bs-user-av.alt{ background:#eff0f1; color:var(--bs-gray-dark); }
.bs-user-av--logo{ border:1px solid var(--bs-border); background:var(--bs-surface); padding:3px; }
.bs-user-av img{ width:100%; height:100%; object-fit:contain; display:block; }
.bs-user-text{ min-width:0; }
.bs-user-name{ font-size:14px; font-weight:500; display:flex; gap:8px; align-items:center; min-width:0; }
.bs-user-name .bs-ellipsis{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bs-user-meta{ font-size:12px; color:var(--bs-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bs-list-panel table.dataTable tbody td{ padding:10px 12px; }
.bs-list-panel .bs-td-av{ width:40px; padding-right:2px !important; }
.bs-list-panel .bs-actions-cell{ width:1%; white-space:nowrap; }
.bs-list-panel td.bs-count-cell{ font-family:var(--bs-font-head); font-size:18px; color:var(--bs-gray-dark); }
.bs-list-panel .dataTables_wrapper{ min-height:120px; }
.bs-table--clientes th.bs-th-av{ width:56px; }
.bs-table--clientes th.bs-th-act{ width:90px; }
.bs-table--clientes td:nth-child(3){ width:190px; }
.bs-table--clientes td:nth-child(4){ width:230px; }
.bs-table--clientes td:nth-child(5){ width:120px; }
.bs-table--users{ table-layout:auto; }
.bs-table--users td{ max-width:0; }
.bs-table--users td.bs-td-av, .bs-table--users td.bs-actions-cell{ max-width:none; }
.bs-users-grid{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:22px; align-items:start; }
.bs-role-panel .bs-pag{ padding:12px 16px; }
.bs-role-panel .bs-pag-nav a, .bs-role-panel .bs-pag-nav .paginate_button{ width:28px; height:28px; min-width:28px; font-size:12px; }
@media (max-width: 1200px){ .bs-users-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width: 1024px){ .bs-users-grid{ grid-template-columns:1fr; } }

/* ============================================================================
   Dashboard de Operaciones (dashboard/resume)
   ========================================================================== */
.bs-dash{ gap:32px; padding-top:6px; }
.bs-dash .bs-home-hello h1{ font-size:38px; }
.bs-dash-group{ display:flex; flex-direction:column; gap:14px; }
.bs-dash-group-head{ display:flex; align-items:baseline; gap:12px; }
.bs-dash-group-head h2{ font-size:22px; }
.bs-dash-group-head .bs-muted{ font-size:13px; }
.bs-stat{ display:flex; align-items:center; gap:20px; padding:22px 24px; }
.bs-stat-ico{ width:56px; height:56px; flex:none; border:1px solid var(--bs-border); display:grid; place-items:center; color:var(--bs-gray-dark); }
.bs-stat-body{ min-width:0; }
.bs-stat-value{ font-family:var(--bs-font-head); font-size:44px; line-height:1.05; color:var(--bs-gray-dark); }
@media (max-width: 640px){
  .bs-stat{ padding:16px 18px; gap:16px; }
  .bs-stat-ico{ width:46px; height:46px; }
  .bs-stat-value{ font-size:32px; }
  .bs-dash .bs-home-hello h1{ font-size:28px; }
}

/* ============================================================================
   Listas (listing/maintenance): cuatro catalogos en paneles
   ========================================================================== */
.bs-lists-grid{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:20px; align-items:start; }
.bs-listing-panel .bs-panel-head{ padding:13px 15px; }
.bs-listing-panel .bs-panel-title{ font-size:18px; }
.bs-listing-panel table.dataTable tbody td{ padding:9px 15px; font-size:13.5px; }
.bs-listing-name{ display:flex; align-items:center; gap:10px; min-width:0; }
.bs-listing-name .bs-ellipsis{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.bs-swatch{ width:12px; height:12px; flex:none; border:1px solid; display:inline-block; }
.bs-table--listing td{ max-width:0; }
.bs-table--listing td.bs-actions-cell{ max-width:none; }
.bs-panel-note{ padding:10px 15px; border-top:1px solid var(--bs-border); font-size:11px; color:var(--bs-muted); }
.bs-listing-panel .bs-pag{ padding:10px 15px; }
.bs-listing-panel .bs-pag-nav a, .bs-listing-panel .bs-pag-nav .paginate_button{ width:28px; height:28px; min-width:28px; font-size:12px; }
@media (max-width: 1400px){ .bs-lists-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width: 700px){ .bs-lists-grid{ grid-template-columns:1fr; } }

/* ============================================================================
   Repuestos: documentos (admin) y descargas (cliente)
   ========================================================================== */
.bs-docs-panel{ max-width:940px; }
.bs-docs-head{ display:flex; align-items:center; gap:14px; padding:12px 18px; background:var(--bs-gray-dark); color:rgba(255,255,255,.82); font-size:11px; letter-spacing:.06em; text-transform:uppercase; }
.bs-docs-col-title{ flex:1; min-width:0; }
.bs-docs-col-file{ width:300px; flex:none; }
.bs-docs-col-act{ width:96px; flex:none; text-align:right; }
.bs-docs-row{ display:flex; align-items:center; gap:14px; padding:12px 18px; border-bottom:1px solid var(--bs-border-soft); flex-wrap:wrap; }
.bs-docs-row > .bs-input{ flex:1; min-width:180px; height:40px; min-height:40px; }
.bs-docs-actions{ display:flex; align-items:center; gap:14px; flex:none; }
.bs-docs-upload{ width:300px; flex:none; }
.bs-upload{
  position:relative; display:flex; align-items:center; gap:8px; height:40px; padding:0 10px; border:1px solid var(--bs-border);
  background:var(--bs-surface); color:var(--bs-muted); font-size:13px; cursor:pointer; box-sizing:border-box; width:100%; margin:0; float:none;
}
.bs-upload:hover{ border-color:var(--bs-gray-dark); }
.bs-upload .bs-ico{ flex:none; }
.bs-upload .text{ flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:1.3; height:auto; padding:0; color:inherit; }
.bs-upload input[type="file"]{ position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; height:100%; margin:0; }
.bs-upload.sucess-val{ background:var(--bs-surface-2); color:var(--bs-ink); }
.bs-upload.sucess-val .text{ color:var(--bs-ink) !important; }
.bs-docs-actions .bs-btn-icon{ width:40px; height:40px; }
.bs-btn--danger-hover:hover{ border-color:var(--bs-red); color:var(--bs-red); }
.bs-docs-row .warning{ flex-basis:100%; margin:0; }
.bs-docs-foot{ display:flex; align-items:center; gap:14px; padding:16px 18px; }
.bs-docs-foot .bs-muted{ flex:1; font-size:12px; }
.bs-docs-client{ max-width:660px; }
.bs-docs-client-row{ display:flex; align-items:center; gap:14px; padding:14px 16px; border-bottom:1px solid var(--bs-border-soft); }
.bs-docs-client-row:last-child{ border-bottom:0; }
.bs-docs-client-ico{ width:38px; height:38px; flex:none; border:1px solid var(--bs-border); display:grid; place-items:center; color:var(--bs-gray-dark); }
.bs-docs-client-text{ flex:1; min-width:0; }
.bs-docs-client-title{ font-size:14px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bs-docs-client-file{ font-size:12px; color:var(--bs-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bs-docs-client-row .bs-btn{ flex:none; height:38px; }
@media (max-width: 760px){
  .bs-docs-head{ display:none; }
  .bs-docs-row{ flex-direction:column; align-items:stretch; gap:10px; padding:12px 14px; }
  .bs-docs-row > .bs-input, .bs-docs-upload{ width:100%; min-width:0; }
  .bs-docs-actions{ flex-wrap:wrap; }
  .bs-docs-upload{ flex:1 1 100%; }
  .bs-docs-client-row{ flex-wrap:wrap; }
}

/* ============================================================================
   Notificaciones
   ========================================================================== */
.bs-table--notif{ min-width:1990px; font-size:13px; }
.bs-table--notif .bs-serie-cell{ font-family:var(--bs-font-head); font-size:14px; color:var(--bs-gray-dark); }
.bs-table--notif th.bs-th-check{ width:70px; }
.bs-table--notif .bs-notif-pick{ gap:8px; }
.bs-table--notif .bs-notif-pick .bs-idx{ font-size:12px; color:var(--bs-muted); }
.bs-table--notif th .bs-check{ display:inline-flex; }
.bs-sel-n{ margin-left:4px; opacity:.85; }
.bs-notif-panel .dataTables_wrapper{ position:relative; }
.bs-notif-panel .dataTables_processing{ position:absolute; top:60px; left:0; right:0; height:120px; margin:0; text-indent:-9999em; }
@media (max-width: 640px){
  .page-notificaciones .bs-page-actions{ width:100%; }
  .page-notificaciones .bs-page-actions .bs-btn{ flex:1; }
}

/* ============================================================================
   Informes (listado)
   ========================================================================== */
.bs-block{ display:flex; flex-direction:column; gap:12px; margin-bottom:26px; }
.bs-block .bs-toolbar{ margin:0; }
.bs-block .bs-toolbar h2{ font-size:22px; }
.bs-pop--sm{ width:420px; }
.bs-table--informes th.bs-th-n{ width:60px; }
.bs-table--informes th.bs-th-act{ width:430px; }
.bs-table--informes td.bs-code-cell{ font-family:var(--bs-font-head); font-size:15px; color:var(--bs-gray-dark); }
.bs-btn-group{ display:inline-flex; border:1px solid var(--bs-border); }
.bs-btn-group > a{
  height:30px; padding:0 10px; display:inline-flex; align-items:center; gap:5px; font-size:12px; color:var(--bs-ink); white-space:nowrap;
}
.bs-btn-group > a + a{ border-left:1px solid var(--bs-border); }
.bs-btn-group > a:hover{ background:var(--bs-surface-2); color:var(--bs-ink); }
.bs-informe-actions{ gap:8px; }
.bs-informe-actions .bs-btn--sm{ height:30px; font-size:12px; padding:0 12px; }
@media (max-width: 640px){
  .bs-table--informes th.bs-th-act{ width:auto; }
  .bs-informe-actions{ flex-wrap:wrap; justify-content:flex-start; }
}

/* ============================================================================
   Modales con estructura propia (cabecera / cuerpo / pie)
   ========================================================================== */
.bs-modal .owp-qv-content-wrap{ width:480px; max-width:calc(100% - 30px); }
.bs-modal--md .owp-qv-content-wrap{ width:640px; }
.bs-modal--lg .owp-qv-content-wrap{ width:760px; }
.bs-modal .owp-qv-content-inner.bs-modal-inner{ padding:0 !important; text-align:left; }
.bs-modal-head{ display:flex; align-items:center; gap:12px; padding:16px 20px; border-bottom:1px solid var(--bs-border); }
.bs-modal-titles{ flex:1; min-width:0; }
.bs-modal-title{ font-family:var(--bs-font-head); font-size:20px; font-weight:600; line-height:1.15; }
.bs-modal-sub{ font-size:12px; color:var(--bs-muted); margin-top:2px; }
.bs-modal .bs-modal-close{
  position:static !important; width:36px !important; height:36px !important; margin:0 !important; line-height:1 !important; font-size:0 !important;
  border:1px solid var(--bs-border); background:var(--bs-surface); color:var(--bs-muted) !important; display:grid !important; place-items:center; flex:none;
}
.bs-modal .bs-modal-close:hover{ border-color:var(--bs-red); color:var(--bs-red) !important; }
.bs-modal-body{ padding:20px; display:flex; flex-direction:column; gap:16px; }
.bs-modal-text{ font-size:13.5px; margin:0; line-height:1.5; }
.bs-modal-foot{ display:flex; align-items:center; justify-content:flex-end; gap:10px; padding:16px 20px; border-top:1px solid var(--bs-border); }
.bs-modal-foot .bs-btn--lg{ height:42px; }
.bs-key-box{ display:flex; align-items:center; gap:10px; padding:12px 14px; background:var(--bs-surface-2); border:1px solid var(--bs-border); }
.bs-key-value{ flex:1; min-width:0; border:0; background:transparent; font-family:var(--bs-font-head); font-size:15px; resize:none; word-break:break-all; color:var(--bs-ink); outline:none; padding:0; line-height:1.4; }
.bs-key-box .bs-btn-icon{ width:38px; height:38px; }
.bs-help code{ font-family:Menlo, Consolas, monospace; font-size:11px; background:var(--bs-surface-2); padding:2px 6px; }
.bs-table--apikeys td.bs-code-cell{ font-family:var(--bs-font-head); font-size:15px; color:var(--bs-gray-dark); }
.bs-table--apikeys{ table-layout:fixed; }

/* Perfil */
.bs-profile-card{ max-width:860px; }
.bs-profile-head{ display:flex; align-items:center; gap:16px; padding-bottom:18px; margin-bottom:18px; border-bottom:1px solid var(--bs-border); }
.bs-profile-name{ font-family:var(--bs-font-head); font-size:22px; }

/* Datos y ajustes: tres bloques */
.bs-settings{ display:flex; flex-direction:column; gap:22px; max-width:1100px; }
.bs-settings .bs-page-head{ margin-bottom:0; }
.bs-settings-block{ display:flex; flex-direction:column; gap:14px; }
.bs-settings-block-head{ display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; }
.bs-settings-block-head h2{ font-size:19px; }
.bs-settings-block-head .bs-muted{ font-size:12px; }
.bs-photo-row{ display:flex; align-items:center; gap:16px; padding-top:4px; flex-wrap:wrap; }
.bs-photo-preview{ width:88px; height:88px; flex:none; border:1px solid var(--bs-border); background:var(--bs-surface-2); display:grid; place-items:center; overflow:hidden; }
.bs-photo-preview img{ width:100%; height:100%; object-fit:cover; display:block; }
.bs-photo-text{ flex:1; min-width:200px; display:flex; flex-direction:column; gap:4px; font-size:12px; }
.bs-photo-title{ font-family:var(--bs-font-head); font-size:16px; }
.bs-photo-actions{ display:flex; gap:8px; flex:none; }
.bs-photo-actions .setting-photo-upload{ position:relative; overflow:hidden; cursor:pointer; margin:0; float:none; width:auto; }
.bs-photo-actions .setting-photo-upload input[type="file"]{ position:absolute; inset:0; opacity:0; cursor:pointer; }
.bs-copies{ display:flex; flex-direction:column; gap:10px; padding-top:4px; font-size:12px; }
.bs-copies-list{ display:flex; flex-direction:column; gap:10px; }
.bs-copy-row{ display:flex; gap:10px; align-items:center; }
.bs-copy-row > .bs-input{ flex:1; min-width:0; }
.bs-copy-actions{ display:flex; gap:10px; flex:none; }
.bs-copy-actions .bs-select{ width:96px; min-height:42px; }
.bs-copy-actions .bs-btn-icon{ width:42px; height:42px; }
.bs-copy-row .warning{ flex-basis:100%; }
.bs-settings-foot{ display:flex; justify-content:flex-end; }
@media (max-width: 640px){
  .bs-photo-row{ align-items:flex-start; }
  .bs-copy-row{ flex-wrap:wrap; }
}

/* ============================================================================
   Modulo Asistencia: las clases asis-* que pinta jquery.asistencia.js se
   traducen al lenguaje nuevo (sin tocar el JS).
   ========================================================================== */
.page-asistencia .asis-kpi-row{ margin:0 0 20px; }
.page-asistencia .asis-card{ height:auto; margin:0; border-radius:var(--bs-radius-md); box-shadow:none; }
.page-asistencia .asis-card-title{ font-family:var(--bs-font-head); font-size:18px; font-weight:600; color:var(--bs-ink); margin:0 0 14px; }
.asis-charts-row{ display:grid; grid-template-columns:1.45fr 1fr; gap:18px; margin:0 0 26px; }
.asis-chart{ min-height:200px; }
.asis-bar{ fill:var(--bs-gray-dark); }
.asis-bar:hover{ fill:var(--bs-gray-900); }
.asis-tooltip{ background:var(--bs-ink); color:#fff; font-size:12px; padding:5px 10px; border-radius:var(--bs-radius); }
.asis-hbar-row{ display:flex; align-items:center; gap:10px; padding:5px 0; }
.asis-hbar-label{ flex:0 0 150px; font-size:12px; color:var(--bs-ink); text-align:left; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.asis-hbar-track{ flex:1; background:var(--bs-neutral-tag); height:8px; border-radius:0; }
.asis-hbar-fill{ background:var(--bs-gray-dark); height:8px; border-radius:0; min-width:2px; }
.asis-hbar-value{ flex:0 0 34px; font-family:var(--bs-font-head); font-size:15px; color:var(--bs-gray-dark); text-align:right; }
.asis-hora{ font-family:var(--bs-font-head); font-size:15px; white-space:nowrap; }
.asis-hora--pend{ color:var(--bs-muted); }

/* tabla, badges y acciones que pinta el JS */
.asis-table th{ background:var(--bs-gray-dark); color:rgba(255,255,255,.82); font-size:11px; font-weight:500; letter-spacing:.08em; text-transform:uppercase; padding:11px 12px; border-radius:0 !important; }
.asis-table td{ font-size:13px; color:var(--bs-ink); padding:9px 12px; border-bottom:1px solid var(--bs-border-soft); }
.asis-table tbody tr:hover{ background:var(--bs-surface-2); }
.asis-table .asis-empty{ color:var(--bs-muted); padding:24px 12px; text-align:center; }
.asis-badge{ display:inline-flex; align-items:center; font-size:11px; font-weight:500; padding:3px 10px; border-radius:var(--bs-radius-sm); line-height:1.4; letter-spacing:.02em; }
.asis-badge-web, .asis-badge-activo{ background:#D1FAE5; color:#047857; }
.asis-badge-manual{ background:#FEF3C7; color:#B45309; }
.asis-badge-inactivo{ background:var(--bs-red-100); color:var(--bs-red-700); }
.asis-badge-empleado{ background:#DBEAFE; color:#1D4ED8; }
.asis-badge-externo{ background:#FFEAD5; color:#C2410C; }
.asis-badge-click:hover{ box-shadow:inset 0 0 0 1px currentColor; }
.asis-actions{ white-space:nowrap; }
.asis-btn-mini{ display:inline-flex; align-items:center; height:32px; padding:0 12px; margin-right:8px; background:var(--bs-surface); border:1px solid var(--bs-border); border-radius:var(--bs-radius); font-family:var(--bs-font-head); font-weight:600; font-size:12.5px; color:var(--bs-ink); text-decoration:none; cursor:pointer; }
.asis-btn-mini:hover{ background:var(--bs-surface-2); border-color:var(--bs-gray-light); color:var(--bs-ink); }
.asis-btn-mini-danger{ color:var(--bs-muted); }
.asis-btn-mini-danger:hover{ border-color:var(--bs-red); color:var(--bs-red); background:var(--bs-surface); }
.asis-btn-outline, .asis-btn-primary{ border-radius:var(--bs-radius); font-family:var(--bs-font-head); font-weight:600; }
.asis-btn-outline.asis-filter-on{ background:var(--bs-gray-dark); border-color:var(--bs-gray-dark); color:#fff; }
.btn-add-pill{ height:40px; border-radius:var(--bs-radius); font-family:var(--bs-font-head); font-weight:600; font-size:14px; background:var(--bs-red); border:1px solid var(--bs-red); color:#fff; padding:0 16px; line-height:1; }
.btn-add-pill:hover{ background:var(--bs-red-600); border-color:var(--bs-red-600); color:#fff; }

/* paginacion del historial */
.asis-pager{ justify-content:flex-end; margin:0; }
.asis-pager:empty{ display:none; }
.asis-page{ display:inline-grid; place-items:center; width:30px; height:30px; min-width:30px; padding:0; border:1px solid var(--bs-border); border-radius:var(--bs-radius); font-family:var(--bs-font-head); font-size:13px; color:var(--bs-ink); background:var(--bs-surface); text-decoration:none; }
.asis-page:hover{ border-color:var(--bs-gray-dark); background:var(--bs-surface); }
.asis-page-on, .asis-page-on:hover{ background:var(--bs-gray-dark); border-color:var(--bs-gray-dark); color:#fff; }
.asis-page-gap{ color:var(--bs-muted); padding:0 2px; font-size:13px; }
.bs-table--historial{ min-width:1400px; font-size:12.5px; }
.bs-search--inline{ width:260px; height:40px; }
.page-asistencia .bs-page-actions .bs-search--inline input{ height:38px; }
.asis-filter-dropdown{ width:420px; border-radius:var(--bs-radius-md); box-shadow:none; }

/* marcar */
.asis-marcar-card{ max-width:620px; margin:0 auto 22px; display:flex; flex-direction:column; gap:18px; }
.asis-marcar-reloj{ display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; margin:0; }
#asis-m-hora{ font-family:var(--bs-font-head); font-size:44px; line-height:1; color:var(--bs-gray-dark); font-variant-numeric:tabular-nums; font-weight:600; }
.asis-marcar-fecha{ font-size:13px; color:var(--bs-muted); }
.asis-marcar-tabs{ display:flex; gap:0; width:100%; margin:0 0 4px; height:44px; }
.asis-marcar-tabs .asis-tab{ flex:1; justify-content:center; border:0; background:transparent; border-radius:0; padding:0 18px; font-size:13px; font-family:var(--bs-font-head); font-weight:600; color:var(--bs-ink); text-decoration:none; display:inline-flex; align-items:center; }
.asis-marcar-tabs .asis-tab + .asis-tab{ border-left:1px solid var(--bs-border); }
.asis-marcar-tabs .asis-tab:hover{ background:var(--bs-surface-2); }
.asis-marcar-tabs .asis-tab-on, .asis-marcar-tabs .asis-tab-on:hover{ background:var(--bs-gray-dark); color:#fff; }
.asis-marcar-tabs .asis-tab-disabled, .asis-marcar-tabs .asis-tab-disabled:hover{ opacity:.5; cursor:not-allowed; background:var(--bs-surface-2); color:var(--bs-muted); }
.asis-marcar-panel{ display:flex; flex-direction:column; gap:14px; }
.asis-banner{ border-radius:var(--bs-radius-md); padding:14px; margin:0; font-size:13px; display:flex; flex-direction:column; gap:3px; border:1px solid var(--bs-border); background:var(--bs-surface-2); color:var(--bs-ink); }
.asis-banner b{ font-family:var(--bs-font-head); font-size:16px; font-weight:600; }
.asis-banner-ok{ background:var(--bs-surface-2); color:var(--bs-ink); }
.asis-banner-warn{ background:#FEF3C7; color:#B45309; border-color:#f3e0a8; }
.asis-hora-box{ display:flex; align-items:center; justify-content:space-between; gap:12px; border:1px solid var(--bs-border); border-radius:var(--bs-radius-md); padding:12px 14px; background:var(--bs-surface-2); }
.asis-hora-label{ display:block; font-family:var(--bs-font-head); font-size:10px; letter-spacing:.12em; text-transform:uppercase; color:var(--bs-muted); margin-bottom:2px; }
.asis-hora-valor{ display:block; font-family:var(--bs-font-head); font-size:24px; line-height:1.1; color:var(--bs-gray-dark); font-variant-numeric:tabular-nums; }
.asis-check b{ color:#B45309; font-weight:500; }
.asis-filter-actions{ display:flex; gap:10px; align-items:center; }
.asis-marcar-panel .asis-filter-actions .bs-btn{ min-height:48px; }
.asis-marcar-panel .warning{ margin-top:0; }

/* registro manual y listados */
.page-asis-manual .asis-card{ max-width:900px; margin-bottom:26px; }
.bs-form-actions{ display:flex; justify-content:flex-end; gap:10px; }
.asis-listados-cols{ display:grid; grid-template-columns:1fr 1.25fr; gap:20px; align-items:start; margin:0; }
.asis-listados-left{ display:flex; flex-direction:column; gap:16px; }
.bs-inline-form{ display:flex; gap:8px; }
.bs-inline-form .bs-input{ flex:1; min-width:0; }
.bs-inline-form--pad{ padding:14px 16px; border-bottom:1px solid var(--bs-border); }
.asis-i-titulo{ font-size:15px; font-style:italic; color:var(--bs-ink); }
.page-asis-listados .asis-table td:first-child{ font-weight:500; }
.page-asis-listados .asis-table thead{ display:none; }
@media (max-width: 1024px){
  .asis-charts-row, .asis-listados-cols{ grid-template-columns:1fr; }
}
@media (max-width: 640px){
  .page-asistencia .bs-page-actions{ width:100%; }
  .bs-search--inline{ width:100%; }
  .asis-marcar-card{ padding:16px; }
  #asis-m-hora{ font-size:36px; }
}

/* ============================================================================
   Dashboard por cliente (historial de intervenciones) y programacion
   ========================================================================== */
.bs-dashpro, .bs-schpro{ display:flex; flex-direction:column; gap:20px; }
.bs-dash-toolbar{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.bs-dash-toolbar .bs-spacer{ flex:1; }
.bs-period{ display:inline-flex; align-items:center; gap:10px; height:40px; border:1px solid var(--bs-border); background:var(--bs-surface); padding:0 12px; box-sizing:border-box; }
.bs-period-lbl{ font-family:var(--bs-font-head); font-size:11px; letter-spacing:.12em; text-transform:uppercase; color:var(--bs-muted); }
.bs-period-sep{ color:var(--bs-gray-light); }
.bs-select--sm{ min-height:30px; height:30px; width:auto; font-size:13px; padding:0 28px 0 10px; background-position:right 8px center; }
.bs-input--sm{ min-height:30px; height:30px; width:auto; font-size:13px; padding:0 8px; }
.asis-p-salida{ width:108px; font-family:var(--bs-font-head); font-weight:600; }
.bs-dash-head{ margin-bottom:0; }
.bs-dash-head h1{ font-size:34px; }
.bs-plan{ padding:18px 22px; display:flex; flex-direction:column; gap:10px; }
.bs-plan-head{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.bs-plan-title{ font-family:var(--bs-font-head); font-size:19px; }
.bs-plan-pct{ font-family:var(--bs-font-head); font-size:34px; line-height:1; color:var(--bs-gray-dark); }
.bs-plan-bar{ height:10px; background:var(--bs-neutral-tag); }
.bs-plan-bar > span{ display:block; height:100%; background:var(--bs-gray-dark); transition:width .4s ease; }
.bs-plan-legend{ font-size:13px; color:var(--bs-muted); }
.bs-plan-legend b{ color:var(--bs-ink); font-weight:500; }
.bs-chart-grid{ display:grid; grid-template-columns:1.35fr 1fr; gap:20px; }
.bs-dashpro .card{ margin:0; border-radius:var(--bs-radius-md); box-shadow:none; padding:16px 18px 8px; min-width:0; }
.bs-dashpro .card > div[id^="chart-"]{ max-width:100%; }
.bs-dashpro #dash-content{ display:flex; flex-direction:column; gap:20px; }
.bs-chart-title{ display:flex; align-items:center; gap:9px; margin-bottom:6px; font-family:var(--bs-font-head); font-size:18px; font-weight:600; }
.bs-chart-title .num{ width:22px; height:22px; flex:none; border:1px solid var(--bs-border); display:grid; place-items:center; font-size:12px; color:var(--bs-gray-dark); background:var(--bs-surface); border-radius:var(--bs-radius); padding:0; }
.bs-dashpro .apexcharts-legend-text{ font-family:var(--bs-font-body) !important; }
.bs-dashpro .apexcharts-tooltip{ border-radius:var(--bs-radius-md) !important; box-shadow:none !important; border:1px solid var(--bs-border) !important; font-family:var(--bs-font-body); }
.bs-dashpro .apexcharts-tooltip-title{ background:var(--bs-surface-2) !important; border-bottom:1px solid var(--bs-border) !important; font-family:var(--bs-font-body) !important; }
.bs-dashpro .dash-empty, .bs-schpro .sch-empty{ padding:48px 30px; }
@media (max-width: 1100px){ .bs-chart-grid{ grid-template-columns:1fr; } }

/* programacion */
.bs-sch-head{ align-items:flex-end; }
.bs-legend{ display:flex; flex-wrap:wrap; gap:8px 16px; }
.bs-legend .lg{ display:inline-flex; align-items:center; gap:7px; font-size:13px; color:var(--bs-ink); }
.bs-legend .dot{ width:14px; height:14px; flex:none; border:1px solid; display:inline-block; border-radius:var(--bs-radius-sm); }
.sch-toggle.on{ background:var(--bs-gray-dark); border-color:var(--bs-gray-dark); color:#fff; }
.sch-filterpanel{ display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:12px 14px; }
.sch-filterpanel[hidden]{ display:none; }
.sch-f-input{ flex:1 1 240px; min-width:170px; min-height:38px; }
.sch-filterpanel .sch-select{ width:auto; min-height:38px; }
.sch-f-count{ font-size:12.5px; color:var(--bs-muted); margin-left:auto; }
.sch-table{ min-width:1994px; font-size:12.5px; table-layout:fixed; }
.sch-table thead th{ position:static; }
.sch-table thead th.mcol{ text-align:center; width:62px; padding-left:4px; padding-right:4px; }
.sch-table thead th:nth-child(1){ width:50px; }
.sch-table thead th:nth-child(2){ width:150px; }
.sch-table thead th:nth-child(3){ width:130px; }
.sch-table thead th:nth-child(4){ width:170px; }
.sch-table thead th:nth-child(5){ width:110px; }
.sch-table thead th:nth-child(6){ width:260px; }
.sch-table thead th:nth-child(7){ width:190px; }
.sch-table thead th:nth-child(8){ width:120px; }
.sch-table thead th:nth-child(9){ width:70px; }
.sch-table tbody td{ padding:8px 10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sch-table td.num{ color:var(--bs-muted); font-family:var(--bs-font-head); font-size:14px; }
.sch-table td.sch-serie{ font-family:var(--bs-font-head); font-size:14px; color:var(--bs-gray-dark); }
.sch-table td.mcell{ text-align:center; padding:6px 4px; border-left:1px solid var(--bs-surface-2); }
.sch-type{ display:inline-flex; align-items:center; gap:6px; }
.sch-done-badge{ font-size:10px; letter-spacing:.06em; text-transform:uppercase; }
.sch-table tbody tr.sch-done td{ opacity:.6; }
.sch-table tfoot td{ background:var(--bs-surface-2); border-top:1px solid var(--bs-border); border-left:1px solid var(--bs-border-soft); text-align:center; padding:11px 4px; font-family:var(--bs-font-head); font-size:16px; color:var(--bs-gray-dark); }
.sch-table tfoot td.lbl{ text-align:left; font-size:13px; letter-spacing:.06em; text-transform:uppercase; padding-left:10px; border-left:0; }
.sch-row.sch-hide{ display:none; }
.sch-foot{ justify-content:flex-start; }

/* ============================================================================
   Contactanos (rol cliente)
   ========================================================================== */
.bs-contact{ max-width:560px; }
.bs-contact-head{ padding:24px; display:flex; gap:18px; align-items:center; border-bottom:1px solid var(--bs-border); }
.bs-contact-photo{ width:92px; height:92px; flex:none; border:1px solid var(--bs-border); background:var(--bs-surface-2); display:grid; place-items:center; color:var(--bs-muted); overflow:hidden; }
.bs-contact-photo img{ width:100%; height:100%; object-fit:cover; display:block; }
.bs-contact-who{ flex:1; min-width:0; }
.bs-contact-name{ font-family:var(--bs-font-head); font-size:24px; line-height:1.15; font-weight:600; }
.bs-contact-intro{ font-size:13px; color:var(--bs-muted); margin-top:4px; }
.bs-contact-grid{ padding:18px 24px; display:grid; grid-template-columns:1fr 1fr; gap:10px; border-bottom:1px solid var(--bs-border); }
.bs-contact-btn{ min-height:44px; justify-content:flex-start; padding:0 12px; font-family:var(--bs-font-body); font-weight:400; font-size:13.5px; }
.bs-contact-btn span{ flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-align:left; }
.bs-acc{ border-bottom:1px solid var(--bs-border); }
.bs-acc:last-child{ border-bottom:0; }
.bs-acc summary{ list-style:none; display:flex; align-items:center; gap:12px; padding:16px 24px; cursor:pointer; font-family:var(--bs-font-head); font-size:16px; letter-spacing:.02em; min-height:auto; color:var(--bs-ink); }
.bs-acc summary::-webkit-details-marker{ display:none; }
.bs-acc summary:hover{ background:var(--bs-surface-2); }
.bs-acc summary::after{ content:"+"; margin-left:auto; color:var(--bs-muted); font-family:var(--bs-font-head); font-size:18px; font-weight:400; }
.bs-acc[open] summary::after{ content:"\2212"; }
.bs-acc-body{ padding:0 24px 18px; display:flex; flex-direction:column; gap:12px; }
.bs-acc-text{ font-size:13.5px; line-height:1.55; color:var(--bs-ink); }
.bs-acc-links{ display:flex; flex-wrap:wrap; gap:8px; }
.bs-video{ width:100%; aspect-ratio:16 / 9; background:#000; border:1px solid var(--bs-border); border-radius:var(--bs-radius-md); overflow:hidden; }
.bs-video iframe{ width:100%; height:100%; display:block; }
@media (max-width: 640px){
  .bs-contact-grid{ grid-template-columns:1fr; }
  .bs-contact-head{ flex-direction:column; align-items:flex-start; }
}

/* ============================================================================
   Formularios flotantes (vehiculo, servicio, usuario, listas, documentos)
   ========================================================================== */
.bs-modal .owp-qv-content-inner{ max-height:calc(100vh - 40px); display:flex; flex-direction:column; }
.bs-modal-form{ display:flex; flex-direction:column; min-height:0; height:auto; position:static; }
.bs-modal-body--scroll{ overflow:auto; max-height:calc(100vh - 220px); }
.bs-modal .bs-modal-title.form-title{ font-size:20px !important; margin:0 !important; padding:0; text-align:left; }
.bs-modal-section{ display:flex; flex-direction:column; gap:12px; }
.bs-modal-section + .bs-modal-section{ padding-top:16px; border-top:1px solid var(--bs-border); }
.bs-modal-section-head{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.bs-modal-section-title{ font-family:var(--bs-font-head); font-size:17px; font-weight:600; }
.bs-modal-section-head .bs-muted{ font-size:12px; }
.bs-veh-grid{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:10px 14px; padding:12px 14px; background:var(--bs-surface-2); border:1px solid var(--bs-border); }
.bs-veh-grid .bs-field > label{ font-family:var(--bs-font-head); font-size:10px; letter-spacing:.1em; text-transform:uppercase; }
.bs-veh-grid .bs-input{ min-height:36px; background:var(--bs-surface); }
.bs-input.servicio-veh-ro, .servicio-veh-ro{ background:var(--bs-surface) !important; color:var(--bs-ink) !important; cursor:default; }
.bs-readonly .bs-input[readonly], .bs-readonly .bs-input:disabled, .bs-readonly .bs-select:disabled{ background:var(--bs-surface-2); color:var(--bs-ink); opacity:1; }
.bs-note{ font-size:12.5px; color:var(--bs-ink); padding:12px 14px; background:var(--bs-surface-2); border:1px solid var(--bs-border); line-height:1.45; }
.bs-link-sm{ font-size:13px; align-self:flex-start; }
.bs-seg--radio{ display:inline-flex; }
.bs-seg--radio label{ display:inline-flex; align-items:center; gap:8px; padding:0 16px; height:40px; margin:0; cursor:pointer; font-family:var(--bs-font-head); font-weight:600; font-size:14px; color:var(--bs-ink); float:none; width:auto; }
.bs-seg--radio label + label{ border-left:1px solid var(--bs-border); }
.bs-seg--radio input[type="radio"]{ width:15px; height:15px; margin:0; accent-color:var(--bs-red); }
.equipment-estado{ gap:0; padding:0; }

/* contrasena con ojo (usuarios) */
.bs-pass-wrap .bs-eye-legacy{ width:42px; height:42px; flex:none; display:grid; place-items:center; color:var(--bs-muted); }
.bs-pass-wrap .bs-eye-legacy i{ width:18px; height:18px; background-size:18px !important; opacity:.7; }
.bs-pass-wrap .bs-eye-legacy:hover i{ opacity:1; }

/* modulos del tecnico */
.modulos-box{ display:flex; flex-direction:column; gap:6px; }
.modulos-title{ font-size:12px; color:var(--bs-muted); }
.modulos-list{ display:flex; flex-direction:column; gap:4px; }
.modulos-list label.check{ display:flex; align-items:center; gap:10px; font-size:14px; color:var(--bs-ink); cursor:pointer; min-height:40px; margin:0; float:none; width:auto; font-weight:400; padding:0 12px; border:1px solid var(--bs-border); }
.modulos-list label.check input[type="checkbox"]{ width:16px; height:16px; margin:0 !important; float:none; accent-color:var(--bs-red); flex:none; }

/* valores sugeridos del kit (listas) */
.kit-info-fields{ display:none; flex-direction:column; gap:12px; padding-top:16px; border-top:1px solid var(--bs-border); }
.kit-info-fields.is-open, .listing-modal.has-kit-fields .kit-info-fields{ display:flex; }
.listing-modal.has-kit-fields .owp-qv-content-wrap{ width:640px; }

/* zona de certificados: filas que arma el JS (row + control-field-upload + botones) */
.zone-documents{ display:flex; flex-direction:column; gap:10px; }
.zone-documents:after{ display:none; }
.zone-documents .row{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.zone-documents .row .documentfile{ flex:1; min-width:200px; width:auto !important; float:none; }
.zone-documents .row .warning{ flex-basis:100%; margin:0; }
.zone-documents .control-field-upload{
  position:relative; display:flex !important; align-items:center; gap:8px; height:42px; min-height:42px; margin:0 !important; padding:0 10px !important;
  border:1px solid var(--bs-border) !important; background:var(--bs-surface) !important; width:100% !important; float:none; cursor:pointer; box-sizing:border-box; text-decoration:none;
}
.zone-documents .control-field-upload:hover{ border-color:var(--bs-gray-dark) !important; }
.zone-documents .control-field-upload .icon-right{ position:static; width:auto; height:auto; padding:0; background:transparent; display:grid; place-items:center; flex:none; right:auto; top:auto; z-index:auto; }
.zone-documents .control-field-upload .icon-right i{ width:16px; height:16px; background-size:16px !important; opacity:.7; margin:0; }
.zone-documents .control-field-upload .text{ flex:1; min-width:0; height:auto; line-height:1.3; padding:0; font-size:13px; color:var(--bs-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.zone-documents .control-field-upload.sucess-val{ background:var(--bs-surface-2) !important; }
.zone-documents .control-field-upload.sucess-val .text{ color:var(--bs-ink) !important; }
.zone-documents .control-field-upload label,
.zone-documents .control-field-upload input[type="file"]{ position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; margin:0; padding:0; }
.zone-documents .control-field-upload.disabled{ opacity:.6; cursor:not-allowed; }
.zone-documents .btn-fix-col-1, .zone-documents button.btn-fix-col-1{
  width:42px !important; height:42px !important; min-width:42px; flex:none; margin:0 !important; float:none; display:grid !important; place-items:center; padding:0 !important;
  border:1px solid var(--bs-border) !important; background:var(--bs-surface) !important; color:var(--bs-ink) !important; font-family:var(--bs-font-head); font-size:22px !important; line-height:1 !important; cursor:pointer; text-decoration:none;
}
.zone-documents .btn-fix-col-1:hover{ background:var(--bs-surface-2) !important; border-color:var(--bs-gray-light) !important; }
.zone-documents .btn-fix-col-1.btn-red:hover, .zone-documents .delete-option:hover, .zone-documents .product-cert-pdf-delete:hover{ border-color:var(--bs-red) !important; color:var(--bs-red) !important; background:var(--bs-surface) !important; }
.zone-documents .generated-product-document .control-field-upload{ cursor:pointer; }
.zone-documents .generated-product-document .product-generated-document-open{ font-size:13px !important; font-family:var(--bs-font-head); }
.zone-documents .product-doc-empty{ padding:12px 14px; font-size:13px; color:var(--bs-muted); border:1px dashed var(--bs-border); text-align:left; }

/* documentos del servicio (modal de certificados) */
.bs-doc-list{ display:flex; flex-direction:column; }
.bs-doc-list .item-d{ display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--bs-border-soft); margin:0; text-align:left; color:var(--bs-ink); width:auto; }
.bs-doc-list .item-d:last-child{ border-bottom:0; }
.bs-doc-list .item-doc{ width:40px; height:40px; max-width:40px; flex:none; border:1px solid var(--bs-border); display:grid; place-items:center; overflow:hidden; background:var(--bs-surface-2); }
.bs-doc-list .item-doc .text, .bs-doc-list .item-doc .overlay{ display:none; }
.bs-doc-list .item-doc .file{ position:static; width:20px; height:20px; transform:none; background-size:contain; }
.bs-doc-list .item-doc img{ width:100%; height:100%; object-fit:cover; }
.bs-doc-list .item-d .name{ flex:1; min-width:0; font-size:14px; color:var(--bs-ink); max-width:none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bs-doc-list .item-d:hover .name{ text-decoration:none; color:var(--bs-red); }
.bs-doc-list .product-doc-empty{ padding:18px 0; color:var(--bs-muted); text-align:left; }

/* selector de cliente (reasignar) */
.bs-pick-list{ max-height:260px; overflow-y:auto; overflow-x:hidden; border:1px solid var(--bs-border); }
.bs-pick-list .customer-selector-option{
  width:100%; box-sizing:border-box; display:flex; align-items:center; gap:12px; padding:11px 14px; border:0; border-bottom:1px solid var(--bs-border-soft); background:var(--bs-surface);
  font:inherit; font-size:14px; color:var(--bs-ink); cursor:pointer; text-align:left; line-height:1.3; margin:0; height:auto; min-height:0; text-transform:none; letter-spacing:0;
}
.bs-pick-list .customer-selector-option:hover, .bs-pick-list .customer-selector-option.is-selected{ background:var(--bs-surface-2); border-color:var(--bs-border-soft); }
.bs-pick-list .customer-selector-option .reassign-ruc{ display:block; font-size:12px; color:var(--bs-muted); margin-top:2px; }
.bs-pick-list .customer-selector-empty{ display:block; padding:18px 14px; color:var(--bs-muted); font-size:13px; text-align:center; }
.reassign-hint b{ color:var(--bs-ink); font-weight:500; }

@media (max-width: 700px){
  .bs-veh-grid{ grid-template-columns:1fr 1fr; }
  .bs-modal .owp-qv-content-wrap{ width:calc(100% - 20px) !important; }
  .bs-modal-body--scroll{ max-height:calc(100vh - 200px); }
}
.bs-field > .bs-upload{ display:flex; font-size:13px; color:var(--bs-muted); font-weight:400; }
/* autocompletado (jQuery UI) con el look del sistema */
.ui-autocomplete.ui-menu{ border:1px solid var(--bs-border) !important; border-radius:var(--bs-radius-md) !important; background:var(--bs-surface) !important; box-shadow:none !important; padding:0 !important; font-family:var(--bs-font-body) !important; font-size:13.5px; max-height:260px; overflow:auto; z-index:100000 !important; }
.ui-autocomplete .ui-menu-item{ margin:0 !important; }
.ui-autocomplete .ui-menu-item-wrapper, .ui-autocomplete .ui-menu-item a{ padding:9px 12px !important; border:0 !important; border-bottom:1px solid var(--bs-border-soft) !important; color:var(--bs-ink) !important; background:var(--bs-surface) !important; border-radius:0 !important; margin:0 !important; font-weight:400 !important; }
.ui-autocomplete .ui-menu-item-wrapper.ui-state-active, .ui-autocomplete .ui-menu-item a.ui-state-active, .ui-autocomplete .ui-menu-item-wrapper:hover{ background:var(--bs-surface-2) !important; color:var(--bs-ink) !important; }
.bs-modal .bs-modal-close.owp-qv-close-inter{ font-size:16px !important; line-height:1; text-indent:0; }
.bs-modal .bs-modal-close .bs-ico{ width:16px !important; height:16px !important; }
.bs-seg--radio{ align-self:flex-start; }
.bs-pick-list .customer-selector-option{ flex-direction:column; align-items:flex-start; gap:2px; }
.bs-link-sm{ color:var(--bs-gray-dark); text-decoration:underline; text-underline-offset:3px; }
.bs-link-sm:hover{ color:var(--bs-ink); }
#content-documents.bs-doc-list{ display:flex !important; flex-direction:column; height:auto !important; max-height:60vh; overflow:auto; padding:0; margin:0; width:100%; flex-wrap:nowrap; }
#content-documents.bs-doc-list .item-d{ width:100% !important; max-width:none !important; height:auto !important; padding:10px 0 !important; margin:0 !important; float:none !important; display:flex !important; }
#content-documents.bs-doc-list .item-d .name{ max-width:none !important; width:auto !important; font-size:14px !important; padding:0 !important; }
#content-documents.bs-doc-list .item-doc{ width:40px !important; height:40px !important; max-width:40px !important; margin:0 !important; }

/* ============================================================================
   Informe nuevo / editar: indice lateral de pasos + contenido del paso
   ========================================================================== */
#page-content.bs-report-page{ padding:0 !important; }
.bs-report{ display:flex; align-items:stretch; min-height:calc(100vh - 60px); margin:0; }
.bs-report-side{
  width:260px; flex:none; border-right:1px solid var(--bs-border); background:var(--bs-surface); padding:22px 0 18px;
  display:flex; flex-direction:column; position:sticky; top:60px; align-self:flex-start; height:calc(100vh - 60px); box-sizing:border-box;
}
.bs-report-side-title{ padding:0 20px 12px; font-family:var(--bs-font-head); font-size:11px; letter-spacing:.12em; text-transform:uppercase; color:var(--bs-muted); }
.bs-report .report-step-tabs{ display:flex; flex-direction:column; margin:0; padding:0; border:0; background:transparent; gap:0; }
.bs-report .report-step-tabs .report-step-tab{
  display:flex; align-items:flex-start; gap:10px; width:100%; margin:0; padding:10px 20px 10px 17px; border:0; border-left:3px solid transparent; border-radius:0;
  background:transparent; color:var(--bs-ink); font:inherit; font-size:13.5px; line-height:1.3; text-align:left; cursor:pointer; box-shadow:none; position:static; z-index:auto; text-transform:none; letter-spacing:0;
}
.bs-report .report-step-tabs .report-step-tab::before, .bs-report .report-step-tabs .report-step-tab::after{ display:none !important; content:none !important; }
.bs-report .report-step-tabs .report-step-tab:hover{ background:var(--bs-surface-2); color:var(--bs-ink); }
.bs-report .report-step-tabs .report-step-tab.is-active{ border-left-color:var(--bs-red); background:var(--bs-surface-2); color:var(--bs-ink); }
.bs-report .report-step-tabs .report-step-tab.is-active .bs-step-lbl{ font-weight:600; }
.bs-report .report-step-tabs .report-step-tab.is-active .bs-step-num{ color:var(--bs-red); }
.bs-step-num{ width:22px; flex:none; font-family:var(--bs-font-head); font-size:14px; font-weight:600; color:var(--bs-muted); padding-top:1px; }
.bs-step-lbl{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.bs-step-lbl small{ font-size:11.5px; color:var(--bs-muted); font-weight:400; }
.bs-report-progress{ margin-top:auto; padding:14px 20px 0; border-top:1px solid var(--bs-border); }
/* 08/10/2026: Reasignar informe (solo admin), encima del progreso */
.bs-report-side-acciones{ margin-top:auto; padding:14px 20px; }
.bs-report-side-acciones + .bs-report-progress{ margin-top:0; }
.bs-report-side-acciones .bs-btn{ width:100%; justify-content:center; }
.reasignar-lista{ max-height:320px; overflow:auto; margin-top:8px; }
.bs-pick-list .reasignar-op{ display:flex !important; flex-direction:row !important; align-items:center !important; gap:10px; cursor:pointer; }
.reasignar-op input{ width:16px; height:16px; margin:0; flex:none; accent-color:var(--bs-red); }
.reasignar-op-txt{ flex:1; min-width:0; }
.bs-pick-list .reasignar-op.is-oculto{ display:none !important; }
.bs-report-progress-text{ font-size:12px; color:var(--bs-muted); margin-bottom:8px; }
.bs-report-progress-bar{ height:8px; background:var(--bs-neutral-tag); }
.bs-report-progress-bar i{ display:block; height:100%; width:16%; background:var(--bs-red); transition:width .2s; }

.bs-report-main{ flex:1; min-width:0; padding:26px 30px 0 32px; display:flex; flex-direction:column; }
.bs-report-main > *{ max-width:880px; width:100%; }
.bs-report-head{ margin-bottom:22px; }
.bs-report-title{ font-family:var(--bs-font-head); font-size:30px; font-weight:600; margin:0; line-height:1.1; color:var(--bs-ink); }
.bs-report-help{ font-size:13px; color:var(--bs-muted); margin-top:5px; line-height:1.45; }

/* --- contenedores heredados: sin cajas, sin padding --- */
.bs-report .content-wrap, .bs-report .content-white, .bs-report .bg-input-gray, .bs-report .certificate-panel{
  background:transparent !important; border:0 !important; padding:0 !important; margin:0 !important; box-shadow:none !important; height:auto !important; border-radius:0 !important; overflow:visible !important;
}
.bs-report .content-float-form, .bs-report .style-form.module_import{ padding:0 !important; margin:0 !important; background:transparent !important; width:auto !important; float:none !important; max-width:none !important; }
.bs-report .cols{ margin:0 !important; padding:0 !important; width:auto !important; }
.bs-report .cols:after, .bs-report .cols:before{ display:none !important; }
.bs-report #report-main-step-content.is-hidden{ display:none; }
.bs-report .report-step-panel{ display:none; }
.bs-report .report-step-panel.is-active:not([data-step="5"]):not([data-step="6"]),
.bs-report .report-step-panel[data-step="5"].is-active .style-form > .cols{ display:grid; grid-template-columns:1fr 1fr; gap:16px 18px; align-items:start; }
.bs-report .report-step-panel[data-step="5"].is-active, .bs-report .report-step-panel[data-step="6"].is-active{ display:block; }
.bs-report .report-step-panel .col-1, .bs-report .report-step-panel .col-2, .bs-report .report-step-panel .col-3{
  float:none !important; width:auto !important; max-width:none !important; padding:0 !important; margin:0 !important; min-width:0; box-sizing:border-box;
}
.bs-report .report-step-panel .col-1{ grid-column:1 / -1; }
.bs-report .report-step-panel .width-limit1{ max-width:none !important; }
.bs-report .report-step-panel .col-1:has(> button.left-button-right){ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-top:8px !important; }
.bs-report .report-step-panel .col-1:has(> button.left-button-right) label{ margin:0; }

/* etiquetas */
.bs-report label.text-normal{ display:block; float:none !important; width:auto !important; margin:0 0 5px; padding:0; font-size:12px; color:var(--bs-muted); font-weight:400; line-height:1.35; text-align:left; }
.bs-report label.text-normal > b{ font-family:var(--bs-font-head); font-size:18px; font-weight:600; color:var(--bs-ink); display:inline-block; margin-right:6px; line-height:1.2; }
.bs-report .col-1 > label.text-normal > b{ margin-top:10px; }
.bs-report .report-vehicle-heading{ margin-top:8px !important; }
.bs-tpl-hint{ display:inline-block; font-size:11px; color:var(--bs-muted); font-weight:400; }
.bs-tpl-hint em{ font-style:normal; }
.bs-tpl-tag{ font-family:Menlo, Consolas, monospace; font-size:10.5px; background:#fef3c7; color:#b45309; padding:1px 5px; margin:0 1px; }

/* controles */
.bs-report .style-form.module_import input[type="text"],
.bs-report .style-form.module_import textarea,
.bs-report .certificate-section input[type="text"],
.bs-report .certificate-section textarea{
  display:block; width:100%; height:42px; border:1px solid var(--bs-border) !important; background:var(--bs-surface) !important; font:inherit; font-size:14px; padding:0 10px; color:var(--bs-ink);
  margin:0 !important; border-radius:var(--bs-radius) !important; box-shadow:none !important; float:none; box-sizing:border-box; outline:0;
}
.bs-report .style-form.module_import textarea, .bs-report .certificate-section textarea{ height:auto !important; min-height:150px; padding:12px; line-height:1.6; resize:vertical; }
.bs-report .style-form.module_import input[type="text"]:focus, .bs-report .style-form.module_import textarea:focus,
.bs-report .certificate-section input[type="text"]:focus, .bs-report .certificate-section textarea:focus{ border-color:var(--bs-red) !important; }
.bs-report .style-form.module_import input[readonly]:not(.customer-selector-input):not(.service-selector-input),
.bs-report .certificate-section input[readonly]{ background:var(--bs-surface-2) !important; color:var(--bs-ink) !important; }
.bs-report #titulo_informe, .bs-report #titulo_acta{ font-family:var(--bs-font-head); font-size:18px; height:44px; }
.bs-report .wpcf7-form-control-wrap{ display:block; position:static; float:none; width:auto; }
.bs-report .warning{ display:block; color:var(--bs-red); font-size:12px; margin-top:4px; }

/* selectores de entidad (cliente, vehiculo, codigo de servicio) */
.bs-report .style-form.module_import input.customer-selector-input,
.bs-report .style-form.module_import input.service-selector-input{
  cursor:pointer; padding-right:36px; background-color:var(--bs-surface) !important;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2363666b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>") !important;
  background-repeat:no-repeat !important; background-position:right 10px center !important;
}
.bs-report .service-code-field{ display:flex; gap:8px; align-items:stretch; position:static; width:auto; }
.bs-report .service-code-field > input{ flex:1; min-width:0; }
.bs-report .service-code-field button.btn-edit-product, .bs-report .service-code-field button.btn-edit-vehiculo{
  position:static; width:42px; height:42px; flex:none; border:1px solid var(--bs-border); background:var(--bs-surface); color:var(--bs-muted); display:grid; place-items:center; padding:0; margin:0; cursor:pointer; border-radius:var(--bs-radius); box-shadow:none; transform:none;
}
.bs-report .service-code-field button:hover{ border-color:var(--bs-gray-dark); color:var(--bs-ink); }
.bs-report .service-code-field button:disabled{ opacity:.4; cursor:not-allowed; }
.bs-report .service-code-field button svg{ width:15px; height:15px; }

/* listas numeradas (actividades, recomendaciones, encuesta) */
.bs-report .row{ display:flex; align-items:center; gap:10px; margin:0 0 10px; padding:0; float:none; width:auto; }
.bs-report .row:after{ display:none; }
.bs-report .coline-1{ width:38px; flex:none; float:none; display:block; margin:0; padding:0; font-family:var(--bs-font-head); font-size:14px; font-weight:600; color:var(--bs-muted); line-height:1; text-align:left; }
.bs-report .coline-2{ flex:1; min-width:0; float:none; display:block; width:auto; margin:0; padding:0; }
.bs-report .stylelinedel, .bs-report .stylelineadd, .bs-report .stylelineview{ flex:none; float:none; display:block; width:auto; margin:0; padding:0; }
.bs-report button.btn-fix-col-1{
  width:42px !important; height:42px !important; min-width:0; border:1px solid var(--bs-border) !important; background:var(--bs-surface) !important; color:var(--bs-muted) !important;
  font-family:var(--bs-font-head); font-size:20px !important; line-height:1 !important; display:grid !important; place-items:center; padding:0 !important; margin:0 !important;
  cursor:pointer; border-radius:var(--bs-radius) !important; box-shadow:none !important; float:none !important; text-transform:none; letter-spacing:0;
}
.bs-report button.btn-fix-col-1:hover{ border-color:var(--bs-gray-dark) !important; color:var(--bs-ink) !important; }
.bs-report button.btn-fix-col-1.btn-red:hover{ border-color:var(--bs-red) !important; color:var(--bs-red) !important; }
.bs-report button.gallery-preview-btn svg{ width:16px; height:16px; fill:currentColor; }
.bs-report button.left-button-right{
  width:auto !important; height:36px !important; padding:0 14px !important; font-size:12px !important; font-family:var(--bs-font-head); font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--bs-ink) !important; float:none !important; display:inline-grid !important;
}
.bs-report #add-actividades::after, .bs-report #add-recomendaciones::after{ content:" Añadir línea"; }
.bs-report #add-fotos::after{ content:" Añadir foto"; }
.bs-report #add-encuesta::after{ content:" Añadir pregunta"; }
/* actividades: menu de "Añadir línea" y líneas semi-predefinidas (texto fijo + huecos).
   Los !important ganan a las reglas heredadas de style.css para input/select/button del form. */
.bs-report .report-step-panel .col-1:has(> .bs-act-pop){ position:relative; }
.bs-report .bs-act-pop{ top:calc(100% + 4px); padding:10px; }
.bs-report .bs-act-pop .bs-pop-option{ display:block !important; width:100% !important; height:auto !important; min-height:0 !important; margin:0 !important; padding:9px 10px !important; border:0 !important; background:transparent !important; color:var(--bs-ink) !important; font-family:var(--bs-font-body) !important; font-size:14px !important; font-weight:400 !important; letter-spacing:0 !important; text-transform:none !important; text-align:left; line-height:1.3 !important; cursor:pointer; }
.bs-report .bs-act-pop .bs-pop-option:hover{ background:var(--bs-surface-2) !important; }
.bs-act-pop-sep{ margin-top:6px; padding-top:10px; border-top:1px solid var(--bs-border-soft); }
.bs-report .bs-act-line{ display:flex; flex-wrap:wrap; align-items:center; gap:4px 6px; min-height:42px; padding:5px 10px; border:1px solid var(--bs-border); background:var(--bs-surface); color:var(--bs-ink); font-size:14px; line-height:1.3; box-sizing:border-box; }
.bs-report .style-form .bs-act-line .bs-act-slot{ width:auto !important; max-width:100%; height:30px !important; min-height:0 !important; margin:0 !important; padding:0 8px !important; border:1px solid var(--bs-border) !important; border-radius:var(--bs-radius) !important; background-color:var(--bs-surface-2) !important; color:var(--bs-ink) !important; font-family:var(--bs-font-body) !important; font-size:14px !important; font-weight:600 !important; line-height:28px !important; box-shadow:none !important; float:none !important; display:inline-block !important; box-sizing:border-box; }
.bs-report .style-form .bs-act-line select.bs-act-slot{ padding-right:30px !important; cursor:pointer; }
.bs-report .style-form .bs-act-line .bs-act-slot:focus{ border-color:var(--bs-red) !important; outline:0; }
.bs-report .style-form .bs-act-line select.bs-act-slot.is-pending{ border-color:var(--bs-red) !important; }
/* actividades: subtareas (5.1.1...) bajo su fila; el "+" de la fila las anade */
.bs-report #zone-actividades .row{ flex-wrap:wrap; }
.bs-report #zone-actividades .stylelinedel + .stylelineadd{ margin-left:-6px; }
.bs-report .bs-act-subs{ flex:0 0 100%; box-sizing:border-box; padding-left:48px; display:flex; flex-direction:column; gap:6px; margin-top:-2px; }
.bs-report .bs-act-sub{ display:flex; align-items:center; gap:10px; }
.bs-report .bs-act-sub-num{ width:46px; flex:none; font-family:var(--bs-font-head); font-size:13px; font-weight:600; color:var(--bs-muted); }
.bs-report .style-form .bs-act-sub .bs-act-sub-input{ flex:1; min-width:0; width:auto !important; height:36px !important; min-height:0 !important; margin:0 !important; padding:0 10px !important; border:1px solid var(--bs-border) !important; border-radius:var(--bs-radius) !important; background:var(--bs-surface) !important; color:var(--bs-ink) !important; font-family:var(--bs-font-body) !important; font-size:14px !important; box-shadow:none !important; float:none !important; box-sizing:border-box; }
.bs-report .style-form .bs-act-sub .bs-act-sub-input:focus{ border-color:var(--bs-red) !important; outline:0; }
.bs-report .bs-act-sub button.bs-act-sub-del{ width:36px !important; height:36px !important; flex:none; }
.bs-report .bs-act-sub button.bs-act-sub-del:hover{ border-color:var(--bs-red) !important; color:var(--bs-red) !important; }
.bs-report #zone-actividades .stylelineadd{ position:relative; }
.bs-report button.bs-act-sub-add{ font-size:14px !important; font-weight:600; letter-spacing:.02em; }
.bs-report .bs-act-sub-pop{ top:calc(100% + 4px); right:0; max-height:340px; overflow:auto; }
.bs-report .bs-act-sub .bs-act-line{ flex:1; min-width:0; min-height:36px; padding:2px 10px; }
.bs-report .style-form .bs-act-line .bs-act-slot--input{ width:80px !important; }
.bs-report .style-form .bs-act-line .bs-act-slot--wide{ width:190px !important; }
.bs-report .style-form .bs-act-line .bs-act-slot--input:placeholder-shown{ border-color:var(--bs-border) !important; border-bottom-color:var(--bs-gray-dark) !important; }


/* galeria de fotos */
.bs-report #zone-fotos{ border:1px solid var(--bs-border); background:var(--bs-surface); }
.bs-report #zone-fotos > .cols{ display:flex !important; align-items:center; gap:12px; padding:8px 14px; border-bottom:1px solid var(--bs-border-soft); }
.bs-report #zone-fotos > .cols:last-child{ border-bottom:0; }
.bs-report #zone-fotos > .cols:hover{ background:var(--bs-surface-2); }
.bs-report #zone-fotos > .cols > .col-2:first-child{ flex:1; min-width:0; display:flex; align-items:center; gap:8px; }
.bs-report #zone-fotos > .cols > .col-2:first-child .coline-2{ flex:1; }
.bs-report #zone-fotos > .cols > .col-2:last-child{ flex:0 0 300px; }
.bs-report #zone-fotos .stylelinedel + .stylelineadd, .bs-report #zone-fotos .stylelineadd + .stylelineview{ margin-left:-2px; }
/* foto de cada subtarea, en su misma fila del paso Actividades (jquery.report.gallery.js).
   .cols arrastra los estilos heredados de fila (style.css): se anulan aqui. */
.bs-report .bs-act-sub .bs-sub-photo{ flex:none !important; display:flex !important; flex-direction:row; flex-wrap:nowrap; align-items:center; gap:6px; width:auto !important; float:none !important; margin:0 !important; padding:0 !important; }
.bs-report .bs-act-sub .bs-sub-photo:before, .bs-report .bs-act-sub .bs-sub-photo:after{ display:none !important; }
.bs-report .bs-act-sub .bs-sub-photo .control-field-upload{ flex:none; width:200px !important; height:36px !important; min-height:0 !important; margin:0 !important; padding:0 10px !important; }
.bs-report .bs-act-sub .bs-sub-photo .control-field-upload .text{ font-size:13px; }
.bs-report .bs-act-sub .bs-sub-photo .control-field-upload.bs-gal-missing{ border-color:var(--bs-red) !important; }
.bs-report .bs-act-sub .bs-sub-photo .control-field-upload.bs-gal-missing .text{ color:var(--bs-red); }
.bs-report .bs-act-sub .bs-sub-photo .bs-gal-warning{ display:none; }
.bs-report .bs-act-sub .bs-sub-photo button.gallery-preview-btn{ width:36px !important; height:36px !important; flex:none; }
/* fotos de informes anteriores (solo lectura) */
.bs-report #zone-fotos-wrap > label{ display:block; margin:14px 0 6px; }
.bs-report #zone-fotos .control-field-upload .bs-gal-warning{ margin-right:30px; }
@media (max-width: 1023px){
  .bs-report .bs-act-sub{ flex-wrap:wrap; }
  .bs-report .bs-act-sub .bs-sub-photo{ flex:1 1 100% !important; margin-left:56px !important; }
  .bs-report .bs-act-sub .bs-sub-photo .control-field-upload{ flex:1; width:auto !important; }
}
.bs-report .control-field-upload{
  position:relative; display:flex !important; align-items:center; gap:8px; height:42px; min-height:42px; margin:0 !important; padding:0 10px !important;
  border:1px solid var(--bs-border) !important; background:var(--bs-surface) !important; width:100% !important; float:none; cursor:pointer; box-sizing:border-box; text-decoration:none; border-radius:var(--bs-radius) !important;
}
.bs-report .control-field-upload:hover{ border-color:var(--bs-gray-dark) !important; }
.bs-report .control-field-upload .icon-right{ position:static; width:auto; height:auto; padding:0; background:transparent; display:grid; place-items:center; flex:none; right:auto; top:auto; z-index:auto; }
.bs-report .control-field-upload .icon-right i{ width:16px; height:16px; background-size:16px !important; opacity:.7; margin:0; }
.bs-report .control-field-upload .text{ flex:1; min-width:0; height:auto; line-height:1.3; padding:0; font-size:13px; color:var(--bs-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bs-report .control-field-upload.sucess-val{ background:var(--bs-surface-2) !important; }
.bs-report .control-field-upload.sucess-val .text{ color:var(--bs-ink) !important; }
.bs-report .control-field-upload label, .bs-report .control-field-upload input[type="file"]{ position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; margin:0; padding:0; }

/* certificado */
.bs-report .certificate-required, .bs-report .certificate-test-result{ display:flex; align-items:center; gap:16px; padding:12px 16px; border:1px solid var(--bs-border); background:var(--bs-surface); margin:0 0 16px; font-size:13.5px; }
.bs-report .certificate-required > span, .bs-report .certificate-test-result > span{ font-family:var(--bs-font-head); font-weight:600; font-size:15px; color:var(--bs-ink); }
.bs-report .certificate-required label, .bs-report .certificate-test-result label{ display:inline-flex; align-items:center; gap:6px; margin:0; font-size:13.5px; color:var(--bs-ink); cursor:pointer; }
.bs-report .certificate-required input[type="radio"], .bs-report .certificate-test-result input[type="radio"]{ accent-color:var(--bs-red); width:15px; height:15px; margin:0; }
.bs-report .certificate-test-result{ margin:12px 0 0; }
.bs-report #certificate-fields.is-disabled{ opacity:.5; pointer-events:none; }
.bs-report .certificate-section{ border:1px solid var(--bs-border); background:var(--bs-surface); padding:18px 20px; margin:0 0 16px; }
.bs-report .certificate-section h3{ font-family:var(--bs-font-head); font-size:18px; font-weight:600; margin:0 0 14px; color:var(--bs-ink); }
.bs-report .certificate-grid{ display:grid; gap:0 18px; }
.bs-report .certificate-grid-2{ grid-template-columns:1fr 1fr; }
.bs-report .certificate-grid-3{ grid-template-columns:repeat(3, minmax(0,1fr)); gap:14px 18px; }
.bs-report .certificate-grid label{ display:flex; flex-direction:column; gap:5px; margin:0 0 12px; font-size:12px; color:var(--bs-muted); }
.bs-report .certificate-check-group{ padding:12px 14px; border:1px solid var(--bs-border-soft); background:var(--bs-surface-2); }
.bs-report .certificate-check-group h4{ font-family:var(--bs-font-head); font-size:14px; font-weight:600; margin:0 0 8px; color:var(--bs-ink); text-transform:uppercase; letter-spacing:.04em; }
.bs-report .certificate-check-group label{ flex-direction:row; align-items:center; gap:8px; font-size:13.5px; color:var(--bs-ink); margin:0 0 6px; cursor:pointer; }
.bs-report .certificate-check-group input[type="checkbox"]{ width:15px; height:15px; margin:0; accent-color:var(--bs-red); }
.bs-report .certificate-extinguishers{ display:grid; grid-template-columns:1fr 1fr; gap:12px 18px; margin-top:16px; }
.bs-report .certificate-extinguishers > div{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:10px 12px; border:1px solid var(--bs-border-soft); background:var(--bs-surface-2); }
.bs-report .certificate-extinguishers label{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; color:var(--bs-muted); margin:0; }
.bs-report .certificate-extinguishers input[type="text"]{ width:72px; height:36px; }
.bs-report .cert-combo{ position:relative; display:block; }
.bs-report .cert-combo input{ padding-right:36px; }
.bs-report .cert-combo button.cert-combo-toggle, .bs-report .ext-dropdown button.ext-dropdown-toggle{ border-radius:var(--bs-radius); box-shadow:none; font-family:var(--bs-font-body); }
.bs-report .cert-combo-menu, .bs-report .ext-dropdown-menu{ border:1px solid var(--bs-border); background:var(--bs-surface); box-shadow:none; border-radius:var(--bs-radius-md); }
.bs-report .cert-combo-option, .bs-report .ext-dropdown-option{ font-size:13.5px; padding:8px 10px; }
.bs-report .cert-combo-option:hover, .bs-report .ext-dropdown-option:hover{ background:var(--bs-surface-2); }
.bs-report .cert-combo-option.is-selected, .bs-report .ext-dropdown-option.is-selected{ background:var(--bs-surface-2); color:var(--bs-ink); font-weight:600; }

/* barra de acciones */
.bs-report .report-step-actions{
  position:sticky; bottom:0; display:flex; align-items:center; gap:10px; padding:14px 0 18px; margin-top:24px; border-top:1px solid var(--bs-border); background:var(--bs-bg); z-index:5;
}
.bs-report .report-step-actions .bs-btn{ height:40px; }
.bs-report .report-step-actions #btn-cancel-data{ order:1; }
.bs-report .report-step-actions #btn-save-draft{ order:2; }
.bs-report .report-step-actions #btn-step-prev{ order:3; margin-left:auto; }
.bs-report .report-step-actions #btn-step-next, .bs-report .report-step-actions #btn-save-data{ order:4; }
.bs-report .report-step-actions #btn-step-prev:disabled{ opacity:.45; cursor:not-allowed; }

/* selectores de entidad (modales) */
.bs-pick-list--tall{ max-height:380px; }
.bs-modal-foot--between{ justify-content:space-between; }
.bs-modal-foot--between .bs-muted{ font-size:13px; }
.bs-modal .bs-btn.service-selector-create{ width:auto; }

/* recorte de foto */
.bs-crop-body{ align-items:center; }
.bs-crop-body .imageBox_profile{ margin:0 auto; }
.bs-crop-zoom{ display:flex; gap:8px; justify-content:center; }

@media (max-width: 1023px){
  .bs-report{ flex-direction:column; min-height:0; }
  .bs-report-side{ width:auto; height:auto; position:static; border-right:0; border-bottom:1px solid var(--bs-border); padding:12px 0 0; }
  .bs-report .report-step-tabs{ flex-direction:row; overflow-x:auto; }
  .bs-report .report-step-tabs .report-step-tab{ width:auto; border-left:0; border-bottom:3px solid transparent; padding:10px 14px; white-space:nowrap; }
  .bs-report .report-step-tabs .report-step-tab.is-active{ border-bottom-color:var(--bs-red); }
  .bs-step-lbl small{ display:none; }
  .bs-report-progress{ display:none; }
  .bs-report-main{ padding:20px 16px 0; }
  .bs-report .report-step-panel.is-active:not([data-step="5"]):not([data-step="6"]),
  .bs-report .report-step-panel[data-step="5"].is-active .style-form > .cols{ grid-template-columns:1fr; }
  .bs-report #zone-fotos > .cols{ flex-wrap:wrap; }
  .bs-report #zone-fotos > .cols > .col-2:last-child{ flex:1 1 100%; }
  .bs-report .certificate-grid-2, .bs-report .certificate-grid-3, .bs-report .certificate-extinguishers{ grid-template-columns:1fr; }
  .bs-report .report-step-actions{ flex-wrap:wrap; }
}
.bs-report button.left-button-right{ display:inline-flex !important; align-items:center; gap:6px; white-space:nowrap; }
.bs-report .style-form.module_import .certificate-extinguishers input[type="text"]{ width:76px; display:inline-block; height:36px; }
.bs-report .style-form.module_import .certificate-extinguishers .ext-dropdown{ flex:0 0 150px; }
.bs-report .certificate-extinguishers > div{ display:grid; grid-template-columns:150px repeat(3, minmax(0,1fr)); align-items:center; gap:10px; }
.bs-report .certificate-extinguishers label{ display:flex; align-items:center; gap:6px; white-space:nowrap; }
.bs-report .style-form.module_import .certificate-extinguishers input[type="text"]{ width:100% !important; min-width:0; flex:1; display:block; }
.bs-report .style-form.module_import .certificate-extinguishers .ext-dropdown{ flex:none; }
#page-content.bs-report-page{ overflow-x:hidden; }
.bs-report, .bs-report-side, .bs-report-main{ max-width:100%; min-width:0; }
.bs-report .report-step-tabs{ min-width:0; max-width:100%; }
.bs-report .certificate-extinguishers{ grid-template-columns:1fr; }
.bs-report .certificate-extinguishers > div{ grid-template-columns:150px repeat(3, minmax(110px, 1fr)); }
.bs-report .style-form.module_import .certificate-extinguishers input[type="text"]{ min-width:56px; }
@media (max-width: 700px){ .bs-report .certificate-extinguishers > div{ grid-template-columns:1fr 1fr; } }
.bs-report .report-step-panel .col-1 > button.left-button-right{ margin:0 !important; }
/* campos del informe mas anchos: el contenido usa todo el ancho disponible */
.bs-report-main > *{ max-width:1240px; }
.bs-report .report-step-actions{ max-width:1240px; }
/* el panel del paso ocupa todo el ancho (el .cols heredado era flex y lo encogia) */
.bs-report .style-form.module_import > .cols{ display:block !important; }
.bs-report .report-step-panel{ width:100% !important; max-width:none !important; box-sizing:border-box; }
.bs-report #zone-fotos > .cols{ padding:8px 14px !important; }
.bs-report #zone-fotos > .cols > .col-2:last-child{ flex:0 0 260px; }
.bs-report #zone-fotos .coline-2 input, .bs-report .coline-2 input{ width:100% !important; }
/* aire entre el titulo de seccion con su boton "+ Añadir…" y las filas */
.bs-report .report-step-panel .col-1:has(> button.left-button-right){ margin:14px 0 6px !important; }
.bs-report .report-step-panel .col-1:has(> button.left-button-right) + .col-1{ margin-top:0 !important; }
.bs-report .row{ margin-bottom:10px; }
.bs-report #zone-actividades, .bs-report #zone-recomendaciones, .bs-report #zone-encuesta{ padding-top:4px !important; }
/* Nunca oscurecer la pantalla: el sombreado heredado del buscador/campana queda anulado
   (los JS le hacen fadeIn con estilo inline; el !important lo gana). */
#highlight-background, .inner-highlight-background{ display:none !important; opacity:0 !important; pointer-events:none !important; }
/* Contactanos: dos columnas como el original (contacto a la izquierda, propuesta/enlaces/video a la derecha) */
.bs-contact-layout{ display:grid; grid-template-columns:400px minmax(0,1fr); gap:20px; align-items:start; }
.bs-contact{ max-width:none; }
.bs-contact-list{ padding:18px 24px 24px; display:flex; flex-direction:column; gap:10px; }
.bs-contact-list .bs-contact-btn{ justify-content:center; font-family:var(--bs-font-head); font-weight:600; font-size:14px; min-height:46px; }
.bs-contact-list .bs-contact-btn span{ flex:none; text-align:center; }
.bs-contact-info .bs-acc summary{ font-size:18px; }
.bs-acc-links{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.bs-acc-links li{ margin:0; padding-left:14px; position:relative; }
.bs-acc-links li::before{ content:""; position:absolute; left:0; top:9px; width:5px; height:5px; background:var(--bs-red); }
.bs-acc-links a{ color:var(--bs-ink); font-size:14px; }
.bs-acc-links a:hover{ color:var(--bs-red); }
.bs-contact-info .bs-video{ max-width:760px; margin:0 auto; }
@media (max-width: 1100px){ .bs-contact-layout{ grid-template-columns:1fr; } }
/* Repuestos (cliente): filas con aire dentro del panel, bordes que no se tocan */
.bs-docs-client{ padding:14px; display:flex; flex-direction:column; gap:10px; }
.bs-docs-client-row{ border:1px solid var(--bs-border); padding:14px 16px; background:var(--bs-surface); }
.bs-docs-client-row:last-child{ border-bottom:1px solid var(--bs-border); }
.bs-docs-client-row:hover{ border-color:var(--bs-gray-dark); }
.bs-docs-client-ico{ border:0; background:var(--bs-surface-2); }
.bs-docs-client .bs-empty--inset{ margin:0; }

/* ============================================================================
   Dashboard de operaciones (admin)
   ========================================================================== */
.bs-ops{ display:flex; flex-direction:column; gap:22px; }
.bs-ops .bs-page-head{ margin-bottom:0; }
.bs-ops-kpis{ grid-template-columns:repeat(4, minmax(0,1fr)); }
.bs-kpi--link{ color:inherit; text-decoration:none; transition:border-color .15s; }
.bs-kpi--link:hover{ border-color:var(--bs-gray-dark); color:inherit; }
.bs-kpi-note--alert{ color:var(--bs-red); }
.bs-chart-grid--3{ grid-template-columns:repeat(3, minmax(0,1fr)); }
.bs-chart-sub{ font-family:var(--bs-font-body); font-size:12px; font-weight:400; color:var(--bs-muted); margin-left:8px; }
.bs-chart-box{ min-height:200px; }
.bs-chart-empty{ display:grid; place-items:center; height:220px; color:var(--bs-muted); font-size:13px; border:1px dashed var(--bs-border); }
.bs-table--ops td{ vertical-align:middle; }
.bs-table--ops .bs-mono{ font-family:var(--bs-font-head); letter-spacing:.02em; }
.bs-table--ops .bs-table-actions{ text-align:right; }
.bs-tag--red{ background:#fde7e7; color:var(--bs-red); margin-left:8px; }
.bs-stat--sm{ padding:14px 16px; gap:12px; }
.bs-stat--sm .bs-stat-ico{ width:40px; height:40px; }
.bs-stat--sm .bs-stat-value{ font-size:24px; }
.bs-ops-activity{ grid-template-columns:repeat(5, minmax(0,1fr)); }
@media (max-width: 1400px){
  .bs-ops-activity{ grid-template-columns:repeat(3, minmax(0,1fr)); }
}
@media (max-width: 1200px){
  .bs-ops-kpis{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  .bs-chart-grid, .bs-chart-grid--3{ grid-template-columns:1fr; }
}
@media (max-width: 700px){
  .bs-ops-kpis, .bs-ops-activity{ grid-template-columns:1fr; }
}
/* modulos del tecnico: la regla heredada quitaba el relleno lateral y pegaba la casilla al borde */
.bs-modal .user-modulos-field .modulos-list label.check{ display:flex; align-items:center; gap:10px; min-height:42px; padding:0 12px !important; margin:0; border:1px solid var(--bs-border); background:var(--bs-surface); font-size:14px; line-height:1.3; cursor:pointer; }
.bs-modal .user-modulos-field .modulos-list label.check:hover{ border-color:var(--bs-gray-dark); }
.bs-modal .user-modulos-field .modulos-list label.check input[type="checkbox"]{ width:16px; height:16px; margin:0 !important; flex:none; accent-color:var(--bs-red); position:static; top:auto; }
.bs-modal .user-modulos-field .modulos-list{ gap:6px; }

/* ==========================================================================
   RRHH (vacaciones, descanso medico, permisos)
   ========================================================================== */
.bs-nav-badge{ display:inline-grid; place-items:center; min-width:18px; height:18px; padding:0 5px; margin-left:auto; background:var(--bs-red); color:#fff; font-family:var(--bs-font-head); font-size:11px; font-weight:600; line-height:1; }
.sidebar-left .submenu li a{ display:flex; align-items:center; }
html.sidebar-collapsed .bs-nav-badge{ display:none; }
.page-rrhh .rrhh-kpis{ margin-bottom:18px; }
.page-rrhh .rrhh-filter-select{ min-width:170px; }
.page-rrhh .bs-page-actions{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.rrhh-table td{ vertical-align:middle; }
.rrhh-row-new td:first-child{ box-shadow:inset 3px 0 0 var(--bs-red); }
.bs-table-empty-cell{ text-align:center; color:var(--bs-muted); padding:26px 12px; }
.rrhh-dias-info{ padding:10px 12px; background:var(--bs-surface-2); border:1px solid var(--bs-border-soft); font-size:13px; color:var(--bs-ink); }
.rrhh-file{ padding:8px 10px; height:auto; min-height:42px; }
.rrhh-ficha-cols{ display:grid; grid-template-columns:1fr 1fr; gap:18px; align-items:start; }
.rrhh-periodo-form{ padding:14px 16px; border-bottom:1px solid var(--bs-border); display:flex; flex-direction:column; gap:12px; }
.rrhh-resolver-actions{ display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.rrhh-adjuntos{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px; }
.rrhh-adjuntos li{ display:flex; align-items:center; gap:10px; padding:8px 10px; border:1px solid var(--bs-border-soft); background:var(--bs-surface); font-size:13px; }
.rrhh-adjuntos li a:first-child{ color:var(--bs-ink); text-decoration:underline; text-underline-offset:3px; }
.rrhh-adjuntos li .bs-help{ flex:1; }
.rrhh-upload{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.rrhh-upload-btn{ position:relative; overflow:hidden; cursor:pointer; margin:0; display:inline-flex; align-items:center; gap:6px; }
.rrhh-upload-btn input[type="file"]{ position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; height:100%; }
/* flujograma de estado: 3 pasos */
.bs-flow{ display:flex; gap:0; border:1px solid var(--bs-border); background:var(--bs-surface); }
.bs-flow-step{ flex:1; min-width:0; display:flex; gap:12px; padding:14px 16px; border-right:1px solid var(--bs-border-soft); position:relative; }
.bs-flow-step:last-child{ border-right:0; }
.bs-flow-dot{ width:28px; height:28px; flex:none; border:1px solid var(--bs-border); display:grid; place-items:center; font-family:var(--bs-font-head); font-weight:600; font-size:13px; color:var(--bs-muted); background:var(--bs-surface); }
.bs-flow-label{ font-family:var(--bs-font-head); font-size:16px; font-weight:600; color:var(--bs-muted); line-height:1.15; }
.bs-flow-date{ font-size:12px; color:var(--bs-muted); margin-top:2px; }
.bs-flow-note{ font-size:12.5px; color:var(--bs-ink); margin-top:4px; }
.bs-flow-step.is-done .bs-flow-dot{ background:var(--bs-gray-dark); border-color:var(--bs-gray-dark); color:#fff; }
.bs-flow-step.is-done .bs-flow-label{ color:var(--bs-ink); }
.bs-flow-step.is-current{ background:var(--bs-surface-2); }
.bs-flow-step.is-current .bs-flow-dot{ border-color:var(--bs-red); color:var(--bs-red); }
.bs-flow-step.is-current .bs-flow-label{ color:var(--bs-red); }
.bs-flow-step.is-bad .bs-flow-dot{ background:var(--bs-red); border-color:var(--bs-red); color:#fff; }
.bs-flow-step.is-bad .bs-flow-label{ color:var(--bs-red); }
.bs-flow-step.is-pending{ opacity:.6; }
/* historial de eventos */
.bs-timeline{ list-style:none; margin:0; padding:0; border-left:2px solid var(--bs-border); }
.bs-timeline li{ display:flex; gap:14px; padding:6px 0 10px 14px; position:relative; font-size:13px; }
.bs-timeline li::before{ content:""; position:absolute; left:-6px; top:11px; width:8px; height:8px; background:var(--bs-gray-dark); }
.bs-timeline-date{ flex:0 0 118px; color:var(--bs-muted); font-size:12px; padding-top:1px; }
.bs-timeline-body{ flex:1; min-width:0; }
/* datos clave-valor */
.bs-dl{ display:grid; grid-template-columns:140px 1fr; gap:6px 14px; margin:0; font-size:13.5px; }
.bs-dl dt{ color:var(--bs-muted); font-size:12px; padding-top:2px; }
.bs-dl dd{ margin:0; color:var(--bs-ink); }
.bs-dl dd .bs-input--sm{ width:180px; }
.bs-dl dd .bs-select--sm{ min-width:200px; }
.bs-dl dd .bs-textarea{ min-height:60px; }
/* badges de origen en asistencia */
.asis-badge-vac{ background:#DBEAFE; color:#1D4ED8; }
.asis-badge-dm{ background:#FFEAD5; color:#C2410C; }
.asis-badge-perm{ background:var(--bs-neutral-tag, #e8eaec); color:var(--bs-gray-dark); }
@media (max-width: 1023px){
  .rrhh-ficha-cols{ grid-template-columns:1fr; }
  .bs-flow{ flex-direction:column; }
  .bs-flow-step{ border-right:0; border-bottom:1px solid var(--bs-border-soft); }
  .bs-dl{ grid-template-columns:1fr; }
}

/* ==========================================================================
   Modo oscuro (html.theme-dark; boton sol/luna en la topbar, localStorage 'theme')
   La paleta se redefine en los tokens; lo que abajo se lista a mano son los
   colores que en claro no salen de un token (badges pastel, plugins).
   ========================================================================== */
html.theme-dark{
  color-scheme: dark;
  --bs-ink:          #e6e7e9;
  --bs-muted:        #a3a7ad;
  --bs-bg:           #151618;
  --bs-surface:      #1e2023;
  --bs-surface-2:    #26282c;
  --bs-border:       #3a3d42;
  --bs-border-soft:  #2c2f33;
  --bs-gray-light:   #5a5e64;
  --bs-gray-dark:    #2a2c30;   /* sidebar, cabecera de tabla, boton oscuro */
  --bs-gray-900:     #35383d;
  --bs-neutral-tag:  #33363b;
  --bs-red-100:      #3a1c1d;
  --bs-red-700:      #ff9a9c;
}
html.theme-dark body{ background:var(--bs-bg); color:var(--bs-ink); }
/* texto que en claro usa el gris oscuro de marca */
html.theme-dark #asis-m-hora,
html.theme-dark .asis-badge-perm,
html.theme-dark .asis-hbar-value,
html.theme-dark .asis-hora-valor,
html.theme-dark .bs-act:hover,
html.theme-dark .bs-chart-title .num,
html.theme-dark .bs-docs-client-ico,
html.theme-dark .bs-group-serie,
html.theme-dark .bs-icon-btn,
html.theme-dark .bs-input-wrap .bs-eye:hover,
html.theme-dark .bs-kpi-value,
html.theme-dark .bs-link-sm,
html.theme-dark .bs-list-panel td.bs-count-cell,
html.theme-dark .bs-module-ico,
html.theme-dark .bs-module-tags .bs-tag,
html.theme-dark .bs-panel-head .bs-panel-ico,
html.theme-dark .bs-plan-pct,
html.theme-dark .bs-stat-ico,
html.theme-dark .bs-stat-value,
html.theme-dark .bs-table--apikeys td.bs-code-cell,
html.theme-dark .bs-table--informes td.bs-code-cell,
html.theme-dark .bs-table--lista .bs-serie-cell,
html.theme-dark .bs-table--notif .bs-serie-cell,
html.theme-dark .bs-tag--neutral,
html.theme-dark .bs-user-av,
html.theme-dark .bs-user-av.alt,
html.theme-dark .sch-table td.sch-serie,
html.theme-dark .sch-table tfoot td,
html.theme-dark .sidebar-toggle,
html.theme-dark /* Vencimiento: el unico dato que se tine de rojo en la tabla */
.bs-status{ color:var(--bs-ink); }
html.theme-dark .bs-btn--dark{ background:var(--bs-ink); color:var(--bs-bg); border-color:var(--bs-ink); }
html.theme-dark .bs-btn--dark:hover{ background:#ffffff; color:var(--bs-bg); }
html.theme-dark .bs-seg > .is-active{ background:var(--bs-ink); color:var(--bs-bg); }
html.theme-dark .bs-table thead th{ background:var(--bs-surface-2); color:var(--bs-ink); }
html.theme-dark .bs-flow-step.is-done .bs-flow-dot{ background:var(--bs-ink); border-color:var(--bs-ink); color:var(--bs-bg); }
html.theme-dark .bs-timeline li::before{ background:var(--bs-ink); }
html.theme-dark .bs-select{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a3a7ad' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}
html.theme-dark .bs-select{ background-repeat:no-repeat; background-position:right 10px center; }
html.theme-dark .bs-select--sm{ background-position:right 8px center; }
html.theme-dark .bs-module-tags .bs-tag{ background:var(--bs-neutral-tag); }
html.theme-dark .asis-bar{ fill:var(--bs-muted); }
html.theme-dark .asis-bar:hover{ fill:var(--bs-ink); }
html.theme-dark .asis-hbar-fill{ background:var(--bs-muted); }
/* estados "activo" que en claro son gris oscuro + texto blanco: en oscuro se invierten */
html.theme-dark .bs-btn.is-on, html.theme-dark .asis-btn-outline.asis-filter-on, html.theme-dark .asis-page-on, html.theme-dark .asis-page-on:hover,
html.theme-dark .asis-marcar-tabs .asis-tab-on, html.theme-dark .asis-marcar-tabs .asis-tab-on:hover, html.theme-dark .sch-toggle.on,
html.theme-dark .bs-panel .dataTables_paginate .paginate_button.current, html.theme-dark .bs-panel .dataTables_paginate .paginate_button.current:hover,
html.theme-dark .ui-datepicker td a.ui-state-active, html.theme-dark .jconfirm .jconfirm-box .jconfirm-buttons button.btn-dark{
  background:var(--bs-ink) !important; border-color:var(--bs-ink) !important; color:var(--bs-bg) !important;
}
html.theme-dark .bs-plan-bar > span{ background:var(--bs-muted); }
html.theme-dark .bs-plan-bar, html.theme-dark .bs-report-progress-bar, html.theme-dark .asis-hbar-track{ background:var(--bs-neutral-tag); }
/* ApexCharts (dashboards): tooltip, leyenda, ejes y rejilla */
html.theme-dark .apexcharts-tooltip{ background:var(--bs-surface) !important; color:var(--bs-ink) !important; border-color:var(--bs-border) !important; }
html.theme-dark .apexcharts-tooltip-title{ background:var(--bs-surface-2) !important; color:var(--bs-ink) !important; border-color:var(--bs-border) !important; }
html.theme-dark .apexcharts-tooltip-text, html.theme-dark .apexcharts-tooltip-series-group{ color:var(--bs-ink) !important; }
html.theme-dark .apexcharts-xaxistooltip, html.theme-dark .apexcharts-yaxistooltip{ background:var(--bs-surface-2) !important; color:var(--bs-ink) !important; border-color:var(--bs-border) !important; }
html.theme-dark .apexcharts-xaxistooltip-bottom:before, html.theme-dark .apexcharts-xaxistooltip-bottom:after{ border-bottom-color:var(--bs-surface-2) !important; }
html.theme-dark .apexcharts-legend-text{ color:var(--bs-ink) !important; }
html.theme-dark .apexcharts-xaxis-label, html.theme-dark .apexcharts-yaxis-label, html.theme-dark .apexcharts-datalabel-label,
html.theme-dark .apexcharts-datalabel-value, html.theme-dark .apexcharts-title-text, html.theme-dark .apexcharts-yaxis-title-text,
html.theme-dark .apexcharts-xaxis-title-text{ fill:var(--bs-muted) !important; }
html.theme-dark .apexcharts-gridline{ stroke:var(--bs-border-soft) !important; }
html.theme-dark .apexcharts-xaxis line, html.theme-dark .apexcharts-yaxis line, html.theme-dark .apexcharts-xcrosshairs{ stroke:var(--bs-border) !important; }
html.theme-dark .apexcharts-menu{ background:var(--bs-surface) !important; border-color:var(--bs-border) !important; color:var(--bs-ink) !important; }
html.theme-dark .bs-input::placeholder, html.theme-dark .bs-textarea::placeholder, html.theme-dark input::placeholder{ color:var(--bs-muted); }
/* badges pastel: mismo tono, fondo oscuro */
html.theme-dark .bs-tag--ok, html.theme-dark .asis-badge-web, html.theme-dark .asis-badge-activo{ background:#12382a; color:#6ee7b7; }
html.theme-dark .bs-tag--warn, html.theme-dark .asis-badge-manual{ background:#3d2e0d; color:#fcd34d; }
html.theme-dark .bs-tag--info, html.theme-dark .asis-badge-empleado, html.theme-dark .asis-badge-vac{ background:#1a2b4d; color:#93c5fd; }
html.theme-dark .bs-tag--orange, html.theme-dark .asis-badge-externo, html.theme-dark .asis-badge-dm{ background:#3f2412; color:#fdba74; }
html.theme-dark .bs-tag--danger, html.theme-dark .asis-badge-inactivo, html.theme-dark .bs-tag--red{ background:var(--bs-red-100); color:var(--bs-red-700); }
html.theme-dark .bs-tag--neutral, html.theme-dark .asis-badge-perm{ background:var(--bs-neutral-tag); color:var(--bs-ink); }
html.theme-dark .asis-banner-warn{ background:#3d2e0d; color:#fcd34d; border-color:#5a4512; }
html.theme-dark .bs-nav-badge{ background:var(--bs-red); color:#fff; }
/* plugins (confirm, toast) */
html.theme-dark .jconfirm .jconfirm-box{ background:var(--bs-surface); color:var(--bs-ink); }
html.theme-dark .jconfirm .jconfirm-box .jconfirm-title{ color:var(--bs-ink); }
html.theme-dark .jconfirm .jconfirm-box .jconfirm-content{ color:var(--bs-ink); }
html.theme-dark .jconfirm .jconfirm-buttons button.btn-default{ background:var(--bs-surface-2); color:var(--bs-ink); }
html.theme-dark .jq-toast-single{ background:var(--bs-surface-2); color:var(--bs-ink); }
/* boton de tema en la topbar */
.bs-theme-toggle{ cursor:pointer; }
.bs-theme-toggle .bs-theme-sun{ display:none; }
html.theme-dark .bs-theme-toggle .bs-theme-sun{ display:inline-flex; }
html.theme-dark .bs-theme-toggle .bs-theme-moon{ display:none; }
.bs-theme-toggle > span{ display:inline-flex; }

/* Flota del cliente */
.flota-table th.flota-sort{ cursor:pointer; user-select:none; }
.flota-table th.flota-sort.is-asc::after{ content:" \2191"; }
.flota-table th.flota-sort.is-desc::after{ content:" \2193"; }
.flota-table .bs-group-actions{ display:inline-flex; gap:6px; justify-content:flex-end; }
.flota-table .bs-actions-cell{ text-align:right; white-space:nowrap; }

/* modal Ubicaciones (Flota) */
.ubic-tabs{ margin-bottom:14px; }
.ubic-tabs .ubic-tab{ padding:0 18px; font-family:var(--bs-font-head); font-weight:600; font-size:14px; background:transparent; border:0; color:var(--bs-ink); cursor:pointer; }
.ubic-tabs .ubic-tab.is-active{ background:var(--bs-gray-dark); color:#fff; }
html.theme-dark .ubic-tabs .ubic-tab.is-active{ background:var(--bs-ink); color:var(--bs-bg); }
.ubic-panel{ display:flex; flex-direction:column; gap:12px; }
.ubic-table .ubic-nombre{ width:100%; }
.ubic-table .bs-actions-cell{ text-align:right; white-space:nowrap; }
.ubic-table .bs-group-actions{ display:inline-flex; gap:6px; }

/* dashboard del cliente: tarjetas de flota */
.bs-dash-kpis{ margin:0 0 18px; }
.bs-dash-kpi{ display:flex; gap:14px; align-items:flex-start; padding:16px 18px; color:inherit; text-decoration:none; position:relative; transition:border-color .15s; }
.bs-dash-kpi:hover{ border-color:var(--bs-gray-dark); color:inherit; }
.bs-dash-kpi.is-alert{ border-color:var(--bs-red); }
.bs-dash-kpi-ico{ width:44px; height:44px; flex:none; border:1px solid var(--bs-border); display:grid; place-items:center; color:var(--bs-gray-dark); }
.bs-dash-kpi.is-alert .bs-dash-kpi-ico{ color:var(--bs-red); border-color:var(--bs-red); }
.bs-dash-kpi-body{ display:flex; flex-direction:column; gap:4px; min-width:0; flex:1; padding-bottom:22px; }
.bs-dash-kpi-body .bs-kpi-label small{ font-size:10px; letter-spacing:.08em; }
.bs-dash-kpi-body .bs-kpi-value{ font-size:32px; }
.bs-dash-kpi-lines{ display:flex; flex-direction:column; gap:2px; font-size:12px; color:var(--bs-muted); margin-top:4px; }
.bs-dash-kpi-lines .is-up{ color:#047857; }
.bs-dash-kpi-lines .is-down{ color:var(--bs-red); }
.bs-dash-kpi-bar{ display:block; margin:6px 0 2px; }
.bs-dash-kpi-link{ position:absolute; right:16px; bottom:12px; font-family:var(--bs-font-head); font-weight:600; font-size:12px; color:var(--bs-gray-dark); }
.bs-chart-sub{ font-size:12px; color:var(--bs-muted); margin:-6px 0 10px; }
html.theme-dark .bs-dash-kpi-lines .is-up{ color:#6ee7b7; }
html.theme-dark .bs-dash-kpi-link, html.theme-dark .bs-dash-kpi-ico{ color:var(--bs-ink); }
@media (max-width: 1100px){ .bs-dash-kpis{ grid-template-columns:repeat(2, minmax(0,1fr)); } }

/* dashboard del cliente: filtros cruzados (clic en graficas) */
.bs-dashpro .apexcharts-bar-area, .bs-dashpro .apexcharts-pie-area, .bs-dashpro .apexcharts-legend-series{ cursor:pointer; }
.bs-dash-filters{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:-6px 0 16px; }
.bs-dash-filters-lbl{ display:inline-flex; align-items:center; gap:6px; font-family:var(--bs-font-head); font-size:11px; letter-spacing:.1em; text-transform:uppercase; color:var(--bs-muted); }
.bs-dash-chip{ display:inline-flex; align-items:center; gap:6px; padding:5px 10px; border:1px solid var(--bs-border); background:var(--bs-surface); color:var(--bs-ink); font-size:13px; text-decoration:none; }
.bs-dash-chip:hover{ border-color:var(--bs-red); color:var(--bs-ink); }
.bs-dash-chip b{ font-weight:600; color:var(--bs-muted); }
.bs-dash-chip-x{ color:var(--bs-red); font-weight:700; margin-left:2px; }

.bs-chart-title .bs-chart-toggle{ font-family:var(--bs-font-body); font-weight:400; font-size:12px; margin-left:10px; }

/* dashboard del cliente: periodo + acciones a la derecha del titulo */
.bs-dash-actions{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.bs-dash-actions .bs-period{ margin:0; }
@media (max-width: 1023px){ .bs-dash-head{ flex-direction:column; align-items:stretch; } .bs-dash-actions{ justify-content:flex-start; } }

/* ---------- Tableros (fase 05: lista y alta) ---------- */
/* categorias: paleta pastel por clave de color (d4f0_tableros_categoria.color) */
.bs-cat--verde{ background:#D1FAE5; color:#047857; }
.bs-cat--turquesa{ background:#CCFBF1; color:#0F766E; }
.bs-cat--naranja{ background:#FFEAD5; color:#C2410C; }
.bs-cat--naranja_oscuro{ background:#FED7AA; color:#9A3412; }
.bs-cat--morado{ background:#EDE9FE; color:#6D28D9; }
.bs-cat--amarillo{ background:#FEF3C7; color:#B45309; }
.bs-cat--azul{ background:#DBEAFE; color:#1D4ED8; }
.bs-cat--gris{ background:#E5E7EB; color:#4B5563; }
/* 08/10/2026: la paleta de los tipos de servicio (TipoColores) tambien en las categorias de Tableros */
.bs-cat--cian{ background:#CFFAFE; color:#0E7490; }
.bs-cat--celeste{ background:#E0F2FE; color:#0369A1; }
.bs-cat--indigo{ background:#E0E7FF; color:#4338CA; }
.bs-cat--lila{ background:#F3E8FF; color:#7E22CE; }
.bs-cat--rosa{ background:#FCE7F3; color:#BE185D; }
.bs-cat--rojo{ background:#FEE2E2; color:#B91C1C; }
.bs-cat--verde_claro{ background:#DCFCE7; color:#15803D; }
.bs-cat--pizarra{ background:#E7ECF3; color:#475569; }
html.theme-dark .bs-cat--verde{ background:#12382a; color:#6ee7b7; }
html.theme-dark .bs-cat--turquesa{ background:#0f3533; color:#5eead4; }
html.theme-dark .bs-cat--naranja{ background:#3f2412; color:#fdba74; }
html.theme-dark .bs-cat--naranja_oscuro{ background:#4a1f0c; color:#fb923c; }
html.theme-dark .bs-cat--morado{ background:#2a2146; color:#c4b5fd; }
html.theme-dark .bs-cat--amarillo{ background:#3d2e0d; color:#fcd34d; }
html.theme-dark .bs-cat--azul{ background:#1a2b4d; color:#93c5fd; }
html.theme-dark .bs-cat--gris{ background:var(--bs-neutral-tag); color:var(--bs-ink); }
html.theme-dark .bs-cat--cian{ background:#16353b; color:#67e8f9; }
html.theme-dark .bs-cat--celeste{ background:#0f2f45; color:#7dd3fc; }
html.theme-dark .bs-cat--indigo{ background:#23264d; color:#a5b4fc; }
html.theme-dark .bs-cat--lila{ background:#321f48; color:#d8b4fe; }
html.theme-dark .bs-cat--rosa{ background:#3d1f31; color:#f9a8d4; }
html.theme-dark .bs-cat--rojo{ background:#3f1d1d; color:#fca5a5; }
html.theme-dark .bs-cat--verde_claro{ background:#14361f; color:#86efac; }
html.theme-dark .bs-cat--pizarra{ background:#2a313b; color:#cbd5e1; }
/* Listas: elegir el color de un tipo de servicio */
.tipo-colores{ display:flex; flex-wrap:wrap; gap:6px; }
.tipo-color-op{ position:relative; cursor:pointer; }
.tipo-color-op input{ position:absolute; opacity:0; pointer-events:none; }
.tipo-color-muestra{ display:inline-flex; align-items:center; justify-content:center; width:40px; height:30px; border:1px solid; border-radius:var(--bs-radius);
  font-family:var(--bs-font-head); font-weight:600; font-size:12px; }
.tipo-color-op input:checked + .tipo-color-muestra{ box-shadow:0 0 0 2px var(--bs-surface), 0 0 0 4px var(--bs-ink); }
.tipo-color-op input:focus-visible + .tipo-color-muestra{ outline:2px solid var(--bs-red); outline-offset:2px; }
.tipo-color-ayuda{ display:block; margin-top:6px; }

/* error de un campo de formulario (mismo texto que la API) */
.bs-field.has-error .bs-input, .bs-field.has-error .bs-select, .bs-field.has-error .bs-textarea, .bs-field.has-error .bs-pick-list{ border-color:var(--bs-red); }
.bs-field-error{ display:block; font-size:12px; color:var(--bs-red); margin-top:4px; }

.tb-head-actions{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.tb-head-actions .bs-seg > *{ display:inline-flex; align-items:center; gap:6px; padding:0 14px; font-family:var(--bs-font-head); font-weight:600; font-size:14px; text-decoration:none; }
.tb-head-actions .bs-seg > :not(.is-active){ color:var(--bs-ink); }
.tb-seg-off{ opacity:.45; cursor:not-allowed; }
#tb-refrescar.is-loading .bs-ico{ animation:tb-spin .8s linear infinite; }
@keyframes tb-spin{ to{ transform:rotate(360deg); } }
.tb-toolbar{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:0 0 14px; }
.tb-toolbar .bs-pop{ left:0; right:auto; }
.tb-search{ width:320px; max-width:100%; }
.tb-count{ display:inline-grid; place-items:center; min-width:18px; height:18px; padding:0 4px; margin-left:4px; background:var(--bs-red); color:#fff; font-size:11px; line-height:1; box-sizing:border-box; }
.tb-checks{ display:flex; flex-direction:column; gap:6px; max-height:180px; overflow:auto; padding:2px 0; }
.tb-table .tb-row{ cursor:pointer; }
.tb-table .tb-clave{ font-family:var(--bs-font-head); font-weight:600; white-space:nowrap; }
.tb-table .tb-clave a, .tb-table .tb-titulo a{ color:var(--bs-ink); text-decoration:none; }
.tb-table .tb-titulo{ min-width:240px; }
.tb-table .tb-titulo a:hover, .tb-table .tb-clave a:hover{ color:var(--bs-red); }
.tb-table .tb-num{ text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
.tb-table .tb-fecha{ white-space:nowrap; color:var(--bs-muted); font-size:13px; }
.tb-av{ width:26px; height:26px; font-size:11px; }
.tb-resp-name{ font-size:13px; }
.tb-pick-search{ width:100%; margin-bottom:6px; box-sizing:border-box; }
.tb-pick{ max-height:200px; }
/* Crear expediente: la lista de responsables flota bajo su campo (no empuja el formulario) */
.tb-c-resp{ position:relative; }
.tb-c-resp .tb-c-personas{ position:absolute; left:0; right:0; top:100%; z-index:40; margin-top:4px; max-height:240px;
  background:var(--bs-surface); border:1px solid var(--bs-border); border-radius:var(--bs-radius-md); }
.tb-pick .tb-persona{ padding:8px 12px; text-decoration:none; }
@media (max-width: 640px){
  .tb-search{ width:100%; }
  .tb-head-actions{ width:100%; }
  .tb-table .tb-resp-name{ display:none; }
}
.tb-check-row{ padding-top:4px; }
.tb-pick .tb-persona{ flex-direction:row; align-items:center; justify-content:flex-start; text-align:left; gap:10px; }

/* ---------- Tableros (fase 06: detalle con edicion en linea) ---------- */
.tb-det-modal .owp-qv-content-wrap{ width:1120px; max-width:calc(100% - 32px); }
.tb-det-modal .owp-qv-content-inner.bs-modal-inner{ height:calc(100vh - 48px); max-height:calc(100vh - 48px); }
.tb-det{ display:flex; flex-direction:column; min-height:0; height:100%; background:var(--bs-surface); color:var(--bs-ink); }
.tb-det-cargando{ padding:40px; text-align:center; }
.tb-det-head{ display:flex; align-items:center; gap:12px; padding:12px 20px; border-bottom:1px solid var(--bs-border); flex:none; }
.tb-det-crumbs{ flex:1; min-width:0; display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:13px; color:var(--bs-muted); }
.tb-det-clave{ font-family:var(--bs-font-head); font-size:15px; color:var(--bs-ink); letter-spacing:.02em; }
.tb-det-tools{ display:flex; align-items:center; gap:8px; }
/* dias en la columna actual (05/10/2026) */
.tb-det-dias{ display:inline-flex; align-items:center; gap:6px; height:36px; padding:0 12px; box-sizing:border-box; border:1px solid var(--bs-border);
  border-radius:var(--bs-radius); background:var(--bs-surface); color:var(--bs-ink); font-family:var(--bs-font-head); font-weight:600; font-size:14px; white-space:nowrap; }
.tb-det-dias .bs-ico{ color:var(--bs-muted); }
/* tiempo en cada estado (06/10/2026): barra de tramos, eje, leyenda y tabla */
.tb-tis{ display:flex; flex-direction:column; gap:14px; }
.tb-tis-sub{ font-size:13px; }
.tb-tis-graf{ position:relative; padding:0 8px 0 0; }
.tb-tis-barra{ position:relative; z-index:1; height:26px; border-bottom:1px solid var(--bs-border); }
.tb-tis-seg{ position:absolute; top:2px; bottom:2px; min-width:2px; box-shadow:inset -1px 0 0 var(--bs-surface); cursor:default; }
.tb-tis-seg.is-actual{ background-image:repeating-linear-gradient(135deg, transparent 0 6px, rgba(255,255,255,.22) 6px 12px); }
.tb-tis-eje{ position:relative; z-index:0; height:18px; margin-top:4px; }
.tb-tis-marca{ position:absolute; top:0; transform:translateX(-50%); font-size:12px; color:var(--bs-muted); font-variant-numeric:tabular-nums; }
.tb-tis-marca::before{ content:""; position:absolute; left:50%; bottom:100%; height:34px; margin-bottom:4px; border-left:1px solid var(--bs-border-soft); }
.tb-tis-unidad{ text-align:center; font-size:12px; color:var(--bs-muted); margin-top:2px; }
.tb-tis-leyenda{ display:flex; flex-wrap:wrap; gap:6px 16px; }
.tb-tis-ley{ display:inline-flex; align-items:center; gap:7px; padding:2px 0; border:0; background:none; color:var(--bs-ink); font-family:var(--bs-font-head); font-weight:600; font-size:13px; cursor:pointer; }
.tb-tis-ley.is-off{ color:var(--bs-muted); text-decoration:line-through; }
.tb-tis-ley.is-off .tb-tis-punto{ opacity:.35; }
.tb-tis-punto{ display:inline-block; width:10px; height:10px; border-radius:50%; flex:none; vertical-align:middle; margin-right:2px; }
.tb-tis-tabla td .tb-tis-punto{ margin-right:8px; }
.tb-tis-num, .tb-tis-tabla th.tb-tis-num{ text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
.tb-tis-c0{ background-color:#6b8fd6; } .tb-tis-c1{ background-color:#3fb3c8; } .tb-tis-c2{ background-color:#2fae7c; }
.tb-tis-c3{ background-color:#e2a53a; } .tb-tis-c4{ background-color:#9a7ed0; } .tb-tis-c5{ background-color:#d8724e; }
.tb-tis-c6{ background-color:#c4588b; } .tb-tis-c7{ background-color:#8fa63f; } .tb-tis-c8{ background-color:#4a7fb0; } .tb-tis-c9{ background-color:#8c9096; }
.tb-det-tools .bs-pop{ width:200px; }
.tb-det-conflicto{ display:flex; align-items:center; gap:12px; padding:10px 20px; background:var(--bs-red-100); color:var(--bs-red-700); border-bottom:1px solid var(--bs-border); font-size:13.5px; flex:none; }
.tb-det-conflicto-msg{ flex:1; }
.tb-det-body{ display:grid; grid-template-columns:minmax(0,1fr) 340px; flex:1; min-height:0; }
.tb-det-main{ padding:20px 24px 32px; overflow:auto; min-height:0; }
.tb-det-side{ padding:20px; border-left:1px solid var(--bs-border); overflow:auto; min-height:0; background:var(--bs-surface-2); }
.tb-det-titulo{ font-family:var(--bs-font-head); font-size:26px; line-height:1.2; margin:0; font-weight:600; word-break:break-word; }
.tb-det-sec{ margin-top:22px; }
.tb-det-label{ font-size:12px; color:var(--bs-muted); margin-bottom:6px; }
.tb-det-desc{ white-space:pre-wrap; line-height:1.55; font-size:14px; word-break:break-word; }
.tb-det-estado{ margin-bottom:16px; }
.tb-det-campos{ display:flex; flex-direction:column; gap:12px; }
.tb-det-row .tb-det-label{ margin-bottom:3px; }
.tb-det-pie{ margin-top:22px; padding-top:12px; border-top:1px solid var(--bs-border); font-size:12px; color:var(--bs-muted); }
/* valor editable: lapiz al pasar el raton, foco por teclado */
.tb-val{ position:relative; min-height:24px; font-size:14px; }
.tb-edit{ cursor:pointer; padding:4px 28px 4px 6px; margin:0 -6px; border:1px solid transparent; }
.tb-edit:hover, .tb-edit:focus{ border-color:var(--bs-border); background:var(--bs-surface); outline:none; }
.tb-edit:focus-visible{ border-color:var(--bs-red); }
.tb-pen{ position:absolute; right:6px; top:6px; color:var(--bs-muted); opacity:0; display:inline-flex; }
.tb-edit:hover .tb-pen, .tb-edit:focus .tb-pen{ opacity:1; }
.tb-val.is-editing{ cursor:default; padding:0; margin:0; border:0; background:transparent; }
.tb-val.is-editing .bs-input, .tb-val.is-editing .bs-select{ width:100%; height:38px; min-height:38px; }
.tb-val.is-saving{ opacity:.6; pointer-events:none; }
.tb-val--titulo.is-editing .bs-input{ font-family:var(--bs-font-head); font-size:22px; height:46px; }
.tb-ed-actions{ display:flex; align-items:center; gap:8px; margin-top:8px; flex-wrap:wrap; }
.tb-asignarme{ display:inline-block; margin-top:4px; font-size:12px; }
.tb-det-pagina{ padding:0; }
.tb-det-pagina .tb-det-body{ min-height:420px; }
body.tb-det-abierto{ overflow:hidden; }
@media (max-width: 860px){
  .tb-det-body{ grid-template-columns:1fr; overflow:auto; }
  .tb-det-main, .tb-det-side{ overflow:visible; }
  .tb-det-side{ border-left:0; border-top:1px solid var(--bs-border); }
  .tb-det-modal .owp-qv-content-wrap{ max-width:100%; }
  .tb-det-modal .owp-qv-content-inner.bs-modal-inner{ height:100vh; max-height:100vh; }
}
/* telefono: el detalle ocupa la pantalla y queda sobre la barra movil (z 1001) */
@media (max-width: 860px){
  .modal-style.tb-det-modal{ z-index:1100; }
  .tb-det-modal .owp-qv-container{ width:100%; left:0; }
  .tb-det-modal .owp-qv-content-wrap{ width:100%; }
}

/* ---------- Tableros (fase 07: estado e historial) ---------- */
/* estado por categoria: todo gris, doing azul, done verde (como los badges de la lista) */
.tb-estado{ display:inline-flex; align-items:center; gap:6px; min-height:34px; padding:0 12px; border:1px solid transparent; font-family:var(--bs-font-head); font-weight:600; font-size:14px; letter-spacing:.02em; text-transform:uppercase; }
.tb-estado--todo{ background:var(--bs-neutral-tag); color:var(--bs-gray-dark); }
.tb-estado--doing{ background:#DBEAFE; color:#1D4ED8; }
.tb-estado--done{ background:#D1FAE5; color:#047857; }
html.theme-dark .tb-estado--todo{ color:var(--bs-ink); }
html.theme-dark .tb-estado--doing{ background:#1a2b4d; color:#93c5fd; }
html.theme-dark .tb-estado--done{ background:#12382a; color:#6ee7b7; }
.tb-estado-btn{ cursor:pointer; }
.tb-estado-btn:hover, .tb-estado-btn:focus-visible{ border-color:currentColor; outline:none; }
.tb-estado-btn.is-saving{ opacity:.6; pointer-events:none; }
.tb-estado-flecha{ transform:rotate(90deg); }
.tb-estado-wrap .bs-pop{ left:0; right:auto; width:280px; max-height:360px; overflow:auto; padding:6px; }
.tb-estado-op{ display:flex; align-items:center; gap:8px; font-size:13px; }
.tb-estado-op.is-on{ background:var(--bs-surface-2); font-weight:600; }
.tb-estado-op .bs-ico{ margin-left:auto; }
.tb-estado-op:focus{ background:var(--bs-surface-2); outline:none; }
.tb-estado-punto{ width:10px; height:10px; min-height:0; padding:0; flex:none; border:0; background:currentColor; }
/* historial */
.tb-hist-list{ display:flex; flex-direction:column; gap:14px; }
.tb-hist-row{ display:flex; gap:10px; align-items:flex-start; }
.tb-hist-body{ min-width:0; flex:1; font-size:13.5px; }
.tb-hist-quien b{ font-weight:600; }
.tb-hist-fecha{ color:var(--bs-muted); font-size:12px; margin-left:4px; white-space:nowrap; }
.tb-hist-cambio{ display:flex; align-items:baseline; flex-wrap:wrap; gap:6px; margin-top:4px; font-size:13px; }
.tb-hist-antes{ color:var(--bs-muted); text-decoration:line-through; word-break:break-word; }
.tb-hist-despues{ word-break:break-word; }
.tb-hist-flecha{ color:var(--bs-muted); }
.tb-hist-cambio--largo{ flex-direction:column; gap:2px; }
.tb-hist-cambio--largo .tb-hist-antes, .tb-hist-cambio--largo .tb-hist-despues{ white-space:pre-wrap; max-height:6.5em; overflow:hidden; }
.tb-hist-cambio--largo .tb-hist-flecha{ display:none; }
.tb-hist-mas{ align-self:flex-start; }
.tb-hist-mas.is-saving{ opacity:.6; pointer-events:none; }
/* telefono: titulo y descripcion, luego estado y campos, al final el historial */
@media (max-width: 860px){
  .tb-det-body{ display:flex; flex-direction:column; }
  .tb-det-main{ display:contents; }
  /* toda seccion va despues del titulo y los campos (tareas, epica, pagos de la obligacion);
     :where() deja la especificidad baja para que .tb-adj, .tb-hist, .tb-docs… fijen la suya */
  .tb-det-main > :where(.tb-det-sec){ order:3; padding:0 20px 8px; flex-shrink:0; }
  .tb-det-cabeza{ order:1; padding:20px 20px 8px; }
  .tb-det-side{ order:2; }
  .tb-hist{ order:3; padding:0 20px 28px; }
  .tb-det-cabeza, .tb-det-side, .tb-hist{ flex-shrink:0; }
}

/* ---------- Tableros (fase 08: tablero kanban) ---------- */
/* columnas de ancho fijo; el scroll horizontal es del tablero, nunca de la pagina */
.tab-board{ display:flex; gap:12px; align-items:flex-start; overflow-x:auto; padding-bottom:12px; max-width:100%; }
.tab-cargando{ padding:30px 4px; }
.tab-col{ flex:0 0 272px; display:flex; flex-direction:column; max-height:calc(100vh - 270px); min-height:120px; background:var(--bs-surface-2); border:1px solid var(--bs-border); }
.tab-col-head{ display:flex; align-items:center; gap:8px; padding:10px 12px; border-bottom:1px solid var(--bs-border); background:var(--bs-surface); flex:none; }
/* el admin del espacio mueve la columna arrastrando su cabecera (05/10/2026) */
.tab-col-head--mover{ cursor:grab; }
.tab-col.is-dragging{ outline:2px solid var(--bs-gray-dark); }
.tab-col.is-dragging .tab-col-head--mover{ cursor:grabbing; }
.tab-col-hueco{ flex:0 0 272px; align-self:stretch; min-height:120px; border:2px dashed var(--bs-gray-light); border-radius:var(--bs-radius-lg); background:transparent; }
.tab-fila--heads .tab-col-hueco{ min-height:0; }
.tab-col-nombre{ flex:1; min-width:0; font-family:var(--bs-font-head); font-weight:600; font-size:13px; letter-spacing:.04em; text-transform:uppercase; color:var(--bs-ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tab-col-n{ display:inline-flex; align-items:center; gap:4px; font-family:var(--bs-font-head); font-size:13px; color:var(--bs-muted); white-space:nowrap; }
.tab-col--doing{ border-top:3px solid #1D4ED8; }
.tab-col--done{ border-top:3px solid #047857; }
.tab-col--todo{ border-top:3px solid var(--bs-gray-light); }
/* limite WIP superado: aviso, no bloqueo */
.tab-wip--over{ background:var(--bs-red-100); }
.tab-wip--over .tab-col-n{ color:var(--bs-red); font-weight:600; }
.tab-col-nota{ padding:6px 12px; font-size:11.5px; color:var(--bs-muted); border-bottom:1px solid var(--bs-border-soft); background:var(--bs-surface); }
.tab-col-body{ overflow-y:auto; padding:8px; display:flex; flex-direction:column; gap:8px; min-height:0; }
.tab-vacia{ padding:18px 8px; text-align:center; font-size:12.5px; color:var(--bs-muted); }
.tab-card{ position:relative; display:flex; flex-direction:column; gap:8px; padding:10px 12px; background:var(--bs-surface); border:1px solid var(--bs-border); color:var(--bs-ink); text-decoration:none; cursor:pointer; }
.tab-card:hover, .tab-card:focus-visible{ border-color:var(--bs-gray-dark); color:var(--bs-ink); outline:none; }
.tab-card--overdue{ border-left:3px solid var(--bs-red); }
.tab-card-titulo{ font-size:13.5px; line-height:1.35; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; word-break:break-word; color:var(--bs-ink); text-decoration:none; padding-right:22px; }
.tab-card-titulo:hover, .tab-card-titulo:focus-visible{ color:var(--bs-ink); text-decoration:underline; outline:none; }
.tab-card-cat .bs-tag{ max-width:100%; overflow:hidden; text-overflow:ellipsis; }
.tab-card-pie{ display:flex; align-items:center; gap:8px; font-size:12px; color:var(--bs-muted); }
/* dias en la columna (08/10/2026): 0-5 verde, 6-10 ambar, 11+ rojo (pastel: fondo claro + tinta del tono) */
.tab-dias{ display:inline-flex; align-items:center; height:20px; padding:0 6px; border-radius:var(--bs-radius-sm); font-family:var(--bs-font-head); font-weight:600; font-size:12px; white-space:nowrap; }
.tab-dias--verde{ background:#DCFCE7; color:#15803D; }
.tab-dias--ambar{ background:#FEF3C7; color:#B45309; }
.tab-dias--rojo{ background:#FEE2E2; color:#B91C1C; }
html.theme-dark .tab-dias--verde{ background:#173a2e; color:#6ee7b7; }
html.theme-dark .tab-dias--ambar{ background:#3a2f14; color:#fcd34d; }
html.theme-dark .tab-dias--rojo{ background:#3a1d1e; color:#fca5a5; }
.tab-card-clave{ font-family:var(--bs-font-head); font-weight:400; font-size:12.5px; color:var(--bs-gray-dark); }   /* sin negrita (29/09/2026) */
.tab-card-resp{ margin-left:auto; display:inline-flex; }
.tab-card .tb-av{ width:24px; height:24px; font-size:10px; }
.tab-sin-resp{ width:24px; height:24px; display:grid; place-items:center; border:1px dashed var(--bs-gray-light); color:var(--bs-muted); }
.tab-vence{ display:inline-flex; align-items:center; gap:3px; }
.tab-vence.bs-status--vencido{ color:var(--bs-red); font-weight:600; }
.tab-mas{ display:block; padding:8px; text-align:center; font-size:12.5px; border:1px dashed var(--bs-border); color:var(--bs-gray-dark); text-decoration:none; }
.tab-mas:hover{ border-color:var(--bs-gray-dark); }
/* filtro por responsable (avatares) */
.tab-personas{ display:flex; align-items:center; }
.tab-persona{ padding:0; border:2px solid transparent; background:transparent; cursor:pointer; margin-left:-4px; }
.tab-persona:first-child{ margin-left:0; }
.tab-persona .tb-av{ width:30px; height:30px; font-size:11px; border:2px solid var(--bs-bg); box-sizing:border-box; }
.tab-persona.is-on{ border-color:var(--bs-red); position:relative; z-index:1; }
/* Filtro del tablero: clientes con buscador (lista con scroll) */
.tab-f-clientes .tb-pick-search{ margin-bottom:6px; }
.bs-filter-grid .tab-f-clientes{ grid-column:1 / -1; }
.tab-f-cli-lista .bs-muted{ margin-left:4px; }
/* Vista Tablero (29/09/2026): sin negrita en los botones de arriba (vistas, ajustes, completar sprint,
   actualizar) y en la barra de filtros (sprint, buscador, personas, Mis asignaciones, Filtro, Agrupar).
   Lo de dentro de los desplegables y las columnas sigue igual. */
.page-tablero .tb-head-actions .tb-vistas > *,
.page-tablero .tb-head-actions > .bs-btn,
.page-tablero .tb-toolbar .tab-sprint-sel,
.page-tablero .tb-toolbar .tb-search input,
.page-tablero .tb-toolbar .tab-persona .tb-av,
.page-tablero .tb-toolbar > .bs-btn,
.page-tablero .tb-toolbar > .bs-pop-wrap > .bs-btn,
.page-tablero .tb-toolbar > .tab-sprint .bs-pop-wrap > .bs-btn{ font-weight:400; }
.tab-persona:hover .tb-av, .tab-persona:focus-visible .tb-av{ background:var(--bs-ink); }
#tab-refrescar.is-loading .bs-ico{ animation:tb-spin .8s linear infinite; }
html.theme-dark .tab-col--doing{ border-top-color:#93c5fd; }
html.theme-dark .tab-col--done{ border-top-color:#6ee7b7; }
html.theme-dark .tab-card-clave{ color:var(--bs-ink); }
/* < 1024: las columnas se recorren deslizando, una casi a pantalla completa en telefono */
@media (max-width: 1023px){
  .tab-board{ scroll-snap-type:x mandatory; }
  .tab-col{ scroll-snap-align:start; max-height:none; }
}
@media (max-width: 640px){
  .tab-col{ flex-basis:84vw; }
}
html.theme-dark .tab-wip--over .tab-col-n, html.theme-dark .tab-vence.bs-status--vencido{ color:#fca5a5; }
html.theme-dark .tab-card--overdue{ border-left-color:#f87171; }

/* ---------- Tableros (fase 09: tablero interactivo) ---------- */
.tab-card--mov{ cursor:grab; }
.tab-card.is-dragging{ cursor:grabbing; border-color:var(--bs-gray-dark); transform:rotate(1.5deg); z-index:10; }
.tab-card-hueco{ min-height:64px; border:1px dashed var(--bs-gray-dark); background:var(--bs-surface); visibility:visible !important; flex:none; }
/* menu "..." de la tarjeta: aparece al pasar el raton o con el foco */
.tab-card-menu-btn{ position:absolute; top:6px; right:6px; width:26px; height:26px; display:grid; place-items:center; padding:0; border:1px solid transparent; background:var(--bs-surface); color:var(--bs-muted); cursor:pointer; opacity:0; }
.tab-card:hover .tab-card-menu-btn, .tab-card:focus-within .tab-card-menu-btn, .tab-card-menu-btn:focus-visible{ opacity:1; }
.tab-card-menu-btn:hover, .tab-card-menu-btn:focus-visible{ border-color:var(--bs-border); color:var(--bs-ink); outline:none; }
@media (hover: none){ .tab-card-menu-btn{ opacity:1; } }
.tab-card-cat-btn{ border:0; cursor:pointer; font:inherit; font-size:11px; }
.tab-card-cat-btn:hover, .tab-card-cat-btn:focus-visible{ outline:1px solid currentColor; outline-offset:1px; }
.tab-menu{ position:absolute; z-index:1200; max-height:min(420px, 70vh); overflow:auto; padding:6px; }
.tab-menu .tab-menu-op{ display:flex; align-items:center; gap:8px; font-size:13px; }
.tab-menu .tab-menu-op .bs-ico{ margin-left:auto; }
.tab-menu .tab-menu-op[disabled]{ opacity:.4; cursor:default; }
.tab-menu .tab-menu-op:focus{ background:var(--bs-surface-2); outline:none; }
/* "+ Crear" al pie de la columna */
.tab-crear-linea{ display:flex; align-items:center; gap:6px; width:100%; padding:9px 12px; border:0; border-top:1px solid var(--bs-border-soft); background:transparent; color:var(--bs-muted); font:inherit; font-size:13px; cursor:pointer; text-align:left; flex:none; }
.tab-crear-linea:hover, .tab-crear-linea:focus-visible{ background:var(--bs-surface); color:var(--bs-ink); outline:none; }
.tab-nuevo{ padding:8px; border-top:1px solid var(--bs-border-soft); display:flex; flex-direction:column; gap:4px; flex:none; }
.tab-nuevo .bs-textarea{ min-height:0; font-size:13.5px; resize:none; }
.tab-nuevo .bs-help{ font-size:11px; }

/* ---------- Tableros (fase 10: filtros y carriles) ---------- */
.tab-pop{ left:0; right:auto; z-index:60; }
#tab-filtro{ width:620px; }
#tab-filtro .tb-checks{ max-height:150px; }   /* 29/09/2026: antes 220px */
#tab-filtro .tab-f-cli-lista{ max-height:120px; }
#tab-grupo{ width:220px; padding:6px; }
.tab-grupo-op.is-on{ background:var(--bs-surface-2); font-weight:600; }
.tab-persona--nadie .tb-av{ background:var(--bs-surface); color:var(--bs-muted); border:1px dashed var(--bs-gray-light); }
.tab-persona--nadie.is-on .tb-av{ color:var(--bs-ink); }
/* carriles: fila de cabeceras y un carril por grupo; las columnas alinean con las cabeceras */
.tab-board--carriles{ display:block; }
.tab-grid{ display:flex; flex-direction:column; gap:10px; width:max-content; min-width:100%; }
.tab-fila{ display:flex; gap:12px; align-items:stretch; }
.tab-col--cab{ max-height:none; min-height:0; background:var(--bs-surface); }
.tab-col--cab .tab-col-body{ display:none; }
.tab-col--celda{ max-height:460px; min-height:56px; border-top-width:1px; }
.tab-carril{ display:flex; flex-direction:column; gap:6px; }
.tab-carril-head{ display:flex; align-items:center; gap:8px; width:100%; padding:8px 10px; border:0; border-bottom:1px solid var(--bs-border); background:transparent; color:var(--bs-ink); font:inherit; cursor:pointer; text-align:left; position:sticky; left:0; }
.tab-carril-head:hover, .tab-carril-head:focus-visible{ background:var(--bs-surface-2); outline:none; }
.tab-carril-flecha{ transform:rotate(90deg); transition:transform .15s; color:var(--bs-muted); }
.tab-carril.is-plegado .tab-carril-flecha{ transform:rotate(0); }
.tab-carril.is-plegado .tab-fila{ display:none; }
.tab-carril-punto{ width:12px; height:12px; flex:none; }
.tab-carril-nombre{ font-family:var(--bs-font-head); font-weight:600; font-size:14px; letter-spacing:.02em; text-transform:uppercase; }
.tab-carril-n{ font-size:12.5px; color:var(--bs-muted); }
.tab-vacia--grande{ padding:40px; }
@media (max-width: 640px){
  #tab-filtro{ width:calc(100vw - 32px); }
  #tab-filtro .bs-filter-grid{ grid-template-columns:1fr; }
}

/* ---------- Tableros (fase 11: comentarios, menciones y observadores) ---------- */
.tb-act-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.tb-act-head .tb-det-label{ margin:0; font-family:var(--bs-font-head); font-weight:600; font-size:13px; letter-spacing:.04em; text-transform:uppercase; color:var(--bs-ink); }
.tb-act-tabs{ height:32px; }
.tb-act-tabs > *{ padding:0 12px; }
.tb-com-caja{ display:flex; gap:10px; align-items:flex-start; margin-bottom:18px; }
.tb-com-caja .tb-com-ed{ flex:1; }
.tb-com-abrir{ flex:1; height:38px; padding:0 12px; text-align:left; border:1px solid var(--bs-border); background:var(--bs-surface); color:var(--bs-muted); font:inherit; font-size:14px; cursor:text; }
.tb-com-abrir:hover, .tb-com-abrir:focus-visible{ border-color:var(--bs-gray-dark); outline:none; }
.tb-com-ed{ min-width:0; }
.tb-com-ed.is-saving{ opacity:.6; pointer-events:none; }
.tb-com .tb-com-ed{ margin-top:6px; }
.tb-com-txt{ width:100%; min-height:96px; resize:vertical; box-sizing:border-box; }
.tb-com-cuerpo{ margin-top:4px; white-space:pre-wrap; word-break:break-word; line-height:1.5; font-size:14px; }
.tb-com-cuerpo a{ color:var(--bs-ink); text-decoration:underline; }
.tb-com-cuerpo a:hover{ color:var(--bs-red); }
.tb-com-acc{ display:flex; gap:14px; margin-top:4px; }
.tb-com-acc a{ font-size:12px; color:var(--bs-muted); text-decoration:none; }
.tb-com-acc a:hover, .tb-com-acc a:focus-visible{ color:var(--bs-red); text-decoration:underline; }
/* mencion: azul como "en curso"; la propia, en rojo suave */
.tb-mencion{ background:#DBEAFE; color:#1D4ED8; padding:0 3px; font-weight:600; }
.tb-mencion--yo{ background:var(--bs-red-100); color:var(--bs-red-700); }
html.theme-dark .tb-mencion{ background:#1a2b4d; color:#93c5fd; }
html.theme-dark .tb-mencion--yo{ background:var(--bs-red-100); color:var(--bs-red-700); }
/* lista de personas al escribir @ */
.tb-menc-wrap{ position:relative; }
.tb-menc-pop{ left:0; right:auto; top:100%; width:280px; max-width:100%; max-height:260px; overflow:auto; padding:6px; z-index:70; }
.tb-menc-op{ display:flex; align-items:center; gap:8px; font-size:13px; }
.tb-menc-op.is-on{ background:var(--bs-surface-2); font-weight:600; }
/* observadores (ojo) */
.tb-ojo{ padding:0 10px; gap:6px; }
.tb-ojo-n{ font-size:13px; min-width:7px; }
.tb-det-tools .tb-ojo-pop{ width:260px; padding:6px; max-height:360px; overflow:auto; }
.tb-ojo-titulo{ font-size:12px; color:var(--bs-muted); padding:6px 10px 4px; }
.tb-ojo-persona{ display:flex; align-items:center; gap:8px; padding:6px 10px; font-size:13px; }
.tb-ojo-vacio{ padding:6px 10px; font-size:13px; }
.tb-seguir.is-saving{ opacity:.6; pointer-events:none; }
@media (max-width: 640px){
  .tb-act-head{ flex-direction:column; align-items:flex-start; }
}

/* ---------- Tableros (fase 12: adjuntos) ---------- */
.tb-adj{ position:relative; }
.tb-adj-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-bottom:10px; }
.tb-adj-head .tb-det-label{ margin:0; font-family:var(--bs-font-head); font-weight:600; font-size:13px; letter-spacing:.04em; text-transform:uppercase; color:var(--bs-ink); }
.tb-adj-n{ color:var(--bs-muted); margin-left:4px; }
.tb-adj-tools{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.tb-adj-tools .bs-seg{ height:32px; }
.tb-adj-tools .bs-seg > *{ padding:0 9px; }
.tb-adj-tools .is-disabled{ pointer-events:auto; }   /* que el title explique por que */
.tb-adj-vacio{ padding:18px; border:1px dashed var(--bs-gray-light); color:var(--bs-muted); font-size:13.5px; text-align:center; }
/* rejilla */
.tb-adj-rejilla{ display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:10px; }
/* una sola fila con desplazamiento lateral (documentos del servicio y adjuntos), como Jira */
.tb-carrusel{ position:relative; }
.tb-carrusel > .tb-adj-rejilla{ display:flex; gap:10px; overflow-x:auto; overscroll-behavior-x:contain; scroll-snap-type:x proximity; padding-bottom:6px; scrollbar-width:thin; }
.tb-carrusel > .tb-adj-rejilla > .tb-adj-tile{ flex:0 0 150px; scroll-snap-align:start; }
.tb-carrusel .tb-adj-prev{ height:88px; }
.tb-carr-btn{ position:absolute; top:28px; z-index:2; width:32px; height:32px; padding:0; border:0; background:var(--bs-gray-dark); color:#fff; cursor:pointer;
  display:none; align-items:center; justify-content:center; }
.tb-carr-btn.is-on{ display:flex; }
.tb-carr-btn:hover, .tb-carr-btn:focus-visible{ background:var(--bs-ink); outline:none; }
.tb-carr-izq{ left:4px; }
.tb-carr-izq .bs-ico{ transform:rotate(180deg); }
.tb-carr-der{ right:4px; }
.tb-adj-tile{ position:relative; border:1px solid var(--bs-border); background:var(--bs-surface); min-width:0; }
.tb-adj-tile:hover, .tb-adj-tile:focus-within{ border-color:var(--bs-gray-dark); }
.tb-adj-prev{ display:flex; align-items:center; justify-content:center; height:104px; background:var(--bs-surface-2); overflow:hidden; text-decoration:none; }
.tb-adj-mini{ width:100%; height:100%; object-fit:cover; display:block; }
.tb-adj-mini--hoja{ object-position:top; }   /* primera hoja de un PDF: la parte de arriba */
.tb-adj-tile .tb-adj-nombre{ padding:6px 8px 0; font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tb-adj-tile .tb-adj-meta{ padding:0 8px 7px; font-size:11.5px; color:var(--bs-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tb-adj-tile .tb-adj-acc{ position:absolute; top:6px; right:6px; display:flex; gap:4px; opacity:0; }
.tb-adj-tile:hover .tb-adj-acc, .tb-adj-tile:focus-within .tb-adj-acc{ opacity:1; }
.tb-adj-ico{ display:inline-flex; flex-direction:column; align-items:center; gap:4px; color:var(--bs-muted); }
.tb-adj-prev .tb-adj-ico .bs-ico{ width:30px; height:30px; }
.tb-adj-fila .tb-adj-ico{ justify-content:center; }
.tb-adj-fila .tb-adj-ico .bs-ico{ width:20px; height:20px; }
.tb-adj-soltar .bs-ico{ width:24px; height:24px; }
.tb-visor-nav .bs-ico{ width:28px; height:28px; }
.tb-adj-ico b{ font-family:var(--bs-font-head); font-size:12px; letter-spacing:.06em; }
.tb-adj-ico--pdf{ color:var(--bs-red); }
.tb-adj-ico--excel{ color:#047857; }
.tb-adj-ico--word{ color:#1D4ED8; }
html.theme-dark .tb-adj-ico--excel{ color:#6ee7b7; }
html.theme-dark .tb-adj-ico--word{ color:#93c5fd; }
/* lista */
.tb-adj-lista{ border-top:1px solid var(--bs-border-soft); }
.tb-adj-fila{ display:grid; grid-template-columns:28px minmax(0,1fr) auto auto auto; align-items:center; gap:12px; padding:6px 4px; border-bottom:1px solid var(--bs-border-soft); font-size:13.5px; }
.tb-adj-fila:hover{ background:var(--bs-surface-2); }
.tb-adj-fila .tb-adj-mini{ width:28px; height:28px; }
.tb-adj-fila .tb-adj-nombre{ color:var(--bs-ink); text-decoration:none; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tb-adj-fila .tb-adj-nombre:hover{ color:var(--bs-red); text-decoration:underline; }
.tb-adj-fila .tb-adj-meta{ color:var(--bs-muted); font-size:12.5px; white-space:nowrap; }
.tb-adj-fila .tb-adj-acc{ display:flex; gap:4px; }
@media (max-width: 640px){
  .tb-adj-fila{ grid-template-columns:28px minmax(0,1fr) auto; }
  .tb-adj-fila .tb-adj-meta{ display:none; }
  .tb-adj-rejilla{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  .tb-adj-tile .tb-adj-acc{ opacity:1; }
}
/* subida y avisos */
.tb-adj-subiendo{ position:relative; height:30px; margin-bottom:10px; border:1px solid var(--bs-border); background:var(--bs-surface-2); overflow:hidden; font-size:12.5px; }
.tb-adj-subiendo span{ position:relative; z-index:1; display:block; line-height:28px; padding:0 10px; }
.tb-adj-subiendo i{ position:absolute; left:0; top:0; bottom:0; background:var(--bs-gray-light); transition:width .2s; }
.tb-adj-cuota{ display:flex; align-items:center; gap:8px; padding:8px 10px; margin-bottom:10px; background:var(--bs-red-100); color:var(--bs-red-700); font-size:13px; }
.tb-adj-soltar{ display:none; position:absolute; inset:0; z-index:5; align-items:center; justify-content:center; gap:10px; border:2px dashed var(--bs-red); background:var(--bs-surface); color:var(--bs-ink); font-family:var(--bs-font-head); font-weight:600; font-size:15px; opacity:.94; }
.tb-adj.is-drop .tb-adj-soltar{ display:flex; }
/* visor de imagenes */
.tb-visor{ position:fixed; inset:0; z-index:1200; background:rgba(20,21,23,.92); display:flex; align-items:center; justify-content:center; padding:64px 56px 24px; box-sizing:border-box; }
.tb-visor img{ max-width:100%; max-height:100%; object-fit:contain; background:#fff; }
.tb-visor-bar{ position:absolute; top:0; left:0; right:0; height:56px; display:flex; align-items:center; gap:8px; padding:0 12px 0 20px; color:#fff; }
.tb-visor-nombre{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }
.tb-visor-nombre .bs-muted{ color:#c1c6c9; }
.tb-visor-nav{ position:absolute; top:50%; transform:translateY(-50%); width:44px; height:64px; border:0; background:transparent; color:#fff; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.tb-visor-nav:hover, .tb-visor-nav:focus-visible{ background:rgba(255,255,255,.12); outline:none; }
.tb-visor-ant{ left:6px; }
.tb-visor-ant .bs-ico{ transform:rotate(180deg); }
.tb-visor-sig{ right:6px; }
/* telefono: titulo y descripcion, estado y campos, adjuntos y al final la actividad */
@media (max-width: 860px){
  .tb-adj{ order:3; padding:0 20px 8px; flex-shrink:0; }
  .tb-hist{ order:4; }
  .tb-visor{ padding:60px 8px 12px; }
}

/* ---------- Tableros (fase 13: avisos en la campana y "Para ti") ---------- */
.bs-notif-tb, .bs-notif-as{ margin:0 0 14px; padding:0 0 12px; border-bottom:1px solid var(--bs-border); }
.bs-notif-head{ display:flex; align-items:center; gap:14px; padding:0 0 8px; flex-wrap:wrap; }
.bs-notif-head > b{ flex:1; font-family:var(--bs-font-head); font-size:16px; color:var(--bs-ink); }
.bs-notif-filtro{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; color:var(--bs-muted); cursor:pointer; }
.bs-notif-todas{ font-size:12.5px; color:var(--bs-ink); text-decoration:underline; }
.bs-notif-todas:hover{ color:var(--bs-red); }
.bs-notif-lista{ max-height:340px; overflow:auto; border-top:1px solid var(--bs-border-soft); }
.bs-notif-vacio{ padding:12px 4px; font-size:13px; color:var(--bs-muted); }
.bs-notif-av{ position:relative; display:flex; gap:10px; align-items:flex-start; padding:9px 26px 9px 8px; border-bottom:1px solid var(--bs-border-soft); color:var(--bs-ink); text-decoration:none; }
.bs-notif-av:hover, .bs-notif-av:focus-visible{ background:var(--bs-surface-2); outline:none; color:var(--bs-ink); }
.bs-notif-av.is-unread{ background:var(--bs-surface-2); }
.bs-notif-av.is-unread:hover{ background:var(--bs-border-soft); }
.bs-notif-body{ display:flex; flex-direction:column; gap:2px; min-width:0; flex:1; font-size:13px; line-height:1.35; }
.bs-notif-txt{ word-break:break-word; }
.bs-notif-veces{ color:var(--bs-muted); }
.bs-notif-item{ color:var(--bs-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bs-notif-item b{ color:var(--bs-ink); font-family:var(--bs-font-head); }
.bs-notif-meta{ display:flex; align-items:center; gap:8px; font-size:12px; color:var(--bs-muted); }
.bs-notif-estado{ min-height:0; padding:1px 6px; font-size:11px; }
.bs-notif-punto{ position:absolute; right:9px; top:14px; width:8px; height:8px; background:var(--bs-red); }
.bs-notif-sistema{ background:var(--bs-red); }
/* seguimiento (comento, cambio de estado en expedientes donde participas): un nivel mas bajo que lo
   que es para ti (mencion, respuesta, asignacion): texto atenuado y punto gris */
.bs-notif-av.is-seguimiento .bs-notif-txt{ color:var(--bs-muted); }
.bs-notif-av.is-seguimiento .bs-notif-txt b{ color:var(--bs-ink); font-weight:500; }
.bs-notif-av.is-seguimiento .tb-av{ background:var(--bs-gray-light); color:var(--bs-ink); }
.bs-notif-av.is-seguimiento .bs-notif-punto{ background:var(--bs-gray-light); }
.bs-notif-nivel{ white-space:nowrap; }
/* numero de productos proximos en su encabezado (el globo cuenta los avisos de Tableros) */
.bs-notif-prod-n{ display:inline-block; min-width:18px; padding:0 5px; margin-left:4px; background:var(--bs-surface-2); border:1px solid var(--bs-border);
  font-family:var(--bs-font-head); font-size:12px; font-weight:600; line-height:18px; text-align:center; color:var(--bs-ink); }
.bs-notif-prod-n:empty{ display:none; }
.bs-notif-pie{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding-top:10px; font-size:12.5px; }
.bs-notif-pie a{ color:var(--bs-ink); font-weight:600; text-decoration:none; }
.bs-notif-pie a:hover{ color:var(--bs-red); }
@media (max-width: 640px){
  .dropdown-notice{ min-width:0; width:calc(100vw - 24px); right:-60px; }
}
/* pagina "Para ti" */
.tb-pm-sec{ margin-bottom:28px; }
.tb-pm-titulo{ font-family:var(--bs-font-head); font-size:18px; font-weight:600; margin:0 0 10px; color:var(--bs-ink); }
.tb-pm-n{ color:var(--bs-muted); margin-left:4px; }
.tb-pm-vacio{ padding:14px; border:1px dashed var(--bs-gray-light); font-size:13.5px; }
.tb-pm-estado{ min-height:24px; padding:0 8px; font-size:12px; white-space:nowrap; }
.tb-pm-mas{ margin-top:8px; }
.tb-pm-menciones{ border-top:1px solid var(--bs-border-soft); }
.tb-pm-mencion{ display:flex; gap:10px; align-items:flex-start; padding:10px 8px; border-bottom:1px solid var(--bs-border-soft); color:var(--bs-ink); text-decoration:none; font-size:13.5px; }
.tb-pm-mencion:hover{ background:var(--bs-surface-2); color:var(--bs-ink); }
.tb-pm-mencion-body{ display:flex; flex-direction:column; gap:3px; min-width:0; }
.tb-pm-mencion-item{ color:var(--bs-muted); font-size:12.5px; }

/* ---------- Tableros (fase 14: servicio DAFO, documentos y vinculadas) ---------- */
.tb-det-srv{ margin-top:18px; padding-top:14px; border-top:1px solid var(--bs-border); }
.tb-det-srv-titulo, .tb-sec-titulo{ font-family:var(--bs-font-head); font-weight:600; font-size:13px; letter-spacing:.04em; text-transform:uppercase; color:var(--bs-ink); margin-bottom:10px; }
.tb-srv-link{ color:var(--bs-ink); text-decoration:underline; }
.tb-srv-link:hover{ color:var(--bs-red); }
.tb-val--srv{ cursor:default; }
/* jerarquia de Jira: tipo (historia, tarea, epica), la epica en la tarjeta y el resumen de la epica */
.tb-tipo{ margin-right:6px; }
.tb-tipo--epica{ background:var(--bs-surface-2); color:var(--bs-ink); border:1px solid var(--bs-border); }
.bl-epicas{ margin:0 0 16px; border:1px solid var(--bs-border); background:var(--bs-surface); }
.bl-epicas-titulo{ padding:10px 12px; font-family:var(--bs-font-head); font-weight:600; font-size:13px; letter-spacing:.04em; text-transform:uppercase; color:var(--bs-ink); border-bottom:1px solid var(--bs-border-soft); }
.bl-epica{ display:flex; align-items:center; gap:12px; }
.bl-epica .bl-titulo{ flex:1; min-width:0; }
.bl-epica .tb-sub-barra{ width:120px; }
.tab-card-epica{ display:inline-flex; align-items:center; gap:4px; max-width:100%; margin-top:4px; font-size:12px; color:var(--bs-muted); overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.tb-agr{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:10px 16px; padding:12px; border:1px solid var(--bs-border-soft); background:var(--bs-surface-2); }
.tb-agr-fila .tb-val{ font-size:13px; line-height:1.45; color:var(--bs-ink); }
@media (max-width: 640px){ .tb-agr{ grid-template-columns:repeat(2, minmax(0, 1fr)); } }
.tb-srv-agregar{ display:inline-flex; align-items:center; gap:4px; }
/* el servicio del expediente (fase 14b) */
#modal-tb-servicio .bs-help{ display:block; margin-top:4px; }
#modal-tb-servicio .tb-s-cli-fijo{ display:flex; align-items:center; background:var(--bs-surface-2); }
/* vehiculo elegido: una fila con "Cambiar" (la lista se abre a pedido) */
#modal-tb-servicio .tb-s-eq-fijo{ display:flex; align-items:center; gap:10px; min-height:42px; padding:6px 6px 6px 12px; border:1px solid var(--bs-border); background:var(--bs-surface-2); box-sizing:border-box; }
#modal-tb-servicio .tb-s-eq-sel{ flex:1; min-width:0; font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#modal-tb-servicio .tb-s-eq-busca .tb-pick-search{ margin-bottom:6px; }
.tb-srv-sub{ display:block; font-size:12px; color:var(--bs-muted); }
/* documentos del servicio */
.tb-docs-estado{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; }
.tb-docs-chip{ display:inline-flex; align-items:center; gap:5px; min-height:26px; padding:0 9px; border:1px solid var(--bs-border); font-size:12.5px; background:var(--bs-surface); color:var(--bs-muted); font-family:inherit; }
.tb-docs-chip--ok{ background:#D1FAE5; border-color:#D1FAE5; color:#047857; }
.tb-docs-chip--pend{ color:var(--bs-ink); }
.tb-docs-chip--na{ border-style:dashed; }
html.theme-dark .tb-docs-chip--ok{ background:#12382a; border-color:#12382a; color:#6ee7b7; }
button.tb-docs-chip{ cursor:pointer; }
button.tb-docs-chip:hover, button.tb-docs-chip:focus-visible{ border-color:var(--bs-gray-dark); outline:none; }
/* documentos del servicio: la rejilla de adjuntos, con la primera hoja vista desde arriba */
.tb-docs-rejilla .tb-adj-prev{ height:88px; }
.tb-docs-rejilla .tb-adj-mini{ object-position:top; }
/* comentarios: respuestas en hilo y reacciones (como Jira) */
.tb-com-resps{ margin-top:10px; padding-left:14px; border-left:1px solid var(--bs-border-soft); }
.tb-com-resps .tb-hist-row{ padding-top:8px; padding-bottom:4px; border-bottom:0; }
.tb-com-resps .tb-com-ed{ margin-top:8px; }
.tb-com--borrado > .tb-hist-body > .tb-com-cuerpo{ font-style:italic; }
.tb-av--vacio{ background:var(--bs-surface-2); border:1px dashed var(--bs-border); }
.tb-reacs{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:6px; }
.tb-com-acc{ align-items:center; }
.tb-reac{ display:inline-flex; align-items:center; gap:4px; height:26px; padding:0 8px; border:1px solid var(--bs-border); background:var(--bs-surface);
  color:var(--bs-ink); font:inherit; font-size:12.5px; cursor:pointer; }
.tb-reac:hover, .tb-reac:focus-visible{ border-color:var(--bs-gray-dark); outline:none; }
.tb-reac.is-mia{ border-color:var(--bs-gray-dark); background:var(--bs-surface-2); font-weight:600; }
.tb-reac-emoji{ font-size:14px; line-height:1; }
.tb-reac-wrap{ position:relative; display:inline-flex; }
.tb-reac-add{ display:inline-flex; align-items:center; justify-content:center; width:24px; height:22px; padding:0; border:1px solid transparent; background:transparent;
  color:var(--bs-muted); cursor:pointer; }
.tb-reac-add:hover, .tb-reac-add:focus-visible{ border-color:var(--bs-border); color:var(--bs-ink); outline:none; }
.tb-reac-pop{ top:auto; right:auto; left:0; bottom:calc(100% + 4px); width:auto; padding:4px; gap:2px; }
.tb-reac-pop.is-open{ display:flex; }
.tb-reac-op{ width:32px; height:32px; border:0; background:transparent; font-size:18px; line-height:1; cursor:pointer; }
.tb-reac-op:hover, .tb-reac-op:focus-visible{ background:var(--bs-surface-2); outline:none; }
/* vinculadas */
/* una sola fila: se recortan el titulo y, si no cabe, el estado (nombre completo en el title) */
.tb-link-fila{ display:flex; align-items:center; gap:10px; padding:6px 0; border-bottom:1px solid var(--bs-border-soft); font-size:13.5px; flex-wrap:nowrap; min-width:0; }
.tb-link-tipo{ font-size:12px; color:var(--bs-muted); min-width:118px; flex:none; }
.tb-link-clave{ font-family:var(--bs-font-head); font-weight:600; color:var(--bs-ink); text-decoration:none; flex:none; }
.tb-link-fila .tb-link-quitar{ flex:none; }
.tb-link-clave:hover{ color:var(--bs-red); text-decoration:underline; }
.tb-link-titulo{ flex:1 1 60px; min-width:40px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tb-link-estado{ display:inline-block; flex:0 1 auto; min-width:0; max-width:45%; min-height:22px; line-height:22px; padding:0 7px; font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media (max-width: 600px){ .tb-link-tipo{ min-width:0; max-width:84px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } }
.tb-link-form{ display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; align-items:center; }
.tb-link-form .bs-input{ width:190px; height:34px; }
.tb-link-form .bs-select{ width:170px; height:34px; }
.tb-link-form .bs-field-error{ flex-basis:100%; }
@media (max-width: 860px){
  .tb-docs, .tb-links{ order:3; padding:0 20px 8px; flex-shrink:0; }
}

/* ---------- Tableros (fase 15: sprints, backlog y metas) ---------- */
/* barra del tablero: sprint que se ve + detalles */
.tab-sprint{ display:flex; align-items:center; gap:6px; }
.tab-sprint-sel{ width:auto; min-width:190px; max-width:260px; height:36px; font-family:var(--bs-font-head); font-weight:600; letter-spacing:.02em; }
.tab-sprint-pop{ width:300px; padding:14px; }
/* popover del sprint (captura 81 de Jira) */
.tb-sp-det{ display:flex; flex-direction:column; gap:6px; font-size:13.5px; color:var(--bs-ink); }
.tb-sp-det-nombre{ font-family:var(--bs-font-head); font-weight:600; font-size:16px; text-transform:uppercase; letter-spacing:.02em; }
.tb-sp-det-meta{ color:var(--bs-muted); }
.tb-sp-det-real b{ font-family:var(--bs-font-head); font-weight:600; font-size:15px; }
.tb-sp-barra{ height:6px; background:var(--bs-surface-2); border:1px solid var(--bs-border-soft); }
.tb-sp-barra > span{ display:block; height:100%; background:var(--bs-gray-dark); }
html.theme-dark .tb-sp-barra > span{ background:var(--bs-ink); }
.tb-sp-det-otras{ font-size:12px; }
.tb-sp-det-conteo{ color:var(--bs-muted); font-size:12.5px; }
.tb-sp-det-dias{ font-weight:600; }
.tb-sp-det-fechas{ display:grid; grid-template-columns:1fr 1fr; gap:10px; padding-top:8px; border-top:1px solid var(--bs-border-soft); }
.tb-sp-det-fechas span{ display:block; font-size:11px; text-transform:uppercase; letter-spacing:.06em; }
/* detalle del expediente: Sprint y "+N" (captura 60) */
.tb-sprint-celda{ display:flex; align-items:center; gap:6px; min-width:0; }
.tb-sprint-celda .tb-val{ flex:1; min-width:0; }
.tb-sprints-mas{ flex:none; height:22px; min-width:30px; padding:0 6px; border:1px solid var(--bs-border); background:var(--bs-surface); color:var(--bs-ink); font-family:var(--bs-font-head); font-weight:600; font-size:12px; cursor:pointer; }
.tb-sprints-mas:hover, .tb-sprints-mas[aria-expanded="true"]{ border-color:var(--bs-gray-dark); }
.tb-sprints-ant{ grid-column:1 / -1; margin:4px 0 6px; padding:8px 10px; border:1px solid var(--bs-border); background:var(--bs-surface-2); font-size:12.5px; }
.tb-sprints-ant-tit{ font-family:var(--bs-font-head); font-weight:600; font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--bs-muted); margin-bottom:4px; }
.tb-sprints-ant-fila{ display:flex; justify-content:space-between; gap:10px; padding:2px 0; }
/* modal completar */
.tb-cs-lista{ margin:0 0 14px 18px; padding:0; color:var(--bs-muted); font-size:13px; }
.tb-cs-lista li{ margin:3px 0; }
/* satisfaccion del cliente (05/10/2026): resumen en el bloque Servicio y ventana con la escala 1-5 */
.tb-enc-val{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.tb-enc-prom b{ font-family:var(--bs-font-head); font-size:18px; color:var(--bs-ink); }
.tb-enc-ayuda{ margin:0 0 14px; color:var(--bs-muted); font-size:13px; }
.tb-enc-lista{ display:flex; flex-direction:column; }
.tb-enc-preg{ display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 0; border-top:1px solid var(--bs-border-soft); }
.tb-enc-preg:first-child{ border-top:0; padding-top:0; }
.tb-enc-texto{ flex:1; min-width:0; color:var(--bs-ink); line-height:1.4; }
.tb-enc-num{ color:var(--bs-muted); font-family:var(--bs-font-head); font-weight:600; }
.tb-enc-escala{ flex:none; border-radius:var(--bs-radius); overflow:hidden; }
.tb-enc-escala > .tb-enc-n{ justify-content:center; width:40px; padding:0; font-size:15px; }
.tb-enc-escala > .tb-enc-n:not(.is-active):not(:disabled):hover{ background:var(--bs-surface-2); }
.tb-enc-escala > .tb-enc-n:disabled{ cursor:default; }
.tb-enc-resumen{ margin-top:16px; padding-top:12px; border-top:1px solid var(--bs-border); display:flex; flex-direction:column; gap:2px; }
/* encima del detalle tambien en el telefono (alli el detalle sube a 1100) */
#modal-tb-encuesta.modal-style{ z-index:1200; }
/* campos personalizados de la historia (06/10/2026): "Crear un campo" y sus valores en el detalle */
#modal-tb-campo.modal-style{ z-index:1200; }
#modal-tb-campo .bs-modal-body{ display:flex; flex-direction:column; gap:16px; overflow:visible; }
.tb-campo-ayuda{ margin:0; color:var(--bs-muted); font-size:13px; }
.tb-req{ color:var(--bs-red); }
.tb-campo-tipo-btn{ display:flex; align-items:center; justify-content:space-between; gap:8px; text-align:left; cursor:pointer; }
.tb-campo-tipo-txt{ display:inline-flex; align-items:center; gap:8px; }
.tb-campo-tipo-btn > .bs-ico{ color:var(--bs-muted); flex:none; }
.tb-campo-tipos.bs-pop{ left:0; right:auto; width:100%; max-height:300px; overflow-y:auto; padding:4px 0; border-radius:var(--bs-radius-md); z-index:60; }
.tb-campo-tipo-op{ display:flex; align-items:center; gap:10px; }
.tb-campo-tipo-op .bs-ico{ color:var(--bs-muted); flex:none; }
.tb-campo-tipo-op.is-selected{ background:var(--bs-surface-2); box-shadow:inset 3px 0 0 var(--bs-gray-dark); }
.bs-input.is-invalid, .bs-textarea.is-invalid{ border-color:var(--bs-red); }
.tb-cf-casilla{ display:inline-flex; align-items:center; gap:6px; }
.tb-cf-casilla .bs-ico{ color:var(--bs-muted); }
.tb-cf-casilla.is-on .bs-ico{ color:var(--bs-ink); }
.tb-cf-chips{ display:inline-flex; flex-wrap:wrap; gap:4px 6px; }
.tb-cf-url{ word-break:break-all; }
.tb-cf-parrafo{ white-space:pre-wrap; }
.tb-cfp-lista{ max-height:220px; overflow-y:auto; }
.tb-cfp-op{ display:flex; align-items:center; gap:8px; cursor:pointer; }
.tb-cfp-op input{ margin:0; flex:none; }
@media (max-width: 600px){
  .tb-enc-preg{ flex-direction:column; align-items:stretch; gap:8px; }
  .tb-enc-escala{ align-self:flex-start; }
}
/* confirmar escribiendo la palabra (eliminar, cerrar): 05/10/2026 */
.bs-confirm-escrito{ margin-top:14px; }
.bs-confirm-escrito label b{ color:var(--bs-red); }
.jconfirm .bs-confirm-escrito .bs-input{ width:100%; }
/* backlog (captura 89) */
.bl-grupos{ display:flex; flex-direction:column; gap:14px; }
.bl-grupo{ border:1px solid var(--bs-border); background:var(--bs-surface); }
.bl-grupo--activo{ border-left:3px solid var(--bs-gray-dark); }
.bl-head{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:10px 12px; border-bottom:1px solid var(--bs-border-soft); }
.bl-plegar{ width:26px; height:26px; display:inline-flex; align-items:center; justify-content:center; border:0; background:none; color:var(--bs-muted); cursor:pointer; }
.bl-plegar .bs-ico{ transition:transform .15s; }
.bl-grupo.is-plegado .bl-plegar .bs-ico{ transform:rotate(-90deg); }
.bl-grupo.is-plegado .bl-filas, .bl-grupo.is-plegado .bl-mas{ display:none; }
.bl-nombre{ font-family:var(--bs-font-head); font-weight:600; font-size:15px; letter-spacing:.03em; text-transform:uppercase; color:var(--bs-ink); }
.bl-sub{ font-size:12.5px; color:var(--bs-muted); }
.bl-meta{ display:inline-flex; align-items:center; gap:4px; font-size:12.5px; color:var(--bs-ink); }
.bl-conteo{ display:inline-flex; gap:4px; margin-left:auto; }
.bl-n{ min-width:24px; height:20px; padding:0 5px; display:inline-flex; align-items:center; justify-content:center; font-family:var(--bs-font-head); font-weight:600; font-size:12px; }
.bl-n--todo{ background:var(--bs-neutral-tag); color:var(--bs-gray-dark); }
.bl-n--doing{ background:#DBEAFE; color:#1D4ED8; }
.bl-n--done{ background:#D1FAE5; color:#047857; }
html.theme-dark .bl-n--todo{ color:var(--bs-ink); }
html.theme-dark .bl-n--doing{ background:#1a2b4d; color:#93c5fd; }
html.theme-dark .bl-n--done{ background:#12382a; color:#6ee7b7; }
.bl-acciones{ display:inline-flex; align-items:center; gap:6px; }
.bl-menu{ right:0; left:auto; min-width:170px; z-index:60; }
.bl-filas{ min-height:44px; }
.bl-fila{ display:grid; grid-template-columns:96px minmax(0, 1fr) 150px 150px 110px 36px; gap:10px; align-items:center; padding:7px 12px; border-bottom:1px solid var(--bs-border-soft); font-size:13.5px; cursor:pointer; background:var(--bs-surface); }
.bl-fila:hover{ background:var(--bs-surface-2); }
.bl-fila--mov{ cursor:grab; }
.bl-fila.is-saving{ opacity:.55; }
.bl-clave{ font-family:var(--bs-font-head); font-weight:600; color:var(--bs-muted); text-decoration:none; }
.bl-clave:hover{ color:var(--bs-red); }
.bl-clave.is-done{ text-decoration:line-through; }
.bl-titulo{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--bs-ink); }
.bl-cat .bs-tag, .bl-estado{ max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:inline-block; }
.bl-estado{ min-height:22px; line-height:22px; padding:0 7px; font-size:11px; font-family:var(--bs-font-head); font-weight:600; text-transform:uppercase; }
.bl-valor{ text-align:right; font-size:12.5px; color:var(--bs-muted); white-space:nowrap; }
.bl-resp{ display:flex; justify-content:flex-end; }
.bl-hueco{ height:38px; background:var(--bs-surface-2); border:1px dashed var(--bs-gray-light); }
.bl-vacio{ padding:12px; font-size:13px; color:var(--bs-muted); }
.bl-mas{ display:block; padding:8px 12px; font-size:13px; color:var(--bs-ink); text-decoration:underline; }
@media (max-width: 860px){
  .bl-fila{ grid-template-columns:80px minmax(0, 1fr) 36px; }
  .bl-cat, .bl-estado, .bl-valor{ display:none; }
  .bl-conteo{ margin-left:0; }
  .tab-sprint{ width:100%; }
  .tab-sprint-sel{ flex:1; max-width:none; }
}

/* ---------- Tableros (fase 16: cobranzas CXC) ---------- */
/* estado que sigue al servicio (detalle, columna y tarjeta) */
.tb-cob-sigue{ display:flex; align-items:flex-start; gap:6px; margin-top:8px; font-size:12.5px; color:var(--bs-muted); line-height:1.4; }
.tb-cob-sigue .bs-ico, .tab-col-sigue .bs-ico, .tab-card-sigue .bs-ico{ flex:none; }
.tb-cob-sigue b{ color:var(--bs-ink); }
.tab-col-sigue{ display:inline-flex; margin-right:5px; color:var(--bs-muted); vertical-align:-1px; }
.tab-card-sigue{ display:inline-flex; align-items:center; gap:4px; margin-top:6px; font-size:11.5px; color:var(--bs-muted); font-family:var(--bs-font-head); font-weight:600; }
.tab-card--sigue{ cursor:pointer; }
.tb-estado-op[disabled]{ color:var(--bs-muted); cursor:not-allowed; }
.tb-estado-op[disabled] .bs-ico{ margin-left:auto; }
/* bloque financiero y crear cobranza */
.tb-det-cob .tb-val b{ font-family:var(--bs-font-head); font-weight:600; }
.tb-crear-cobranza{ margin-top:2px; }
/* lista: total del filtro */
.tb-totales{ padding:10px 14px; border-top:1px solid var(--bs-border); text-align:right; font-size:13.5px; color:var(--bs-ink); }
.tb-totales b{ font-family:var(--bs-font-head); font-weight:600; font-size:15px; }
.tb-table td.tb-nowrap{ white-space:nowrap; }

/* ---------- Tableros (fase 17: pagos, proveedores y subtareas) ---------- */
.tb-solicitar-pago{ margin-top:8px; }
.tb-vence-alerta{ display:inline-flex; align-items:center; gap:4px; font-weight:600; }
/* subtareas */
.tb-sub-fila{ display:flex; align-items:center; gap:10px; padding:6px 0; border-bottom:1px solid var(--bs-border-soft); font-size:13.5px; flex-wrap:wrap; }
.tb-sub-valor{ font-size:12.5px; color:var(--bs-muted); white-space:nowrap; }
.tb-sub-fila .tb-sub-estado{ width:auto; min-width:170px; height:30px; font-size:12px; }
.tb-sub-cuenta{ margin-left:8px; font-family:var(--bs-font-body); font-weight:400; text-transform:none; letter-spacing:0; color:var(--bs-muted); font-size:12px; }
.tb-sub-barra{ display:inline-block; vertical-align:middle; width:80px; height:5px; margin-left:8px; background:var(--bs-surface-2); border:1px solid var(--bs-border-soft); }
.tb-sub-barra > span{ display:block; height:100%; background:var(--bs-gray-dark); }
html.theme-dark .tb-sub-barra > span{ background:var(--bs-ink); }
.tb-sub-form{ display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; align-items:center; }
/* busqueda de tareas existentes al escribir el titulo (como las actividades coincidentes de Jira) */
.tb-sub-busca{ position:relative; flex:1 1 240px; min-width:0; }
.tb-sub-busca .tb-sub-titulo{ width:100%; }
.tb-sub-form .tb-sub-titulo{ flex:1; min-width:180px; height:34px; }
.tb-sub-form .tb-sub-monto{ width:120px; height:34px; }
.tb-sub-form .bs-field-error{ flex-basis:100%; }
.tab-card-subs{ display:inline-flex; align-items:center; gap:4px; margin-top:6px; margin-left:6px; font-size:11.5px; color:var(--bs-muted); font-family:var(--bs-font-head); font-weight:600; }
.tab-card-subs.is-completas{ color:#047857; }
html.theme-dark .tab-card-subs.is-completas{ color:#6ee7b7; }
/* alta: proveedor nuevo en linea */
.tb-c-np-abrir{ display:inline-flex; align-items:center; gap:4px; margin-top:6px; }
.tb-c-np{ display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; padding:10px; border:1px solid var(--bs-border); background:var(--bs-surface-2); }
.tb-c-np .tb-c-np-nombre{ flex:1; min-width:200px; }
.tb-c-np .tb-c-np-ruc{ width:140px; }
.tb-c-np .tb-c-np-pais{ width:60px; text-transform:uppercase; }
.tb-c-np .tb-c-np-error{ flex-basis:100%; color:var(--bs-red); font-size:12.5px; }
/* proveedores */
.pv-activos{ width:auto; min-width:140px; }
.tb-acciones{ text-align:right; }

/* ---------- Tableros (fase 18: pagos recurrentes) ---------- */
.ag-tabs{ margin:0 0 14px; }
.ag-tabs a{ text-decoration:none; }
.ag-mes{ display:flex; align-items:center; gap:6px; }
.ag-mes .ag-mes-input{ width:170px; height:36px; }
.ag-mes.is-disabled, .ag-estado.is-disabled{ opacity:.5; }
.ag-estado{ width:auto; min-width:150px; }
.ag-aviso{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin:0 0 12px; padding:10px 14px; border:1px solid var(--bs-border); border-left:3px solid var(--bs-red); background:var(--bs-surface); color:var(--bs-ink); font-size:13.5px; }
.ag-aviso svg{ color:var(--bs-red); }
.ag-table .tb-acciones .bs-btn{ white-space:nowrap; }
.ag-table td.bs-status--vencido svg{ vertical-align:-2px; }
.ob-pick{ max-height:180px; }
/* detalle: bloque del pago recurrente */
.tb-det-pago .tb-pago-form{ display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:10px; }
.tb-det-pago .tb-pago-form .bs-input{ height:34px; }
.tb-det-pago .tb-pago-form .tb-pago-op{ grid-column:1 / -1; }
.tb-det-pago .tb-pago-form .bs-field-error{ grid-column:1 / -1; }
.tb-det-pago .tb-pago-form button{ grid-column:1 / -1; justify-self:start; }
@media (max-width:640px){
  .ag-mes{ flex-wrap:wrap; }
  .ag-mes .ag-mes-input{ width:140px; }
  .tb-det-pago .tb-pago-form{ grid-template-columns:1fr; }
}
#ob-rows .ag-abrir{ color:var(--bs-ink); }
#ob-rows .ag-abrir:hover{ text-decoration:underline; }

/* ---------- Tableros (fase 19: configuracion de espacios) ---------- */
.cf-tabs{ margin:0 0 14px; }
.cf-tabs a{ text-decoration:none; }
.cf-panel.bs-panel{ padding:20px; }
.cf-acciones{ margin-top:16px; }
.cf-toolbar{ justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.cf-asa-col{ width:34px; }
.cf-asa{ width:34px; cursor:grab; color:var(--bs-muted); }
.cf-table .ui-sortable-helper{ display:table; background:var(--bs-surface); border:1px solid var(--bs-border); }
.cf-inactivos{ margin-top:16px; padding:12px 14px; border:1px solid var(--bs-border); background:var(--bs-surface); }
.cf-inactivo{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 0; border-top:1px solid var(--bs-border-soft); font-size:13.5px; }
.cf-inactivo:first-of-type{ border-top:0; }
.cf-rol{ width:auto; min-width:150px; }
.cf-miembro-form #cf-candidato{ flex:1; min-width:220px; max-width:420px; }
.cf-miembro-form{ justify-content:flex-start; }
.cf-nota{ margin-top:10px; font-size:12.5px; }
.cf-colores{ display:flex; flex-wrap:wrap; gap:8px; }
.cf-color{ display:inline-flex; align-items:center; gap:4px; cursor:pointer; }
.cf-color input{ margin:0; }
/* tablero: minimo WIP y atajo de la columna */
.tab-wip--under .tab-col-n{ color:#b45309; }
html.theme-dark .tab-wip--under .tab-col-n{ color:#fcd34d; }
.tab-col-editar{ display:inline-flex; align-items:center; justify-content:center; width:24px; height:24px; margin-left:4px; color:var(--bs-muted); background:none; border:0; cursor:pointer; opacity:0; }
.tab-col-head:hover .tab-col-editar, .tab-col-editar:focus{ opacity:1; }
.tab-col-editar:hover{ color:var(--bs-ink); }
@media (hover:none){ .tab-col-editar{ opacity:1; } }
.cf-au-quien{ white-space:nowrap; }
.cf-au-txt{ display:-webkit-box; -webkit-line-clamp:3; line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.cf-table .tb-estado{ white-space:nowrap; }

/* ---------- Tableros: Resumen del espacio (como el de Jira) ---------- */
/* paleta de graficos (estados de la dona): tonos distinguibles en claro y oscuro */
:root{
  --rs-c-0:#f59e0b; --rs-c-1:#3b82f6; --rs-c-2:#06b6d4; --rs-c-3:#84cc16;
  --rs-c-4:#8b5cf6; --rs-c-5:#ec4899; --rs-c-6:#1e40af; --rs-c-7:#14b8a6;
  --rs-listo:#65a30d; --rs-curso:#2563eb; --rs-hacer:var(--bs-gray-light);
}
html.theme-dark{ --rs-hacer:#5a5e64; }
.page-resumen .bs-card{ margin-bottom:18px; }
.rs-toolbar{ margin-bottom:14px; }
#rs-filtro-toggle.is-active{ border-color:var(--bs-gray-dark); }
.rs-cifras{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:18px; margin-bottom:18px; }
.rs-cifra{ display:flex; align-items:center; gap:12px; padding:14px 16px; background:var(--bs-surface); border:1px solid var(--bs-border); }
.rs-cifra-ico{ flex:none; width:40px; height:40px; display:inline-flex; align-items:center; justify-content:center; background:var(--bs-surface-2); color:var(--bs-ink); }
.rs-cifra-n{ font-family:var(--bs-font-head); font-weight:600; font-size:18px; color:var(--bs-ink); }
.rs-cifra-nota{ font-size:12px; color:var(--bs-muted); }
.rs-grid{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:18px; }
.rs-card-sub{ margin:-4px 0 14px; font-size:13px; color:var(--bs-muted); }
.rs-nota{ font-family:var(--bs-font-body); font-size:12.5px; font-weight:400; margin-left:6px; }
/* dona */
.rs-dona-wrap{ display:grid; grid-template-columns:200px minmax(0,1fr); gap:18px; align-items:center; }
.rs-dona{ width:200px; height:200px; }
.rs-arco-fondo{ stroke:var(--bs-surface-2); }
.rs-dona-n{ font-family:var(--bs-font-head); font-weight:600; font-size:30px; fill:var(--bs-ink); }
.rs-dona-t{ font-size:12px; fill:var(--bs-muted); }
.rs-leyendas{ display:flex; flex-direction:column; gap:6px; max-height:220px; overflow:auto; }
.rs-ley{ display:flex; align-items:flex-start; gap:8px; font-size:12.5px; color:var(--bs-ink); text-decoration:none; }
.rs-ley:hover span{ text-decoration:underline; }
.rs-ley i{ flex:none; width:12px; height:12px; margin-top:2px; }
/* prioridad */
.rs-prio-plot{ position:relative; display:grid; grid-template-columns:repeat(5, minmax(0,1fr)); gap:14%; height:190px; margin-left:34px; padding:0 4%; border-left:1px solid var(--bs-border); border-bottom:1px solid var(--bs-border); }
.rs-prio-eje{ position:absolute; left:0; right:0; border-top:1px dashed var(--bs-border-soft); }
.rs-prio-eje em{ position:absolute; left:-34px; top:-8px; width:28px; text-align:right; font-style:normal; font-size:11px; color:var(--bs-muted); }
.rs-prio-col{ position:relative; display:flex; align-items:flex-end; z-index:1; }
.rs-prio-barra{ position:relative; display:block; width:100%; min-height:1px; background:var(--bs-gray-light); }
html.theme-dark .rs-prio-barra{ background:var(--bs-muted); }
.rs-prio-barra b{ position:absolute; left:0; right:0; top:-18px; text-align:center; font-family:var(--bs-font-head); font-size:12px; color:var(--bs-ink); }
.rs-prio-nombres{ display:grid; grid-template-columns:repeat(5, minmax(0,1fr)); gap:14%; margin-left:34px; padding:6px 4% 0; font-size:12px; color:var(--bs-muted); text-align:center; }
.rs-prio-nombres span{ white-space:nowrap; }
.rs-prio-nombres svg{ vertical-align:-2px; }
/* actividad reciente */
.rs-feed{ max-height:460px; overflow:auto; }
.rs-feed-dia{ margin:12px 0 6px; font-family:var(--bs-font-head); font-weight:600; font-size:13px; color:var(--bs-ink); }
.rs-feed-dia:first-child{ margin-top:0; }
.rs-feed-fila{ display:flex; gap:10px; padding:8px 0; border-bottom:1px solid var(--bs-border-soft); }
.rs-feed-texto{ min-width:0; font-size:13.5px; color:var(--bs-ink); line-height:1.45; }
.rs-feed-quien{ font-weight:600; }
.rs-feed-item{ color:var(--bs-ink); font-weight:500; text-decoration:underline; text-decoration-color:var(--bs-border); }
.rs-feed-item:hover{ text-decoration-color:currentColor; }
.rs-feed-cita{ margin-top:2px; color:var(--bs-muted); }
.rs-feed-cuando{ font-size:12px; color:var(--bs-muted); }
.rs-feed-mas{ margin-top:10px; }
.rs-avatar{ flex:none; width:28px; height:28px; display:inline-flex; align-items:center; justify-content:center; background:var(--bs-gray-dark); color:#fff; font-family:var(--bs-font-head); font-weight:600; font-size:12px; }
.rs-avatar--vacio{ background:var(--bs-surface-2); color:var(--bs-muted); border:1px solid var(--bs-border); }
/* carga del equipo */
.rs-carga{ display:flex; flex-direction:column; gap:10px; max-height:300px; overflow:auto; }
.rs-carga-fila{ display:grid; grid-template-columns:minmax(0,200px) minmax(0,1fr); gap:12px; align-items:center; color:var(--bs-ink); text-decoration:none; font-size:13px; }
.rs-carga-quien{ display:flex; align-items:center; gap:8px; min-width:0; }
.rs-carga-quien > span:last-child{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rs-carga-pista{ position:relative; height:24px; background:var(--bs-surface-2); }
.rs-carga-pista > span{ display:block; height:100%; background:var(--bs-gray-light); }
.rs-carga-pista em{ position:absolute; left:8px; top:3px; font-style:normal; font-size:12px; color:var(--bs-ink); }
.rs-carga-fila:hover .rs-carga-quien span:last-child{ text-decoration:underline; }
/* progreso por categoria */
.rs-leyenda{ display:flex; gap:16px; margin-bottom:12px; font-size:12px; color:var(--bs-muted); }
.rs-leyenda i{ display:inline-block; width:11px; height:11px; margin-right:4px; vertical-align:-1px; }
.rs-cats{ display:flex; flex-direction:column; gap:12px; max-height:300px; overflow:auto; }
.rs-cat-fila{ display:block; color:var(--bs-ink); text-decoration:none; }
.rs-cat-nombre{ display:block; margin-bottom:4px; font-size:12px; }
.rs-cat-barra{ display:flex; height:22px; background:var(--bs-surface-2); }
.rs-cat-barra > span{ display:flex; align-items:center; padding-left:6px; overflow:hidden; white-space:nowrap; font-size:12px; color:#fff; }
.rs-c-listo{ background:var(--rs-listo); }
.rs-c-curso{ background:var(--rs-curso); }
.rs-c-hacer{ background:var(--rs-hacer); }
.rs-cat-barra > .rs-c-hacer{ color:var(--bs-ink); }
.rs-pie{ font-size:12px; margin:4px 0 20px; }
@media (max-width:1200px){ .rs-cifras{ grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media (max-width:1023px){
  .rs-grid{ grid-template-columns:minmax(0,1fr); }
}
@media (max-width:600px){
  .rs-cifras{ grid-template-columns:minmax(0,1fr); }
  .rs-dona-wrap{ grid-template-columns:minmax(0,1fr); justify-items:center; }
  .rs-carga-fila{ grid-template-columns:minmax(0,130px) minmax(0,1fr); }
  .rs-prio-nombres{ font-size:10.5px; }
}

/* ---------- Tableros: vista Calendario (franjas de inicio a termino, sprints, sin programar) ---------- */
.tb-vistas{ flex-wrap:nowrap; max-width:100%; overflow-x:auto; scrollbar-width:none; }
.tb-vistas > *{ flex:none; }
.bs-btn.is-active{ background:var(--bs-gray-dark); border-color:var(--bs-gray-dark); color:#fff; }
.cal-toolbar{ flex-wrap:wrap; }
.cal-mes{ display:flex; align-items:center; gap:6px; margin-left:auto; }
.cal-titulo{ min-width:150px; text-align:center; font-family:var(--bs-font-head); font-weight:600; font-size:18px; color:var(--bs-ink); }
.cal-wrap{ display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:16px; align-items:start; }
.cal-wrap.sin-panel{ grid-template-columns:minmax(0,1fr); }
.cal-grid-wrap{ background:var(--bs-surface); border:1px solid var(--bs-border); overflow-x:auto; }
.cal-dias, .cal-fondo, .cal-carriles, .cal-mas-fila{ display:grid; grid-template-columns:repeat(7, minmax(96px, 1fr)); }
.cal-dias{ border-bottom:1px solid var(--bs-border); background:var(--bs-surface-2); }
.cal-dias span{ padding:8px 10px; font-family:var(--bs-font-head); font-weight:600; font-size:12px; letter-spacing:.06em; text-transform:uppercase; color:var(--bs-muted); }
.cal-semana{ position:relative; min-height:118px; border-bottom:1px solid var(--bs-border); }
.cal-semana:last-child{ border-bottom:0; }
.cal-fondo{ position:absolute; inset:0; }
.cal-celda{ border-left:1px solid var(--bs-border-soft); padding:6px 8px; }
.cal-celda:first-child{ border-left:0; }
.cal-celda.is-finde{ background:var(--bs-surface-2); }
.cal-celda.is-fuera .cal-num{ color:var(--bs-gray-light); }
.cal-celda.is-destino{ background:var(--bs-neutral-tag); outline:2px dashed var(--bs-gray-dark); outline-offset:-3px; }
.cal-num{ font-size:12px; color:var(--bs-muted); }
.cal-celda.is-hoy .cal-num{ display:inline-block; min-width:20px; padding:1px 5px; background:var(--bs-red); color:#fff; font-weight:600; text-align:center; }
.cal-carriles{ position:relative; grid-auto-rows:22px; row-gap:3px; padding:28px 0 8px; pointer-events:none; }
.cal-carriles > *{ pointer-events:auto; }
.cal-barra, .cal-sprint{ display:block; min-width:0; margin:0 3px; padding:0 8px; line-height:22px; font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-decoration:none; border-left:3px solid transparent; }
.cal-barra{ cursor:pointer; }
.cal-barra:hover{ filter:brightness(.96); }
.cal-barra--neutra{ background:var(--bs-neutral-tag); color:var(--bs-ink); }
.cal-barra.is-vencido{ border-left-color:var(--bs-red); }
.cal-barra.is-listo{ opacity:.6; }
.cal-barra.is-listo .cal-barra-titulo{ text-decoration:line-through; }
.cal-barra.sigue-antes, .cal-sprint.sigue-antes{ margin-left:0; }
.cal-barra.sigue-despues, .cal-sprint.sigue-despues{ margin-right:0; }
.cal-barra.is-arrastrando{ opacity:.4; }
.cal-barra-clave{ font-family:var(--bs-font-head); font-weight:600; }
.cal-sprint{ background:var(--bs-surface-2); color:var(--bs-ink); border:1px solid var(--bs-border); font-family:var(--bs-font-head); font-weight:600; letter-spacing:.02em; line-height:20px; }
.cal-sprint svg{ vertical-align:-2px; }
.cal-sprint--activo{ background:var(--bs-gray-dark); border-color:var(--bs-gray-dark); color:#fff; }
.cal-sprint--cerrado{ color:var(--bs-muted); }
.cal-mas-fila{ position:relative; padding:0 0 6px; }
.cal-mas{ margin:0 8px; font-size:12px; color:var(--bs-muted); text-decoration:none; }
.cal-mas:hover{ color:var(--bs-ink); text-decoration:underline; }
.cal-mas-pop{ position:absolute; z-index:30; width:280px; max-height:320px; overflow:auto; }
.cal-pop-item{ display:block; padding:6px 4px; font-size:13px; color:var(--bs-ink); text-decoration:none; border-top:1px solid var(--bs-border-soft); }
.cal-pop-item:hover{ background:var(--bs-surface-2); }
.page-calendario{ position:relative; }
.cal-aviso{ padding:8px 12px; font-size:13px; color:var(--bs-muted); border-top:1px solid var(--bs-border); }
.cal-sin{ background:var(--bs-surface); border:1px solid var(--bs-border); max-height:calc(100vh - 230px); display:flex; flex-direction:column; }
.cal-sin-head{ padding:12px 14px; border-bottom:1px solid var(--bs-border); }
.cal-sin-titulo{ font-family:var(--bs-font-head); font-weight:600; font-size:16px; color:var(--bs-ink); }
.cal-sin-sub{ margin-top:2px; font-size:12px; color:var(--bs-muted); }
.cal-sin-lista{ overflow:auto; padding:8px; }
.cal-sin-item{ display:block; padding:10px; margin-bottom:8px; border:1px solid var(--bs-border); background:var(--bs-surface); color:var(--bs-ink); text-decoration:none; }
.cal-sin-item[draggable="true"]{ cursor:grab; }
.cal-sin-item:hover{ border-color:var(--bs-gray-dark); }
.cal-sin-item.is-arrastrando{ opacity:.4; }
.cal-sin-tit{ display:block; font-size:13px; line-height:1.35; }
.cal-sin-meta{ display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-top:6px; font-size:12px; }
.cal-sin-meta .tb-clave{ font-family:var(--bs-font-head); font-weight:600; }
.cal-sin-vacio, .cal-sin-mas{ padding:8px 4px; font-size:12px; }
@media (max-width: 1100px){
  .cal-wrap{ grid-template-columns:minmax(0,1fr); }
  .cal-sin{ max-height:none; }
  .cal-mes{ margin-left:0; }
}
/* configuracion: enlace de categorias con "Tipo de servicio" */
.cf-enlace{ margin:0 0 12px; padding:12px 14px; background:var(--bs-surface); border:1px solid var(--bs-border); }
.cf-enlace .bs-help{ margin-top:4px; font-size:12px; color:var(--bs-muted); }

/* ============================================================================
   Esquinas (27/09/2026, como Jira) — un solo sitio para los componentes que no
   declaran la suya. Tokens: --bs-radius-sm (etiquetas), --bs-radius (controles),
   --bs-radius-md (recuadros, menus), --bs-radius-lg (columnas, modales).
   Un componente nuevo usa el token en su propia regla.
   ========================================================================== */
/* etiquetas y contadores */
.bs-tag, .bs-tpl-tag, .bs-notif-estado, .bs-notif-prod-n, .bs-swatch, [class*="bs-cat--"],
.tb-estado, .tb-tipo, .tb-link-estado, .tb-link-tipo, .tb-docs-chip, .tb-det-estado, .tb-pm-estado, .tb-c-np,
.tab-card-cat, .tab-card-cat-btn{ border-radius:var(--bs-radius-sm); }
/* controles */
.bs-icon-btn, .bs-btn-mini, .bs-search, .bs-input-wrap, .sidebar-toggle, .bs-modal .bs-modal-close,
.style-form.module_import .control-field-content input, .jconfirm .jconfirm-box .jconfirm-buttons button.btn-default,
.modulos-list label.check, .bs-modal .user-modulos-field .modulos-list label.check,
.zone-documents .control-field-upload, .zone-documents .btn-fix-col-1, .zone-documents button.btn-fix-col-1, .bs-period,
.tb-edit, .tb-com-abrir, .tb-reac, .tb-reac-add, .tb-carr-btn, .tb-estado-btn, .tb-sprints-mas, .tb-sprints-ant, .tb-agr,
.tab-card-menu-btn, .bs-flow-dot{ border-radius:var(--bs-radius); }
/* grupos: la esquina es del grupo, no de cada parte */
.bs-seg, .bs-btn-group, .asis-marcar-tabs{ border-radius:var(--bs-radius); overflow:hidden; }
.bs-seg > *, .bs-btn-group > *{ border-radius:0; }
/* recuadros, menus e iconos en caja */
.bs-pop, .dropdown-notice, .bs-panel, .bs-empty, .bs-module, .bs-upload, .bs-key-box, .bs-photo-preview, .bs-note, .alert,
.bs-pick-list, .bs-doc-list .item-doc, .bs-docs-client-row, .bs-veh-grid, .bs-dash-chip, .bs-flow, .rrhh-dias-info, .rrhh-adjuntos li,
.bs-report .bs-act-line, .bs-report #zone-fotos, .bs-report .certificate-required, .bs-report .certificate-test-result,
.bs-report .certificate-section, .bs-report .certificate-check-group, .bs-report .certificate-extinguishers > div,
.bs-empty-ico, .bs-module-ico, .bs-panel-head .bs-panel-ico, .bs-stat-ico, .bs-docs-client-ico, .bs-dash-kpi-ico, .bs-user-av--logo,
.tab-card, .tab-pop, .tab-menu, .tab-sprint-pop, .tb-adj-tile, .tb-adj-subiendo, .tb-adj-soltar, .tb-det-srv,
.tb-menc-pop, .tb-reac-pop, .tb-sub-barra, .bl-epicas, .bl-grupo, .ag-aviso, .cf-inactivos, .cf-enlace, .rs-cifra,
.cal-sprint, .cal-sin, .cal-sin-item, #modal-tb-servicio .tb-s-eq-fijo, .tab-mas, .tb-adj-vacio, .tb-pm-vacio{ border-radius:var(--bs-radius-md); }
.cal-grid-wrap{ border-radius:var(--bs-radius-md); }
.bs-panel{ overflow:hidden; }
/* columnas del tablero: la cabecera sigue la esquina */
.tab-col{ border-radius:var(--bs-radius-lg); }
.tab-col-head{ border-radius:calc(var(--bs-radius-lg) - 1px) calc(var(--bs-radius-lg) - 1px) 0 0; }
/* el expediente: el panel lateral gris llega a la esquina */
.tb-det-modal .owp-qv-content-inner.bs-modal-inner{ overflow:hidden; }
/* personas: circulares */
.bs-avatar, .tb-av, .bs-user-av:not(.bs-user-av--logo), .bs-client-avatar, .bs-contact-photo, .rs-avatar--vacio, .tab-persona{ border-radius:50%; }
/* menu lateral */
.menu-list a, .menu-footer a{ border-radius:var(--bs-radius-md); margin:0 8px; }
.menu-list .submenu a{ margin:0; border-radius:0; }
.sidebar-collapsed .menu-list a, .sidebar-collapsed .menu-footer a{ margin:0 auto; }
@media (max-width: 1024px){
  .sidebar-collapsed .menu-list a, .sidebar-collapsed .menu-footer a{ margin:0 8px; }
  .menu-list .submenu a{ margin:0; }
  /* el subitem activo se marca con el texto, como en escritorio (sin franja) */
  .sidebar-collapsed .menu-list .submenu a.active{ background:transparent; }
}

/* ============================================================================
   Prioridad (como Jira): icono prio-* de bs_icon()/app_icon() + color por nivel.
   1 Highest y 2 High en rojo, 3 Medium en naranja, 4 Low y 5 Lowest en azul.
   ========================================================================== */
.tb-prio{ display:inline-flex; align-items:center; flex:none; line-height:0; }
.tb-prio .bs-ico{ stroke-width:2.4; }
.tb-prio--1{ color:#d92d20; }
.tb-prio--2{ color:#ef5d3a; }
.tb-prio--3{ color:#e08400; }
.tb-prio--4{ color:#3d82f0; }
.tb-prio--5{ color:#1f5fcf; }
html.theme-dark .tb-prio--1{ color:#ff6b5e; }
html.theme-dark .tb-prio--2{ color:#ff8f73; }
html.theme-dark .tb-prio--3{ color:#ffb938; }
html.theme-dark .tb-prio--4{ color:#6aa6ff; }
html.theme-dark .tb-prio--5{ color:#4c8dff; }
/* tarjeta: boton cuadrado pequeno que abre el menu de prioridad */
.tab-prio-btn{ display:inline-grid; place-items:center; width:24px; height:24px; padding:0; margin:0 2px; border:1px solid transparent; border-radius:var(--bs-radius); background:transparent; cursor:pointer; }
button.tab-prio-btn:hover, button.tab-prio-btn:focus-visible{ border-color:var(--bs-border); background:var(--bs-surface); }
.tab-prio-btn.is-fija{ cursor:default; }
/* menu: icono + nombre + check */
.tab-menu .tab-menu-op .tb-prio{ margin-right:2px; }
.tab-menu .tab-menu-op .tb-prio .bs-ico{ margin-left:0; }
.tab-menu .tab-menu-op[aria-current="true"]{ background:var(--bs-surface-2); }
.tab-menu .tab-menu-txt{ flex:1; }
/* detalle: valor y lista */
.tb-prio-val{ display:inline-flex; align-items:center; gap:8px; }
/* prioridad: la celda conserva su medida (con el borde de "activo") y la lista flota debajo */
.tb-val.is-editing[data-campo="prioridad"]{ position:relative; padding:4px 28px 4px 6px; margin:0 -6px; border:1px solid var(--bs-border); background:var(--bs-surface); }
.tb-ed-prio{ max-height:none; position:absolute; top:calc(100% + 4px); left:0; z-index:40; min-width:200px; margin:0;
  background:var(--bs-surface); border:1px solid var(--bs-border); border-radius:var(--bs-radius-md); padding:4px 0; }
.tb-ed-prio .tb-ed-prio-op{ display:flex; flex-direction:row; justify-content:flex-start; align-items:center; gap:10px; width:100%; border:0; background:transparent; text-align:left; font:inherit; color:var(--bs-ink); cursor:pointer; }
.tb-ed-prio .tb-ed-prio-op:hover, .tb-ed-prio .tb-ed-prio-op:focus-visible{ background:var(--bs-surface-2); outline:0; }
.tb-ed-prio .tb-ed-prio-op.is-selected{ background:var(--bs-surface-2); font-weight:600; }
/* filtros y carriles */
.bs-check .tb-prio{ margin:0 2px 0 4px; }
.tab-carril-head .tb-prio{ margin-right:2px; }

/* ============================================================================
   Operaciones: Servicios y Personal (27/09/2026). Listas, ventanas, formulario de asignar
   y el calendario de bloques (jquery.cronograma.js, clases cr-*).
   ========================================================================== */
:root{ --op-rango:#eef3fb; --op-finde:#f7f8f9; }
html.theme-dark{ --op-rango:#1f2835; --op-finde:#23262b; }

/* Personal: buscador y filtro de asignacion mas cortos para que la barra quepa en una linea */
/* Personal: los atajos del periodo en el desplegable Filtrar */
.pe-periodo{ margin-bottom:12px; }
.pe-periodo .op-rangos{ display:flex; }
.pe-periodo .op-rangos button{ flex:1; }
.op-tabla .op-sub{ display:block; font-size:12px; color:var(--bs-muted); margin-top:2px; }
.op-tabla .op-num{ text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.op-fila{ cursor:pointer; }
.op-codigo{ font-family:var(--bs-font-head); font-weight:600; color:var(--bs-ink); text-decoration:none; }
.op-codigo:hover{ color:var(--bs-red); text-decoration:underline; }
.op-estado{ min-height:24px; padding:0 8px; font-size:11.5px; white-space:nowrap; }
.op-personas{ display:inline-flex; align-items:center; }
.op-personas .tb-av{ width:28px; height:28px; font-size:11px; border:2px solid var(--bs-surface); margin-left:-6px; box-sizing:border-box; }
.op-personas .tb-av:first-child{ margin-left:0; }
.op-personas-mas{ margin-left:4px; font-size:12px; color:var(--bs-muted); }
.op-persona-celda{ display:inline-flex; align-items:center; gap:10px; }

/* ventana: franja de datos, pestanas y columnas */
.op-franja{ display:flex; flex-wrap:wrap; gap:10px 28px; align-items:center; padding:12px 16px; margin:0 0 16px;
  background:var(--bs-surface); border:1px solid var(--bs-border); border-radius:var(--bs-radius-md); }
.op-franja-item{ display:flex; flex-direction:column; gap:4px; min-width:0; }
.op-franja-label{ font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--bs-muted); }
.op-franja-item b{ font-family:var(--bs-font-head); font-size:17px; font-weight:600; color:var(--bs-ink); }
.op-periodo{ display:inline-flex; align-items:center; gap:6px; }
.op-periodo .bs-input{ width:148px; height:30px; }
.op-tabs{ margin:0 0 14px; }
.op-cols{ display:grid; grid-template-columns:minmax(0, 1.25fr) minmax(0, 1fr); gap:16px; align-items:start; }
.op-panel-body{ padding:14px 16px; }
.op-panel-body .bs-dl{ grid-template-columns:150px 1fr; }
.op-lista-personal{ list-style:none; margin:0; padding:0; }
.op-persona{ display:flex; align-items:center; gap:10px; padding:9px 0; border-bottom:1px solid var(--bs-border-soft); }
.op-persona:last-child{ border-bottom:0; }
.op-persona-txt{ flex:1; min-width:0; display:flex; flex-direction:column; }
.op-persona-nombre{ color:var(--bs-ink); font-weight:600; text-decoration:none; }
.op-persona-nombre:hover{ color:var(--bs-red); text-decoration:underline; }
.op-persona-txt .op-sub{ font-size:12px; color:var(--bs-muted); }
.op-persona-acc{ display:flex; gap:6px; flex:none; }
.op-vacio{ display:flex; flex-direction:column; align-items:flex-start; gap:10px; }
.op-vacio p{ margin:0; }
.op-cal-nota{ font-size:12.5px; margin:0 0 10px; }
/* documentos del servicio y configuracion */
.op-subir{ cursor:pointer; }
.op-docs-soltar{ padding:16px; margin:0 0 12px; border:1px dashed var(--bs-gray-light); border-radius:var(--bs-radius-md); color:var(--bs-muted); font-size:13px; text-align:center; }
.op-docs-soltar.is-encima{ border-color:var(--bs-gray-dark); background:var(--bs-surface-2); }
.op-docs-soltar.is-subiendo{ color:var(--bs-ink); }
.op-docs{ list-style:none; margin:0 0 10px; padding:0; }
.op-doc{ display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid var(--bs-border-soft); color:var(--bs-muted); }
.op-doc:last-child{ border-bottom:0; }
.op-doc-nombre{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--bs-ink); text-decoration:none; }
.op-doc-nombre:hover{ color:var(--bs-red); text-decoration:underline; }
.op-doc-hueco{ width:30px; flex:none; }
.op-doc.is-pendiente .op-doc-nombre{ color:var(--bs-muted); }
.op-peligro .bs-panel-head{ border-bottom-color:var(--bs-red-100); }
.op-peligro-txt{ margin:0 0 14px; font-size:13.5px; max-width:680px; }
@media (max-width: 600px){ .op-doc .bs-tag{ display:none; } }
.op-ausencias{ display:flex; flex-wrap:wrap; gap:6px; padding:10px 14px; border-bottom:1px solid var(--bs-border-soft); }
.op-tabla tr.op-dia-nuevo td{ border-top:1px solid var(--bs-border); }

/* formulario de asignar */
.op-personas-lista{ max-height:230px; overflow:auto; margin-top:8px; }
.op-persona-op{ display:flex !important; flex-direction:row !important; align-items:center !important; gap:10px; cursor:pointer; }
.op-persona-op input{ width:16px; height:16px; margin:0; flex:none; accent-color:var(--bs-red); }
.op-persona-op-txt{ flex:1; min-width:0; }
.op-dias{ display:flex; gap:6px; flex-wrap:wrap; }
.op-dia{ width:38px; height:36px; border:1px solid var(--bs-border); border-radius:var(--bs-radius); background:var(--bs-surface); color:var(--bs-muted);
  font-family:var(--bs-font-head); font-weight:600; font-size:14px; cursor:pointer; }
.op-dia.is-on{ background:var(--bs-gray-dark); border-color:var(--bs-gray-dark); color:#fff; }
.op-tramo{ display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.op-tramo .bs-input{ width:130px; }
.op-previa{ margin-top:4px; }
.op-foot-resumen{ font-size:13.5px; color:var(--bs-muted); min-width:0; }
.op-foot-resumen b{ color:var(--bs-ink); }
.op-rojo{ color:var(--bs-red-700); font-weight:600; }
.op-verde{ color:#047857; }
html.theme-dark .op-rojo{ color:#fca5a5; }
html.theme-dark .op-verde{ color:#6ee7b7; }
.op-previa-caja{ padding:10px 12px; background:var(--bs-surface-2); border:1px solid var(--bs-border); border-radius:var(--bs-radius-md); font-size:13.5px; }
.op-previa-caja.is-error{ background:var(--bs-red-100); border-color:#eec5c5; color:var(--bs-red-700); }
.op-previa-cruces{ margin:8px 0 0; padding-left:18px; }
.op-previa-avisos{ list-style:none; margin:8px 0 0; padding:0; font-size:12.5px; color:var(--bs-muted); display:flex; flex-direction:column; gap:3px; }
.op-previa-avisos .bs-ico{ vertical-align:-2px; }
html.theme-dark .op-previa-caja.is-error{ background:#3a1d1e; border-color:#6b2c2e; color:#fca5a5; }

/* calendario de bloques */
.cr.is-cargando .cr-cuerpo{ opacity:.55; }
.cr-barra{ display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin:0 0 12px; }
.cr-nav{ display:flex; align-items:center; gap:6px; }
.cr-titulo{ font-family:var(--bs-font-head); font-size:19px; font-weight:600; color:var(--bs-ink); margin-left:8px; }
.cr-cargando{ padding:30px; text-align:center; }
.cr-mes{ border:1px solid var(--bs-border); border-radius:var(--bs-radius-md); overflow:hidden; }
.cr-sem{ display:grid; grid-template-columns:repeat(7, minmax(0, 1fr)); }
.cr-sem + .cr-sem{ border-top:1px solid var(--bs-border-soft); }
.cr-sem--cab{ background:var(--bs-surface-2); }
.cr-dia-nombre{ padding:7px 8px; font-family:var(--bs-font-head); font-weight:600; font-size:12px; letter-spacing:.06em; text-transform:uppercase; color:var(--bs-muted); }
.cr-dia{ min-height:108px; padding:5px 6px 6px; background:var(--bs-surface); display:flex; flex-direction:column; gap:4px; min-width:0; }
.cr-dia + .cr-dia, .cr-dia-nombre + .cr-dia-nombre{ border-left:1px solid var(--bs-border-soft); }
.cr-dia.is-finde, .cr-col.is-finde{ background:var(--op-finde); }
.cr-dia.is-rango, .cr-col.is-rango{ background:var(--op-rango); }
.cr-dia.is-fuera{ opacity:.45; }
.cr-dia-cab{ display:flex; align-items:center; gap:4px; flex-wrap:wrap; min-height:22px; }
.cr-num{ font-family:var(--bs-font-head); font-weight:600; font-size:14px; color:var(--bs-ink); min-width:22px; height:22px; display:inline-grid; place-items:center; border-radius:50%; }
.cr-num.is-hoy{ background:var(--bs-red); color:#fff; }
.cr-marca{ display:inline-block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:10.5px; padding:1px 6px; border-radius:var(--bs-radius-sm); }
.cr-marca--feriado{ background:var(--bs-red-100); color:var(--bs-red-700); }
.cr-marca--ausencia{ background:#FEF3C7; color:#B45309; }
html.theme-dark .cr-marca--feriado{ background:#3a1d1e; color:#fca5a5; }
html.theme-dark .cr-marca--ausencia{ background:#3a2f14; color:#fcd34d; }
.cr-dia-items{ display:flex; flex-direction:column; gap:3px; min-width:0; }
.cr-bloque{ display:block; width:100%; min-width:0; text-align:left; border:0; border-left:3px solid currentColor; border-radius:var(--bs-radius-sm);
  padding:2px 6px; font-family:var(--bs-font-body); font-size:11.5px; line-height:1.35; cursor:pointer; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cr-bloque .cr-hora{ font-family:var(--bs-font-head); font-weight:600; margin-right:5px; }
.cr-bloque .cr-txt{ color:var(--bs-ink); }
.cr-bloque:hover, .cr-bloque:focus-visible{ filter:brightness(.96); outline:1px solid currentColor; }
.cr-bloque.is-ausencia{ outline:1px dashed var(--bs-red); outline-offset:-1px; }
.cr-alerta{ display:inline-grid; place-items:center; width:13px; height:13px; margin-right:4px; border-radius:50%; background:var(--bs-red); color:#fff; font-size:10px; font-weight:700; line-height:1; vertical-align:1px; }
.cr-mas{ border:0; background:transparent; padding:0 2px; font-size:11.5px; color:var(--bs-muted); cursor:pointer; text-align:left; }
.cr-mas:hover{ color:var(--bs-red); text-decoration:underline; }
.cr-semana{ display:flex; border:1px solid var(--bs-border); border-radius:var(--bs-radius-md); overflow-x:auto; background:var(--bs-surface); }
.cr-horas{ position:relative; flex:none; width:48px; margin-top:38px; border-right:1px solid var(--bs-border-soft); }
.cr-horas span{ position:absolute; right:6px; transform:translateY(-50%); font-size:11px; color:var(--bs-muted); font-variant-numeric:tabular-nums; }
.cr-cols{ flex:1; display:grid; grid-template-columns:repeat(7, minmax(110px, 1fr)); min-width:770px; }
.cr-col + .cr-col{ border-left:1px solid var(--bs-border-soft); }
.cr-col-cab{ height:38px; display:flex; align-items:center; justify-content:center; gap:5px; border-bottom:1px solid var(--bs-border); font-size:12px; color:var(--bs-muted); text-transform:uppercase; }
.cr-col-cuerpo{ position:relative; }
.cr-linea{ position:absolute; left:0; right:0; border-top:1px solid var(--bs-border-soft); }
.cr-bloque--sem{ position:absolute; display:flex; flex-direction:column; white-space:normal; padding:3px 5px; font-size:11px; z-index:1; }
.cr-bloque--sem .cr-txt{ overflow:hidden; text-overflow:ellipsis; }
/* Asistencias → Marcar: el codigo se elige con la lupa (06/10/2026) */
.asis-codigo-wrap input{ padding-left:10px; cursor:pointer; }
/* botones propios (no .bs-eye: ese es el ojo de contrasena y cambia el input a password) */
.asis-codigo-btn{ width:42px; height:42px; flex:none; border:0; background:transparent; color:var(--bs-muted); cursor:pointer; display:grid; place-items:center; padding:0; }
.asis-codigo-btn:hover{ color:var(--bs-ink); }
/* codigo unico del item elegido (08/10/2026): fijo, sin lupa */
.asis-codigo-wrap.is-fijo{ background:var(--bs-surface-2); }
.asis-codigo-wrap.is-fijo input{ cursor:default; }
.asis-codigo-wrap.is-fijo .asis-codigo-lupa{ display:none; }
/* Listados: el codigo unico de cada item */
.asis-i-codigo{ white-space:nowrap; }
.asis-i-codigo .asis-check{ display:inline-flex; align-items:center; gap:6px; margin-right:8px; vertical-align:middle; }
.asis-i-cod-input{ display:inline-block; width:140px; min-height:32px; height:32px; vertical-align:middle; text-transform:uppercase; }
.asis-codigo-wrap input::placeholder{ color:var(--bs-muted); }
.asis-codigo-linea{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.asis-codigo-linea b{ font-family:var(--bs-font-head); font-weight:600; }
#modal-asis-codigo .bs-modal-body{ display:flex; flex-direction:column; gap:12px; }
/* Operaciones → Personal, vista Por persona (06/10/2026): personas x dias, cabecera y nombre fijos */
.pe-vistas{ margin-right:4px; }
.pe-grid-scroll{ overflow:auto; max-height:calc(100vh - 260px); border:1px solid var(--bs-border); border-radius:var(--bs-radius-md); background:var(--bs-surface); }
.pe-grid{ border-collapse:separate; border-spacing:0; width:100%; min-width:900px; table-layout:fixed; font-size:12px; }
.pe-grid.is-mes{ min-width:1300px; }
.pe-grid th, .pe-grid td{ border-bottom:1px solid var(--bs-border-soft); border-left:1px solid var(--bs-border-soft); padding:4px; vertical-align:top; background:var(--bs-surface); }
.pe-grid thead th{ position:sticky; top:0; z-index:2; background:var(--bs-surface-2); border-bottom:1px solid var(--bs-border); text-align:center; font-weight:400; }
.pe-grid tfoot td, .pe-grid tfoot th{ position:sticky; bottom:0; z-index:2; background:var(--bs-surface-2); border-top:1px solid var(--bs-border); text-align:center;
  font-family:var(--bs-font-head); font-weight:600; vertical-align:middle; }
.pe-grid .pe-grid-persona{ position:sticky; left:0; z-index:1; width:220px; text-align:left; border-left:0; border-right:1px solid var(--bs-border); vertical-align:middle; }
.pe-grid thead .pe-grid-persona, .pe-grid tfoot .pe-grid-persona{ z-index:3; font-family:var(--bs-font-head); font-weight:600; font-size:12px; letter-spacing:.06em; text-transform:uppercase; color:var(--bs-muted); padding:8px 10px; }
.pe-grid.is-mes .pe-grid-persona{ width:190px; }
.pe-grid-persona a{ display:flex; align-items:center; gap:8px; color:var(--bs-ink); text-decoration:none; min-width:0; padding:2px 6px; }
.pe-grid-persona a:hover .pe-grid-nombre{ text-decoration:underline; }
.pe-grid-persona .tb-av{ width:26px; height:26px; font-size:10.5px; flex:none; }
.pe-grid-nombre{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.pe-grid-nombre .op-sub{ display:block; overflow:hidden; text-overflow:ellipsis; }
.pe-grid-dia{ padding:6px 2px !important; }
.pe-grid-dn{ display:block; font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--bs-muted); }
.pe-grid-dia .cr-marca{ display:block; margin:2px auto 0; width:max-content; }
.pe-grid-celda{ height:44px; }
.pe-grid-celda > * + *{ margin-top:3px; }
.pe-grid td.is-finde, .pe-grid th.is-finde{ background:var(--op-finde); }
.pe-grid td.is-feriado, .pe-grid th.is-feriado{ background:var(--bs-red-100); }
html.theme-dark .pe-grid td.is-feriado, html.theme-dark .pe-grid th.is-feriado{ background:#2a1a1b; }
.pe-grid td.is-hoy{ box-shadow:inset 0 0 0 1px var(--bs-red); }
.pe-grid td.is-ausente{ background-image:repeating-linear-gradient(135deg, transparent 0 6px, var(--bs-border-soft) 6px 8px); }
.pe-grid-chip{ display:block; text-decoration:none; }
.pe-grid-chip .cr-hora{ display:block; margin:0; }
.pe-grid.is-mes .pe-grid-chip{ text-align:center; padding:2px 3px; font-family:var(--bs-font-head); font-weight:600; }
.pe-grid.is-mes .pe-grid-celda .cr-marca{ display:block; text-align:center; padding:1px 2px; }
.pe-grid .pe-grid-total{ width:74px; text-align:right; white-space:nowrap; vertical-align:middle; font-family:var(--bs-font-head); font-weight:600; padding-right:10px; }
.pe-grid-vacio{ padding:30px !important; text-align:center; }
.pe-grid-nota{ margin-top:8px; }
.pe-grid-wrap.is-cargando .pe-grid-scroll{ opacity:.55; }
.pe-grid tbody th{ font-weight:400; }
.pe-grid-nombre .op-sub{ color:var(--bs-muted); font-size:11.5px; }
/* 08/10/2026: un clic en un dia (fuera de sus bloques) asigna personal */
.pe-grid .pe-asignable{ cursor:pointer; }
.pe-grid tbody td.pe-asignable:hover, .pe-grid thead th.pe-asignable:hover, .pe-grid tfoot td.pe-asignable:hover{ box-shadow:inset 0 0 0 1px var(--bs-gray-dark); }
#pe-vista-calendario .cr-dia, #pe-vista-calendario .cr-col{ cursor:pointer; }

/* Asignar personal desde Personal (08/10/2026): eleccion del servicio dentro del modal */
.as-srv-lista{ max-height:260px; overflow:auto; margin-top:8px; }
.bs-pick-list .as-srv-op{ display:flex !important; flex-direction:row !important; align-items:center !important; gap:12px; width:100%; text-align:left;
  font:inherit; color:var(--bs-ink); cursor:pointer; }
.as-srv-cod, .as-srv-fila b{ flex:none; min-width:84px; font-family:var(--bs-font-head); font-weight:600; font-size:14px; color:var(--bs-ink); }
.as-srv-op .bs-tag{ flex:none; }
.as-srv-elegido{ display:flex; align-items:center; gap:12px; padding:10px 12px; border:1px solid var(--bs-border); border-radius:var(--bs-radius-md); background:var(--bs-surface-2); }
.as-srv-fila{ display:flex; align-items:center; gap:12px; flex:1; min-width:0; }
.as-srv-fila .reassign-ruc{ display:block; font-size:12px; color:var(--bs-muted); margin-top:2px; }
.as-servicio-campo + .as-plan{ margin-top:4px; }
@media (max-width: 1024px){ .pe-vistas{ order:-1; } }
@media (max-width: 600px){
  .pe-grid .pe-grid-persona, .pe-grid.is-mes .pe-grid-persona{ width:120px; }
  .pe-grid-persona .tb-av{ display:none; }
  .pe-grid-persona a{ padding:2px; }
  .pe-grid-nombre{ white-space:normal; font-size:12px; }
}
/* colores por persona o servicio (fondo suave + linea y hora del mismo tono) */
.cr-c0{ background:#DBEAFE; color:#1D4ED8; } .cr-c1{ background:#D1FAE5; color:#047857; }
.cr-c2{ background:#FFEAD5; color:#C2410C; } .cr-c3{ background:#EDE9FE; color:#6D28D9; }
.cr-c4{ background:#FCE7F3; color:#BE185D; } .cr-c5{ background:#CFFAFE; color:#0E7490; }
.cr-c6{ background:#FEF3C7; color:#B45309; } .cr-c7{ background:#E7ECF3; color:#475569; }
html.theme-dark .cr-c0{ background:#1e2a44; color:#93c5fd; } html.theme-dark .cr-c1{ background:#173a2e; color:#6ee7b7; }
html.theme-dark .cr-c2{ background:#3d2618; color:#fdba74; } html.theme-dark .cr-c3{ background:#2d2346; color:#c4b5fd; }
html.theme-dark .cr-c4{ background:#3d1f31; color:#f9a8d4; } html.theme-dark .cr-c5{ background:#16353b; color:#67e8f9; }
html.theme-dark .cr-c6{ background:#3a2f14; color:#fcd34d; } html.theme-dark .cr-c7{ background:#2a313b; color:#cbd5e1; }

@media (max-width: 1024px){
  .op-cols{ grid-template-columns:1fr; }
}
@media (max-width: 600px){
  .op-panel-body .bs-dl{ grid-template-columns:110px 1fr; }
  .cr-dia{ min-height:74px; padding:3px; }
  .cr-bloque .cr-txt{ display:none; }
  .cr-bloque{ padding:1px 3px; font-size:10.5px; }
  .op-periodo .bs-input{ width:128px; }
}
/* expediente de Operaciones: personal asignado al servicio */
.tb-srv-personal{ display:flex; flex-direction:column; gap:6px; align-items:flex-start; }
.tb-srv-persona{ display:flex; align-items:center; gap:8px; }
.tb-srv-persona .tb-av{ width:26px; height:26px; font-size:10.5px; }
.tb-srv-persona .tb-srv-sub{ display:block; }
