/* ============================================================
   InvControl — CSS Principal
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  /* Fondo deliberadamente más marcado: el gris anterior (#dde2ed) se perdía
     contra las tarjetas blancas en monitores con poco contraste. */
  background: #b4c0d1;
  color: #1a2340;
  height: 100vh;
  overflow: hidden;
}

/* ── APP LAYOUT ─────────────────────────────────────────── */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  width: 210px;
  min-width: 210px;
  background: #1a2340;
  display: flex;
  flex-direction: column;
  transition: width 0.25s, min-width 0.25s;
  overflow: hidden;
}
.sidebar.collapsed { width: 58px; min-width: 58px; }

.sb-logo {
  padding: 14px 12px 12px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  min-height: 66px;
}
.sb-logo-row { display: flex; align-items: center; gap: 9px; overflow: hidden; }
.sb-logo-icon {
  width: 32px; min-width: 32px; height: 32px;
  background: rgba(99,148,255,0.15);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #7eb3ff;
}
.sb-logo-name {
  font-size: 14px; font-weight: 600; color: #fff;
  white-space: nowrap; transition: opacity 0.15s;
}
.sidebar.collapsed .sb-logo-name { opacity: 0; width: 0; }
/* ── Logo: card (expandido) + botón ícono (colapsado) ── */
.sb-logo-collapsed { display: none !important; justify-content: center; padding: 9px 0; width: 100%;
                     background: rgba(255,255,255,0.1) !important; border-radius: 9px; }
.sb-logo-collapsed:hover { background: rgba(255,255,255,0.16) !important; }
/* Estado colapsado (toggle manual) */
.sidebar.collapsed .sb-logo-expanded  { display: none !important; }
.sidebar.collapsed .sb-logo-collapsed { display: flex !important; }
.sidebar.collapsed .sb-logo { padding: 8px 8px 10px; min-height: auto; }
/* Estado rail automático (tablet/laptop ≤1100px, no drawer) */
@media (max-width: 1100px) {
  .sidebar:not(.mobile-open) .sb-logo-expanded  { display: none !important; }
  .sidebar:not(.mobile-open) .sb-logo-collapsed { display: flex !important; }
  .sidebar:not(.mobile-open) .sb-logo { padding: 8px 8px 10px; min-height: auto; }
}
/* Drawer móvil abierto (≤720px): vuelve la card completa */
@media (max-width: 720px) {
  .sidebar.mobile-open .sb-logo-expanded  { display: flex !important; }
  .sidebar.mobile-open .sb-logo-collapsed { display: none !important; }
  .sidebar.mobile-open .sb-logo { padding: 14px 12px 12px; }
}

.collapse-btn {
  background: rgba(255,255,255,0.06);
  border: none; border-radius: 7px;
  width: 27px; min-width: 27px; height: 27px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: rgba(255,255,255,0.4);
  transition: background 0.15s;
  flex-shrink: 0; font-size: 15px;
}
.collapse-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
.sidebar.collapsed .collapse-btn { margin: 0 auto; }

.sb-section { padding: 10px 0 2px; }
.sb-label {
  font-size: 9.5px; color: rgba(255,255,255,0.25);
  padding: 6px 16px 4px; letter-spacing: 0.09em;
  text-transform: uppercase; white-space: nowrap;
  transition: opacity 0.15s;
}
.sidebar.collapsed .sb-label { opacity: 0; height: 0; padding: 0; }
.sidebar.collapsed .sb-nav   { padding: 0; }

.sb-nav { padding: 0 8px; display: flex; flex-direction: column; gap: 2px; }

.sb-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; font-size: 12.5px;
  color: rgba(255,255,255,0.45);
  border-radius: 9px; cursor: pointer;
  white-space: nowrap; overflow: hidden;
  text-decoration: none; transition: all 0.12s;
}
.sb-item:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.85); }
.sb-item.active { background: rgba(99,148,255,0.15); color: #7eb3ff; }
.sb-item i { font-size: 16px; min-width: 16px; flex-shrink: 0; }
.sb-item-text { transition: opacity 0.15s; }
.sidebar.collapsed .sb-item-text { opacity: 0; width: 0; }
.sidebar.collapsed .sb-item { justify-content: center; padding: 9px 0; }

.sb-spacer { flex: 1; }
.sb-bottom { border-top: 1px solid rgba(255,255,255,0.07); padding: 8px; }
.sb-logout {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; font-size: 12.5px;
  color: rgba(255,90,90,0.55); border-radius: 9px;
  cursor: pointer; white-space: nowrap; overflow: hidden;
  text-decoration: none;
}
.sb-logout:hover { background: rgba(255,70,70,0.08); color: #ff8080; }
.sb-logout i { font-size: 16px; min-width: 16px; flex-shrink: 0; }
.sidebar.collapsed .sb-logout { justify-content: center; padding: 9px 0; }
.sidebar.collapsed .sb-logout-text { opacity: 0; width: 0; }

/* ── MAIN ────────────────────────────────────────────────── */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

/* ── TOPBAR ──────────────────────────────────────────────── */
.topbar {
  background: #1a2340;
  padding: 14px 24px 16px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  position: relative;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-icon {
  width: 42px; height: 42px;
  background: rgba(126,179,255,0.12);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(126,179,255,0.2);
  font-size: 19px; color: #7eb3ff;
}
.topbar-title { font-size: 21px; font-weight: 500; color: #fff; letter-spacing: -0.01em; }
.topbar-sub { font-size: 11px; color: rgba(255,255,255,0.32); margin-top: 2px; }
.topbar-user {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,0.06);
  border-radius: 20px; padding: 6px 14px;
  border: 1px solid rgba(255,255,255,0.09);
  font-size: 12px; color: rgba(255,255,255,0.5);
}
.topbar-user i { font-size: 13px; color: rgba(255,255,255,0.35); }

/* ── CONTENT AREA ────────────────────────────────────────── */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #b4c0d1;
}
.content::-webkit-scrollbar { width: 5px; }
.content::-webkit-scrollbar-thumb { background: #c8cdd8; border-radius: 4px; }

/* ── DASHBOARD ───────────────────────────────────────────── */
.stats-grid { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 10px; width: 100%; }
.stat-card { background: #fff; border-radius: 13px; padding: 12px 14px; flex: 1 1 0%; min-width: 0; overflow: hidden; box-sizing: border-box; }
.stat-label { font-size: 11.5px; color: #9aa0bc; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-sub   { font-size: 11.5px; font-weight: 500; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; margin-bottom: 10px;
}
.stat-val { font-size: 24px; font-weight: 600; color: #1a2340; }

.chart-card { background: #fff; border-radius: 13px; padding: 18px 20px; }
.card-title { font-size: 13px; font-weight: 600; color: #1a2340; margin-bottom: 16px; }
.chart-inner { display: flex; gap: 32px; align-items: center; }
.bars { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-label { font-size: 11.5px; color: #8b93a8; width: 80px; text-align: right; flex-shrink: 0; }
.bar-track { flex: 1; background: #eef0f7; border-radius: 20px; height: 9px; overflow: hidden; }
.bar-fill { height: 9px; border-radius: 20px; transition: width 0.6s ease; }
.bar-count { font-size: 11.5px; color: #4a5070; min-width: 24px; text-align: right; }
.donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0; }
.donut-info { text-align: center; }
.donut-num { font-size: 24px; font-weight: 600; color: #1a2340; line-height: 1; }
.donut-lbl { font-size: 11px; color: #9aa0bc; margin-top: 3px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.alerts-card { background: #fff; border-radius: 13px; padding: 15px; display: flex; flex-direction: column; gap: 8px; }
.alert-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 10px; background: #f8f9fd;
  text-decoration: none;
}
.alert-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.alert-info { flex: 1; min-width: 0; }
.alert-name { font-size: 12px; font-weight: 500; color: #1a2340; }
.alert-desc { font-size: 11px; color: #9aa0bc; margin-top: 1px; }
.badge {
  font-size: 10.5px; padding: 2px 8px;
  border-radius: 20px; font-weight: 500; flex-shrink: 0; white-space: nowrap;
}

.activity-card { background: #fff; border-radius: 13px; padding: 15px; }
.activity-row {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 7px 0; border-bottom: 1px solid #f0f2f8;
}
.activity-row:last-child { border-bottom: none; }
.activity-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #7eb3ff; margin-top: 5px; flex-shrink: 0;
}
.activity-text { font-size: 11.5px; color: #4a5070; line-height: 1.4; }
.activity-time { font-size: 10.5px; color: #b0b5cc; margin-top: 2px; }

/* ── PANEL (sucursales) ──────────────────────────────────── */
.panel {
  background: #fff; border-radius: 13px;
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; margin: 0;
}
.panel-head {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px; padding: 10px 15px;
  border-bottom: 1px solid #edf0f7;
  flex-wrap: wrap;
}
.search-box {
  display: flex; align-items: center; gap: 7px;
  background: #f5f6fb; border-radius: 8px;
  padding: 6px 11px; border: 1.5px solid #6b7a99;
}
.search-box i { font-size: 13px; color: #6b7a99; }
.search-box input {
  background: transparent; border: none; outline: none;
  font-size: 12px; color: #1a2340; font-family: inherit; width: 150px;
}
.search-box input::placeholder { color: #6b7a99; }
.show-wrap { display: flex; align-items: center; gap: 6px; }
.show-label { font-size: 12px; color: #6b7a99; }
.show-select {
  font-size: 12px; border: 1.5px solid #6b7a99;
  border-radius: 8px; padding: 5px 8px;
  background: #f5f6fb; color: #1a2340;
  font-family: inherit; cursor: pointer; outline: none;
}

.suc-list { flex: 1; overflow-y: auto; padding: 10px 13px; display: flex; flex-direction: column; gap: 7px; }
.suc-list::-webkit-scrollbar { width: 4px; }
.suc-list::-webkit-scrollbar-thumb { background: #c8cdd8; border-radius: 4px; }

.suc-row {
  display: flex; align-items: center; gap: 13px;
  padding: 11px 13px; background: #f8f9fd;
  border-radius: 10px; border-right: 4px solid transparent;
  cursor: pointer; text-decoration: none; transition: background 0.12s;
}
.suc-row:hover { background: #f0f2fa; }
.suc-row.optimo  { border-right-color: #4caf7d; }
.suc-row.bueno   { border-right-color: #2196b0; }
.suc-row.leve    { border-right-color: #e8a020; }
.suc-row.grave   { border-right-color: #e05050; }
.suc-row.urgencia{ border-right-color: #a01818; }

.suc-info { flex: 1; min-width: 0; }
.suc-name { font-size: 13px; font-weight: 500; color: #1a2340; }
.suc-code { font-size: 11px; color: #9aa0bc; margin-top: 2px; }
.suc-pcs {
  display: inline-flex; align-items: center; gap: 5px;
  background: #eef0fa; border-radius: 20px;
  padding: 4px 11px; font-size: 11.5px; color: #4a56a0; flex-shrink: 0;
}
.suc-pill {
  width: 92px; text-align: center;
  padding: 4px 0; border-radius: 20px;
  font-size: 11.5px; font-weight: 500;
  flex-shrink: 0; margin: 0 6px;
}

/* ── DISPOSITIVOS ────────────────────────────────────────── */
.dev-toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 15px; border-bottom: 1px solid #edf0f7;
  flex-wrap: wrap;
}
.dev-tabs { display: flex; gap: 6px; }
.dev-tab {
  padding: 7px 15px; font-size: 12.5px; font-weight: 500;
  border-radius: 8px; cursor: pointer;
  background: #dde1ea; color: #3a4460;
  border: none; font-family: inherit;
  transition: all 0.15s;
}
.dev-tab:hover { background: #c8cdd8; color: #1a2340; }
.dev-tab.active { background: #1a2340; color: #fff; }

.dev-sep { width: 1px; background: #e0e3ed; align-self: stretch; margin: 0 2px; }

.dev-search {
  display: flex; align-items: center; gap: 7px;
  background: #f5f6fb; border-radius: 8px;
  padding: 7px 12px; border: 1.5px solid #6b7a99;
  flex: 1; max-width: 280px;
}
.dev-search i { font-size: 13px; color: #6b7a99; }
.dev-search input {
  background: transparent; border: none; outline: none;
  font-size: 12px; color: #1a2340; font-family: inherit; width: 100%;
}
.dev-search input::placeholder { color: #6b7a99; }
.dev-search:focus-within { border-color: #534AB7; }

.btn-add {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; background: #1a2340; color: #fff;
  border: none; border-radius: 9px; font-size: 12.5px;
  font-family: inherit; cursor: pointer; margin-left: auto;
  font-weight: 500; white-space: nowrap;
}
.btn-add:hover { background: #253660; }

/* Grupo de botones de agregar (dispositivo + componente lado a lado) */
.btn-add-group { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.btn-add-group .btn-add { margin-left: 0; }
.btn-add-sec {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; background: #fff; color: #534AB7;
  border: 1.5px solid #cfc9f2; border-radius: 9px; font-size: 12.5px;
  font-family: inherit; cursor: pointer;
  font-weight: 500; white-space: nowrap;
}
.btn-add-sec:hover { background: #ECEAFC; border-color: #534AB7; }

/* Placeholder mientras no se elige equipo en "agregar componente" global */
.cg-placeholder { font-size: 12px; color: #9aa0bc; background: #f8f9fd; border: 1px dashed #dde1ef; border-radius: 9px; padding: 14px; text-align: center; }

/* Etiqueta de componente en el historial del equipo */
.hist-comp-tag { display: inline-block; background: #fff3e0; color: #a05c10; font-size: 10.5px; font-weight: 700; padding: 1px 8px; border-radius: 6px; margin-right: 4px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }

/* Bloque "duplicar componente" en el formulario de edición */
.comp-dup-box { margin-top: 14px; padding: 10px 12px; background: #f7f6ff; border: 1.5px dashed #d5d0f0; border-radius: 9px; }
.comp-dup-head { font-size: 12px; font-weight: 700; color: #534AB7; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.comp-dup-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comp-dup-input { width: 72px !important; flex: 0 0 72px; text-align: center; }
.comp-dup-btn { display: inline-flex; align-items: center; gap: 5px; padding: 8px 14px; border: none; border-radius: 8px; background: #534AB7; color: #fff; font-size: 12.5px; font-weight: 600; font-family: inherit; cursor: pointer; white-space: nowrap; }
.comp-dup-btn:hover { filter: brightness(.92); }
.comp-dup-hint { font-size: 11px; color: #9aa0bc; }

/* TABLE */
.table-wrap { flex: 1; overflow-y: auto; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap::-webkit-scrollbar { width: 4px; height: 6px; }
.table-wrap::-webkit-scrollbar-thumb { background: #c8cdd8; border-radius: 4px; }

table { width: 100%; border-collapse: collapse; }
thead th {
  font-size: 11.5px; color: #9aa0bc; font-weight: 500;
  padding: 9px 14px; text-align: left;
  border-bottom: 1px solid #edf0f7;
  background: #fafbfd; position: sticky; top: 0;
}
tbody td {
  font-size: 12.5px; color: #1a2340;
  padding: 10px 14px; border-bottom: 1px solid #f4f5fb;
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #f8f9fd; }
tbody tr.row-resuelta td { background: #e6f7ee; }
tbody tr.row-resuelta:hover td { background: #d9f1e4; }

.type-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px; font-size: 15px;
}
.status-pill {
  display: inline-flex; padding: 3px 10px;
  border-radius: 20px; font-size: 11.5px; font-weight: 500;
}
.pill-optimo   { background: #e6f7ee; color: #276b45; }
.pill-bueno    { background: #e0f2f8; color: #155a70; }
.pill-leve     { background: #fff3e0; color: #7a4f10; }
.pill-grave    { background: #fdecea; color: #922020; }
.pill-urgencia { background: #f5d0d0; color: #6b1010; }
.pill-pendiente{ background: #f0f0f8; color: #6a6a9a; }
.pill-listo-envio { background: #ede9fe; color: #5b47a8; }

/* Estado clicable (solicitudes) */
.estado-btn {
  border: none; cursor: pointer; align-items: center; gap: 3px;
  font-family: inherit; line-height: 1.4; transition: filter .12s;
}
.estado-btn:hover { filter: brightness(.95); }
.estado-btn .ti { font-size: 13px; opacity: .7; }
.estado-menu {
  position: absolute; z-index: 9999; background: #fff;
  border: 1px solid #e6e8f2; border-radius: 10px;
  box-shadow: 0 8px 28px rgba(20,25,60,.16);
  padding: 5px; display: flex; flex-direction: column; gap: 2px;
  min-width: 220px;
}
.estado-opt {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; background: none; border: none; cursor: pointer;
  padding: 5px 7px; border-radius: 7px; width: 100%;
}
.estado-opt:hover, .estado-opt.sel { background: #f5f6fb; }
.estado-opt .ti { color: #534AB7; font-size: 15px; }

.action-btns { display: flex; gap: 5px; justify-content: center; }
.btn-action {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid #e4e6f2; background: #f8f9fd;
  cursor: pointer; font-size: 14px; transition: all 0.12s;
}
.btn-edit { color: #534AB7; }
.btn-edit:hover { background: #EAE9FD; border-color: #c5c2f5; }
.btn-delete { color: #c0392b; }
.btn-delete:hover { background: #fdecea; border-color: #f5b8b4; }

/* ── PAGINATION / FOOTER ─────────────────────────────────── */
.panel-footer {
  padding: 10px 15px; border-top: 1px solid #edf0f7;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-info { font-size: 11.5px; color: #6b7a99; }
.pag-btns { display: flex; gap: 4px; }
.pag-btn {
  width: 29px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 500;
  border: 1.5px solid #6b7a99; border-radius: 8px;
  background: transparent; color: #6b7a99;
  cursor: pointer; font-family: inherit; transition: all 0.12s;
}
.pag-btn:hover { border-color: #1a2340; color: #1a2340; }
.pag-btn.active { background: #1a2340; color: #fff; border-color: #1a2340; }
.pag-btn:disabled { opacity: 0.28; cursor: default; }
.cant-sel {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: #6b7a99;
}
.cant-sel select {
  border: 1.5px solid #6b7a99; border-radius: 8px;
  background: transparent; color: #1a2340;
  font-size: 12px; font-family: inherit;
  padding: 4px 6px; cursor: pointer; outline: none;
}

/* ── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.3);
  display: none; align-items: center; justify-content: center;
  z-index: 100;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: 15px;
  width: 640px; max-width: 94vw; max-height: 94vh; overflow-y: auto;
  box-shadow: 0 10px 50px rgba(0,0,0,0.16);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 17px 20px; border-bottom: 1px solid #edf0f7;
}
.modal-title { font-size: 15px; font-weight: 600; color: #1a2340; }
.modal-close {
  background: transparent; border: none;
  font-size: 22px; color: #9aa0bc; cursor: pointer; line-height: 1;
}
.modal-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 13px; }
.field-group { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-group label { font-size: 12px; color: #6a7090; font-weight: 500; }
.field-group input,
.field-group select,
.field-group textarea {
  padding: 8px 11px; border: 1.5px solid #e0e3f0;
  border-radius: 9px; font-size: 13px; color: #1a2340;
  font-family: inherit; background: #f9fafd; outline: none;
  width: 100%; box-sizing: border-box;
}
.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus { border-color: #7eb3ff; background: #fff; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-foot {
  padding: 13px 20px; border-top: 1px solid #edf0f7;
  display: flex; justify-content: flex-end; gap: 9px;
}
.btn-cancel {
  padding: 8px 16px; font-size: 13px;
  border: 1.5px solid #e0e3f0; border-radius: 9px;
  background: transparent; color: #6a7090; cursor: pointer;
  font-family: inherit;
}
.btn-save {
  padding: 8px 18px; font-size: 13px;
  border: none; border-radius: 9px;
  background: #1a2340; color: #fff; cursor: pointer;
  font-family: inherit; font-weight: 500;
}
.btn-save:hover { background: #253660; }

/* ── LOGIN ───────────────────────────────────────────────── */
.login-page {
  min-height: 100vh; background: #dde2ed;
  display: flex; align-items: center; justify-content: center;
}
.login-card {
  background: #fff; border-radius: 16px;
  padding: 36px 40px; width: 380px;
  box-shadow: 0 4px 30px rgba(26,35,64,0.1);
}
.login-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.login-logo-icon {
  width: 40px; height: 40px; background: #EAE9FD;
  border-radius: 11px; display: flex; align-items: center;
  justify-content: center; font-size: 20px; color: #534AB7;
}
.login-logo-name { font-size: 20px; font-weight: 700; color: #1a2340; }
.login-sub { font-size: 12.5px; color: #9aa0bc; margin-bottom: 28px; }
.login-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.login-field label { font-size: 12.5px; color: #6a7090; font-weight: 500; }
.login-field input,
.login-field select {
  padding: 10px 13px; border: 1.5px solid #e0e3f0;
  border-radius: 10px; font-size: 13.5px; color: #1a2340;
  font-family: inherit; background: #f9fafd; outline: none;
}
.login-field input:focus,
.login-field select:focus { border-color: #534AB7; background: #fff; }
.btn-login {
  width: 100%; padding: 11px; background: #1a2340; color: #fff;
  border: none; border-radius: 10px; font-size: 14px;
  font-family: inherit; font-weight: 500; cursor: pointer; margin-top: 6px;
}
.btn-login:hover { background: #253660; }
.login-error {
  background: #fdecea; color: #922020; border-radius: 9px;
  padding: 9px 13px; font-size: 12.5px; margin-bottom: 12px; display: none;
}

/* ── UTILITIES ───────────────────────────────────────────── */
.hidden { display: none !important; }
.text-muted { color: #9aa0bc; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }

/* ── BÚSQUEDA GLOBAL (Ctrl+K) ─────────────────────────── */
.gsearch-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 2000;
  display: none; align-items: flex-start; justify-content: center; padding-top: 80px;
}
.gsearch-overlay.open { display: flex; }
.gsearch-box {
  background: #fff; border-radius: 13px; width: 95%; max-width: 580px;
  box-shadow: 0 12px 48px rgba(0,0,0,.25); overflow: hidden;
}
.gsearch-input {
  width: 100%; padding: 14px 18px; border: none; outline: none;
  font-size: 15px; font-family: inherit; border-bottom: 1px solid #f0f2f8;
}
.gsearch-results { max-height: 380px; overflow-y: auto; }
.gsearch-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px; cursor: pointer; text-decoration: none;
  color: #1a2340; font-size: 13px; border-bottom: 1px solid #f5f6fb;
}
.gsearch-item:hover, .gsearch-item.active { background: #f0eeff; }
.gsearch-item i { color: #534AB7; font-size: 16px; flex-shrink: 0; }
.gsearch-item-meta { font-size: 11px; color: #9aa0bc; margin-left: auto; }
.gsearch-empty { padding: 24px; text-align: center; color: #9aa0bc; font-size: 13px; }

/* ── MOBILE TOPBAR TOGGLE ─────────────────────────────── */
.mobile-menu-btn {
  display: none; background: rgba(255,255,255,.1); border: none;
  color: #fff; padding: 8px 10px; border-radius: 8px; cursor: pointer;
  font-size: 18px; margin-right: 8px;
}

/* ── BREAKPOINT LAPTOP / TABLET (1100px y abajo, incluye 1024) ── */
@media (max-width: 1100px) {
  .sidebar { width: 58px; min-width: 58px; }
  .sidebar .sb-item-text, .sidebar .sb-label, .sidebar .sb-logo-name, .sidebar .sb-logout-text { opacity: 0; width: 0; }
  .sidebar .sb-item { justify-content: center; padding: 9px 0; }
  .sidebar .sb-logout { justify-content: center; padding: 9px 0; }
  .sidebar:not(.mobile-open) .sb-nav { padding: 0; }
  .stats-grid { flex-wrap: wrap; }
  .stat-card { flex: 1 1 40%; min-width: 140px; }
  .two-col { grid-template-columns: 1fr; }
  .chart-inner { flex-direction: column; gap: 18px; }
  .content { padding: 12px 14px; }
  .topbar { padding: 10px 14px 12px; }
  .topbar-title { font-size: 17px; }
  .topbar-center-logo { display: none; } /* el logo central chocaría con el título */
}

/* ── BREAKPOINT MEDIO (920px y abajo) ── */
@media (max-width: 920px) {
  /* La barra de herramientas reparte sus controles en varias filas */
  .dev-search { flex: 1 1 100%; max-width: none; }
  .btn-add { margin-left: auto; }
  .chart-card { padding: 14px 16px; }
  .donut-wrap { width: 100%; }
  /* Layout maestro-detalle (roles, etc.) en una columna */
  .roles-layout { grid-template-columns: 1fr !important; }
}

/* ── BREAKPOINT MOBILE (720px y abajo) ──────────────────── */
@media (max-width: 720px) {
  body { overflow: auto; height: auto; }
  .app { flex-direction: column; height: auto; min-height: 100vh; }

  /* Sidebar como menú lateral oculto */
  .sidebar {
    position: fixed; top: 0; left: -260px; bottom: 0;
    width: 240px; min-width: 240px;
    transition: left .25s ease;
    z-index: 1500; box-shadow: 4px 0 20px rgba(0,0,0,.2);
  }
  .sidebar.mobile-open { left: 0; }
  .sidebar .sb-item-text, .sidebar .sb-label, .sidebar .sb-logo-name, .sidebar .sb-logout-text { opacity: 1; width: auto; }
  .sidebar .sb-item { justify-content: flex-start; padding: 9px 11px; }
  .sidebar .sb-logout { justify-content: flex-start; padding: 9px 11px; }
  .collapse-btn { display: none; }

  /* Overlay cuando el menú móvil está abierto */
  .sidebar-backdrop {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1400;
  }
  .sidebar-backdrop.active { display: block; }

  .main { width: 100%; height: auto; overflow: visible; }
  .content { overflow: visible; padding: 10px 12px; gap: 10px; }

  .mobile-menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .topbar { padding: 9px 12px; }
  .topbar-icon { width: 36px; height: 36px; font-size: 16px; }
  .topbar-title { font-size: 15px; }
  .topbar-sub { font-size: 10px; }
  .topbar-user { padding: 4px 9px; font-size: 11px; }
  .topbar-user span { display: none; }
  .topbar-user i { font-size: 14px; }

  /* Stats apilados */
  .stats-grid { flex-direction: column; gap: 8px; }
  .stat-card { flex: 1 1 100%; }
  .stat-val { font-size: 21px; }

  /* Tablas: scroll horizontal limpio en vez de aplastar columnas */
  .table-wrap { overflow-x: auto; }
  .table-wrap table { min-width: 560px; }
  table { font-size: 12px; }
  thead th, tbody td { padding: 8px 10px; }

  /* Modales casi pantalla completa */
  .modal { width: 96% !important; max-width: 96% !important; max-height: 92vh; }
  .modal-body { max-height: 65vh; overflow-y: auto; }
  .field-row { grid-template-columns: 1fr !important; gap: 8px !important; }
  .field-group { width: 100%; }

  /* Búsqueda y filtros ocupan el ancho disponible */
  .panel-head { flex-wrap: wrap; gap: 6px; justify-content: flex-start; }
  .search-box { flex: 1; }
  .search-box input { width: 100%; }
  .dev-toolbar { padding: 10px 12px; }
  .panel-footer { flex-wrap: wrap; gap: 8px; justify-content: center; }
}

/* ── BREAKPOINT MOBILE PEQUEÑO (440px y abajo) ── */
@media (max-width: 440px) {
  .content { padding: 8px 9px; }
  .topbar-title { font-size: 14px; }
  .topbar-sub { display: none; }
  .stat-val { font-size: 19px; }
  .dev-tab { padding: 6px 11px; font-size: 12px; }
  .btn-add { width: 100%; justify-content: center; margin-left: 0; }
  .btn-add-group { width: 100%; margin-left: 0; }
  .btn-add-group .btn-add, .btn-add-sec { flex: 1 1 100%; justify-content: center; }
  .modal { width: 100% !important; max-width: 100% !important; }
}

/* ============================================================
   SELECTOR DE INVENTARIOS (selector.php)
   ============================================================ */
body.sel-page { font-family: 'Inter', system-ui, -apple-system, sans-serif; background: #dde2ed; min-height: 100vh; display: flex; overflow: auto; height: auto; }

/* ── SIDEBAR ── */
.sel-sidebar {
  width: 220px; min-height: 100vh; background: #0c1a2e;
  display: flex; flex-direction: column; flex-shrink: 0;
  position: sticky; top: 0; height: 100vh;
}
.ss-logo {
  padding: 18px 14px 16px;
  border-bottom: 1px solid #1e3a5f;
}
.ss-logo-big { font-size: 30px; font-weight: 900; letter-spacing: -1px; color: #fff; line-height: 1; }
.ss-logo-accent { color: #38bdf8; }
.ss-logo-sub { font-size: 11px; color: #475569; font-weight: 400; margin-top: 5px; letter-spacing: .02em; }

.ss-divider { height: 1px; background: #1e3a5f; margin: 6px 14px; }
.ss-divider-top { margin-top: 14px; }

.ss-profile-row { padding: 14px 14px 10px; display: flex; align-items: center; gap: 11px; }
.ss-profile-namewrap { overflow: hidden; }
.ss-profile-name { font-size: 13px; font-weight: 700; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-profile-role { font-size: 11px; color: #64748b; margin-top: 1px; }

.ss-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: #1976d2; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
}

.ss-section { padding: 14px 14px 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #334155; }

.ss-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 14px; margin: 1px 8px; border-radius: 8px;
  font-size: 12.5px; color: #94a3b8; cursor: pointer;
  text-decoration: none; transition: background .12s, color .12s; border: none; background: none; width: calc(100% - 16px); text-align: left;
}
.ss-item:hover { background: #1e3a5f; color: #cbd5e1; }
.ss-item.active { background: #1e3a5f; color: #38bdf8; font-weight: 600; }
.ss-item i { font-size: 15px; }
.ss-item-muted { color: #94a3b8; text-decoration: none; }

.ss-footer {
  margin-top: auto; padding: 14px;
  border-top: 1px solid #1e3a5f;
}
.ss-logout {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: #f87171; text-decoration: none;
  padding: 8px 10px; border-radius: 7px; transition: background .12s;
  border: 1px solid rgba(248,113,113,.2);
}
.ss-logout:hover { background: rgba(248,113,113,.08); }

/* ── MAIN ── */
.sel-main { flex: 1; display: flex; flex-direction: column; overflow-y: auto; }

.sel-topbar {
  background: #fff; border-bottom: 1px solid #e2e8f0;
  padding: 22px 28px; display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; z-index: 10; min-height: 80px;
}
.sel-topbar-logo-center { position: absolute; left: 50%; transform: translateX(-50%); text-align: center; pointer-events: none; line-height: 1.2; }
.sel-topbar-logo-title { font-size: 36px; font-weight: 900; letter-spacing: -1.5px; color: #0c1a2e; line-height: 1; }
.sel-topbar-logo-sub { font-size: 12px; color: #94a3b8; letter-spacing: .05em; font-weight: 400; margin-top: 5px; }
.sel-topbar-title { font-size: 16px; font-weight: 700; color: #0c1a2e; }
.sel-topbar-sub { font-size: 12px; color: #94a3b8; margin-top: 1px; }
.sel-topbar-actions { display: flex; gap: 8px; align-items: center; }

.sel-body { padding: 20px 28px 28px; flex: 1; }
.sel-body-header { padding: 24px 28px 0; }
.sel-body-title { font-size: 20px; font-weight: 700; color: #0c1a2e; }
.sel-body-sub { font-size: 13px; color: #94a3b8; margin-top: 3px; }

.sel-section-block { margin-top: 36px; padding-top: 28px; border-top: 1px solid #e2e8f0; }
.sel-section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #94a3b8; margin-bottom: 14px; }
.sel-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }

/* ── MENSAJE FLASH ── */
.flash { padding: 11px 16px; border-radius: 9px; font-size: 13px; margin-bottom: 20px; display: flex; align-items: center; gap: 9px; }
.flash.ok   { background: #e6f7ee; color: #276b45; border: 1px solid #b7e8cc; }
.flash.err  { background: #fdecea; color: #922020; border: 1px solid #f5c2c2; }
.flash.info { background: #fff8e1; color: #7a4f10; border: 1px solid #ffe082; }

/* ── GRID DE TARJETAS ── */
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* Wrapper posiciona los botones de acción FUERA del <a> para evitar que el clic
   en los botones también active la navegación del enlace */
.inv-card-wrapper { position: relative; height: 100%; }
.inv-card-wrapper:hover .inv-card { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(12,26,46,.1); border-color: #38bdf8; }

.inv-card {
  background: #fff; border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  padding: 20px; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 12px;
  min-height: 170px; height: 100%; box-sizing: border-box; position: relative;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.inv-card.inactive { opacity: .55; }

.inv-card-top { display: flex; align-items: center; gap: 13px; }
.inv-icon {
  width: 46px; height: 46px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff; flex-shrink: 0;
}
.inv-name { font-size: 15px; font-weight: 700; color: #0c1a2e; }
.inv-name-role { font-size: 11px; color: #94a3b8; margin-top: 2px; }

.inv-desc { font-size: 12px; color: #64748b; line-height: 1.55; flex: 1; }

.inv-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid #f1f5f9; }
.inv-count { font-size: 11.5px; color: #64748b; display: flex; align-items: center; gap: 5px; }
.inv-count i { font-size: 13px; }
.inv-enter { font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 4px; }

.inv-badge {
  position: absolute; top: 12px; right: 12px;
  padding: 3px 9px; border-radius: 99px; font-size: 10px; font-weight: 700; letter-spacing: .03em;
}
.inv-badge.soon   { background: #fff8e1; color: #92600a; border: 1px solid #ffe082; }
.inv-badge.off    { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; }

.inv-actions { position: absolute; top: 10px; right: 10px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; z-index: 2; }
.inv-card-wrapper:hover .inv-actions { opacity: 1; }
.inv-act-btn {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 6px;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #64748b; font-size: 12px; transition: all .12s;
}
.inv-act-btn:hover { background: #eff6ff; color: #1976d2; border-color: #93c5fd; }
.inv-act-del:hover { background: #fef2f2 !important; color: #dc2626 !important; border-color: #fca5a5 !important; }

/* ── BOTÓN AGREGAR ── */
.inv-add {
  background: #fff; border: 2px dashed #cbd5e1;
  border-radius: 12px; padding: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  cursor: pointer; min-height: 170px; height: 100%; box-sizing: border-box; color: #94a3b8;
  transition: all .18s;
}
.inv-add:hover {
  border-color: #38bdf8; color: #0ea5e9;
  background: #f0f9ff; box-shadow: 0 4px 16px rgba(14,165,233,.1);
}
.inv-add-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: #f1f5f9; display: flex; align-items: center; justify-content: center;
  font-size: 24px; transition: background .18s;
}
.inv-add:hover .inv-add-icon { background: #e0f2fe; color: #0284c7; }
.inv-add-label { font-size: 13.5px; font-weight: 700; }
.inv-add-sub { font-size: 11px; color: #94a3b8; }

/* ── MODAL CREAR ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(12,26,46,.55);
  z-index: 1000; display: none; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #fff; border-radius: 14px; padding: 26px;
  width: 100%; max-width: 720px; max-height: 94vh; overflow-y: auto;
  box-shadow: 0 24px 60px rgba(12,26,46,.25);
}
.modal-box-tall { max-height: 94vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h3 { font-size: 16px; font-weight: 700; color: #0c1a2e; }
.modal-close { background: none; border: none; cursor: pointer; color: #94a3b8; font-size: 20px; line-height: 1; padding: 2px 6px; border-radius: 5px; }
.modal-close:hover { background: #f1f5f9; color: #0c1a2e; }

.f-label { display: block; font-size: 11.5px; font-weight: 600; color: #374151; margin: 14px 0 5px; }
.f-label-top { margin-top: 18px; }
.f-help { font-size: 11.5px; color: #94a3b8; margin-bottom: 10px; }
.f-input {
  width: 100%; padding: 9px 12px; border: 1.5px solid #e2e8f0;
  border-radius: 8px; font-size: 13px; font-family: inherit; color: #0c1a2e;
  transition: border-color .12s;
}
.f-input:focus { outline: none; border-color: #38bdf8; }
textarea.f-input { resize: vertical; min-height: 64px; }

/* Grilla de íconos */
.ico-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; margin-top: 6px; }
.ico-opt { position: relative; }
.ico-opt input[type=radio] { display: none; }
.ico-opt label {
  display: flex; align-items: center; justify-content: center;
  width: 100%; aspect-ratio: 1; border-radius: 8px;
  border: 2px solid transparent; background: #f8fafc;
  font-size: 18px; cursor: pointer; transition: all .12s;
}
.ico-opt label:hover { border-color: #38bdf8; background: #f0f9ff; }
.ico-opt input:checked + label { border-color: #0ea5e9; background: #e0f2fe; color: #0284c7; }

/* Grilla de colores */
.color-grid { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 6px; }
.color-opt input[type=radio] { display: none; }
.color-opt label {
  width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
  border: 3px solid transparent; transition: transform .12s, border-color .12s;
  display: block;
}
.color-opt label:hover { transform: scale(1.12); }
.color-opt input:checked + label { border-color: #0c1a2e; transform: scale(1.15); }

/* Preview dinámica */
.modal-preview {
  display: flex; align-items: center; gap: 12px;
  background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 10px;
  padding: 12px 14px; margin-top: 16px;
}
.preview-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 20px; color: #fff;
  transition: background .15s;
}
.preview-name { font-size: 13.5px; font-weight: 700; color: #0c1a2e; }
.preview-sub { font-size: 11px; color: #94a3b8; }

.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }
.btn-cancel {
  padding: 9px 16px; border: 1.5px solid #e2e8f0; background: #fff;
  color: #64748b; border-radius: 8px; cursor: pointer; font-size: 13px; font-family: inherit;
  transition: background .12s;
}
.btn-cancel:hover { background: #f8fafc; }
.btn-create {
  padding: 9px 20px; border: none; background: #0c1a2e;
  color: #fff; border-radius: 8px; cursor: pointer; font-size: 13px; font-family: inherit; font-weight: 600;
  transition: background .12s;
}
.btn-create:hover { background: #1e3a5f; }

/* ── INACTIVOS LINK ── */
.inactivos-link { text-align: center; margin-top: 22px; }

.conf-card {
  display: flex; align-items: center; gap: 13px;
  background: #fff; border: 1.5px solid #e2e8f0; border-radius: 11px;
  padding: 14px 16px; text-decoration: none; color: inherit;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.conf-card:hover { border-color: #1976d2; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(25,118,210,.1); }
.conf-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.conf-icon-green { background: #ecfdf5; color: #059669; }
.conf-icon-blue { background: #eff6ff; color: #1976d2; }
.conf-icon-amber { background: #fff8e1; color: #b45309; }
.conf-icon-red { background: #fdecea; color: #c0392b; }
.conf-name { font-size: 13.5px; font-weight: 700; color: #0c1a2e; }
.conf-sub { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.inactivos-link a { font-size: 12px; color: #94a3b8; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; transition: color .12s; }
.inactivos-link a:hover { color: #64748b; }

/* ── PREFIJO DE CÓDIGO ── */
.codigo-hint {
  margin-top: 5px; padding: 8px 12px;
  background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px;
  font-size: 12px; color: #0369a1;
}
.codigo-hint-head { display: flex; align-items: center; gap: 5px; margin-bottom: 6px; }
.codigo-hint-row { display: flex; align-items: center; gap: 8px; }
.codigo-hint-txt { font-size: 12px; color: #0369a1; }
.codigo-pref-input {
  width: 54px; border: 1.5px solid #7dd3fc; border-radius: 7px;
  padding: 5px 8px; font-size: 15px; font-weight: 700; text-align: center;
  text-transform: uppercase; color: #0369a1; background: #e0f2fe;
  outline: none; font-family: monospace;
}

/* ── ESTADOS DEL INVENTARIO ── */
.estados-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.estados-preview {
  display: none; margin-top: 12px; padding: 10px 14px;
  background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 10px;
}
.estados-preview-label { font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.estados-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.required-mark { color: #e05050; }

/* Tarjetas de preset de estados (generadas por JS) */
.preset-card {
  border: 2px solid #e2e8f0; border-radius: 10px; padding: 10px 12px;
  cursor: pointer; transition: all .15s; background: #fff;
}
.preset-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.preset-card-head i { font-size: 16px; color: #64748b; }
.preset-card-title { font-weight: 700; font-size: 12.5px; color: #0c1a2e; }
.preset-card-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.preset-chip, .estado-chip {
  font-size: 10px; padding: 2px 7px; border-radius: 10px; font-weight: 600;
}
.estado-chip { font-size: 12px; padding: 4px 12px; border-radius: 20px; }

/* Utilidades puntuales de este módulo */
.m0 { margin: 0; }
.icon-mr5 { margin-right: 5px; }
.icon-mr7-accent { margin-right: 7px; color: #38bdf8; }
.fw600 { font-weight: 600; }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .sel-sidebar { display: none; }
  .sel-body { padding: 16px; }
  .sel-topbar { padding: 12px 16px; }
}

/* ============================================================
   PÁGINA SUCURSAL (pages/sucursal.php)
   ============================================================ */
.suc-breadcrumb { margin-bottom: 16px; font-size: 13px; color: #9aa0bc; }
.suc-breadcrumb a { color: #534AB7; text-decoration: none; }
.suc-breadcrumb-sep { margin: 0 6px; }

.suc-header-panel { flex: none; margin-bottom: 16px; padding: 20px 24px; }
.suc-header-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.suc-header-icon { width: 48px; height: 48px; background: #EAE9FD; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.suc-header-icon i { color: #534AB7; font-size: 22px; }
.suc-header-info { flex: 1; }
.suc-header-name { font-size: 18px; font-weight: 700; color: #1a2340; }
.suc-header-code { font-size: 12px; color: #9aa0bc; margin-top: 2px; }

.suc-type-summary { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.suc-type-summary-solo { margin-top: 0; }
.suc-type-chip { border-radius: 10px; padding: 10px 16px; display: flex; align-items: center; gap: 10px; }
.suc-type-chip i { font-size: 18px; }
.suc-type-total { font-size: 15px; font-weight: 700; color: #1a2340; }
.suc-type-label { font-size: 11px; color: #7a8099; }
.suc-type-alert { color: #e05050; }

.dev-tabs-wrap { flex-wrap: wrap; }
.dev-tab-count { opacity: .6; font-size: 10px; }

.th-icon { width: 42px; }
.th-actions { width: 100px; text-align: center; }
.td-empty { text-align: center; padding: 28px; color: #9aa0bc; font-size: 13px; }
.tr-noborder { border-bottom: none; }

.td-device-name { font-weight: 600; color: #1a2340; }
.device-comp-count { font-size: 10.5px; color: #9aa0bc; font-weight: 400; margin-top: 2px; }
.device-proc-badge {
  display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; color: #7a5d8c;
  font-weight: 500; margin-top: 3px; cursor: pointer; background: #f3eef7; padding: 1px 7px; border-radius: 10px;
}
.device-proc-badge i { font-size: 11px; }
.td-muted { color: #6a7090; }
.td-serie { color: #9aa0bc; font-size: 11.5px; font-family: monospace; }
.device-comp-hint { font-size: 10px; color: #c0c4d6; margin-top: 2px; }
.device-comp-hint i { font-size: 9px; }
.td-motivo { font-size: 11.5px; color: #7a8099; max-width: 200px; }
.motivo-icon { font-size: 11px; margin-right: 3px; }
.td-empty-dash { color: #b0b8d0; }

.btn-action-comp { background: #f0eeff; color: #534AB7; }
.btn-action-hist { background: #f0f8ff; color: #2196b0; }
.btn-action-clone { color: #157a52; }
.btn-action-clone:hover { background: #e6f7ee; border-color: #a7dcc2; }
.action-btn-icon { font-size: 13px; }

.tr-comp-row { background: #f8f9fd; }
.td-comp-cell { padding: 0; }
.comp-panel-body { padding: 10px 14px 14px 58px; border-top: 1px solid #edf0f7; border-bottom: 1px solid #edf0f7; }
.comp-empty { font-size: 12px; color: #b0b8d0; font-style: italic; }
.btn-add-comp {
  margin-top: 10px; display: flex; align-items: center; gap: 6px; padding: 6px 14px;
  border: 1.5px dashed #b0b8d0; border-radius: 8px; background: transparent; color: #7a8099;
  font-size: 12px; cursor: pointer; font-family: inherit;
}
.btn-add-comp i { font-size: 13px; }

.suc-footer-link { font-size: 12px; color: #534AB7; text-decoration: none; }

/* Componentes sin asignar (sueltos en la sucursal) — abajo de los equipos, en tono suave */
.comp-libre-sec { margin: 14px 16px 8px; background: #fffaf0; border: 1px solid #f3e6c8; border-left: 4px solid #e8b23a; border-radius: 10px; padding: 12px 16px; }
.comp-libre-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: #8a6116; margin-bottom: 6px; flex-wrap: wrap; }
.comp-libre-head i { font-size: 15px; }
.comp-libre-count { background: #e8b23a; color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 1px 8px; }
.comp-libre-hint { font-size: 11px; color: #b09455; font-weight: 400; }
.comp-libre-sec .comp-row { border-bottom-color: #f3e6c8; }
.comp-libre-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #f3e6c8; flex-wrap: wrap; }
.comp-pager-btn { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid #e8d5a8; color: #8a6116; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 8px; cursor: pointer; font-family: inherit; }
.comp-pager-btn:hover:not(:disabled) { background: #fdf4e0; border-color: #e8b23a; }
.comp-pager-btn:disabled { opacity: .45; cursor: default; }
.comp-pager-info { font-size: 11.5px; color: #b09455; font-weight: 500; }

/* Arrastrar y soltar componentes */
.comp-row[draggable="true"] { cursor: grab; }
.comp-row.comp-dragging { opacity: .4; cursor: grabbing; }
/* Mientras se arrastra, resaltar sutilmente las zonas donde se puede soltar */
body.arrastrando-comp tr[id^="fila-"] { outline: 1px dashed #c9cbe0; outline-offset: -3px; }
body.arrastrando-comp #comp-row-0 { border-style: dashed; }
/* Zona bajo el cursor: destino activo */
tr.drop-activo > td { background: #eef0ff !important; }
tr.drop-activo { box-shadow: inset 0 0 0 2px #534AB7; }
.tr-comp-row.drop-activo > td { background: #eef0ff !important; box-shadow: inset 0 0 0 2px #534AB7; }
#comp-row-0.drop-activo { border-color: #534AB7; box-shadow: inset 0 0 0 2px #534AB7; background: #f2f0ff; }

/* Fila de componente (renderComponenteHTML / JS) */
.comp-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid #f0f2f8; }
.comp-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.comp-name { font-size: 12.5px; font-weight: 500; color: #1a2340; min-width: 140px; }
.comp-pill { font-size: 11px; padding: 2px 8px; border-radius: 12px; font-weight: 500; }
.comp-obs { font-size: 11px; color: #9aa0bc; flex: 1; }
.comp-obs-empty { flex: 1; }
.comp-btn-edit { padding: 2px 7px; border: 1px solid #d0d4e8; border-radius: 6px; background: #f0f2fa; color: #534AB7; font-size: 11px; cursor: pointer; font-family: inherit; }
.comp-btn-del { padding: 2px 7px; border: 1px solid #ffd4d4; border-radius: 6px; background: #fff5f5; color: #e05050; font-size: 11px; cursor: pointer; font-family: inherit; }

/* Modal de componente (independiente del modal global) */
.modal-comp-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 2000; align-items: center; justify-content: center; }
.modal-comp-box { background: #fff; border-radius: 14px; padding: 28px 32px; width: 760px; max-width: 96vw; max-height: 92vh; overflow-y: auto; box-shadow: 0 8px 40px rgba(0,0,0,.18); }
.modal-comp-title { font-size: 15px; font-weight: 700; color: #1a2340; margin-bottom: 18px; }
.modal-comp-actions { display: flex; gap: 8px; margin-top: 18px; }
.modal-comp-btn-cancel { flex: 1; padding: 9px; border: 1.5px solid #e0e3f0; border-radius: 9px; background: #fff; font-size: 13px; font-family: inherit; cursor: pointer; color: #6a7090; }
.modal-comp-btn-save { flex: 1; padding: 9px; border: none; border-radius: 9px; background: #1a2340; color: #fff; font-size: 13px; font-family: inherit; cursor: pointer; font-weight: 500; }

/* Formularios generados por JS (componente / dispositivo) */
.mini-label { font-size: 12px; color: #6a7090; font-weight: 600; display: block; margin-bottom: 4px; }
.mini-input { width: 100%; border: 1.5px solid #e0e3f0; border-radius: 9px; padding: 8px 10px; font-size: 13px; font-family: inherit; box-sizing: border-box; }
.mini-hint { font-weight: 400; color: #b0b8d0; }
.mini-warn { color: #e8a020; font-weight: 600; font-size: 10px; }
.mini-danger { color: #e05050; font-size: 11px; }
.mini-field-mb { margin-bottom: 12px; }
.mini-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.mini-color-row { display: flex; gap: 7px; align-items: center; }
.mini-color-pick { width: 38px; height: 36px; border: 1.5px solid #e0e3f0; border-radius: 8px; padding: 2px; cursor: pointer; flex-shrink: 0; background: #fff; }
.mini-sep { border-top: 1.5px solid #f0f2f8; margin: 4px 0 14px; }
.mini-money-row { display: grid; grid-template-columns: auto 1fr 1fr; gap: 10px; margin-bottom: 12px; align-items: start; }
.mini-money-wrap { display: flex; align-items: center; border: 1.5px solid #e0e3f0; border-radius: 9px; overflow: hidden; min-width: 150px; }
.mini-money-prefix { padding: 8px 10px; background: #f1f3f9; color: #5a6077; font-size: 11px; font-weight: 700; border-right: 1.5px solid #e0e3f0; }
.mini-money-input { border: none; outline: none; padding: 8px 12px; font-size: 13px; width: 90px; background: transparent; font-family: inherit; }
.mini-border-danger { border-color: #e05050; }
.field-hint { font-size: 10px; color: #9aa0bc; }
.field-warn-computed { font-size: 10px; color: #e8a020; font-weight: 600; }
.field-disabled { opacity: 0.55; cursor: not-allowed; background: #f5f6fa; }
.field-note { font-size: 11px; color: #9aa0bc; margin-top: 3px; }
.field-row-mt4 { margin-top: 4px; }
.field-pc-hint { font-size: 11px; color: #9aa0bc; padding: 2px 0 8px; grid-column: 1/-1; }

.hist-toggle-wrap { margin-top: 16px; border-top: 1px solid #f0f2f8; padding-top: 12px; }
.hist-toggle-head { display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none; }
.hist-toggle-label { font-size: 12px; font-weight: 600; color: #6a7090; display: flex; align-items: center; gap: 6px; }
.hist-toggle-chevron { color: #9aa0bc; font-size: 13px; transition: transform .2s; }
.hist-toggle-body { display: block; margin-top: 10px; }
.hist-toggle-loading { font-size: 12px; color: #9aa0bc; }
.hist-empty-mini { font-style: italic; color: #b0b8d0; }
.hist-list-mini { display: flex; flex-direction: column; gap: 6px; }
.hist-row-mini { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; background: #f8f9fb; border: 1px solid #f0f2f8; }
.hist-row-mini i { color: #9aa0bc; flex-shrink: 0; }
.hist-row-mini-body { flex: 1; }
.hist-arrow-mini { color: #9aa0bc; margin: 0 6px; }
.hist-nota-mini { color: #9aa0bc; font-style: italic; margin-left: 8px; }
.hist-meta-mini { text-align: right; flex-shrink: 0; }
.hist-meta-mini-date { font-size: 11px; color: #9aa0bc; }
.hist-meta-mini-user { font-size: 11px; color: #b0b8d0; }

/* Historial / procedencia (modales dinámicos) */
.hist-loading { padding: 16px; text-align: center; color: #9aa0bc; font-size: 13px; }
.hist-empty { padding: 32px; text-align: center; }
.hist-empty i { font-size: 36px; color: #d0d4e8; display: block; margin-bottom: 12px; }
.hist-empty-title { font-size: 13px; color: #9aa0bc; }
.hist-empty-sub { font-size: 12px; color: #b0b8d0; margin-top: 6px; }
.hist-count { margin-bottom: 12px; font-size: 12px; color: #9aa0bc; }
.hist-list { display: flex; flex-direction: column; gap: 8px; }
.hist-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 9px; background: #f8f9fb; border: 1px solid #f0f2f8; }
.hist-row i { color: #9aa0bc; flex-shrink: 0; font-size: 16px; }
.hist-row-body { flex: 1; min-width: 0; }
.hist-row-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hist-arrow { color: #c0c8e0; font-size: 12px; }
.hist-nota { font-size: 11px; color: #6a7090; margin-top: 2px; font-style: italic; }
.hist-meta { text-align: right; flex-shrink: 0; }
.hist-meta-user { font-size: 12px; color: #6a7090; font-weight: 500; }
.hist-meta-date { font-size: 11px; color: #9aa0bc; }
.hist-error { padding: 20px; color: #e05050; text-align: center; }

.proc-card { border: 1px solid #eef0f7; border-radius: 11px; padding: 11px 13px; }
.proc-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.proc-card-code { font-size: 13px; font-weight: 600; color: #1a2340; }
.proc-card-arrow { font-size: 13px; color: #b0b8d0; }
.proc-card-status { margin-left: auto; font-size: 11px; padding: 2px 10px; border-radius: 12px; font-weight: 500; }
.proc-card-body { font-size: 11.5px; color: #7a8099; line-height: 1.6; }
.proc-card-sep { color: #c8cce0; }
.proc-card-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 2px; }
.proc-card-meta i { font-size: 11px; color: #9aa0bc; }

/* ============================================================
   PÁGINA DEPRECIACIÓN (pages/inv_depreciacion.php)
   ============================================================ */
.mono { font-family: monospace; }

/* Selector de inventario (cuando no hay ?inv=) */
.dep-sel-wrap { padding: 32px 24px; max-width: 900px; margin: 0 auto; }
.dep-sel-head { margin-bottom: 28px; }
.dep-sel-title { font-size: 20px; font-weight: 800; color: #1a2340; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.dep-sel-title i { color: #534AB7; }
.dep-sel-sub { font-size: 13px; color: #7a829e; margin: 0; }
.dep-sel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.dep-sel-card {
  display: flex; align-items: center; gap: 20px; background: #fff; border-radius: 16px; padding: 26px 28px;
  text-decoration: none; border: 2px solid #e8eaf4; transition: box-shadow .15s, border-color .15s, transform .15s;
}
.dep-sel-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,.1); border-color: var(--inv-color, #e8eaf4); transform: translateY(-2px); }
.dep-sel-icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 26px; color: #fff; flex-shrink: 0; }
.dep-sel-name { font-size: 16px; font-weight: 700; color: #1a2340; line-height: 1.3; }
.dep-sel-link { font-size: 12px; color: #9aa0bc; margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.dep-sel-link i { font-size: 11px; }

/* Volver / navegación superior */
.dep-back-wrap { padding: 12px 20px 0; }
.dep-back-link { font-size: 12.5px; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.dep-back-green { color: #059669; }
.dep-back-purple { color: #534AB7; }

/* Layout compartido de la vista de depreciación */
.dep-page { padding: 28px 32px; max-width: 1400px; }
.dep-top { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.dep-title { font-size: 20px; font-weight: 700; color: #1a2340; line-height: 1.2; }
.dep-sub { font-size: 12px; color: #9aa0bc; margin-top: 3px; }
.dep-print-btn {
  display: flex; align-items: center; gap: 6px; padding: 8px 16px; border: 1.5px solid #e0e3ef; border-radius: 9px;
  background: #fff; color: #1a2340; font-size: 12.5px; cursor: pointer; font-family: inherit; font-weight: 500; flex-shrink: 0;
}

.dep-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 24px; }
.dep-card { background: #fff; border-radius: 13px; padding: 18px 20px; box-shadow: 0 2px 8px rgba(0,0,0,.06); border: 1px solid #f0f2f8; }
.dep-card-val { font-size: 22px; font-weight: 700; color: #1a2340; line-height: 1.2; }
.dep-card-lbl { font-size: 11.5px; color: #9aa0bc; margin-top: 4px; font-weight: 500; }
.dep-card-ico { font-size: 22px; margin-bottom: 8px; }

.dep-tabs { display: flex; gap: 4px; margin-bottom: 18px; background: #f3f4f9; border-radius: 10px; padding: 4px; width: fit-content; }
.dep-tab { padding: 7px 18px; border-radius: 7px; font-size: 13px; font-weight: 500; color: #6a7090; cursor: pointer; text-decoration: none; transition: all .15s; }
.dep-tab.active { background: #fff; color: #1a2340; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.dep-tab-n { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 5px; border-radius: 10px; font-size: 10.5px; font-weight: 700; margin-left: 5px; }
.dep-tab-n.green { background: #dcfce7; color: #166534; }
.dep-tab-n.red { background: #fee2e2; color: #991b1b; }
.dep-tab-n.grey { background: #f1f3f9; color: #6a7090; }

.dep-table-wrap { background: #fff; border-radius: 13px; box-shadow: 0 2px 8px rgba(0,0,0,.06); border: 1px solid #f0f2f8; overflow: hidden; }
.dep-table { width: 100%; border-collapse: collapse; }
.dep-table th { font-size: 11px; font-weight: 700; color: #9aa0bc; text-transform: uppercase; letter-spacing: .05em; padding: 11px 14px; text-align: left; border-bottom: 2px solid #f0f2f8; white-space: nowrap; background: #fafbfc; }
.dep-table td { padding: 11px 14px; font-size: 12.5px; color: #1a2340; border-bottom: 1px solid #f5f6fb; vertical-align: middle; }
.dep-table tr:last-child td { border-bottom: none; }
.dep-table tr:hover td { background: #f9fbff; }

.dep-bar-wrap { width: 120px; background: #f0f2f8; border-radius: 99px; height: 7px; overflow: hidden; }
.dep-bar { height: 100%; border-radius: 99px; transition: width .3s; }
.dep-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 12px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.dep-badge.green { background: #dcfce7; color: #166534; }
.dep-badge.red { background: #fee2e2; color: #991b1b; }
.dep-tipo-badge { display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 10.5px; font-weight: 600; background: #eef0f9; color: #534AB7; }
.dep-empty { padding: 48px 24px; text-align: center; color: #9aa0bc; }
.dep-empty i { font-size: 40px; display: block; margin-bottom: 12px; color: #d0d4e8; }

/* Caja de vida útil (configurada / sin configurar) */
.dep-vu-box { background: #fff; border-radius: 13px; padding: 16px 22px; box-shadow: 0 2px 8px rgba(0,0,0,.05); border: 1px solid #f0f2f8; margin-bottom: 22px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.dep-vu-left { display: flex; align-items: center; gap: 10px; }
.dep-vu-title { font-size: 13px; font-weight: 700; color: #1a2340; }
.dep-vu-sub { font-size: 11.5px; color: #9aa0bc; }
.dep-vu-link { margin-left: auto; font-size: 12px; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.dep-vu-warn-box { background: #fff8ed; border-radius: 13px; padding: 18px 22px; border: 1px solid #fde4bd; margin-bottom: 22px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dep-vu-warn-title { font-size: 13.5px; font-weight: 700; color: #1a2340; }
.dep-vu-warn-sub { font-size: 12px; color: #9a6a20; margin-top: 2px; }
.dep-vu-warn-cta { background: #e8a020; color: #fff; padding: 9px 16px; border-radius: 9px; font-size: 12.5px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

/* Referencia de tasas (solo vista IT) */
.dep-ref { background: #fff; border-radius: 13px; padding: 18px 22px; box-shadow: 0 2px 8px rgba(0,0,0,.05); border: 1px solid #f0f2f8; margin-bottom: 22px; }
.dep-ref-title { font-size: 12px; font-weight: 700; color: #6a7090; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.dep-ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.dep-ref-item { padding: 8px 12px; border-radius: 9px; background: #f8f9fc; border: 1px solid #eef0f9; font-size: 11.5px; }
.dep-ref-item strong { display: block; color: #1a2340; font-weight: 600; margin-bottom: 2px; }
.dep-ref-item span { color: #6a7090; }
.dep-ref-item-cat { font-size: 10.5px; color: #b0b8d0; display: block; margin-top: 1px; }

/* Celdas y filas reutilizadas en las tablas de depreciación */
.dep-code-chip { font-family: monospace; font-size: 11px; background: #f1f3f9; padding: 2px 6px; border-radius: 5px; margin-right: 6px; }
.dep-code-chip-sm { font-family: monospace; font-size: 10.5px; background: #f1f3f9; color: #5a6077; padding: 2px 6px; border-radius: 5px; font-weight: 700; }
.dep-code-chip-sm2 { font-family: monospace; font-size: 10.5px; background: #f1f3f9; padding: 2px 5px; border-radius: 4px; }
.dep-progress-row { display: flex; align-items: center; gap: 7px; }
.dep-progress-pct { font-size: 11px; color: #6a7090; }
.dep-progress-pct-nowrap { font-size: 11px; color: #6a7090; white-space: nowrap; }
.dep-progress-sub { font-size: 10.5px; color: #9aa0bc; margin-top: 2px; }
.dep-badge-row { display: flex; gap: 5px; flex-wrap: wrap; }
.dep-total-row { background: #f8f9fd; font-weight: 700; }
.dep-total-row-it { background: #f8f9fb; border-top: 2px solid #eef0f9; }
.dep-td-strong { font-weight: 600; color: #1a2340; }
.dep-td-sub { font-size: 11.5px; color: #6a7090; }
.dep-td-muted-sm { color: #6a7090; font-size: 12px; }
.dep-td-note { font-size: 11.5px; color: #9aa0bc; }
.dep-td-item-row { display: flex; align-items: center; gap: 8px; }
.dep-footnote { margin-top: 18px; font-size: 11.5px; color: #b0b8d0; line-height: 1.6; }
.dep-footnote i { margin-right: 4px; }
.dep-noaccess { padding: 40px; text-align: center; color: #9aa0bc; }
.dep-link-purple { color: #534AB7; font-weight: 600; text-decoration: none; }
.txt-purple { color: #534AB7; }
.txt-teal { color: #2196b0; }
.txt-amber { color: #e8a020; }
.txt-green { color: #4caf7d; }
.txt-red { color: #e05050; }
.txt-green-dark { color: #166534; }
.txt-red-dark { color: #991b1b; }
.txt-green-alt { color: #2e7d32; }

@media (max-width: 900px) {
  .dep-page { padding: 16px; }
  .dep-table th, .dep-table td { padding: 8px 10px; font-size: 11.5px; }
  .dep-bar-wrap { width: 70px; }
}

@media print {
  @page { size: landscape; margin: 10mm; }
  .sidebar, .topbar, .dep-print-hide, .dep-tabs,
  a[href*="panel.php?p=inv_depreciacion"] { display: none !important; }
  .dep-table-wrap { box-shadow: none !important; border: 1px solid #ccc !important; }
  .dep-card { box-shadow: none !important; border: 1px solid #ccc !important; }
  .main { margin: 0 !important; padding: 0 !important; }
  .dep-page { padding: 8px !important; max-width: 100% !important; }
  .dep-table th, .dep-table td { padding: 6px 8px !important; font-size: 11px !important; }
  .dep-bar-wrap { display: none !important; }
  /* Vista IT: además oculta la referencia de tasas y la columna de progreso */
  .dep-page-it .dep-ref { display: none !important; }
  .dep-page-it .dep-table th:nth-child(5), .dep-page-it .dep-table td:nth-child(5),
  .dep-page-it .dep-table th:nth-child(9), .dep-page-it .dep-table td:nth-child(9) { display: none !important; }
}

/* ============================================================
   PÁGINA DISPOSITIVOS (pages/dispositivos.php)
   ============================================================ */
.disp-alert-banner { background: #fdecea; border: 1.5px solid #f5c2c2; border-radius: 10px; padding: 10px 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.disp-alert-banner i { color: #e05050; font-size: 16px; }
.disp-alert-text { font-size: 13px; color: #922020; font-weight: 500; }
.disp-alert-link { margin-left: auto; font-size: 12px; color: #922020; text-decoration: underline; }

.disp-toprow { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.disp-baja-info { display: flex; align-items: center; gap: 8px; }
.disp-baja-icon { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; background: #f5d0d0; border-radius: 8px; }
.disp-baja-icon i { color: #a01818; font-size: 15px; }
.disp-baja-title { font-size: 13px; font-weight: 700; color: #6b1010; }
.disp-baja-sub { font-size: 11px; color: #b07070; }
.disp-back-link { font-size: 12px; color: #534AB7; text-decoration: none; display: flex; align-items: center; gap: 4px; }
.disp-baja-btn { display: flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 8px; border: 1.5px solid #f5c2c2; background: #fff8f8; color: #a01818; font-size: 12px; font-weight: 500; text-decoration: none; }

.disp-tabs-row { display: flex; align-items: center; gap: 0; padding: 0 16px 0; border-bottom: 1px solid #edf0f7; flex-wrap: wrap; }
.dev-tab-flush { margin-bottom: -1px; }

.disp-addtab-wrap { position: relative; margin-left: 4px; }
.disp-addtab-btn { display: flex; align-items: center; gap: 4px; padding: 5px 10px; border: 1.5px dashed #c8cce8; border-radius: 8px; background: transparent; color: #7a8099; font-size: 12px; cursor: pointer; font-family: inherit; margin: 6px 0; }
.disp-addtab-menu { display: none; position: absolute; top: calc(100% + 4px); left: 0; background: #fff; border: 1.5px solid #edf0f7; border-radius: 10px; padding: 8px; box-shadow: 0 4px 20px rgba(0,0,0,.1); z-index: 100; min-width: 160px; }
.disp-addtab-menu-label { font-size: 10px; font-weight: 700; color: #9aa0bc; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; padding: 0 4px; }
.disp-addtab-item { display: flex; align-items: center; gap: 8px; padding: 5px 4px; cursor: pointer; border-radius: 6px; font-size: 12.5px; color: #1a2340; transition: background .12s; }
.disp-addtab-item:hover { background: #f8f9fd; }
.disp-addtab-checkbox { accent-color: #534AB7; cursor: pointer; }

.th-actions-sm { width: 75px; text-align: center; }
.td-name-light { font-weight: 500; }
.td-sm { font-size: 12px; }
.td-section { color: #8b93a8; font-size: 12px; }
.btn-action-purple { color: #534AB7; }

/* Modal componentes (lista) */
.disp-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 2000; align-items: center; justify-content: center; padding: 20px; }
.disp-modal-box { background: #fff; border-radius: 14px; width: 760px; max-width: 96vw; max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 12px 48px rgba(0,0,0,.22); }
.disp-modal-header { padding: 18px 22px; border-bottom: 1px solid #edf0f7; display: flex; align-items: center; justify-content: space-between; }
.disp-modal-header-left { display: flex; align-items: center; gap: 11px; min-width: 0; }
.disp-modal-icon { width: 34px; height: 34px; border-radius: 9px; background: #EAE9FD; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.disp-modal-icon i { color: #534AB7; font-size: 17px; }
.disp-modal-titles { min-width: 0; }
.disp-modal-title { font-size: 15px; font-weight: 700; color: #1a2340; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.disp-modal-subtitle { font-size: 11.5px; color: #9aa0bc; }
.disp-modal-close { background: none; border: none; cursor: pointer; color: #9aa0bc; font-size: 22px; line-height: 1; padding: 2px 6px; flex-shrink: 0; }
.disp-modal-body { padding: 10px 22px; overflow-y: auto; flex: 1; min-height: 120px; }
.disp-modal-footer { padding: 14px 22px; border-top: 1px solid #edf0f7; }

/* Modal formulario de componente (segundo modal, encima del anterior) */
.compform-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 2100; align-items: center; justify-content: center; padding: 20px; }
.compform-box { background: #fff; border-radius: 14px; padding: 24px 28px; width: 760px; max-width: 96vw; max-height: 92vh; overflow-y: auto; box-shadow: 0 12px 48px rgba(0,0,0,.25); }
.compform-title { font-size: 15px; font-weight: 700; color: #1a2340; margin-bottom: 16px; }
.compform-actions { display: flex; gap: 8px; margin-top: 18px; }
.compform-btn-cancel { flex: 1; padding: 9px; border: 1.5px solid #e0e3f0; border-radius: 9px; background: #fff; font-size: 13px; font-family: inherit; cursor: pointer; color: #6a7090; }
.compform-btn-save { flex: 1; padding: 9px; border: none; border-radius: 9px; background: #1a2340; color: #fff; font-size: 13px; font-family: inherit; cursor: pointer; font-weight: 500; }

/* Lista de componentes dentro del modal */
.disp-comp-loading { text-align: center; color: #9aa0bc; padding: 24px; font-size: 13px; }
.disp-comp-empty { text-align: center; color: #9aa0bc; padding: 30px 16px; font-size: 13px; }
.disp-comp-empty i { font-size: 30px; display: block; margin-bottom: 10px; opacity: .35; }
.disp-comp-error { color: #e05050; padding: 16px; font-size: 13px; }
.disp-comp-add-btn { width: 100%; padding: 10px; border: 1.5px dashed #c8cce8; border-radius: 9px; background: #f8f9fd; color: #534AB7; font-size: 13px; font-weight: 500; cursor: pointer; font-family: inherit; }
.disp-comp-readonly { text-align: center; font-size: 11.5px; color: #b0b8d0; }

.disp-comp-row { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px solid #f3f4f9; flex-wrap: wrap; }
.disp-comp-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.disp-comp-name { font-size: 12.5px; font-weight: 500; color: #1a2340; min-width: 130px; }
.disp-comp-pill { font-size: 11px; padding: 2px 9px; border-radius: 12px; font-weight: 500; white-space: nowrap; }
.disp-comp-mm { font-size: 11px; color: #5a6077; }
.disp-comp-val { font-size: 10.5px; color: #2e7d32; font-weight: 600; font-family: monospace; white-space: nowrap; }
.disp-comp-obs { flex: 1; font-size: 11px; color: #9aa0bc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.disp-comp-btn-edit { padding: 3px 8px; border: 1px solid #d0d4e8; border-radius: 6px; background: #f0f2fa; color: #534AB7; font-size: 11px; cursor: pointer; font-family: inherit; }
.disp-comp-btn-del { padding: 3px 8px; border: 1px solid #ffd4d4; border-radius: 6px; background: #fff5f5; color: #e05050; font-size: 11px; cursor: pointer; font-family: inherit; }

/* Form de componente: variante propia (medidas ligeramente distintas a sucursal.php) */
.disp-color-pick { width: 36px; height: 34px; border: 1px solid #e8eaf4; border-radius: 7px; padding: 2px; cursor: pointer; flex-shrink: 0; background: #fff; }
.disp-money-wrap { display: flex; align-items: center; border: 1px solid #e8eaf4; border-radius: 8px; overflow: hidden; min-width: 140px; }
.disp-money-prefix { padding: 7px 8px; background: #f1f3f9; color: #5a6077; font-size: 11px; font-weight: 700; border-right: 1px solid #e8eaf4; }
.disp-money-input { border: none; outline: none; padding: 7px 10px; font-size: 13px; width: 80px; background: transparent; font-family: inherit; }
.disp-warn-danger { color: #e05050; font-size: 10.5px; }
.disp-field-hint-sm { color: #b0b8d0; font-weight: 400; }

/* ============================================================
   PÁGINA REPORTES (pages/reportes.php)
   ============================================================ */
.flex-col-16 { display: flex; flex-direction: column; gap: 16px; }
.txt-dark2 { color: #1a1f36; }
.txt-red-deep { color: #a01818; }
.txt-green-deep { color: #1a7c46; }
.txt-red-pdf { color: #c0392b; }

.rep-stats-row { display: flex; gap: 12px; flex-wrap: wrap; }
.rep-stat-card { flex: none; min-width: 150px; background: #fff; border-radius: 13px; padding: 16px 20px; }
.rep-stat-val { font-size: 26px; font-weight: 700; }
.rep-stat-lbl { font-size: 12px; color: #9aa0bc; margin-top: 3px; }

.rep-export-card { background: #fff; border-radius: 13px; padding: 20px; flex: none; }
.rep-export-title { font-size: 14px; font-weight: 700; color: #1a1f36; margin-bottom: 4px; }
.rep-export-sub { font-size: 12px; color: #9aa0bc; margin-bottom: 16px; }
.rep-export-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.rep-export-item { border: 1px solid #e8eaf4; border-radius: 10px; padding: 14px 16px; }
.rep-export-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.rep-export-icon { width: 30px; height: 30px; border-radius: 7px; display: flex; align-items: center; justify-content: center; }
.rep-export-icon i { font-size: 15px; }
.rep-export-label { font-size: 13px; font-weight: 600; color: #1a1f36; }
.rep-export-actions { display: flex; gap: 8px; }
.rep-export-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 7px; border-radius: 7px; border: 1px solid #e0e3ef;
  font-size: 12px; font-weight: 600; color: #4a5070; text-decoration: none; background: #fafbff;
  cursor: pointer; font-family: inherit;
}
.rep-export-btn i { font-size: 14px; }

.rep-table-card { background: #fff; border-radius: 13px; overflow: hidden; flex: none; }
.rep-table-head { padding: 14px 20px; border-bottom: 1px solid #f0f2f8; font-size: 13.5px; font-weight: 700; color: #1a1f36; }
.rep-table-head-icon { display: flex; align-items: center; gap: 8px; }
.rep-table { width: 100%; border-collapse: collapse; }
.rep-thead-row { background: #f8f9fb; }
.rep-th { padding: 8px; text-align: center; font-size: 11.5px; font-weight: 600; color: #9aa0bc; }
.rep-th-l { padding: 8px 20px; text-align: left; font-size: 11.5px; font-weight: 600; color: #9aa0bc; }
.rep-th-r { padding: 8px 20px; text-align: center; font-size: 11.5px; font-weight: 600; }
.rep-tr { border-bottom: 1px solid #f5f6fb; }
.rep-td { padding: 10px 8px; text-align: center; font-size: 13px; }
.rep-td-l { padding: 10px 20px; font-size: 13px; }
.rep-td-r { padding: 10px 20px; text-align: center; font-size: 13px; }
.rep-td9 { padding: 9px 8px; text-align: center; font-size: 13px; }
.rep-td9-l { padding: 9px 20px; font-size: 13px; }
.rep-td9-r { padding: 9px 20px; }
.rep-td-name { font-size: 13px; font-weight: 500; color: #1a1f36; }
.rep-td-strong { font-size: 13px; font-weight: 700; }
.rep-td-icon-row { display: flex; align-items: center; gap: 9px; }
.rep-mini-icon { width: 28px; height: 28px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #fff; flex-shrink: 0; }
.rep-td-num { font-size: 14px; font-weight: 700; }
.rep-status-dot { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; }
.rep-status-dot span { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.rep-link-purple { font-size: 13px; font-weight: 500; color: #534AB7; text-decoration: none; }

/* Modal selector de sucursales (reporte "Sucursales + Componentes") */
.rep-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1000; align-items: center; justify-content: center; padding: 16px; }
.rep-modal-box { background: #fff; border-radius: 14px; width: 100%; max-width: 720px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 16px 48px rgba(0,0,0,.2); }
.rep-modal-header { padding: 16px 20px; border-bottom: 1px solid #e8eaf4; display: flex; align-items: center; justify-content: space-between; }
.rep-modal-title { font-weight: 700; font-size: 15px; color: #1a1f36; }
.rep-modal-sub { font-size: 11.5px; color: #9aa0bc; margin-top: 2px; }
.rep-modal-close { background: none; border: none; font-size: 20px; color: #9aa0bc; cursor: pointer; }
.rep-modal-toolbar { padding: 12px 20px; border-bottom: 1px solid #f0f2f8; display: flex; gap: 8px; }
.rep-modal-toolbar-btn { font-size: 12px; padding: 4px 12px; border: 1px solid #e0e3ef; border-radius: 6px; background: #f8f9fb; cursor: pointer; font-family: inherit; }
.rep-modal-body { overflow-y: auto; padding: 10px 20px; flex: 1; }
.rep-modal-item { display: flex; align-items: center; gap: 10px; padding: 7px 4px; cursor: pointer; border-radius: 6px; transition: background .12s; }
.rep-modal-item:hover { background: #f8f9fd; }
.rep-modal-item input { width: 15px; height: 15px; accent-color: #534AB7; }
.rep-modal-item-label { font-size: 13px; color: #1a1f36; font-weight: 500; }
.rep-modal-item-status { margin-left: auto; font-size: 11px; font-weight: 600; }
.rep-modal-footer { padding: 14px 20px; border-top: 1px solid #e8eaf4; display: flex; justify-content: flex-end; gap: 8px; }
.rep-modal-btn-cancel { padding: 8px 18px; border: 1px solid #e0e3ef; border-radius: 8px; background: #f8f9fb; font-size: 13px; cursor: pointer; font-family: inherit; }
.rep-modal-btn-generate { padding: 8px 18px; border: none; border-radius: 8px; background: #1a7c46; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }

@media print {
  .sidebar, .topbar, .btn-add { display: none !important; }
  body { background: white; }
}

/* ============================================================
   DASHBOARD (pages/dashboard.php)
   ============================================================ */
.dash-cards-row { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 10px; width: 100%; box-sizing: border-box; }
.dash-card { flex: 1; min-width: 0; background: #fff; border-radius: 13px; padding: 14px 16px; text-decoration: none; box-sizing: border-box; display: block; }
.dash-card-icon { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.dash-card-icon i { font-size: 16px; }
.dash-card-val { font-size: 24px; font-weight: 600; color: #1a2340; }
.dash-card-label { font-size: 11.5px; color: #9aa0bc; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-card-sub { font-size: 11.5px; font-weight: 500; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dash-print-card-title { font-size: 13px; font-weight: 600; color: #1a2340; margin-bottom: 8px; }
.dash-print-rows { display: flex; flex-direction: column; gap: 5px; }
.dash-print-row { display: flex; align-items: center; justify-content: space-between; }
.dash-print-row-left { display: flex; align-items: center; gap: 5px; }
.dash-print-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dash-print-row-label { font-size: 11px; color: #7a8099; }
.dash-print-row-val { font-size: 13px; font-weight: 700; }

.chart-card-pad { padding: 18px 22px; }
.dash-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dash-section-icon { display: flex; align-items: center; gap: 9px; }
.dash-section-icon-box { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.dash-section-icon-box i { font-size: 15px; }
.dash-section-title { font-size: 14px; font-weight: 700; color: #1a2340; }
.dash-section-link { font-size: 11.5px; text-decoration: none; font-weight: 500; }

.dash-mov-grid { display: flex; gap: 10px; }
.dash-mov-grid-margin { margin-bottom: 14px; }
.dash-mov-card { flex: 1; border-radius: 10px; padding: 10px 14px; text-decoration: none; display: block; }
.dash-mov-card-val { font-size: 20px; font-weight: 700; }
.dash-mov-card-lbl { font-size: 11px; margin-top: 2px; display: flex; align-items: center; gap: 4px; }
.dash-mov-card-lbl i { font-size: 11px; }
.dash-mov-new { flex: 1; background: #f5f6fa; border: 1.5px dashed #d0d4e8; border-radius: 10px; padding: 10px 14px; text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 6px; color: #9aa0bc; font-size: 12.5px; font-weight: 500; }

.dash-recent-list { display: flex; flex-direction: column; gap: 6px; }
.dash-recent-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: #fafbff; text-decoration: none; border: 1px solid #f0f2f8; transition: background .12s; }
.dash-recent-link:hover { background: #f3f4fc; }
.dash-recent-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 12px; font-size: 11px; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.dash-recent-badge i { font-size: 10px; }
.dash-recent-name { flex: 1; font-size: 12.5px; color: #1a2340; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-recent-arrow { color: #d4d8e8; margin: 0 4px; }
.dash-recent-meta { font-size: 11px; color: #9aa0bc; flex-shrink: 0; }
.dash-recent-date { font-size: 11px; color: #b0b8d0; flex-shrink: 0; }
.dash-empty-note { font-size: 12px; color: #b0b8d0; margin: 0; padding: 4px 0; }

.dash-crit-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: #fafbff; text-decoration: none; border: 1px solid #f0f2f8; transition: background .12s; }
.dash-crit-link:hover { background: #fdf5f5; }
.dash-crit-name { font-size: 12.5px; font-weight: 600; color: #1a1f36; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-crit-badge { border-radius: 8px; padding: 2px 8px; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.dash-crit-badge-urg { background: #fdecea; color: #c0392b; }
.dash-crit-badge-gra { background: #fff3e0; color: #7a4f10; }

.dash-alert-desc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.dash-flex-1-min0 { flex: 1; min-width: 0; }
.dash-text-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml8-shrink0 { margin-left: 8px; flex-shrink: 0; }

.dash-trend-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; flex-wrap: wrap; gap: 8px; }
.dash-trend-legend { display: flex; gap: 14px; font-size: 11px; color: #6a7090; }
.dash-trend-legend-item { display: flex; align-items: center; gap: 5px; }
.dash-trend-swatch { width: 10px; height: 2px; display: inline-block; }
.dash-trend-canvas { width: 100%; height: 180px; }

/* ============================================================
   PÁGINA COSTO DE INVENTARIO (pages/inv_valor.php)
   ============================================================ */
.val-wrap { max-width: 960px; margin: 0 auto; padding: 20px 16px; display: flex; flex-direction: column; gap: 16px; }
.val-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.val-title { font-size: 20px; font-weight: 800; color: #1a1f36; margin: 0; display: flex; align-items: center; gap: 8px; }
.val-title i { color: #f0a500; }
.val-sub { font-size: 13px; color: #7a829e; margin: 4px 0 0; }
.val-total-box { background: #fff; border-radius: 12px; padding: 12px 20px; border: 1px solid #e8eaf4; text-align: center; }
.val-total-num { font-size: 22px; font-weight: 800; color: #1a7c46; }
.val-total-lbl { font-size: 11px; color: #9aa0bc; margin-top: 2px; }

.val-breadcrumb { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.val-breadcrumb-link { font-size: 13px; color: #534AB7; text-decoration: none; display: flex; align-items: center; gap: 5px; }
.val-breadcrumb-sep { color: #d0d4e0; }
.val-breadcrumb-name { font-size: 13px; font-weight: 700; color: #1a1f36; }
.val-breadcrumb-total { margin-left: auto; font-size: 14px; font-weight: 700; color: #1a7c46; }

.val-empty { background: #fff; border-radius: 12px; padding: 48px; text-align: center; color: #9aa0bc; border: 1px solid #e8eaf4; }
.val-empty i { font-size: 36px; display: block; margin-bottom: 12px; opacity: .3; }
.val-empty-link { font-size: 13px; color: #534AB7; margin-top: 8px; display: inline-block; }

.val-card { background: #fff; border-radius: 12px; border: 1px solid #e8eaf4; overflow: hidden; }
.val-card-head { padding: 12px 18px; background: #f8f9fd; border-bottom: 1px solid #e8eaf4; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.val-card-badge { font-size: 12px; font-weight: 700; color: #534AB7; }
.val-card-name { font-size: 13px; font-weight: 600; color: #1a1f36; }
.val-card-total { margin-left: auto; font-size: 13px; font-weight: 700; color: #1a7c46; }
.val-card-empty { padding: 12px 18px; font-size: 12px; color: #9aa0bc; }

.val-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.val-thead { background: #f0f2f8; }
.val-th-l { padding: 8px 18px; text-align: left; color: #6a7090; font-weight: 600; font-size: 11px; }
.val-th { padding: 8px; text-align: left; color: #6a7090; font-weight: 600; font-size: 11px; }
.val-th-c { padding: 8px; text-align: center; color: #6a7090; font-weight: 600; font-size: 11px; }
.val-th-r { padding: 8px 18px; text-align: right; color: #6a7090; font-weight: 600; font-size: 11px; }
.val-tr { border-bottom: 1px solid #f0f2f8; }
.val-td-l { padding: 8px 18px; }
.val-td { padding: 8px; }
.val-td-r { padding: 8px 18px; text-align: right; font-weight: 700; color: #1a7c46; }
.val-td-name { font-weight: 500; color: #1a1f36; }
.val-td-muted { color: #5a6077; }
.val-td-serie { font-family: monospace; color: #7a829e; font-size: 11px; }
.val-estado { font-size: 11px; font-weight: 600; }
.val-code { font-family: monospace; font-size: 11px; color: #534AB7; font-weight: 700; }
.val-td-small { font-size: 11px; color: #7a829e; }

.val-thead2 { background: #f8f9fb; }
.val-th2-l { padding: 10px 20px; text-align: left; font-size: 11.5px; color: #9aa0bc; font-weight: 600; }
.val-th2-c { padding: 10px 8px; text-align: center; font-size: 11.5px; color: #9aa0bc; font-weight: 600; }
.val-th2-r { padding: 10px 20px; text-align: right; font-size: 11.5px; color: #9aa0bc; font-weight: 600; }
.val-th2-action { padding: 10px 16px; text-align: center; font-size: 11.5px; color: #9aa0bc; font-weight: 600; }
.val-tr2 { border-bottom: 1px solid #f5f6fb; }
.val-td2-l { padding: 11px 20px; }
.val-td2-c { padding: 11px 8px; text-align: center; font-size: 13px; color: #6a7090; }
.val-td2-r { padding: 11px 20px; text-align: right; font-size: 14px; font-weight: 700; color: #1a7c46; font-family: monospace; }
.val-td2-action { padding: 11px 16px; text-align: center; }
.val-suc-name { font-size: 13px; font-weight: 600; color: #1a1f36; }
.val-suc-bar-wrap { margin-top: 5px; height: 4px; background: #f0f2f8; border-radius: 2px; max-width: 180px; }
.val-suc-bar { height: 4px; background: #1a7c46; border-radius: 2px; }
.val-pct-sub { font-size: 10px; color: #9aa0bc; font-weight: 400; font-family: sans-serif; }
.val-detail-link { font-size: 12px; font-weight: 600; color: #534AB7; text-decoration: none; padding: 4px 10px; border: 1px solid #d0d4f0; border-radius: 6px; white-space: nowrap; }
.val-dash { font-size: 12px; color: #c8d0e0; }
.val-total-row { background: #f8f9fb; border-top: 2px solid #e8eaf4; }
.val-total-label { padding: 10px 20px; font-size: 13px; font-weight: 700; color: #1a1f36; }
.val-total-val { padding: 10px 20px; text-align: right; font-size: 15px; font-weight: 800; color: #1a7c46; font-family: monospace; }

/* ============================================================
   INVENTARIO GENÉRICO — ITEMS (pages/inv_items.php)
   ============================================================ */
.ii-page { padding: 24px 24px 32px; }
.ii-stats-toggle-row { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.ii-stats-toggle-btn { display: flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 8px; border: 1px solid #e1e4ee; background: #fff; color: #5b6178; font-size: 13px; font-family: inherit; cursor: pointer; }
.ii-stats-toggle-btn:hover { background: #f5f6fa; }
.ii-stats-toggle-btn .ti { transition: transform .15s; }
.ii-stats-toggle-btn.ii-open .ti { transform: rotate(180deg); }
.ii-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.ii-stats-grid.ii-collapsed { display: none; }
.ii-stat-card { margin: 0; padding: 16px 18px; display: flex; align-items: center; gap: 13px; }
.ii-stat-icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 21px; flex-shrink: 0; }
.ii-stat-val { font-size: 22px; font-weight: 700; color: #1a2340; line-height: 1; }
.ii-stat-lbl { font-size: 11.5px; color: #9aa0bc; margin-top: 3px; }

.ii-btn-config { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border: 1.5px solid #e2e8f0; background: #fff; color: #5b6178; border-radius: 9px; font-size: 12.5px; font-family: inherit; text-decoration: none; white-space: nowrap; transition: background .12s; }
.ii-btn-config:hover { background: #f8fafc; }

.ii-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 10px 16px; margin-bottom: 12px; background: #fff; border-radius: 10px; border: 1px solid #eef0f7; }
.ii-pag-info { font-size: 13px; color: #5b6178; }
.ii-pag-btns { display: flex; align-items: center; gap: 10px; }
.ii-pag-current { font-size: 13px; color: #5b6178; white-space: nowrap; }
.ii-pag-size { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #5b6178; }
.ii-pag-size select { height: 30px; border: 1px solid #e8eaf4; border-radius: 8px; padding: 0 8px; font-size: 13px; font-family: inherit; background: #fff; }
.ii-pag-info-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.ii-panel-head { flex-wrap: wrap; gap: 8px; }
.ii-search-wrap { position: relative; flex-shrink: 0; }
.ii-search-icon { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: #b0b8d0; font-size: 13px; pointer-events: none; }
.ii-search-input { height: 34px; border: 1px solid #e8eaf4; border-radius: 8px; padding: 0 12px 0 30px; font-size: 13px; font-family: inherit; outline: none; width: 180px; }
.ii-filter-select { height: 34px; border: 1px solid #e8eaf4; border-radius: 8px; padding: 0 10px; font-size: 13px; font-family: inherit; color: #374151; outline: none; background: #fff; }
.ii-spacer { flex: 1; }

.ii-banco-badge { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 9px; font-weight: 700; margin-right: 6px; vertical-align: middle; }
.ii-banco-select-wrap { display: flex; align-items: center; gap: 8px; }
.ii-banco-preview { font-size: 13px; color: #374151; white-space: nowrap; }

.ii-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ii-thead-row { background: #f8f9fd; border-bottom: 2px solid #e8eaf4; }
.ii-th { padding: 10px 14px; text-align: left; font-weight: 600; color: #5a6077; white-space: nowrap; }
.ii-th-r { padding: 10px 14px; text-align: right; font-weight: 600; color: #5a6077; }
.ii-td-empty { padding: 48px; text-align: center; color: #9aa0bc; }
.ii-td-empty i { font-size: 22px; display: block; margin-bottom: 8px; }

.ii-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.48); z-index: 900; align-items: center; justify-content: center; }
.ii-modal-box { background: #fff; border-radius: 16px; width: 760px; max-width: 96vw; max-height: 94vh; display: flex; flex-direction: column; box-shadow: 0 24px 64px rgba(0,0,0,.26); }
.ii-modal-header { padding: 20px 24px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e8eaf4; flex-shrink: 0; }
.ii-modal-title { font-weight: 700; font-size: 15px; color: #1a2340; }
.ii-modal-close { background: none; border: none; font-size: 22px; color: #9aa0bc; cursor: pointer; line-height: 1; padding: 2px 4px; }
.ii-modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.ii-modal-footer { padding: 14px 24px; border-top: 1px solid #e8eaf4; display: flex; justify-content: flex-end; gap: 10px; flex-shrink: 0; }

/* Filas de la tabla (generadas por JS) */
.ii-row { border-bottom: 1px solid #f0f2f8; transition: background .12s; }
.ii-row:hover { background: #f8f9fd; }
.ii-incr-vigente { background: #4caf7d0d; }
.ii-incr-vigente:hover { background: #4caf7d1a; }
.ii-td { padding: 11px 14px; }
.ii-item-cell { display: flex; align-items: center; gap: 8px; }
.ii-item-code { background: #f1f3f9; color: #5a6077; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; font-family: monospace; white-space: nowrap; flex-shrink: 0; }
.ii-item-name { font-weight: 500; color: #1a2340; }
.ii-estado-badge { padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.ii-qty-wrap { display: inline-flex; align-items: center; gap: 7px; }
.ii-qty-btn { width: 24px; height: 24px; border: 1px solid #e0e3ef; background: #fff; border-radius: 7px; cursor: pointer; color: #534AB7; font-size: 15px; line-height: 1; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ii-qty-btn-edit { width: 24px; height: 24px; border: 1px solid #e0e3ef; background: #fff; border-radius: 7px; cursor: pointer; color: #7a829e; font-size: 12px; line-height: 1; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ii-qty-val { min-width: 30px; text-align: center; font-weight: 700; font-size: 13px; color: #1a2340; }
.ii-td-dash { padding: 11px 14px; color: #c8d0e0; font-size: 12.5px; }
.ii-td-money { padding: 11px 14px; color: #2e7d32; font-size: 12.5px; font-weight: 600; font-family: monospace; }
.ii-td-text { padding: 11px 14px; color: #5a6077; font-size: 12.5px; }
.ii-td-actions { padding: 11px 14px; text-align: right; white-space: nowrap; }
.ii-qty-edit-input { width: 64px; text-align: center; border: 1.5px solid #534AB7; border-radius: 6px; padding: 3px 4px; font-size: 13px; font-weight: 700; outline: none; font-family: inherit; }

/* Formulario (modal agregar/editar item) */
.ii-required { color: #e05050; }
.ii-textarea { width: 100%; border: 1px solid #e8eaf4; border-radius: 8px; padding: 8px 12px; font-family: inherit; font-size: 13px; outline: none; resize: vertical; }
.ii-money-wrap { display: flex; align-items: center; border: 1px solid #e8eaf4; border-radius: 8px; overflow: hidden; background: #fff; }
.ii-money-prefix { padding: 8px 10px; background: #f1f3f9; color: #5a6077; font-size: 12px; font-weight: 700; white-space: nowrap; border-right: 1px solid #e8eaf4; }
.ii-money-input { border: none; outline: none; padding: 8px 12px; font-size: 13px; flex: 1; background: transparent; }
.ii-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ii-full { grid-column: 1/-1; }

/* ============================================================
   PÁGINA IMPRESORAS (pages/impresoras.php)
   ============================================================ */
.imp-cards-row { display: flex; gap: 10px; margin-bottom: 20px; }
.imp-card { flex: 1; border-radius: 13px; padding: 16px 18px; cursor: pointer; border: 2px solid transparent; transition: border-color .15s; }
.imp-card-ok { background: #e6f7ee; }
.imp-card-prob { background: #fdecea; }
.imp-card-sin { background: #f8f9fd; border-color: #edf0f7; }
.imp-card-todos { background: #EAE9FD; }
.imp-card-val { font-size: 26px; font-weight: 700; }
.imp-card-lbl { font-size: 12px; margin-top: 2px; font-weight: 500; }

.imp-toolbar-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.imp-search-input { flex: 1; border: 1.5px solid #e0e3f0; border-radius: 9px; padding: 8px 12px; font-size: 13px; font-family: inherit; outline: none; color: #1a2340; }
.imp-limit-wrap { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.imp-limit-label { font-size: 12px; color: #9aa0bc; }
.imp-limit-select { border: 1.5px solid #e0e3f0; border-radius: 9px; padding: 6px 10px; font-size: 12px; font-family: inherit; color: #1a2340; background: #fff; cursor: pointer; }
.imp-pills-row { display: flex; gap: 8px; flex-wrap: wrap; }
.imp-pill { padding: 5px 14px; border-radius: 20px; border: 2px solid transparent; font-size: 12px; font-weight: 500; cursor: pointer; font-family: inherit; }
.imp-pill-all { border-color: #534AB7; background: #534AB7; color: #fff; }
.imp-pill-ok { border-color: #c8e6c9; background: #e6f7ee; color: #276b45; }
.imp-pill-warn { border-color: #ffe0b2; background: #fff3e0; color: #7a4f10; }
.imp-pill-pending { border-color: #d0d4e8; background: #f0f0f8; color: #6a6a9a; }
.imp-pill-danger { border-color: #ffcdd2; background: #fdecea; color: #922020; }

.imp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.imp-thead-row { background: #f8f9fd; border-bottom: 1px solid #edf0f7; }
.imp-th { padding: 11px 14px; text-align: left; color: #6a7090; font-weight: 600; font-size: 11px; white-space: nowrap; }
.imp-th-c { padding: 11px 14px; text-align: center; color: #6a7090; font-weight: 600; font-size: 11px; }
.imp-tr { border-bottom: 1px solid #f0f2f8; vertical-align: top; }
.imp-td { padding: 10px 14px; }
.imp-td-code { padding: 10px 14px; color: #9aa0bc; font-size: 12px; font-weight: 500; white-space: nowrap; }
.imp-td-c { padding: 10px 14px; text-align: center; }
.imp-suc-link { color: #1a2340; font-weight: 500; text-decoration: none; }
.imp-count-pc { font-size: 14px; font-weight: 700; color: #2196b0; }
.imp-count-imp { font-size: 14px; font-weight: 700; color: #e8a020; }
.imp-nodata { font-size: 11px; color: #9aa0bc; }
.imp-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; border: 2px solid transparent; font-size: 11.5px; font-weight: 600; }
.imp-empty-note { font-size: 11.5px; color: #9aa0bc; }
.imp-dev-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.imp-dev-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.imp-dev-name { font-size: 12px; color: #1a2340; font-weight: 500; }
.imp-dev-label { font-size: 11px; }
.imp-edit-btn { padding: 2px 7px; border: 1px solid #d0d4e8; border-radius: 6px; background: #f0f2fa; color: #534AB7; font-size: 12px; cursor: pointer; line-height: 1.4; font-family: inherit; }

.imp-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1000; align-items: center; justify-content: center; }
.imp-modal-box { background: #fff; border-radius: 14px; padding: 28px; width: 480px; max-width: 94vw; box-shadow: 0 8px 40px rgba(0,0,0,.18); }
.imp-modal-title { font-size: 15px; font-weight: 700; color: #1a2340; margin-bottom: 6px; }
.imp-modal-sub { font-size: 12px; color: #9aa0bc; margin-bottom: 18px; }
.imp-opts-wrap { display: flex; flex-direction: column; gap: 8px; }
.imp-opt-btn { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; border: 2px solid transparent; font-size: 13px; font-weight: 500; cursor: pointer; text-align: left; font-family: inherit; transition: border-color .15s; }
.imp-modal-actions { display: flex; gap: 8px; margin-top: 18px; }
.imp-modal-btn-cancel { flex: 1; padding: 9px; border: 1.5px solid #e0e3f0; border-radius: 9px; background: #fff; font-size: 13px; font-family: inherit; cursor: pointer; color: #6a7090; }
.imp-modal-btn-save { flex: 1; padding: 9px; border: none; border-radius: 9px; background: #1a2340; color: #fff; font-size: 13px; font-family: inherit; cursor: pointer; font-weight: 500; }
.imp-toolbar-card { background: #fff; border-radius: 13px; box-shadow: 0 2px 8px rgba(0,0,0,.06); border: 1px solid #f0f2f8; margin-bottom: 14px; padding: 12px 16px; }
.imp-table-card { background: #fff; border-radius: 13px; box-shadow: 0 2px 8px rgba(0,0,0,.06); border: 1px solid #f0f2f8; overflow: auto; }

/* Leyenda de la regla de estado */
.imp-legend { display: flex; align-items: flex-start; gap: 8px; background: #eef2ff; border: 1px solid #dfe4fb; color: #4a5170; border-radius: 10px; padding: 9px 13px; font-size: 12px; line-height: 1.45; margin-bottom: 12px; }
.imp-legend i { color: #534AB7; flex-shrink: 0; margin-top: 1px; }
.imp-legend .ti-pencil, .imp-legend .ti-lock { font-size: 12px; }

/* Marca/modelo bajo el nombre de la impresora */
.imp-dev-model { display: block; font-size: 10.5px; color: #9aa0bc; font-weight: 400; }

/* Columna última actualización */
.imp-fecha { font-size: 11.5px; color: #6a7090; white-space: nowrap; }

/* Aviso "estado derivado" dentro del modal */
.imp-modal-aviso { display: flex; align-items: flex-start; gap: 8px; background: #fff8e6; border: 1px solid #f3e3b3; color: #7a5b10; border-radius: 9px; padding: 9px 12px; font-size: 12px; line-height: 1.4; margin-top: 14px; }
.imp-modal-aviso i { color: #d09a1a; flex-shrink: 0; margin-top: 1px; }

/* Campo de nota del modal */
.imp-modal-nota-wrap { margin-top: 14px; }
.imp-modal-nota-lbl { display: block; font-size: 11.5px; font-weight: 600; color: #6a7090; margin-bottom: 5px; }
.imp-modal-nota { width: 100%; box-sizing: border-box; border: 1.5px solid #e2e5f0; border-radius: 9px; padding: 8px 10px; font-size: 12.5px; font-family: inherit; resize: vertical; }
.imp-modal-nota:focus { outline: none; border-color: #534AB7; }

/* ============================================================
   PÁGINA ALERTAS (pages/alertas.php)
   ============================================================ */
.alt-wrap { display: flex; flex-direction: column; gap: 16px; }
.alt-summary-row { display: flex; gap: 12px; flex-wrap: wrap; }
.alt-summary-card { flex: 1; min-width: 160px; border-radius: 13px; padding: 16px 20px; border-left: 4px solid; }
.alt-card-crit { background: #fdecea; border-left-color: #e05050; }
.alt-card-suc { background: #fff3e0; border-left-color: #e8a020; }
.alt-card-gar { background: #fff8f0; border-left-color: #f39c12; }
.alt-card-sol { background: #fdf5f5; border-left-color: #c0392b; }
.alt-card-val { font-size: 28px; font-weight: 700; }
.alt-card-lbl { font-size: 12.5px; margin-top: 3px; font-weight: 500; }
.alt-card-sub { font-size: 11px; }

.alt-empty { background: #fff; border-radius: 13px; padding: 48px; text-align: center; color: #9aa0bc; flex: none; }
.alt-empty i { font-size: 40px; color: #4caf7d; display: block; margin-bottom: 12px; }
.alt-empty-title { font-size: 15px; font-weight: 600; color: #4caf7d; }
.alt-empty-sub { font-size: 12.5px; margin-top: 6px; }

.alt-section { background: #fff; border-radius: 13px; overflow: hidden; flex: none; }
.alt-section-head { padding: 16px 20px; border-bottom: 1px solid #f0f2f8; display: flex; align-items: center; justify-content: space-between; }
.alt-section-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.alt-section-count { font-size: 11px; color: #9aa0bc; }

.alt-suc-block { border-bottom: 1px solid #f8f9fb; }
.alt-suc-header { padding: 10px 20px; background: #fafbff; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.alt-suc-chevron { color: #9aa0bc; font-size: 13px; transition: transform .2s; }
.alt-suc-link { font-weight: 600; font-size: 13px; color: #1a1f36; text-decoration: none; }
.alt-suc-badge { margin-left: auto; background: #fdecea; color: #c0392b; border-radius: 10px; padding: 2px 10px; font-size: 11px; font-weight: 600; }

.alt-dev-row { display: flex; align-items: center; gap: 12px; padding: 10px 20px 10px 46px; border-top: 1px solid #f5f6fb; }
.alt-dev-sev { font-size: 11px; border-radius: 6px; padding: 3px 8px; font-weight: 600; min-width: 64px; text-align: center; }
.alt-dev-info { flex: 1; min-width: 0; }
.alt-dev-name { font-size: 13px; font-weight: 500; color: #1a1f36; }
.alt-dev-mm { font-size: 11.5px; color: #9aa0bc; margin-left: 8px; }
.alt-dev-tipo { font-size: 11px; color: #9aa0bc; background: #f0f2f8; border-radius: 6px; padding: 2px 8px; }
.alt-dev-seccion { font-size: 11px; color: #9aa0bc; }
.alt-dev-link { font-size: 11px; color: #534AB7; text-decoration: none; padding: 3px 8px; border: 1px solid #ddd; border-radius: 6px; }

.alt-table { width: 100%; border-collapse: collapse; }
.alt-thead-row { background: #fffdf5; border-bottom: 1px solid #f0f2f8; }
.alt-th { padding: 8px; text-align: left; font-size: 11.5px; color: #9aa0bc; font-weight: 600; }
.alt-th-l { padding: 8px 20px; text-align: left; font-size: 11.5px; color: #9aa0bc; font-weight: 600; }
.alt-tr { border-bottom: 1px solid #f5f6fb; }
.alt-td-l { padding: 10px 20px; }
.alt-td { padding: 10px 8px; }
.alt-td-name { font-size: 13px; font-weight: 500; color: #1a1f36; }
.alt-td-mm { font-size: 11px; color: #9aa0bc; }
.alt-td-link { color: #534AB7; text-decoration: none; }
.alt-td-sm { font-size: 12.5px; color: #6a7090; }
.alt-badge { border-radius: 8px; padding: 3px 10px; font-size: 11px; font-weight: 600; }
.alt-badge-danger { background: #fdecea; color: #c0392b; }
.alt-badge-warn { background: #fdecea; color: #e05050; }
.alt-badge-amber { background: #fff3e0; color: #d68910; }

.alt-sol-row { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-bottom: 1px solid #f5f6fb; }
.alt-sol-urgent { background: #fdecea; color: #c0392b; border-radius: 6px; padding: 3px 8px; font-size: 11px; font-weight: 600; flex-shrink: 0; }
.alt-sol-info { flex: 1; min-width: 0; }
.alt-sol-title { font-size: 13px; font-weight: 500; color: #1a1f36; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alt-sol-meta { font-size: 11px; color: #9aa0bc; margin-top: 2px; }
.alt-sol-status { border-radius: 8px; padding: 3px 10px; font-size: 11px; font-weight: 600; flex-shrink: 0; }

/* ============================================================
   PÁGINA CALENDARIO (pages/calendario.php)
   ============================================================ */
.cal-wrap { display: flex; flex-direction: column; gap: 12px; }
.cal-header { background: #fff; border-radius: 13px; padding: 16px 20px; flex: none; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.cal-header-title { font-size: 17px; font-weight: 700; color: #1a1f36; }
.cal-header-sub { font-size: 12px; color: #9aa0bc; margin-top: 2px; }
.cal-header-actions { display: flex; gap: 6px; align-items: center; }
.cal-btn-add { display: flex; align-items: center; gap: 5px; padding: 7px 13px; border: none; border-radius: 8px; background: #534AB7; color: #fff; font-size: 12.5px; font-weight: 500; cursor: pointer; font-family: inherit; margin-right: 4px; }
.cal-nav-link { padding: 6px 12px; border: 1px solid #e0e3ef; border-radius: 7px; color: #534AB7; text-decoration: none; font-size: 13px; }
.cal-nav-today { padding: 6px 12px; border: 1px solid #e0e3ef; border-radius: 7px; color: #534AB7; text-decoration: none; font-size: 12.5px; }

.cal-legend { background: #fff; border-radius: 13px; padding: 10px 20px; flex: none; display: flex; flex-wrap: wrap; gap: 14px; font-size: 11px; color: #6a7090; }
.cal-legend-item { display: flex; align-items: center; gap: 5px; }
.cal-legend-dot { width: 9px; height: 9px; border-radius: 3px; }

.cal-grid-wrap { background: #fff; border-radius: 13px; padding: 14px; flex: none; overflow-x: auto; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; min-width: 680px; }
.cal-dow { text-align: center; font-size: 11px; color: #9aa0bc; font-weight: 600; padding: 6px 0; }
.cal-cell { min-height: 80px; border: 1px solid; border-radius: 8px; padding: 5px 6px; font-size: 11px; overflow: hidden; cursor: pointer; transition: box-shadow .12s, border-color .12s; }
.cal-cell:hover { box-shadow: 0 2px 10px rgba(83,74,183,.12); }
.cal-cell-day { margin-bottom: 3px; }
.cal-ev-chip { padding: 2px 5px; border-radius: 4px; margin-bottom: 2px; font-size: 10.5px; display: flex; align-items: center; gap: 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-ev-chip i { font-size: 9px; flex-shrink: 0; }
.cal-ev-chip span { overflow: hidden; text-overflow: ellipsis; }
.cal-more { font-size: 10px; color: #9aa0bc; text-align: center; margin-top: 2px; }

.cal-detail-panel { background: #fff; border-radius: 13px; padding: 16px 20px; flex: none; }
.cal-detail-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cal-detail-title { font-size: 13.5px; font-weight: 700; color: #1a1f36; }
.cal-btn-day { display: none; align-items: center; gap: 5px; padding: 5px 11px; border: 1px solid #e0e3ef; border-radius: 7px; background: #fff; color: #534AB7; font-size: 11.5px; cursor: pointer; font-family: inherit; }
.cal-detail-empty { font-size: 12.5px; color: #9aa0bc; text-align: center; padding: 18px; }
.cal-detail-empty i { font-size: 26px; display: block; margin-bottom: 8px; opacity: .4; }
.cal-detail-filled { text-align: left; color: #1a1f36; padding: 0; }

.cal-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 2100; align-items: center; justify-content: center; padding: 20px; }
.cal-modal-box { background: #fff; border-radius: 14px; padding: 24px; width: 560px; max-width: 95vw; box-shadow: 0 12px 48px rgba(0,0,0,.25); }
.cal-modal-title { font-size: 15px; font-weight: 700; color: #1a2340; margin-bottom: 16px; }
.cal-modal-title i { color: #534AB7; margin-right: 6px; }
.cal-field-label { font-size: 12px; color: #6a7090; font-weight: 600; display: block; margin-bottom: 4px; }
.cal-field-input { width: 100%; border: 1.5px solid #e0e3f0; border-radius: 9px; padding: 9px 11px; font-size: 13px; font-family: inherit; box-sizing: border-box; margin-bottom: 12px; }
.cal-color-swatches { display: flex; gap: 8px; margin-bottom: 6px; }
.cal-modal-actions { display: flex; gap: 8px; margin-top: 18px; }
.cal-modal-btn-cancel { flex: 1; padding: 9px; border: 1.5px solid #e0e3f0; border-radius: 9px; background: #fff; font-size: 13px; font-family: inherit; cursor: pointer; color: #6a7090; }
.cal-modal-btn-save { flex: 1; padding: 9px; border: none; border-radius: 9px; background: #534AB7; color: #fff; font-size: 13px; font-family: inherit; cursor: pointer; font-weight: 500; }

.cal-detail-row { display: flex; align-items: center; gap: 11px; padding: 10px 4px; border-bottom: 1px solid #f3f4f9; }
.cal-detail-icon { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cal-detail-info { flex: 1; min-width: 0; }
.cal-detail-texto { font-size: 13px; font-weight: 500; color: #1a1f36; }
.cal-detail-sub { font-size: 11.5px; color: #9aa0bc; }
.cal-detail-sep { color: #c8cce0; }
.cal-detail-hora { font-size: 11px; color: #9aa0bc; font-variant-numeric: tabular-nums; }
.cal-detail-del { margin-left: auto; padding: 3px 8px; border: 1px solid #ffd4d4; border-radius: 6px; background: #fff5f5; color: #e05050; font-size: 11px; cursor: pointer; font-family: inherit; }
.cal-color-swatch { width: 26px; height: 26px; border-radius: 7px; cursor: pointer; border: 3px solid transparent; transition: transform .1s; }

/* ============================================================
   PÁGINA MOVIMIENTOS (pages/movimientos.php)
   ============================================================ */
.mov-header-card { flex: none; margin-bottom: 14px; padding: 14px 18px; }
.mov-header-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.mov-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.mov-tab { display: flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 8px; font-size: 13px; text-decoration: none; }
.mov-tab-badge { color: #fff; border-radius: 10px; padding: 1px 7px; font-size: 11px; }

.mov-empty { text-align: center; padding: 48px 24px; color: #9aa0bc; }
.mov-empty i { font-size: 32px; display: block; margin-bottom: 10px; opacity: .4; }
.mov-empty-text { font-size: 14px; }

.mov-table-scroll { max-height: calc(100vh - 230px); overflow-y: auto; overflow-x: auto; }
.mov-table { width: 100%; border-collapse: collapse; }
.mov-thead-row { border-bottom: 1px solid #edf0f7; }
.mov-th, .mov-th-r { position: sticky; top: 0; z-index: 2; background: #fff; box-shadow: inset 0 -1px 0 #edf0f7; }
.mov-th { padding: 10px 16px; font-size: 11.5px; color: #9aa0bc; font-weight: 600; text-align: left; }
.mov-th-r { padding: 10px 16px; font-size: 11.5px; color: #9aa0bc; font-weight: 600; text-align: right; }
.mov-tr { border-bottom: 1px solid #f3f4f8; transition: background .12s; }
.mov-tr:hover { background: #fafbff; }
.mov-td { padding: 12px 16px; }
.mov-status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.mov-route { display: flex; align-items: center; gap: 8px; }
.mov-route-name { font-size: 12.5px; font-weight: 700; color: #1a2340; }
.mov-route-code { font-size: 10.5px; color: #b0b8d0; }
.mov-route-arrow { color: #d4d8e8; font-size: 14px; flex-shrink: 0; }
.mov-notes { font-size: 11px; color: #9aa0bc; margin-top: 4px; font-style: italic; }
.mov-td-items { padding: 12px 16px; max-width: 280px; }
.mov-items-row { display: flex; flex-wrap: wrap; gap: 4px; }
.mov-item-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; background: #f5f6fb; border: 1px solid #e8eaf2; border-radius: 6px; font-size: 11.5px; color: #3a3f52; }
.mov-item-tipo { font-size: 10px; color: #9aa0bc; }
.mov-td-dash { color: #c5c8d4; font-size: 12px; }
.mov-td-fecha { padding: 12px 16px; font-size: 12px; color: #7a8099; white-space: nowrap; }
.mov-fecha-recibido { font-size: 11px; color: #4caf7d; }
.mov-fecha-est { font-size: 11px; color: #9aa0bc; }
.mov-td-por { padding: 12px 16px; font-size: 12px; color: #7a8099; }
.mov-td-actions { padding: 12px 16px; text-align: right; white-space: nowrap; }
.mov-btn-camino { background: #fff3e0; color: #7a4f10; border: none; border-radius: 7px; padding: 5px 11px; font-size: 12px; cursor: pointer; font-weight: 600; }
.mov-btn-recibido { background: #e6f7ee; color: #276b45; border: none; border-radius: 7px; padding: 5px 11px; font-size: 12px; cursor: pointer; font-weight: 600; }
.mov-completado { font-size: 11px; color: #c5c8d4; padding-right: 8px; }
.mov-btn-del { background: none; border: none; color: #d4d8e8; cursor: pointer; padding: 4px 6px; margin-left: 2px; }

.mov-hint { font-size: 10.5px; color: #9aa0bc; font-weight: 400; }
.mov-loading { font-size: 12px; color: #9aa0bc; padding: 8px 0; }
.mov-disp-list { max-height: 44vh; overflow-y: auto; border: 1.5px solid #e0e3f0; border-radius: 9px; padding: 6px 8px; background: #fafbff; }
.mov-disp-item { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 6px; cursor: pointer; }
.mov-disp-item input { width: 14px; height: 14px; accent-color: #534AB7; }
.mov-disp-info { flex: 1; }
.mov-disp-name { font-size: 12.5px; font-weight: 600; color: #1a2340; }
.mov-disp-tipo { font-size: 11px; color: #9aa0bc; margin-left: 5px; }
.mov-disp-serie { color: #b0b8d0; font-size: 10px; font-family: monospace; }
.mov-disp-mm { display: block; font-size: 10.5px; color: #b0b8d0; }
.mov-disp-empty { font-size: 12px; color: #9aa0bc; padding: 8px; }

/* Equipos vs componentes en movimientos */
.mov-item-kind { font-size: 9.5px; font-weight: 700; padding: 1px 6px; border-radius: 5px; text-transform: uppercase; letter-spacing: .3px; }
.mov-kind-eq   { background: #ECEAFC; color: #534AB7; }
.mov-kind-comp { background: #fff3e0; color: #a05c10; }
.mov-chip-comp { background: #fffaf2; border-color: #f3e2c5; }
.mov-item-dest { font-size: 10.5px; color: #276b45; font-weight: 600; }
.mov-list-groupt { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: #6a7090; text-transform: uppercase; letter-spacing: .4px; padding: 8px 4px 4px; border-bottom: 1px solid #edf0f7; margin-bottom: 4px; }
.mov-list-groupt:not(:first-child) { margin-top: 10px; }
.mov-list-groupt i { color: #9aa0bc; }
.mov-comp-row { border-radius: 8px; }
.mov-comp-en { display: block; font-size: 10.5px; color: #7a8099; font-style: italic; }
.mov-comp-dest { display: flex; align-items: center; gap: 7px; margin: 2px 0 8px 26px; padding: 7px 10px; background: #f2f6ff; border: 1px dashed #c9d6f2; border-radius: 8px; }
.mov-comp-dest i { color: #7a8099; font-size: 14px; }
.mov-comp-dest-lbl { font-size: 11.5px; color: #5a6077; font-weight: 600; white-space: nowrap; }
.mv-comp-dest-sel { flex: 1; min-width: 0; padding: 6px 9px; border: 1.5px solid #d5dcf0; border-radius: 7px; font-size: 12px; font-family: inherit; color: #1a2340; background: #fff; outline: none; }
.mv-comp-dest-sel:focus { border-color: #7eb3ff; }
.mov-comp-locked .mov-disp-item { opacity: .55; cursor: default; }
.mov-comp-lock-note { display: block; font-size: 10.5px; color: #534AB7; font-weight: 600; }
.mov-comp-libre { color: #b8860b !important; font-style: normal; font-weight: 600; }
.mov-item-dest-libre { color: #b8860b; }
.mov-chip-borrado { opacity: .65; background: #f7f7f9; border-style: dashed; }
.mov-item-borrado { font-size: 11px; color: #9aa0bc; font-style: italic; }
.mov-item-borrado i { font-size: 11px; }

/* Cabecera "qué es" en formularios (dispositivo vs componente) */
.field-kind-row { display: flex; align-items: center; gap: 9px; padding-bottom: 4px; }
.field-kind-txt { font-size: 11.5px; color: #9aa0bc; }
.field-kind-note { display: flex; align-items: flex-start; gap: 7px; font-size: 11.5px; color: #6a7090; background: #f5f7fd; border: 1px solid #e4e8f5; border-radius: 9px; padding: 9px 12px; line-height: 1.5; }
.field-kind-note i { color: #7a8bd0; font-size: 14px; flex-shrink: 0; margin-top: 1px; }

/* Bloque "convertir en componente" */
.conv-comp-box { border: 1.5px dashed #e0d5be; background: #fffaf0; border-radius: 10px; padding: 12px 14px; margin-top: 4px; }
.conv-comp-head { font-size: 12.5px; font-weight: 700; color: #8a6116; display: flex; align-items: center; gap: 6px; }
.conv-comp-sub { font-size: 11.5px; color: #9a854f; margin: 4px 0 10px; line-height: 1.5; }
.conv-comp-row { display: flex; gap: 8px; align-items: center; }
.conv-comp-row select { flex: 1; min-width: 0; padding: 8px 10px; border: 1.5px solid #e0d5be; border-radius: 8px; font-size: 12.5px; font-family: inherit; color: #1a2340; background: #fff; outline: none; }
.conv-comp-btn { display: inline-flex; align-items: center; gap: 5px; padding: 8px 14px; border: none; border-radius: 8px; background: #b8860b; color: #fff; font-size: 12.5px; font-weight: 600; font-family: inherit; cursor: pointer; white-space: nowrap; }
.conv-comp-btn:hover { filter: brightness(.92); }

/* ============================================================
   PÁGINA SEGURIDAD (pages/seguridad.php)
   ============================================================ */
.sec-page { max-width: 960px; padding: 4px 0; }
.sec-okmsg { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 11px 16px; font-size: 13px; color: #15803d; margin-bottom: 18px; display: flex; align-items: center; gap: 8px; }
.sec-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.sec-header-title { font-size: 18px; font-weight: 800; color: #1a1f36; margin: 0 0 3px; }
.sec-header-sub { font-size: 12.5px; color: #9aa0bc; margin: 0; }
.sec-btn-clear { padding: 8px 16px; border: 1.5px solid #fca5a5; border-radius: 9px; background: #fff; color: #e05050; font-size: 12.5px; cursor: pointer; font-family: inherit; font-weight: 500; }

.sec-panel { margin: 0 0 20px; }
.sec-count { font-size: 12px; color: #9aa0bc; }

.sec-td-empty { text-align: center; padding: 28px; color: #9aa0bc; font-size: 13px; }
.sec-td-empty i { font-size: 18px; display: block; margin-bottom: 6px; color: #4caf7d; }

.sec-user-name { font-weight: 500; font-size: 13px; }
.sec-user-login { font-size: 11px; color: #9aa0bc; font-family: monospace; }
.sec-td-c { text-align: center; }
.sec-attempts { font-size: 13px; font-weight: 700; }
.sec-td-sm { font-size: 12px; }
.sec-locked { color: #e05050; display: flex; align-items: center; gap: 4px; }
.sec-dash { color: #9aa0bc; }
.sec-td-muted-xs { font-size: 11.5px; color: #9aa0bc; }
.sec-btn-action { padding: 5px 10px; border: 1px solid #e0e3ef; border-radius: 7px; background: #fff; color: #534AB7; font-size: 11.5px; cursor: pointer; font-family: inherit; }

.sec-ip { font-family: monospace; font-size: 13px; font-weight: 500; }
.sec-nolock { color: #9aa0bc; }

.sec-empty-block { margin: 0; padding: 32px; text-align: center; color: #9aa0bc; font-size: 13px; }
.sec-empty-block i { font-size: 28px; display: block; margin-bottom: 8px; color: #4caf7d; }
.sec-icon-title { color: #f87171; }

.sec-fail-block { border-bottom: 1px solid #edf0f7; }
.sec-fail-block:last-child { border-bottom: none; }
.sec-fail-header { display: flex; align-items: center; gap: 10px; padding: 11px 15px; cursor: pointer; flex-wrap: wrap; }
.sec-fail-header:hover { background: #f8f9fd; }
.sec-fail-chevron { color: #9aa0bc; font-size: 13px; transition: transform .2s; }
.sec-fail-name { font-size: 13px; font-weight: 600; color: #1a2340; }
.sec-fail-count { font-size: 11.5px; color: #922020; background: #fdecea; border-radius: 10px; padding: 2px 9px; font-weight: 600; }
.sec-fail-last { margin-left: auto; font-size: 11.5px; color: #9aa0bc; }
.sec-fail-body { padding: 0 15px 12px 39px; }
.th-center { text-align: center; }
.th-action-narrow { width: 90px; text-align: center; }
.inline-form { display: inline; }

/* ============================================================
   INVENTARIO GENÉRICO — MOVIMIENTOS (pages/inv_movimientos.php)
   ============================================================ */
.mv-wrap   { max-width: 1500px; margin: 0 auto; padding: 24px 16px; display: flex; flex-direction: column; gap: 20px; }
.mv-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mv-title  { font-size: 22px; font-weight: 800; color: #1a2340; display: flex; align-items: center; gap: 10px; }
.mv-sub    { font-size: 13px; color: #7a829e; margin-top: 4px; }
.btn-mv-new { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; background: var(--inv-color, #1976d2); color: #fff; border: none; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: filter .15s; }
.btn-mv-new:hover { filter: brightness(.9); }

.mv-filtros { display:flex;align-items:center;gap:10px;flex-wrap:wrap; }
.mv-buscador { display:flex;align-items:center;gap:9px;max-width:520px;flex:1 1 360px;padding:9px 12px;background:#fff;border:1px solid #dfe5f1;border-radius:9px;color:#7a829e; }
.mv-buscador input { width:100%;border:0;outline:0;font-size:13px;color:#27314d;background:transparent; }
.mv-filtro-tipo { min-width:150px;padding:10px 12px;background:#fff;border:1px solid #dfe5f1;border-radius:9px;color:#27314d;font-size:13px;outline:0; }
.mv-lista  { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start; }
.mv-card   { background: #fff; border: 1px solid #e8eaf4; border-radius: 12px; padding: 16px 20px; }
.mv-card-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mv-trayecto { font-size: 15px; font-weight: 700; color: #1a2340; display: flex; align-items: center; gap: 8px; }
.mv-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.mv-badge.preparando { background:#fff3e0;color:#e65100; }
.mv-badge.en_camino  { background:#e3f2fd;color:#1565c0; }
.mv-badge.recibido   { background:#e8f5e9;color:#2e7d32; }
.mv-card-meta { font-size: 12px; color: #94a3b8; margin-top: 8px; display: flex; gap: 16px; flex-wrap: wrap; }
.mv-items-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mv-item-chip { background: #f1f3f9; color: #5a6077; border-radius: 6px; padding: 3px 9px; font-size: 12px; font-family: monospace; }
.mv-card-foot { display: flex; gap: 8px; margin-top: 14px; border-top: 1px solid #f1f3f9; padding-top: 12px; flex-wrap: wrap; }
@media (max-width:900px){.mv-lista{grid-template-columns:1fr}.mv-wrap{max-width:1000px}}
.mv-btn-sm { display: inline-flex; align-items: center; gap: 5px; padding: 6px 14px; border-radius: 7px; font-size: 12px; font-weight: 600; cursor: pointer; border: none; transition: filter .15s; }
.mv-impreso { display:inline-flex;align-items:center;gap:5px;padding:4px 9px;border:1px solid #dbe1ec;border-radius:14px;font-size:11px;font-weight:700;color:#73809a;cursor:pointer;transition:.15s; }
.mv-impreso input { accent-color:#2f9e6e; }
.mv-impreso.es-impreso { background:#e8f7ef;border-color:#85d4a8;color:#167445;box-shadow:0 1px 5px #67bd8d44; }
.mv-btn-sm:hover { filter: brightness(.9); }
.mv-btn-avanzar { background: #1976d2; color: #fff; }
.mv-btn-elim    { background: #fce4ec; color: #c62828; }
.mv-btn-pdf     { background: #f1f3f9; color: #3a4060; text-decoration: none; }
.mv-empty { text-align: center; padding: 64px 20px; color: #7a829e; background: #fff; border: 1px solid #e8eaf4; border-radius: 12px; }
.mv-empty-icon { font-size: 36px; color: #c8d0e0; display: block; margin-bottom: 12px; }
.mv-loading { text-align: center; padding: 40px; color: #94a3b8; }

/* Modal */
.mv-overlay { position:fixed;inset:0;background:rgba(15,25,50,.45);z-index:1000;display:flex;align-items:center;justify-content:center;padding:16px; }
.mv-modal   { background:#fff;border-radius:16px;width:100%;max-width:880px;max-height:94vh;display:flex;flex-direction:column;overflow:hidden; }
.mv-modal-head { display:flex;align-items:center;justify-content:space-between;padding:18px 24px;border-bottom:1px solid #e8eaf4; }
.mv-modal-head h3 { font-size:17px;font-weight:800;color:#1a2340; }
.mv-close { background:none;border:none;font-size:20px;color:#94a3b8;cursor:pointer;padding:2px; }
.mv-close:hover { color:#e05050; }
.mv-modal-body { flex:1;overflow-y:auto;padding:20px 24px;display:flex;flex-direction:column;gap:14px; }
.mv-modal-foot { padding:14px 24px;border-top:1px solid #e8eaf4;display:flex;justify-content:flex-end;gap:10px; }
.mv-form-row   { display:flex;gap:12px;align-items:flex-start; }
.mv-form-group { flex:1;display:flex;flex-direction:column;gap:4px; }
.mv-flex2 { flex: 2; }
.mv-label { font-size:12px;font-weight:700;color:#5a6077; }
.mv-input  { padding:9px 12px;border:1px solid #e0e3f0;border-radius:8px;font-size:13px;outline:none;width:100%;transition:border-color .15s; }
.mv-input:focus { border-color:#1976d2; }
.mv-items-box { background:#f8f9fd;border:1px solid #e8eaf4;border-radius:10px;padding:12px;max-height:44vh;overflow-y:auto; }
.mv-lote-control { display:flex;align-items:center;gap:8px;margin:7px 0 8px;padding:8px 10px;background:#f8f9fd;border:1px solid #e8eaf4;border-radius:8px;font-size:12px;color:#4b556d; }
.mv-lote-control label { display:flex;align-items:center;gap:6px;font-weight:600;white-space:nowrap; }
.mv-lote-control input[type="number"] { width:64px;padding:6px 8px;border:1px solid #cfd6e8;border-radius:6px;text-align:center; }
.mv-lote-btn { border:0;border-radius:6px;padding:7px 10px;background:#e7eefb;color:#1a5fa8;font-size:12px;font-weight:700;cursor:pointer; }
.mv-resumen-masivo { color:#52617b;font-size:11px;font-weight:600; }
.mv-masivo-toggle { display:flex;align-items:center;gap:6px;margin-top:9px;font-size:13px;color:#27314d;cursor:pointer; }
.mv-destinos-masivos { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-height:220px;overflow-y:auto;margin:0 0 12px;padding:10px;border:1px solid #e0e5f0;border-radius:10px;background:#f8faff; }
.mv-destinos-masivos label { display:flex;align-items:center;gap:8px;min-height:38px;padding:8px 10px;border:1px solid #e1e6f2;border-radius:8px;background:#fff;color:#27314d;font-size:12px;line-height:1.2;cursor:pointer;transition:.15s; }
.mv-destinos-masivos label:hover { border-color:#91b6e8;background:#f1f6ff; }
.mv-destinos-masivos label:has(input:checked) { border-color:#3b82d0;background:#eaf3ff;color:#135ca7;font-weight:700; }
.mv-destinos-masivos input { accent-color:#1976d2;flex:0 0 auto; }
.mv-destinos-masivos label:has(input:disabled) { opacity:.45;cursor:not-allowed;background:#f4f5f8; }
@media (max-width:760px){.mv-destinos-masivos{grid-template-columns:repeat(2,minmax(0,1fr));}}
.mv-item-check { display:flex;align-items:center;gap:8px;padding:6px 4px;border-radius:6px;cursor:pointer;transition:background .1s; }
.mv-item-check:hover { background:#eef0f8; }
.mv-item-check input { cursor:pointer;width:14px;height:14px; }
.mv-item-check .mv-cantidad-input { width:76px;height:30px;margin-left:auto;padding:4px 7px;border:1px solid #cfd6e8;border-radius:6px;background:#fff;font-size:12px;text-align:center; }
.mv-item-check .mv-cantidad-input:disabled { background:#f1f3f9;color:#94a3b8;cursor:not-allowed; }
.mv-btn { display:inline-flex;align-items:center;gap:6px;padding:9px 20px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;border:none;transition:filter .15s; }
.mv-btn:hover { filter:brightness(.9); }
.mv-btn-pri { background:#1976d2;color:#fff; }
.mv-btn-sec { background:#f1f3f9;color:#3a4060; }
.mv-btn-confirm { background:#2e7d32;color:#fff; }

.mv-foto-label { display:flex;align-items:center;gap:10px;padding:10px 14px;border:1.5px dashed #c8d0e0;border-radius:10px;cursor:pointer;font-size:13px;color:#5a6077;background:#fafbfd;transition:border-color .15s; }
.mv-foto-label:hover { border-color:#1976d2;color:#1976d2; }
.mv-icon-lg { font-size: 20px; color: #94a3b8; }
.mv-icon-sm { font-size: 13px; }
.mv-count-hint { font-weight: 400; color: #94a3b8; }
.mv-placeholder { color: #94a3b8; font-size: 13px; padding: 12px; }
.mv-arrow-sep { display: flex; align-items: center; padding-top: 22px; color: #94a3b8; }
.mv-foto-preview { display: none; margin-top: 8px; }
.mv-foto-img { max-height: 120px; border-radius: 8px; border: 1px solid #e8eaf4; }
.mv-remove-foto-btn { display: block; margin-top: 4px; background: none; border: none; color: #e05050; font-size: 12px; cursor: pointer; }
.mv-conf-info-box { background: #f0f9f4; border: 1px solid #c8e6c9; border-radius: 10px; padding: 12px 16px; font-size: 13px; color: #1b5e20; margin-bottom: 4px; }
.mv-note-box { font-size: 12px; color: #7a829e; background: #f8f9fd; border-radius: 8px; padding: 10px 14px; }
.mv-icon-green { color: #2e7d32; }

.mv-foto-thumb { max-height: 100px; border-radius: 8px; border: 1px solid #e8eaf4; cursor: pointer; }
.mv-firma-row { margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.mv-firma-icon { color: #2e7d32; font-size: 13px; }
.mv-firma-label { font-size: 11.5px; color: #2e7d32; font-weight: 600; }
.mv-firma-link { font-size: 11px; color: #1565c0; margin-left: 4px; }
.mv-note-inline { font-size: 12px; color: #7a829e; margin-top: 8px; }
.mv-store-icon { font-size: 15px; color: #94a3b8; }
.mv-arrow-icon { color: #94a3b8; }
.mv-meta-icon { font-size: 11px; }

@media(max-width:600px){
  .mv-form-row { flex-direction:column; }
  .mv-arrow-sep { display:none; }
}

/* Reportes: tarjeta destacada + "otros reportes" colapsable */
.rep-featured-card {
  background: #fff; border-radius: 13px; padding: 22px 24px;
  border: 1.5px solid #cdeada; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.rep-featured-icon {
  width: 52px; height: 52px; border-radius: 12px; background: #1a7c4618;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.rep-featured-icon i { font-size: 26px; color: #1a7c46; }
.rep-featured-body { flex: 1; min-width: 200px; }
.rep-featured-title { font-size: 16px; font-weight: 700; color: #1a1f36; }
.rep-featured-sub { font-size: 12.5px; color: #9aa0bc; margin-top: 2px; }
.rep-featured-btn {
  display: flex; align-items: center; gap: 7px; padding: 11px 22px;
  border-radius: 9px; border: none; background: #1a7c46; color: #fff;
  font-size: 13.5px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.rep-featured-btn:hover { background: #156339; }

.rep-others-toggle {
  display: inline-flex; align-items: center; gap: 5px; background: none; border: none;
  color: #6a7090; font-size: 12.5px; cursor: pointer; font-family: inherit; padding: 4px 0;
}
.rep-others-toggle i { font-size: 12px; transition: transform .15s; }
.rep-others-toggle.open i { transform: rotate(180deg); }
.rep-others-panel { display: none; }
.rep-others-panel.open { display: block; }

/* ============================================================
   MODAL USUARIO (pages/usuarios.php) — versión ampliada
   ============================================================ */
.modal-lg { width: 820px; max-width: 94vw; }

.uform-header {
  display: flex; align-items: center; gap: 14px;
  background: #f8f9fd; border-radius: 12px; padding: 14px 16px; margin-bottom: 4px;
}
.uform-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: #EAE9FD; color: #534AB7; display: flex; align-items: center;
  justify-content: center; font-size: 19px; font-weight: 700;
}
.uform-header-info { flex: 1; min-width: 0; }
.uform-header-name { font-size: 15px; font-weight: 700; color: #1a2340; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uform-header-sub { font-size: 11.5px; color: #9aa0bc; margin-top: 2px; }

.uform-section { display: flex; flex-direction: column; gap: 10px; }
.uform-section-label {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: #9aa0bc; display: flex; align-items: center; gap: 6px; margin-top: 4px;
}
.uform-section-label i { font-size: 12px; color: #534AB7; }
.uform-section-label::after { content: ''; flex: 1; height: 1px; background: #edf0f7; }

.uform-input-icon { position: relative; }
.uform-input-icon > i {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: #b0b8d0; font-size: 14px; pointer-events: none;
}
.uform-input-icon input { padding-left: 32px !important; }

.uform-pass-row { display: flex; gap: 6px; align-items: stretch; }
.uform-pass-row .uform-input-icon { flex: 1; }
.uform-gen-btn {
  flex-shrink: 0; padding: 0 12px; border: 1.5px solid #e0e3f0; border-radius: 9px;
  background: #f9fafd; color: #534AB7; cursor: pointer; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; gap: 5px; font-family: inherit; white-space: nowrap;
}
.uform-gen-btn:hover { background: #EAE9FD; }
.uform-hint { font-size: 11px; color: #9aa0bc; margin-top: 3px; }

.uform-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  background: #f8f9fd; border-radius: 10px; padding: 11px 14px;
}
.uform-toggle-label { font-size: 12.5px; font-weight: 600; color: #1a2340; }
.uform-toggle-sub { font-size: 11px; color: #9aa0bc; margin-top: 1px; }
.uform-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; cursor: pointer; }
.uform-switch input { opacity: 0; width: 0; height: 0; }
.uform-switch-slider {
  position: absolute; inset: 0; background: #d0d4e8; border-radius: 22px; transition: background .15s;
}
.uform-switch-slider::before {
  content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.uform-switch input:checked + .uform-switch-slider { background: #4caf7d; }
.uform-switch input:checked + .uform-switch-slider::before { transform: translateX(18px); }

.uform-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.uform-info-chip { background: #f8f9fd; border-radius: 9px; padding: 9px 12px; }
.uform-info-chip-label { font-size: 10px; color: #9aa0bc; text-transform: uppercase; letter-spacing: .04em; }
.uform-info-chip-val { font-size: 12.5px; font-weight: 600; color: #1a2340; margin-top: 2px; display: flex; align-items: center; gap: 5px; }
.uform-info-chip-val.warn { color: #b45309; }
.uform-info-chip-val.danger { color: #e05050; }

/* ══════════════════════════════════════════════════════════════
   Estilos consolidados desde bloques <style> de páginas (jul 2026).
   Cada prefijo pertenece a UNA sola página; se movieron aquí para
   centralizar el CSS. (inv_calendario.php se dejó inline porque sus
   clases .cal-* chocan con las de arriba y usa color dinámico.)
   ══════════════════════════════════════════════════════════════ */

/* ── Roles y permisos (pages/roles.php) ─────────────────────── */
.rol-item.activo { background:#f0effd; }
.perm-cat { font-size:11px;font-weight:700;color:#534AB7;text-transform:uppercase;letter-spacing:.6px;margin:16px 0 8px;padding-bottom:4px;border-bottom:1px solid #e8eaf4 }
.perm-cat:first-child { margin-top:0 }
.perm-row { display:flex;align-items:flex-start;gap:10px;padding:8px 10px;border-radius:8px;transition:background .1s }
.perm-row:hover { background:#f8f9fd }
.perm-row input[type=checkbox] { width:16px;height:16px;accent-color:#534AB7;margin-top:2px;flex-shrink:0 }
.perm-label { font-size:13px;font-weight:500;color:#1a2340 }
.perm-desc  { font-size:11.5px;color:#9aa0bc;margin-top:2px }

/* ── Copias de seguridad (pages/backups.php) ────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.bk-row {
  display:flex;align-items:center;gap:12px;padding:10px 20px;
  border-bottom:1px solid #f5f6fb;font-size:13px;
}
.bk-row:last-child { border-bottom:none; }
.bk-nombre { flex:1;font-family:monospace;color:#1a1f36;font-size:12px }
.bk-fecha  { color:#9aa0bc;font-size:12px;min-width:130px }
.bk-tam    { color:#6a7090;font-size:12px;min-width:70px;text-align:right }

/* ── Registros de inventario genérico (pages/inv_registros.php) ── */
.rg-wrap   { max-width: 860px; margin: 0 auto; padding: 24px 16px; display: flex; flex-direction: column; gap: 20px; }
.rg-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rg-title  { font-size: 22px; font-weight: 800; color: #1a2340; display: flex; align-items: center; gap: 10px; }
.rg-sub    { font-size: 13px; color: #7a829e; margin-top: 4px; }
.rg-select { padding: 7px 10px; border: 1px solid #e0e3f0; border-radius: 8px; font-size: 13px; outline: none; background: #fff; cursor: pointer; }
.rg-empty  { text-align: center; padding: 64px 20px; color: #7a829e; }

.rg-date-sep { display: flex; align-items: center; gap: 10px; margin: 12px 0 6px; }
.rg-date-sep span { font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.rg-date-sep::before, .rg-date-sep::after { content:''; flex:1; height:1px; background:#e8eaf4; }

.rg-timeline { display: flex; flex-direction: column; gap: 0; }
.rg-entry  { display: flex; align-items: flex-start; gap: 14px; padding: 10px 0; border-bottom: 1px solid #f1f3f9; }
.rg-entry:last-child { border-bottom: none; }
.rg-entry-icon { width: 34px; min-width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.rg-entry-body { flex: 1; min-width: 0; }
.rg-entry-row  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rg-accion-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.rg-item-nombre  { font-size: 14px; font-weight: 600; color: #1a2340; }
.rg-detalle      { font-size: 12px; color: #7a829e; margin-top: 3px; }
.rg-meta         { font-size: 11px; color: #94a3b8; margin-top: 5px; display: flex; align-items: center; gap: 4px; }

.rg-pag { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.rg-pag-btn { padding: 6px 12px; border-radius: 7px; font-size: 13px; border: 1px solid #e0e3f0; text-decoration: none; color: #3a4060; background: #fff; transition: all .15s; }
.rg-pag-btn.active, .rg-pag-btn:hover { background: #1976d2; color: #fff; border-color: #1976d2; }

/* ── Reportes de inventario genérico (pages/inv_reportes.php) ── */
.rpt-wrap { max-width: 1100px; margin: 0 auto; padding: 24px 16px; display: flex; flex-direction: column; gap: 20px; }
.rpt-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rpt-title { font-size: 22px; font-weight: 800; color: #1a2340; display: flex; align-items: center; gap: 10px; }
.rpt-sub { font-size: 13px; color: #7a829e; margin-top: 4px; }
.rpt-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-rpt { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 8px; font-size: 13px; font-weight: 600; text-decoration: none; border: none; cursor: pointer; transition: filter .15s; }
.btn-rpt:hover { filter: brightness(.92); }
.btn-csv { background: #1976d2; color: #fff; }
.btn-pdf { background: #e05050; color: #fff; }

/* Seleccion e impresion por lote de solicitudes */
.sol-toolbar-actions { display:flex; align-items:center; gap:8px; }
.sol-type-tabs { display:flex; gap:5px; align-items:center; flex-wrap:wrap; }
.sol-type-tab { border:1px solid #e1e4ef; border-radius:8px; padding:6px 10px; color:#69708d; background:#fff; font-size:11.5px; font-weight:600; text-decoration:none; white-space:nowrap; }
.sol-type-tab:hover { border-color:#aaa2e8; color:#534AB7; }
.sol-type-tab.active { border-color:#534AB7; background:#f0eeff; color:#534AB7; }
.sol-type-pill { display:inline-flex; align-items:center; border-radius:20px; padding:4px 9px; font-size:11px; font-weight:600; white-space:nowrap; }
.sol-tipo-equipo { color:#1769aa; background:#e8f3fc; }
.sol-tipo-tecnico { color:#704b00; background:#fff2d8; }
.sol-check-col { width:38px; text-align:center !important; }
.sol-check-col input { width:16px; height:16px; accent-color:#534AB7; cursor:pointer; }
.btn-sol-print { border:1px solid #d9dced; background:#fff; color:#39405f; border-radius:8px; padding:8px 12px; font:600 12.5px inherit; cursor:pointer; display:inline-flex; align-items:center; gap:6px; }
.btn-sol-print:hover:not(:disabled) { border-color:#534AB7; color:#534AB7; background:#f7f5ff; }
.btn-sol-print:disabled { opacity:.48; cursor:not-allowed; }
.btn-sol-print span { min-width:20px; padding:1px 6px; border-radius:10px; background:#eeebff; color:#534AB7; text-align:center; font-size:11px; }
@media (max-width:760px) {
  .sol-toolbar-actions { width:100%; justify-content:flex-end; flex-wrap:wrap; }
  .btn-sol-print { flex:1; justify-content:center; }
}

.rpt-stats-row { display: flex; gap: 12px; flex-wrap: wrap; }
.rpt-stat-card { background: #fff; border: 1px solid #e8eaf4; border-radius: 12px; padding: 18px 22px; flex: 1; min-width: 120px; border-top: 3px solid #e8eaf4; }
.rpt-stat-total { border-top-color: #1a2340 !important; }
.rpt-stat-num { font-size: 32px; font-weight: 800; color: #1a2340; line-height: 1; }
.rpt-stat-label { font-size: 12px; color: #7a829e; margin-top: 6px; font-weight: 500; }

.rpt-charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media(max-width:700px){ .rpt-charts-row { grid-template-columns: 1fr; } }

.rpt-chart-card { background: #fff; border: 1px solid #e8eaf4; border-radius: 12px; padding: 20px; }
.rpt-chart-title { font-size: 14px; font-weight: 700; color: #1a2340; display: flex; align-items: center; gap: 7px; margin-bottom: 16px; }
.rpt-chart-sub { font-size: 11px; font-weight: 500; color: #94a3b8; margin-left: 4px; }
.rpt-empty { color: #c8d0e0; font-size: 13px; text-align: center; padding: 24px 0; }

.rpt-bar-list { display: flex; flex-direction: column; gap: 10px; }
.rpt-bar-row { display: grid; grid-template-columns: 130px 1fr 64px; align-items: center; gap: 8px; }
.rpt-bar-label { font-size: 12px; color: #3a4060; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.rpt-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.rpt-bar-track { background: #f1f3f9; border-radius: 99px; height: 7px; overflow: hidden; }
.rpt-bar-fill { height: 100%; border-radius: 99px; transition: width .3s; min-width: 2px; }
.rpt-bar-count { font-size: 12px; font-weight: 700; color: #1a2340; text-align: right; }
.rpt-pct { font-weight: 400; color: #94a3b8; }

.rpt-table-card { background: #fff; border: 1px solid #e8eaf4; border-radius: 12px; overflow: hidden; }
.rpt-table-head { padding: 18px 20px 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.rpt-filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.rpt-search { padding: 7px 12px; border: 1px solid #e0e3f0; border-radius: 8px; font-size: 13px; outline: none; width: 220px; transition: border-color .15s; }
.rpt-search:focus { border-color: #1976d2; }
.rpt-select { padding: 7px 10px; border: 1px solid #e0e3f0; border-radius: 8px; font-size: 13px; outline: none; background: #fff; cursor: pointer; }
.rpt-table-wrap { overflow-x: auto; margin-top: 14px; border: 1px solid #e8eaf4; border-radius: 8px; }
.rpt-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rpt-table th { background: #f8f9fd; color: #5a6077; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; text-align: left; border-bottom: 2px solid #dde1ee; border-right: 1px solid #e8eaf4; white-space: nowrap; }
.rpt-table th:last-child { border-right: none; }
.rpt-table td { padding: 10px 14px; border-bottom: 1px solid #e8eaf4; border-right: 1px solid #f1f3f9; vertical-align: middle; color: #1a2340; }
.rpt-table td:last-child { border-right: none; }
.rpt-table tr:last-child td { border-bottom: none; }
.rpt-table tr:nth-child(even) td { background: #fafbfd; }
.rpt-table tr:hover td { background: #f0f4ff; }
.rpt-table tr[style*="display:none"] { display: none !important; }
.rpt-code { font-family: monospace; background: #f1f3f9; color: #5a6077; padding: 2px 7px; border-radius: 5px; font-size: 11px; font-weight: 700; }
.rpt-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.rpt-banco-badge { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; color: #fff; font-size: 8px; font-weight: 700; margin-right: 5px; vertical-align: middle; }
.rpt-notas { max-width: 200px; color: #7a829e; font-size: 12px; }
.rpt-empty-table { text-align: center; padding: 48px 20px; color: #7a829e; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rpt-table-footer { padding: 10px 20px; font-size: 12px; color: #94a3b8; border-top: 1px solid #f1f3f9; }
.rpt-veh-section { background: #fff; border: 1px solid #e8eaf4; border-radius: 12px; padding: 20px; }

@media(max-width:480px){
  .rpt-bar-row { grid-template-columns: 90px 1fr 48px; }
  .rpt-search { width: 100%; }
  .rpt-header { flex-direction: column; }
  .rpt-title { font-size: 18px; }
}


/* ============================================================
   ARRENDAMIENTOS — módulo de contratos (pages/arr_*.php)
   ============================================================ */
.arr-wrap { display: flex; flex-direction: column; gap: 16px; }

.arr-noaccess { background: #fff; border: 1px solid #e8eaf4; border-radius: 12px; padding: 40px 24px; text-align: center; color: #7a829e; font-size: 14px; }
.arr-noaccess i { font-size: 26px; display: block; margin-bottom: 8px; color: #b6bccd; }
.arr-noaccess a { color: #0d9488; text-decoration: none; font-weight: 600; }

/* ── Cabecera ── */
.arr-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.arr-title { font-size: 19px; font-weight: 700; color: #1a2340; display: flex; align-items: center; gap: 8px; }
.arr-title i { color: #0d9488; }
.arr-sub { font-size: 12.5px; color: #7a829e; margin-top: 3px; }
.arr-head-acciones { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.arr-crumb { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #7a829e; flex-wrap: wrap; }
.arr-crumb a { color: #0d9488; text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.arr-crumb a:hover { text-decoration: underline; }

/* ── Botones ── */
.btn-arr-primary { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; background: #0d9488; color: #fff; border: none; border-radius: 9px; font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; text-decoration: none; transition: filter .15s; }
.btn-arr-primary:hover { filter: brightness(.92); }
.btn-arr-sec { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; background: #fff; color: #3a4060; border: 1.5px solid #e0e3f0; border-radius: 9px; font-size: 13px; font-weight: 500; font-family: inherit; cursor: pointer; text-decoration: none; transition: border-color .15s, background .15s; }
.btn-arr-sec:hover { border-color: #0d9488; background: #f0fdfa; color: #0d9488; }
.btn-arr-mini { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; background: #f0fdfa; color: #0d9488; border: 1px solid #99f6e4; border-radius: 7px; font-size: 11.5px; font-weight: 600; font-family: inherit; cursor: pointer; }
.btn-arr-mini:hover { background: #ccfbf1; }

.arr-btn-ico { background: #fff; border: 1px solid #e8eaf4; border-radius: 7px; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: #5a6077; font-size: 14px; text-decoration: none; transition: all .12s; }
.arr-btn-ico:hover { border-color: #0d9488; color: #0d9488; background: #f0fdfa; }
.arr-btn-del:hover { border-color: #f5b8b4; color: #c0392b; background: #fdecea; }
.arr-acciones { white-space: nowrap; display: flex; gap: 5px; justify-content: flex-end; }

/* ── Tiles ── */
.arr-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.arr-tile { background: #fff; border: 1px solid #e8eaf4; border-left: 3px solid var(--c, #0d9488); border-radius: 11px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
a.arr-tile:hover { box-shadow: 0 4px 16px rgba(26,35,64,.09); transform: translateY(-1px); }
.arr-tile.active { background: #f0fdfa; border-color: var(--c); }
.arr-tile > i { font-size: 22px; color: var(--c, #0d9488); flex-shrink: 0; }
.arr-tile-num { font-size: 21px; font-weight: 700; color: #1a2340; line-height: 1.15; }
.arr-tile-money { font-size: 16px; font-family: 'Consolas', monospace; color: #157a52; }
.arr-tile-lbl { font-size: 11.5px; color: #7a829e; margin-top: 2px; }
.arr-tile-lg { padding: 16px 18px; }
/* Un contrato vencido es una sucursal operando sin cobertura: tiene que saltar a la vista */
.arr-tile-alerta { background: #fef6f6; border-color: #f5b8b4; }
.arr-tile-alerta .arr-tile-num { color: #c0392b; }
/* Los tiles del panel llevan cifras de dinero: necesitan más ancho que los contadores */
.arr-tiles-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* ── Filtros ── */
.arr-filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.arr-input, .arr-select { padding: 8px 11px; border: 1.5px solid #e0e3f0; border-radius: 8px; font-size: 13px; font-family: inherit; color: #1a2340; background: #fff; outline: none; transition: border-color .15s; }
.arr-input:focus, .arr-select:focus { border-color: #0d9488; }
.arr-select { cursor: pointer; }
.arr-filtros .arr-input { min-width: 240px; flex: 1; }
.arr-limpiar { font-size: 12px; color: #7a829e; text-decoration: none; }
.arr-limpiar:hover { color: #e05050; }
.w100 { width: 100%; }

.arr-mes-nav { display: flex; align-items: center; gap: 6px; }
.arr-mes-form { display: flex; margin: 0; }
.arr-barra-acciones { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.arr-check { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: #3a4060; cursor: pointer; }
.arr-check-mt { margin-top: 7px; font-size: 12px; }
/* Importe + su moneda en una sola línea (depósito en garantía) */
/* La fecha acordada es la que rige el cronograma: se distingue de la cláusula informativa */
.arr-acordado { color: #0f766e; }
.arr-dupla { display: flex; gap: 6px; }
.arr-dupla .arr-input { flex: 1; min-width: 0; }
.arr-dupla .arr-select { flex: 0 0 auto; }
.arr-tot-inline { display: flex; gap: 16px; font-size: 12.5px; color: #5a6077; flex-wrap: wrap; }

/* ── Tarjetas ── */
.arr-card { background: #fff; border: 1px solid #e8eaf4; border-radius: 12px; overflow: hidden; }
.arr-card-pad { padding: 18px 20px; }
.arr-pb0 { padding-bottom: 0; }
.arr-p20 { padding: 20px; }
.arr-mt { margin-top: 18px; }
.arr-card-titulo { font-size: 13.5px; font-weight: 700; color: #1a2340; display: flex; align-items: center; gap: 7px; margin-bottom: 12px; }
.arr-card-titulo i { color: #0d9488; font-size: 15px; }
/* Logo del banco: caja FIJA, no altura fija. Con altura fija los logos apilados
   (Occidente, Banrural) gastaban los 22 px en dos renglones y salían diminutos al
   lado de los horizontales. Con la caja, cada uno crece hasta llenarla como puede
   y todos pesan lo mismo a la vista. De paso el nombre arranca siempre en el mismo
   punto, así que las tarjetas quedan alineadas entre sí. */
.arr-banco-logo { width: 110px; height: 36px; object-fit: contain; object-position: center; flex-shrink: 0; }
/* En el recuadro manda la cifra: la caja va algo menor para no partirla en dos líneas */
.arr-banco-logo-tile { width: 88px; height: 30px; }
/* Y el recuadro necesita más ancho que uno normal: logo + monto + nombre */
.arr-tiles-banco { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
/* La columna de estado se puede quitar de la planilla */
body.pl-sin-est .pl-col-est { display: none; }
.arr-checks { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
/* El nombre de la sucursal se lee como texto, pero sigue llevando al contrato */
.arr-suc { color: #1a2340; text-decoration: none; }
.arr-suc:hover { color: #0d9488; text-decoration: underline; }
.arr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }

/* ── Tablas ── */
.arr-tabla-wrap { overflow-x: auto; }
.arr-tabla { width: 100%; border-collapse: collapse; font-size: 13px; }
.arr-tabla th { background: #f8f9fd; color: #5a6077; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; text-align: left; border-bottom: 2px solid #dde1ee; white-space: nowrap; }
.arr-tabla td { padding: 10px 12px; border-bottom: 1px solid #f1f3f9; color: #1a2340; vertical-align: middle; }
.arr-tabla tr:last-child td { border-bottom: none; }
.arr-tabla tbody tr:hover td { background: #f7fbfa; }
.arr-tabla .ta-r, .arr-tabla th.ta-r { text-align: right; }
.arr-tabla .ta-c, .arr-tabla th.ta-c { text-align: center; }
.arr-th-chk { width: 34px; text-align: center !important; }
.arr-fila-hoy td { background: #f0fdfa !important; box-shadow: inset 3px 0 0 #0d9488; }
.arr-fila-vencida td { background: #fef6f6; }
.arr-fila-total td { background: #f8f9fd; font-weight: 700; border-top: 2px solid #dde1ee; }
/* El total del banco es la cifra que se va a transferir: tiene que cantar por
   encima de las líneas de arriba, en papel y en pantalla */
.arr-fila-total .arr-dinero { font-size: 16.5px; font-weight: 800; color: #0f5f40; }
.arr-tabla-pie { padding: 10px 16px; font-size: 12px; color: #7a829e; border-top: 1px solid #f1f3f9; background: #fcfcfe; }
.arr-tabla-pie a { color: #0d9488; text-decoration: none; }

.arr-num { font-family: 'Consolas', monospace; font-size: 12px; font-weight: 700; color: #0d9488; text-decoration: none; background: #f0fdfa; padding: 2px 7px; border-radius: 5px; }
.arr-num:hover { background: #ccfbf1; }
.arr-fuerte { font-weight: 600; color: #1a2340; }
.arr-mini { font-size: 11px; color: #94a3b8; }
.arr-mini2 { font-size: 12px; color: #5a6077; }
.arr-mono { font-family: 'Consolas', monospace; font-size: 12px; }
.arr-gris { color: #94a3b8; }
.arr-rojo { color: #e05050; }
.arr-verde { color: #157a52; }
.arr-dinero { font-family: 'Consolas', monospace; font-weight: 700; color: #157a52; white-space: nowrap; }
.arr-oculto { color: #c3c9d8; }
.arr-pendiente { color: #b07d2a; font-style: normal; font-weight: 600; }
/* Subtítulo de cabecera de tabla: aclara qué cifra es sin alargar el título */
.arr-th-sub { font-weight: 500; text-transform: none; letter-spacing: 0; color: #94a3b8; font-size: 9.5px; }
/* El dato que se busca al abrir la ficha: cuánto se paga este mes */
.arr-dato-destacado b { color: #157a52; font-size: 15px; }
.arr-dato-destacado span { color: #0d9488; }
/* Alias operativo del local («KENNEDY»): identifica el sitio mejor que la dirección */
.arr-alias { color: #0d9488; font-weight: 600; }
.arr-ficha-alias { display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 6px; background: #f0fdfa; color: #0d9488; font-size: 12px; font-weight: 700; vertical-align: middle; }
.arr-link { color: #0d9488; text-decoration: none; font-weight: 500; }
.arr-link:hover { text-decoration: underline; }

.arr-badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.arr-badge-warn { background: #e8a02018; color: #b57310; }
.arr-badge-info { background: #2196b018; color: #16748a; }

/* ── Estados vacíos ── */
.arr-empty { background: #fff; border: 1px dashed #d8dcea; border-radius: 12px; padding: 44px 24px; text-align: center; color: #7a829e; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.arr-empty i { font-size: 32px; color: #c3c9d8; }
.arr-vacio-mini { font-size: 12.5px; color: #94a3b8; padding: 6px 0; }
.arr-vacio-mini a { color: #0d9488; text-decoration: none; }
.arr-help { font-size: 11.5px; color: #94a3b8; line-height: 1.5; margin-top: 3px; }
.arr-help a { color: #0d9488; text-decoration: none; }

/* ── Avisos ── */
.arr-alerta { display: flex; gap: 11px; align-items: flex-start; background: #fdecea; border: 1px solid #f5b8b4; border-radius: 11px; padding: 13px 16px; font-size: 12.5px; color: #922020; line-height: 1.5; }
.arr-alerta i { font-size: 18px; flex-shrink: 0; }
.arr-nota { display: flex; gap: 9px; align-items: center; background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 10px; padding: 10px 14px; font-size: 12.5px; color: #155a70; line-height: 1.5; }
.arr-nota i { font-size: 16px; flex-shrink: 0; }
.arr-aviso-cron { display: flex; gap: 9px; align-items: center; background: #f0fdfa; border: 1px solid #99f6e4; border-radius: 9px; padding: 10px 13px; font-size: 12px; color: #0f766e; }
.arr-nota-crono { margin: 0 18px 12px; }

/* ── Ficha de contrato ── */
.arr-ficha-head { background: #fff; border: 1px solid #e8eaf4; border-left: 4px solid var(--c, #0d9488); border-radius: 12px; padding: 18px 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.arr-ficha-id { min-width: 0; flex: 1; }
.arr-ficha-suc { font-size: 17px; font-weight: 700; color: #1a2340; word-break: break-word; }
.arr-ficha-dir { font-size: 12.5px; color: #7a829e; margin-top: 2px; }
.arr-ficha-badges { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.arr-ficha-acciones { display: flex; gap: 8px; flex-wrap: wrap; }

.arr-datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 11px 18px; }
.arr-datos > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.arr-datos span { font-size: 10.5px; color: #94a3b8; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.arr-datos b { font-size: 13px; color: #1a2340; font-weight: 600; word-break: break-word; }
.arr-datos b em { font-style: normal; }
.arr-notas-box { margin-top: 14px; background: #f8f9fd; border-radius: 9px; padding: 11px 13px; font-size: 12.5px; color: #3a4060; line-height: 1.55; }
.arr-lista { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: #3a4060; }
.arr-lista li { padding-left: 14px; position: relative; }
.arr-lista li::before { content: '•'; position: absolute; left: 0; color: #0d9488; }

.arr-docs { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.arr-docs li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; flex-wrap: wrap; }
.arr-docs a { color: #0d9488; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; font-weight: 500; }
.arr-docs a:hover { text-decoration: underline; }
.arr-subir { display: flex; gap: 8px; align-items: center; margin-top: 11px; flex-wrap: wrap; }
.arr-subir input[type=file] { font-size: 12px; max-width: 100%; }

.arr-crono-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 18px 10px; }
.arr-card-pad .arr-crono-head { padding: 0 0 10px; }
.arr-crono-tot { display: flex; gap: 7px; flex-wrap: wrap; }
.arr-chip { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 30%, #fff); }

.arr-timeline { list-style: none; display: flex; flex-direction: column; }
.arr-timeline li { display: grid; grid-template-columns: 118px 150px 1fr 120px; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f1f3f9; font-size: 12.5px; align-items: baseline; }
.arr-timeline li:last-child { border-bottom: none; }
.arr-tl-fecha { color: #94a3b8; font-size: 11.5px; font-family: 'Consolas', monospace; }
.arr-tl-accion { font-weight: 600; color: #0d9488; }
.arr-tl-detalle { color: #3a4060; word-break: break-word; }
.arr-tl-user { color: #94a3b8; font-size: 11.5px; text-align: right; }

.arr-lista-avisos { list-style: none; display: flex; flex-direction: column; }
.arr-lista-avisos li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #f1f3f9; }
.arr-lista-avisos li:last-child { border-bottom: none; }
.arr-lista-avisos a { text-decoration: none; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.arr-aviso-fecha { font-size: 12px; color: #5a6077; text-align: right; white-space: nowrap; }
.arr-li-rojo .arr-aviso-fecha { color: #e05050; font-weight: 600; }

/* ── Barras y progreso ── */
.arr-bar { background: #f1f3f9; border-radius: 99px; height: 6px; overflow: hidden; min-width: 60px; }
.arr-bar-fill { height: 100%; background: #0d9488; border-radius: 99px; min-width: 2px; }
.arr-bar-verde { background: #4caf7d; }
.arr-progress { background: #f1f3f9; border-radius: 99px; height: 9px; overflow: hidden; }
.arr-progress-fill { height: 100%; background: linear-gradient(90deg, #0d9488, #4caf7d); border-radius: 99px; transition: width .4s; }
.arr-progress-pie { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; color: #7a829e; margin-top: 7px; flex-wrap: wrap; }

/* ── Planilla de pago ── */
.arr-planilla-total { border-left: 3px solid #0d9488; }
.arr-planilla-cifra { font-family: 'Consolas', monospace; font-size: 22px; font-weight: 700; color: #157a52; line-height: 1.35; }
.arr-planilla-desglose { font-size: 12px; color: #7a829e; margin-top: 5px; }

/* Tipo de cambio: el equivalente en lempiras de lo pactado en dólares */
.arr-cambio { display: flex; align-items: center; gap: 13px; background: #f0fdfa; border: 1px solid #99f6e4;
  border-radius: 11px; padding: 12px 16px; flex-wrap: wrap; }
.arr-cambio > i { font-size: 22px; color: #0d9488; flex-shrink: 0; }
.arr-cambio-datos { flex: 1; min-width: 200px; }
.arr-cambio-tasa { font-size: 15px; color: #1a2340; }
.arr-cambio-tasa strong { font-family: 'Consolas', monospace; color: #0f766e; }
.arr-cambio-acciones { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.arr-cambio-acciones .arr-input { width: 108px; }
.arr-cambio-falta { background: #fdecea; border-color: #f5b8b4; }
.arr-cambio-falta > i { color: #c0392b; }
.arr-convertido { font-family: 'Consolas', monospace; font-size: 11.5px; font-weight: 600; color: #0f766e; margin-top: 2px; }

/* ── Pestañas de pagos (todas / pagadas / pendientes) ── */
.arr-pestanas { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.arr-pestana { display: flex; align-items: center; gap: 11px; padding: 12px 15px; background: #fff;
  border: 1px solid #e8eaf4; border-bottom: 3px solid transparent; border-radius: 11px;
  text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s, background .15s; }
.arr-pestana:hover { border-color: var(--c); box-shadow: 0 3px 12px rgba(26,35,64,.07); }
.arr-pestana > i { font-size: 19px; color: var(--c); flex-shrink: 0; }
.arr-pestana.activa { background: color-mix(in srgb, var(--c) 8%, #fff); border-color: color-mix(in srgb, var(--c) 35%, #fff); border-bottom-color: var(--c); }
.arr-pestana-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.arr-pestana-lbl { font-size: 13px; font-weight: 700; color: #1a2340; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.arr-pestana-num { font-size: 11.5px; color: #7a829e; }
.arr-pestana.activa .arr-pestana-num { color: #5a6077; }

/* ── Barra de acción en lote ── */
.arr-lote { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #e8eaf4; border-radius: 10px; padding: 10px 14px; flex-wrap: wrap; opacity: .55; transition: opacity .15s, border-color .15s; }
.arr-lote.activo { opacity: 1; border-color: #0d9488; box-shadow: 0 2px 10px rgba(13,148,136,.12); }
.arr-lote span { font-size: 12.5px; font-weight: 600; color: #3a4060; }
.ap-cortes { display: flex; gap: 6px; flex-wrap: wrap; }
.ap-corte-btn { font-size: 11.5px; padding: 6px 9px; }
.arr-tabla .ap-corte-head td { padding: 9px 12px; background: #f0fdfa; border-top: 1px solid #b9ede6; border-bottom: 1px solid #b9ede6; color: #0f766e; }
.arr-tabla .ap-corte-head span { font-size: 12px; font-weight: 700; }
.arr-tabla .ap-corte-head i { margin-right: 5px; }
.arr-tabla .ap-corte-head small { margin-left: 8px; color: #5a8790; font-size: 11px; }

/* ── Modales del módulo ── */
.arr-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(12,18,38,.45); z-index: 2200; align-items: center; justify-content: center; padding: 20px; }
.arr-modal-overlay.open { display: flex; }
.arr-modal { background: #fff; border-radius: 14px; width: 860px; max-width: 100%; max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 12px 48px rgba(0,0,0,.22); }
.arr-modal-sm { width: 540px; }
.arr-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; border-bottom: 1px solid #eef0f7; font-size: 14.5px; font-weight: 700; color: #1a2340; }
.arr-modal-head i { color: #0d9488; margin-right: 6px; }
.arr-modal-x { background: none; border: none; font-size: 22px; line-height: 1; color: #94a3b8; cursor: pointer; padding: 0 4px; }
.arr-modal-x:hover { color: #1a2340; }
.arr-modal-body { padding: 16px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.arr-modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 20px; border-top: 1px solid #eef0f7; background: #fcfcfe; border-radius: 0 0 14px 14px; }
.arr-lbl { display: block; font-size: 11px; font-weight: 700; color: #5a6077; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; }
.arr-req { color: #e05050; }
.arr-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.arr-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.arr-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.arr-seccion { border: 1px solid #eef0f7; border-radius: 10px; padding: 13px 15px; }
.arr-seccion-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; font-weight: 700; color: #1a2340; }
.arr-seccion-head i { color: #0d9488; }
/* Atajo del aumento anual: la forma en que se pacta de verdad, en una frase */
.arr-atajo { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #f8f9fd; border: 1px dashed #d8dcea; border-radius: 9px; padding: 10px 13px;
  margin-top: 9px; flex-wrap: wrap; }
.arr-atajo-txt { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #3a4060; flex-wrap: wrap; }
.arr-input-mini { width: 62px; padding: 5px 7px; font-size: 12px; text-align: center; }

.arr-inc-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr .7fr .7fr 30px; gap: 7px; margin-top: 9px; align-items: center; }
.arr-inc-row .arr-input, .arr-inc-row .arr-select { padding: 6px 8px; font-size: 12px; min-width: 0; }

.arr-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; background: #f8f9fd; border-radius: 9px; padding: 11px 13px; }
.arr-prev-item { display: flex; flex-direction: column; gap: 2px; }
.arr-prev-item span { font-size: 10.5px; color: #94a3b8; }
.arr-prev-item b { font-size: 13px; font-family: 'Consolas', monospace; color: #1a2340; }
.arr-prev-total b { color: #157a52; }

/* ── Impresión ── */
.arr-print-head { display: none; }
@media print {
  .sidebar, .topbar, .sidebar-backdrop, .arr-no-print, .arr-acciones, .arr-btn-ico { display: none !important; }
  html, body { width: 100%; margin: 0 !important; padding: 0 !important; }
  body, .app, .main, .content { height: auto; overflow: visible; background: #fff; color: #000 !important; }
  .main, .content { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; }
  .arr-wrap { display: block; width: auto; max-width: none; gap: 0; padding: .38in .40in !important; color: #000 !important; font-family: Arial, Helvetica, sans-serif; }
  .arr-print-head { display: block; font-size: 12pt; line-height: 1.25; font-weight: 800; color: #000; margin: 0 0 .20in; }
  .arr-card { box-shadow: none; }
  /* Los bancos conservan su propio bloque y su tabla puede continuar en otra
     hoja si es grande. No se fuerza una hoja por banco: los bloques pequeños
     comparten página y así se evita desperdiciar papel. */
  .arr-banco { width: 100%; break-inside: auto; page-break-inside: auto; margin: 0; color: #000; border: 1.2px solid #000; border-radius: 0; }
  .arr-banco + .arr-banco { break-before: auto; page-break-before: auto; margin-top: 5mm; }
  .arr-banco .arr-crono-head { break-after: avoid; page-break-after: avoid; padding: 7px 8px; color: #000; border-bottom: 1.2px solid #000; }
  .arr-banco .arr-card-titulo { color: #000 !important; font-size: 11pt; font-weight: 800; }
  .arr-banco .arr-crono-tot { color: #000 !important; font-size: 9pt; font-weight: 700; }
  .arr-banco .arr-chip { color: #000 !important; background: #fff !important; border-color: #000 !important; }
  .arr-tabla-wrap { overflow: visible; }
  .arr-banco .arr-tabla { width: 100% !important; table-layout: fixed; border-collapse: collapse; color: #000 !important; font-size: 8.5pt; line-height: 1.22; }
  .arr-banco .arr-tabla thead { display: table-header-group; }
  .arr-banco .arr-tabla tfoot { display: table-footer-group; }
  .arr-banco .arr-tabla tr { break-inside: avoid; page-break-inside: avoid; }
  .arr-banco .arr-tabla th { padding: 5px 5px; color: #000 !important; background: #e9e9e9 !important; border-bottom: 1px solid #000; font-size: 7.5pt; font-weight: 800; letter-spacing: .01em; }
  .arr-banco .arr-tabla td { padding: 6px 5px; color: #000 !important; border-bottom: .6px solid #777; vertical-align: top; }
  .arr-banco .arr-tabla a, .arr-banco .arr-mini, .arr-banco .arr-mini2,
  .arr-banco .arr-fuerte, .arr-banco .arr-dinero, .arr-banco .arr-convertido { color: #000 !important; }
  .arr-banco .arr-tabla th:nth-child(1) { width: 4% !important; }
  .arr-banco .arr-tabla th:nth-child(2) { width: 20%; }
  .arr-banco .arr-tabla th:nth-child(3) { width: 30%; }
  .arr-banco .arr-tabla th:nth-child(4) { width: 28%; }
  .arr-banco .arr-tabla th:nth-child(5) { width: 18%; }
  .arr-banco .arr-tabla td:nth-child(2) { white-space: nowrap; font-size: 10.5pt; font-weight: 800; letter-spacing: .015em; }
  .arr-banco .arr-tabla td:nth-child(3) { font-size: 9pt; font-weight: 700; overflow-wrap: anywhere; }
  .arr-banco .arr-tabla td:nth-child(4) { font-size: 8.5pt; overflow-wrap: anywhere; }
  .arr-banco .arr-tabla td:nth-child(5) { white-space: nowrap; }
  .arr-banco .arr-fila-total td { color: #000 !important; background: #efefef !important; border-top: 1.2px solid #000; font-weight: 800; }
  .arr-banco .pl-col-est { display: none !important; }
  .arr-banco-logo { max-width: 1.15in; max-height: .30in; object-fit: contain; }
  .arr-planilla-total { break-inside: avoid; page-break-inside: avoid; margin-top: 8mm; }
  /* La hoja que se lleva al banco tiene que salir con el logo, no en blanco */
  .arr-banco-logo { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  /* Imprimir un solo banco: se oculta todo lo demás, incluido el total general,
     que sumaría bancos que no van en esa hoja */
  body.arr-print-uno .arr-banco:not(.arr-print-esta),
  body.arr-print-uno .arr-planilla-total,
  body.arr-print-uno .arr-tiles { display: none !important; }
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .arr-cols { grid-template-columns: 1fr; }
  .arr-grid4 { grid-template-columns: 1fr 1fr; }
  .arr-timeline li { grid-template-columns: 100px 1fr; }
  .arr-tl-detalle { grid-column: 1 / -1; }
  .arr-tl-user { grid-column: 1 / -1; text-align: left; }
}
@media (max-width: 720px) {
  .arr-head { flex-direction: column; align-items: stretch; }
  .arr-title { font-size: 17px; }
  .arr-grid2, .arr-grid3, .arr-grid4 { grid-template-columns: 1fr; }
  .arr-filtros .arr-input, .arr-filtros .arr-select { min-width: 0; width: 100%; }
  .arr-filtros { flex-direction: column; align-items: stretch; }
  .arr-inc-row { grid-template-columns: 1fr 1fr; }
  .arr-inc-row > button { grid-column: 2; justify-self: end; }
  .arr-ficha-head { flex-direction: column; }
  .arr-ficha-acciones { width: 100%; }
  .arr-ficha-acciones > * { flex: 1; justify-content: center; }
  .arr-modal { max-height: 96vh; border-radius: 12px; }
  .arr-tabla { font-size: 12px; }
  .arr-tabla th, .arr-tabla td { padding: 8px 9px; }
  .arr-lote { flex-direction: column; align-items: stretch; }
  .arr-lote .btn-arr-primary { justify-content: center; }
}
@media (max-width: 480px) {
  .arr-tiles { grid-template-columns: 1fr 1fr; }
  .arr-tile { padding: 11px 12px; gap: 9px; }
  .arr-tile-num { font-size: 18px; }
  .arr-tile-money { font-size: 13px; }
}

/* ============================================================
   COMBUSTIBLE — control de giras y cargas (pages/cmb_*.php)
   Prefijo propio (cmb-) para que el módulo se pueda tocar sin
   arrastrar a los otros. Color base: el ámbar del inventario.
   ============================================================ */
.cmb-wrap { display: flex; flex-direction: column; gap: 16px; }

.cmb-noaccess { background: #fff; border: 1px solid #e8eaf4; border-radius: 12px; padding: 40px 24px; text-align: center; color: #7a829e; font-size: 14px; }
.cmb-noaccess i { font-size: 26px; display: block; margin-bottom: 8px; color: #b6bccd; }
.cmb-noaccess a { color: #c97810; text-decoration: none; font-weight: 600; }

/* ── Cabecera ── */
.cmb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.cmb-title { font-size: 19px; font-weight: 700; color: #1a2340; display: flex; align-items: center; gap: 8px; }
.cmb-title i { color: #c97810; }
.cmb-sub { font-size: 12.5px; color: #7a829e; margin-top: 3px; }
.cmb-head-acciones { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cmb-crumb { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #7a829e; flex-wrap: wrap; }
.cmb-crumb a { color: #c97810; text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.cmb-crumb a:hover { text-decoration: underline; }
.cmb-mes-nav { display: flex; align-items: center; gap: 6px; }
.cmb-mes-form { margin: 0; }

/* ── Botones ── */
.btn-cmb-primary { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; background: #c97810; color: #fff; border: none; border-radius: 9px; font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; text-decoration: none; transition: filter .15s; }
.btn-cmb-primary:hover { filter: brightness(.92); }
.btn-cmb-primary:disabled { opacity: .6; cursor: default; }
.btn-cmb-sec { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; background: #fff; color: #3a4060; border: 1.5px solid #e0e3f0; border-radius: 9px; font-size: 13px; font-weight: 500; font-family: inherit; cursor: pointer; text-decoration: none; transition: border-color .15s, background .15s; }
.btn-cmb-sec:hover { border-color: #c97810; background: #fff8ef; color: #a86209; }
.btn-cmb-mini { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; background: #fff8ef; color: #a86209; border: 1px solid #f5d9ac; border-radius: 7px; font-size: 11.5px; font-weight: 600; font-family: inherit; cursor: pointer; }
.btn-cmb-mini:hover { background: #fdeed6; }
.btn-cmb-danger { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; background: #fff; color: #c0392b; border: 1.5px solid #f5b8b4; border-radius: 9px; font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; }
.btn-cmb-danger:hover { background: #fdecea; }

.cmb-btn-ico { background: #fff; border: 1px solid #e8eaf4; border-radius: 7px; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: #5a6077; font-size: 14px; text-decoration: none; transition: all .12s; }
.cmb-btn-ico:hover { border-color: #c97810; color: #c97810; background: #fff8ef; }
.cmb-btn-del:hover { border-color: #f5b8b4; color: #c0392b; background: #fdecea; }
.cmb-acciones { white-space: nowrap; display: flex; gap: 5px; justify-content: flex-end; }

/* ── Veredicto de la gira ──
   Es la franja que sustituye a la etiqueta «NORMAL» del control anterior: dice el
   resultado, lo justifica en una frase y enseña la cifra que lo sostiene. */
.cmb-veredicto { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid #e8eaf4; border-left: 5px solid var(--c, #6a7090); border-radius: 12px; padding: 16px 20px; }
.cmb-veredicto > i { font-size: 32px; color: var(--c); flex-shrink: 0; }
.cmb-ver-txt { flex: 1; min-width: 0; }
.cmb-ver-lbl { font-size: 17px; font-weight: 700; color: var(--c); line-height: 1.2; }
.cmb-ver-desc { font-size: 12.5px; color: #5a6077; margin-top: 4px; line-height: 1.5; }
.cmb-ver-cifra { text-align: right; flex-shrink: 0; padding-left: 16px; border-left: 1px solid #eef0f7; }
.cmb-ver-num { font-size: 24px; font-weight: 700; color: var(--c); font-family: Consolas, monospace; line-height: 1.1; }
.cmb-ver-cap { font-size: 11px; color: #7a829e; margin-top: 3px; }

/* ── Tiles ── */
.cmb-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.cmb-tiles-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.cmb-tile { background: #fff; border: 1px solid #e8eaf4; border-left: 3px solid var(--c, #c97810); border-radius: 11px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
a.cmb-tile:hover { box-shadow: 0 4px 16px rgba(26,35,64,.09); transform: translateY(-1px); }
.cmb-tile > i { font-size: 22px; color: var(--c, #c97810); flex-shrink: 0; }
.cmb-tile-num { font-size: 20px; font-weight: 700; color: #1a2340; line-height: 1.15; }
.cmb-tile-money { font-size: 16px; font-family: Consolas, monospace; color: #157a52; }
.cmb-tile-lbl { font-size: 11.5px; color: #7a829e; margin-top: 2px; line-height: 1.45; }
.cmb-tile-lg { padding: 16px 18px; }
.cmb-tile-alerta { background: #fef6f6; border-color: #f5b8b4; }
.cmb-tile-alerta .cmb-tile-num { color: #c0392b; }

/* ── Tarjetas ── */
.cmb-card { background: #fff; border: 1px solid #e8eaf4; border-radius: 12px; overflow: hidden; }
.cmb-card-pad { padding: 18px 20px; }
.cmb-pb0 { padding-bottom: 0; }
.cmb-card-titulo { font-size: 14px; font-weight: 700; color: #1a2340; display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
.cmb-card-titulo i { color: #c97810; font-size: 16px; }
.cmb-card-aviso { border-color: #f5d9ac; background: #fffdf8; }
.cmb-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cmb-crono-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cmb-mt { margin-top: 16px; }

/* ── Datos de la ficha ── */
.cmb-datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px 20px; }
.cmb-dato { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cmb-dato-lbl { font-size: 10.5px; font-weight: 700; color: #9aa0bc; text-transform: uppercase; letter-spacing: .04em; }
.cmb-dato-val { font-size: 13.5px; color: #1a2340; font-weight: 500; }
.cmb-dato-sub { font-size: 11.5px; color: #7a829e; }

/* ── Caja de cálculo ──
   Una cifra que no se puede reconstruir no se cree. Aquí va la cuenta entera. */
.cmb-calculo { background: #fbfcff; }
.cmb-formula { font-family: Consolas, monospace; font-size: 12.5px; color: #3a4060; background: #f4f6fc; border: 1px solid #e8eaf4; border-radius: 8px; padding: 10px 12px; margin: 8px 0; line-height: 1.9; overflow-x: auto; }
.cmb-formula span { background: #fff; border: 1px solid #e0e3f0; border-radius: 5px; padding: 2px 6px; white-space: nowrap; }
.cmb-formula b { color: #a86209; font-size: 13.5px; }

/* ── Indicios ── */
.cmb-indicios { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.cmb-indicio { display: flex; gap: 11px; padding: 11px 13px; border: 1px solid #e8eaf4; border-left: 3px solid var(--c); border-radius: 9px; background: #fff; }
.cmb-indicio > i { color: var(--c); font-size: 17px; flex-shrink: 0; margin-top: 1px; }
.cmb-ind-alta { background: #fef6f6; border-color: #f5b8b4; }
.cmb-ind-media { background: #fffdf5; border-color: #f2e3bd; }
.cmb-ind-tit { font-size: 13px; font-weight: 700; color: #1a2340; }
.cmb-ind-det { font-size: 12px; color: #5a6077; margin-top: 3px; line-height: 1.55; }

/* ── Listas de avisos ── */
.cmb-lista-avisos { list-style: none; display: flex; flex-direction: column; }
.cmb-lista-avisos li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #f1f3f9; }
.cmb-lista-avisos li:last-child { border-bottom: none; }
.cmb-lista-avisos a { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.cmb-lista-avisos a:hover .cmb-fuerte { color: #c97810; }
.cmb-li-rojo .cmb-fuerte { color: #c0392b; }
.cmb-aviso-fecha { font-size: 11.5px; color: #7a829e; text-align: right; white-space: nowrap; flex-shrink: 0; }

/* ── Tablas ── */
.cmb-tabla-wrap { overflow-x: auto; }
.cmb-tabla { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.cmb-tabla thead th { background: #1a2340; color: #fff; font-weight: 600; font-size: 11.5px; text-align: left; padding: 10px 12px; white-space: nowrap; }
.cmb-tabla tbody td { padding: 10px 12px; border-bottom: 1px solid #f1f3f9; color: #3a4060; vertical-align: middle; }
.cmb-tabla tbody tr:last-child td { border-bottom: none; }
.cmb-tabla tbody tr:hover { background: #fafbff; }
.cmb-tabla tfoot td { padding: 10px 12px; border-top: 2px solid #e8eaf4; background: #fafbff; font-size: 12.5px; color: #1a2340; }
.cmb-tabla .ta-r { text-align: right; }
.cmb-tabla-pie { padding: 10px 20px; font-size: 11.5px; color: #94a3b8; border-top: 1px solid #f1f3f9; }
.cmb-fila-alerta { background: #fff8f8 !important; }
.cmb-fila-alerta:hover { background: #fef1f1 !important; }
.cmb-fila-sel { background: #fff8ef !important; }
.cmb-fila-baja { opacity: .55; }

/* Paradas del itinerario que no son sucursales (clientes, bodegas, pueblos). */
.cmb-extras { margin-top: 10px; padding: 10px 12px; background: #fff; border: 1px solid #e8eaf4; border-radius: 8px; }
.cmb-extras textarea { resize: vertical; min-height: 62px; font-family: inherit; }
.cmb-extras .cmb-help { margin: 6px 0 0; }

/* Gira predeterminada: elegir una ruta ya definida llena el itinerario. */
.cmb-preset { padding: 10px 12px; margin-bottom: 10px; background: #fff; border: 1px solid #e8eaf4; border-radius: 8px; }
.cmb-preset-fila { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cmb-preset-fila .cmb-select { flex: 1 1 260px; min-width: 0; }
.cmb-preset .cmb-help { margin: 6px 0 0; }

/* Filas que se abren enteras (ver js/app.js): todo el renglón es el enlace. */
tr[data-href] { cursor: pointer; }
tr[data-href]:hover { background: #f4f7ff; }
tr[data-href]:focus-visible { outline: 2px solid #c97810; outline-offset: -2px; }

/* ── Texto ── */
.cmb-fuerte { font-weight: 600; color: #1a2340; }
.cmb-mini { font-size: 11px; color: #9aa0bc; display: block; }
.cmb-mono { font-family: Consolas, monospace; font-size: 11.5px; }
.cmb-dinero { font-family: Consolas, monospace; }
.cmb-rojo { color: #c0392b; }
.cmb-verde { color: #157a52; }
.cmb-ambar { color: #a86209; }
.cmb-num { color: #c97810; font-weight: 600; text-decoration: none; }
.cmb-num:hover { text-decoration: underline; }
.cmb-link { color: #c97810; text-decoration: none; font-weight: 600; }
.cmb-link:hover { text-decoration: underline; }
.cmb-req { color: #e05050; }
.cmb-nota { font-size: 12.5px; color: #5a6077; line-height: 1.6; margin-bottom: 10px; }
.cmb-help { font-size: 11.5px; color: #7a829e; line-height: 1.6; margin: 6px 0; }
.cmb-help-warn { color: #a86209; background: #fffdf5; border: 1px solid #f2e3bd; border-radius: 8px; padding: 9px 11px; }

/* ── Badges ── */
.cmb-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 20px; font-size: 10.5px; font-weight: 700; background: #eef0f7; color: #6a7090; white-space: nowrap; }
.cmb-badge-ok   { background: #e6f7ee; color: #157a52; }
.cmb-badge-warn { background: #fdf3e0; color: #a86209; }
.cmb-badge-err  { background: #fdecea; color: #c0392b; }
.cmb-badge-off  { background: #f1f3f9; color: #9aa0bc; }

/* ── Estados vacíos ── */
.cmb-empty { background: #fff; border: 1px solid #e8eaf4; border-radius: 12px; padding: 44px 24px; text-align: center; color: #7a829e; font-size: 13.5px; }
.cmb-empty i { font-size: 34px; color: #cfd5e6; display: block; margin-bottom: 10px; }
.cmb-empty-lg { padding: 56px 28px; }
.cmb-empty-lg h3 { font-size: 17px; color: #1a2340; margin-bottom: 8px; }
.cmb-empty-lg p { max-width: 620px; margin: 0 auto 14px; line-height: 1.65; }
.cmb-vacio-mini { font-size: 12.5px; color: #9aa0bc; padding: 14px 0; text-align: center; line-height: 1.6; }

/* ── Filtros ── */
.cmb-filtros { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; background: #fff; border: 1px solid #e8eaf4; border-radius: 12px; padding: 14px 16px; }
.cmb-filtro { display: flex; flex-direction: column; gap: 4px; }
.cmb-filtro-ancho { flex: 1; min-width: 160px; }
.cmb-filtro-btn { flex-direction: row; align-items: center; gap: 8px; }

/* ── Formularios ── */
.cmb-lbl { font-size: 11.5px; font-weight: 600; color: #5a6077; display: block; margin-bottom: 4px; }
.cmb-input, .cmb-select { padding: 8px 11px; border: 1.5px solid #e0e3f0; border-radius: 8px; font-size: 13px; font-family: inherit; color: #1a2340; background: #fff; min-width: 130px; }
.cmb-input:focus, .cmb-select:focus { outline: none; border-color: #c97810; }
.cmb-input-ro { background: #f4f6fc; color: #5a6077; }
.cmb-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.cmb-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.cmb-check { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: #3a4060; cursor: pointer; }
.cmb-check input { margin-top: 2px; flex-shrink: 0; }
.cmb-check-destacado { background: #fff8ef; border: 1px solid #f5d9ac; border-radius: 9px; padding: 11px 13px; margin-bottom: 12px; }
.cmb-bloque-clave { background: #fbfcff; border: 1px solid #dbe4f5; border-radius: 10px; padding: 13px 14px 4px; margin-bottom: 12px; }
.cmb-bloque-clave-tit { font-size: 12px; font-weight: 700; color: #2b5d9e; display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }

/* ── Aviso en vivo del formulario ──
   Sale mientras se teclea, que es cuando la persona todavía tiene el dato delante. */
.cmb-aviso-vivo { font-size: 12px; line-height: 1.55; border-radius: 8px; padding: 10px 12px; display: flex; gap: 8px; align-items: flex-start; }
.cmb-aviso-vivo i { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.cmb-aviso-ok    { background: #e6f7ee; color: #276b45; border: 1px solid #b7dfca; }
.cmb-aviso-warn  { background: #fdf3e0; color: #8a5209; border: 1px solid #f2e3bd; }
.cmb-aviso-error { background: #fdecea; color: #922020; border: 1px solid #f5b8b4; }

/* ── Barras del reporte ── */
.cmb-barras { display: flex; flex-direction: column; gap: 8px; }
.cmb-barra-row { display: grid; grid-template-columns: 130px 1fr 110px 90px; align-items: center; gap: 10px; font-size: 12px; }
.cmb-barra-lbl { color: #5a6077; font-weight: 600; }
.cmb-barra-track { background: #f1f3f9; border-radius: 5px; height: 16px; overflow: hidden; }
.cmb-barra-fill { background: linear-gradient(90deg, #e0a54a, #c97810); height: 100%; border-radius: 5px; }
.cmb-barra-val { text-align: right; font-family: Consolas, monospace; color: #1a2340; font-weight: 600; }
.cmb-barra-sub { text-align: right; font-size: 11px; color: #9aa0bc; }

/* ── Bitácora ── */
.cmb-bitacora { list-style: none; display: flex; flex-direction: column; }
.cmb-bitacora li { display: grid; grid-template-columns: 130px 160px 1fr 120px; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f1f3f9; font-size: 12px; align-items: baseline; }
.cmb-bitacora li:last-child { border-bottom: none; }
.cmb-bit-fecha { color: #9aa0bc; font-size: 11.5px; }
.cmb-bit-accion { font-weight: 600; color: #1a2340; }
.cmb-bit-det { color: #5a6077; }

/* ── Zona de riesgo ── */
.cmb-zona-riesgo { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #fffbfb; border: 1px solid #f5d5d2; border-radius: 12px; padding: 16px 20px; flex-wrap: wrap; }
.cmb-zona-riesgo b { font-size: 13.5px; color: #1a2340; }
.cmb-zona-riesgo .cmb-help { max-width: 620px; }

/* ── Modales ── */
.cmb-modal-overlay { position: fixed; inset: 0; background: rgba(15,20,40,.55); display: none; align-items: center; justify-content: center; z-index: 300; padding: 16px; }
.cmb-modal-overlay.open { display: flex; }
.cmb-modal { background: #fff; border-radius: 14px; width: 100%; max-width: 700px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; }
.cmb-modal-sm { max-width: 460px; }
.cmb-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; border-bottom: 1px solid #eef0f7; font-size: 15px; font-weight: 700; color: #1a2340; }
.cmb-modal-head i { color: #c97810; margin-right: 6px; }
.cmb-modal-x { background: none; border: none; font-size: 22px; color: #9aa0bc; cursor: pointer; line-height: 1; }
.cmb-modal-body { padding: 18px 20px; overflow-y: auto; }
.cmb-modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 20px; border-top: 1px solid #eef0f7; background: #fafbff; }

/* ── Responsive ──
   Norma del proyecto: todo tiene que caber en cualquier pantalla. Las tablas anchas
   scrollean dentro de su contenedor y nunca hacen scrollear la página entera. */
@media (max-width: 1100px) {
  .cmb-cols { grid-template-columns: 1fr; }
  .cmb-bitacora li { grid-template-columns: 120px 1fr; }
  .cmb-bit-det, .cmb-bitacora li > .cmb-mini { grid-column: 1 / -1; }
  .cmb-barra-row { grid-template-columns: 110px 1fr 100px; }
  .cmb-barra-sub { display: none; }
}
@media (max-width: 720px) {
  .cmb-head { flex-direction: column; align-items: stretch; }
  .cmb-title { font-size: 17px; }
  .cmb-head-acciones > * { flex: 1; justify-content: center; }
  .cmb-grid2, .cmb-grid3 { grid-template-columns: 1fr; }
  .cmb-filtros { flex-direction: column; align-items: stretch; }
  .cmb-filtros .cmb-input, .cmb-filtros .cmb-select { min-width: 0; width: 100%; }
  .cmb-veredicto { flex-direction: column; align-items: flex-start; gap: 10px; }
  .cmb-ver-cifra { text-align: left; padding-left: 0; border-left: none; border-top: 1px solid #eef0f7; padding-top: 10px; width: 100%; }
  .cmb-modal { max-height: 96vh; border-radius: 12px; }
  .cmb-tabla { font-size: 12px; }
  .cmb-tabla th, .cmb-tabla td { padding: 8px 9px; }
  .cmb-zona-riesgo { flex-direction: column; align-items: stretch; }
  .cmb-zona-riesgo button { width: 100%; justify-content: center; }
}
@media (max-width: 480px) {
  .cmb-tiles, .cmb-tiles-4 { grid-template-columns: 1fr 1fr; }
  .cmb-tile { padding: 11px 12px; gap: 9px; }
  .cmb-tile-num { font-size: 17px; }
  .cmb-tile-money { font-size: 13px; }
  .cmb-datos { grid-template-columns: 1fr 1fr; }
  .cmb-barra-row { grid-template-columns: 90px 1fr 90px; }
}

/* ── Selector de tiendas a visitar (pages/cmb_picker.php) ──
   53 sucursales no caben en un desplegable usable: se buscan y se marcan. */
.cmb-picker { display: flex; flex-direction: column; gap: 8px; }
.cmb-picker-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cmb-picker-buscar { flex: 1; min-width: 150px; }
.cmb-picker-cuenta { font-size: 11.5px; color: #9aa0bc; font-weight: 600; white-space: nowrap; }
.cmb-picker-cuenta.activo { color: #a86209; }

.cmb-picker-sel { min-height: 30px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  background: #fff; border: 1px dashed #e0e3f0; border-radius: 8px; padding: 7px 9px; }
.cmb-ruta-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 3px;
  background: #fff8ef; border: 1px solid #f5d9ac; border-radius: 20px; font-size: 11.5px;
  font-weight: 700; color: #a86209; font-family: inherit; cursor: pointer; }
.cmb-ruta-chip:hover { background: #fdecea; border-color: #f5b8b4; color: #c0392b; }
.cmb-ruta-chip i { font-size: 12px; opacity: .55; }
.cmb-ruta-n { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px;
  border-radius: 50%; background: #c97810; color: #fff; font-size: 9.5px; }
.cmb-ruta-flecha { color: #cfd5e6; font-size: 11px; }

.cmb-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 6px;
  max-height: 208px; overflow-y: auto; padding: 4px; background: #f7f9fd;
  border: 1px solid #e8eaf4; border-radius: 9px; }
.cmb-chip { position: relative; display: flex; align-items: baseline; gap: 5px; padding: 7px 9px;
  background: #fff; border: 1.5px solid #e8eaf4; border-radius: 8px; cursor: pointer;
  font-family: inherit; font-size: 12px; color: #3a4060; text-align: left; transition: all .12s; }
.cmb-chip:hover { border-color: #c97810; background: #fff8ef; }
.cmb-chip b { color: #1a2340; font-size: 11.5px; }
.cmb-chip span { color: #7a829e; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmb-chip.activo { border-color: #c97810; background: #fff8ef; }
.cmb-chip.activo b { color: #a86209; }
/* El número de orden sobre el chip deja ver la ruta sin mirar la lista de arriba */
.cmb-chip.activo::after { content: attr(data-orden); position: absolute; top: -6px; right: -6px;
  width: 18px; height: 18px; border-radius: 50%; background: #c97810; color: #fff;
  font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* ── Itinerario de la gira ── */
.cmb-progress { background: #f1f3f9; border-radius: 5px; height: 7px; overflow: hidden; margin: 4px 0 12px; }
.cmb-progress-fill { background: linear-gradient(90deg, #4caf7d, #157a52); height: 100%; border-radius: 5px; transition: width .3s; }

.cmb-itinerario { list-style: none; display: flex; flex-direction: column; }
.cmb-parada { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f1f3f9; }
.cmb-parada:last-child { border-bottom: none; }
.cmb-parada-n { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px;
  border-radius: 50%; background: #f1f3f9; color: #7a829e; font-size: 10.5px; font-weight: 700; flex-shrink: 0; }
.cmb-parada > i { font-size: 17px; flex-shrink: 0; }
.cmb-parada-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cmb-parada-acc { display: flex; gap: 5px; align-items: center; flex-shrink: 0; }
.cmb-parada-visitada .cmb-parada-n { background: #e6f7ee; color: #157a52; }
.cmb-parada-omitida { opacity: .6; }
.cmb-parada-omitida .cmb-fuerte { text-decoration: line-through; }
.cmb-ruta-mini i { font-size: 11px; }

/* ── Subida de facturas ── */
.cmb-oculto { display: none; }
.cmb-subida { display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  border: 2px dashed #dbe4f5; border-radius: 11px; padding: 16px 18px; background: #fbfcff;
  transition: border-color .15s, background .15s; }
.cmb-subida.activa { border-color: #c97810; background: #fff8ef; }
.cmb-subida > i { font-size: 30px; color: #b6bccd; flex-shrink: 0; }
.cmb-subida-txt { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 3px; }
.cmb-subida-txt b { font-size: 13px; color: #1a2340; }
.cmb-subida-campos { display: flex; gap: 8px; flex-wrap: wrap; }
.cmb-subida-campos .cmb-input, .cmb-subida-campos .cmb-select { min-width: 120px; }

/* ── Galería de documentos ── */
.cmb-galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; margin-top: 14px; }
.cmb-doc { position: relative; border: 1px solid #e8eaf4; border-radius: 10px; overflow: hidden; background: #fff; }
.cmb-doc-vista { display: block; height: 122px; background: #f4f6fc; overflow: hidden; }
.cmb-doc-vista img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.cmb-doc-vista:hover img { transform: scale(1.05); }
.cmb-doc-pdf { display: flex; align-items: center; justify-content: center; height: 100%; color: #c0392b; font-size: 38px; }
.cmb-doc-pie { padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; }
.cmb-doc-pie .cmb-mini { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmb-doc-monto { font-family: Consolas, monospace; font-size: 12px; font-weight: 700; color: #157a52; }
/* Las acciones aparecen al pasar el cursor para no tapar la miniatura */
.cmb-doc-acc { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.cmb-doc:hover .cmb-doc-acc, .cmb-doc:focus-within .cmb-doc-acc { opacity: 1; }
.cmb-doc-acc .cmb-btn-ico { background: rgba(255,255,255,.94); box-shadow: 0 1px 4px rgba(26,35,64,.18); }

@media (max-width: 720px) {
  .cmb-picker-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); max-height: 178px; }
  .cmb-parada { flex-wrap: wrap; }
  .cmb-parada-acc { width: 100%; justify-content: flex-end; }
  .cmb-subida { flex-direction: column; align-items: stretch; text-align: center; }
  .cmb-subida-campos > * { flex: 1; }
  .cmb-galeria { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  /* En móvil no hay hover: las acciones se quedan visibles */
  .cmb-doc-acc { opacity: 1; }
}

/* Subtítulo dentro de una tarjeta (comparativas por camión en Rutas) */
.cmb-sub-titulo { font-size: 12px; font-weight: 700; color: #5a6077; margin: 14px 0 6px;
  padding-left: 8px; border-left: 3px solid #c97810; }


/* ============================================================
   FALTANTES DE INVENTARIO — cobro a empleados (pages/flt_*.php)
   Prefijo propio (flt-). Color base: rojo de alerta/cobranza.
   ============================================================ */
.flt-wrap { display: flex; flex-direction: column; gap: 16px; }

.flt-noaccess { background: #fff; border: 1px solid #e8eaf4; border-radius: 12px; padding: 40px 24px; text-align: center; color: #7a829e; font-size: 14px; }
.flt-noaccess i { font-size: 26px; display: block; margin-bottom: 8px; color: #b6bccd; }

/* ── Cabecera ── */
.flt-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.flt-title { font-size: 19px; font-weight: 700; color: #1a2340; display: flex; align-items: center; gap: 8px; }
.flt-title i { color: #2563eb; }
.flt-sub { font-size: 12.5px; color: #7a829e; margin-top: 3px; }

/* ── Botones ── */
.btn-flt-primary { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; background: #2563eb; color: #fff; border: none; border-radius: 9px; font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; text-decoration: none; transition: filter .15s; }
.btn-flt-primary:hover { filter: brightness(.92); }
.btn-flt-sec { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; background: #fff; color: #3a4060; border: 1.5px solid #e0e3f0; border-radius: 9px; font-size: 13px; font-weight: 500; font-family: inherit; cursor: pointer; text-decoration: none; transition: border-color .15s, background .15s; }
.btn-flt-sec:hover { border-color: #2563eb; background: #eef1fd; color: #2563eb; }
.btn-flt-mini { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; background: #eef1fd; color: #2563eb; border: 1px solid #c7d0f7; border-radius: 7px; font-size: 11.5px; font-weight: 600; font-family: inherit; cursor: pointer; }
.btn-flt-mini:hover { background: #dde3fa; }

.flt-btn-ico { background: #fff; border: 1px solid #e8eaf4; border-radius: 7px; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: #5a6077; font-size: 14px; text-decoration: none; transition: all .12s; }
.flt-btn-ico:hover { border-color: #2563eb; color: #2563eb; background: #eef1fd; }
.flt-btn-del:hover { border-color: #f5b8b4; color: #c0392b; background: #fdecea; }
.flt-acciones { white-space: nowrap; display: flex; gap: 5px; justify-content: flex-end; }

/* ── Tiles ── */
.flt-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.flt-tile { background: #fff; border: 1px solid #e8eaf4; border-left: 3px solid var(--c, #2563eb); border-radius: 11px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
a.flt-tile:hover { box-shadow: 0 4px 16px rgba(26,35,64,.09); transform: translateY(-1px); }
.flt-tile.active { background: #eef1fd; border-color: var(--c); }
.flt-tile > i { font-size: 22px; color: var(--c, #2563eb); flex-shrink: 0; }
.flt-tile-num { font-size: 21px; font-weight: 700; color: #1a2340; line-height: 1.15; }
.flt-tile-money { font-size: 16px; font-family: 'Consolas', monospace; color: #157a52; }
.flt-tile-lbl { font-size: 11.5px; color: #7a829e; margin-top: 2px; }
.flt-tile-lg { padding: 16px 18px; }
.flt-tiles-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* ── Filtros ── */
.flt-filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.flt-input, .flt-select { padding: 8px 11px; border: 1.5px solid #e0e3f0; border-radius: 8px; font-size: 13px; font-family: inherit; color: #1a2340; background: #fff; outline: none; transition: border-color .15s; }
.flt-input:focus, .flt-select:focus { border-color: #2563eb; }
.flt-select { cursor: pointer; }
.flt-filtros .flt-input { min-width: 220px; flex: 1; }
.flt-limpiar { font-size: 12px; color: #7a829e; text-decoration: none; }
.flt-limpiar:hover { color: #e05050; }

/* ── Tarjetas ── */
.flt-card { background: #fff; border: 1px solid #e8eaf4; border-radius: 12px; overflow: hidden; }
.flt-card-pad { padding: 18px 20px; }
.flt-pb0 { padding-bottom: 0; }
.flt-mt { margin-top: 18px; }
.flt-card-titulo { font-size: 13.5px; font-weight: 700; color: #1a2340; display: flex; align-items: center; gap: 7px; margin-bottom: 12px; }
.flt-card-titulo i { color: #2563eb; font-size: 15px; }
.flt-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }

/* ── Tablas ── */
.flt-tabla-wrap { overflow-x: auto; }
.flt-tabla { width: 100%; border-collapse: collapse; font-size: 13px; }
.flt-tabla th { background: #f8f9fd; color: #5a6077; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; text-align: left; border-bottom: 2px solid #dde1ee; white-space: nowrap; }
.flt-tabla td { padding: 10px 12px; border-bottom: 1px solid #f1f3f9; color: #1a2340; vertical-align: middle; }
.flt-tabla tr:last-child td { border-bottom: none; }
.flt-tabla tbody tr:hover td { background: #fdf7f8; }
.flt-tabla .ta-r, .flt-tabla th.ta-r { text-align: right; }
.flt-tabla-pie { padding: 10px 16px; font-size: 12px; color: #7a829e; border-top: 1px solid #f1f3f9; background: #fcfcfe; }

.flt-num { font-family: 'Consolas', monospace; font-size: 12px; font-weight: 700; color: #2563eb; text-decoration: none; background: #eef1fd; padding: 2px 7px; border-radius: 5px; }
.flt-num:hover { background: #dde3fa; }
.flt-fuerte { font-weight: 600; color: #1a2340; }
.flt-mini { font-size: 11px; color: #94a3b8; }
.flt-mini2 { font-size: 12px; color: #5a6077; }
.flt-gris { color: #94a3b8; }
.flt-rojo { color: #e05050; }
.flt-verde { color: #157a52; }
.flt-dinero { font-family: 'Consolas', monospace; font-weight: 700; color: #157a52; white-space: nowrap; }
.flt-oculto { color: #c3c9d8; }
.flt-link { color: #2563eb; text-decoration: none; font-weight: 500; }
.flt-link:hover { text-decoration: underline; }

.flt-badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 10.5px; font-weight: 700; white-space: nowrap; }

/* ── Estados vacíos ── */
.flt-empty { background: #fff; border: 1px dashed #d8dcea; border-radius: 12px; padding: 44px 24px; text-align: center; color: #7a829e; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.flt-empty i { font-size: 32px; color: #c3c9d8; }
.flt-vacio-mini { font-size: 12.5px; color: #94a3b8; padding: 6px 0; }
.flt-help { font-size: 11.5px; color: #94a3b8; line-height: 1.5; margin-top: 3px; }

/* ── Avisos ── */
.flt-nota { display: flex; gap: 9px; align-items: center; background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 10px; padding: 10px 14px; font-size: 12.5px; color: #155a70; line-height: 1.5; }
.flt-nota i { font-size: 16px; flex-shrink: 0; }

/* ── Ficha de registro ── */
.flt-ficha-head { background: #fff; border: 1px solid #e8eaf4; border-left: 4px solid var(--c, #2563eb); border-radius: 12px; padding: 18px 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.flt-ficha-id { min-width: 0; flex: 1; }
.flt-ficha-suc { font-size: 17px; font-weight: 700; color: #1a2340; word-break: break-word; }
.flt-ficha-dir { font-size: 12.5px; color: #7a829e; margin-top: 2px; }
.flt-ficha-badges { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.flt-ficha-acciones { display: flex; gap: 8px; flex-wrap: wrap; }

.flt-datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 11px 18px; }
.flt-datos > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.flt-datos span { font-size: 10.5px; color: #94a3b8; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.flt-datos b { font-size: 13px; color: #1a2340; font-weight: 600; word-break: break-word; }
.flt-notas-box { margin-top: 14px; background: #f8f9fd; border-radius: 9px; padding: 11px 13px; font-size: 12.5px; color: #3a4060; line-height: 1.55; }

.flt-timeline { list-style: none; display: flex; flex-direction: column; }
.flt-timeline li { display: grid; grid-template-columns: 118px 150px 1fr 120px; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f1f3f9; font-size: 12.5px; align-items: baseline; }
.flt-timeline li:last-child { border-bottom: none; }
.flt-tl-fecha { color: #94a3b8; font-size: 11.5px; font-family: 'Consolas', monospace; }
.flt-tl-accion { font-weight: 600; color: #2563eb; }
.flt-tl-detalle { color: #3a4060; word-break: break-word; }
.flt-tl-user { color: #94a3b8; font-size: 11.5px; text-align: right; }

/* ── Barras y progreso ── */
.flt-progress { background: #f1f3f9; border-radius: 99px; height: 9px; overflow: hidden; }
.flt-progress-fill { height: 100%; background: linear-gradient(90deg, #2563eb, #4caf7d); border-radius: 99px; transition: width .4s; }
.flt-progress-pie { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; color: #7a829e; margin-top: 7px; flex-wrap: wrap; }
.flt-bar { background: #f1f3f9; border-radius: 99px; height: 7px; overflow: hidden; min-width: 60px; }
.flt-bar-fill { height: 100%; background: #94a3b8; border-radius: 99px; min-width: 2px; }

/* ── Resumen en texto plano (igual que MotoCabra: Empleados/Saldo/Otros/Abonado en fila) ── */
.flt-statbar { display: flex; flex-wrap: wrap; gap: 26px; background: #fff; border: 1px solid #e8eaf4; border-radius: 10px; padding: 14px 20px; }
.flt-statbar > div { display: flex; flex-direction: column; gap: 2px; }
.flt-statbar span { font-size: 16px; font-weight: 700; color: #1a2340; font-family: 'Consolas', monospace; }
.flt-statbar label { font-size: 10.5px; color: #94a3b8; text-transform: uppercase; letter-spacing: .03em; }

/* ── Encabezado plano de cada sucursal en la tabla agrupada ── */
.flt-suc-header { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #eef0f7; background: #fafbfd; flex-wrap: wrap; }
.flt-suc-total { margin-left: auto; font-family: 'Consolas', monospace; font-weight: 700; color: #1a2340; font-size: 13.5px; }

/* ── Ficha estilo Excel: calca el formato de la plantilla original ── */
.flt-hoja { background: #fff; border: 1px solid #b7b7b7; }
.flt-hoja + .flt-hoja { margin-top: 14px; }
.flt-hoja-tabla { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.flt-hoja-tabla td { border: 1px solid #c7c7c7; padding: 6px 10px; color: #1a2340; }
.flt-hoja-tabla th { border: 1px solid #c7c7c7; padding: 6px 10px; background: #f0f0f0; font-weight: 700; color: #333; text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .02em; }
.flt-hoja-label { background: #f0f0f0; font-weight: 700; color: #333; white-space: nowrap; width: 1%; }
.flt-hoja-money { font-family: 'Consolas', monospace; text-align: right; white-space: nowrap; }
.flt-hoja-titulo td { background: #dbe5f1; font-weight: 700; padding: 7px 10px; text-transform: uppercase; font-size: 11px; letter-spacing: .03em; color: #1a2340; }
.flt-hoja-saldo-inicial td { background: #f5f6f8; font-weight: 700; }
.flt-hoja-acciones { width: 1%; white-space: nowrap; text-align: center; }
.flt-hoja-add { display: flex; gap: 6px; padding: 8px 10px; background: #fafbfc; border-top: 1px solid #c7c7c7; flex-wrap: wrap; align-items: center; }
.flt-hoja-add .flt-input { padding: 5px 8px; font-size: 12px; }

/* ── Mosaico de calor (panel): tamaño = cuánto debe, color = qué tan al día ── */
.flt-mosaico { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 62px; gap: 7px; }
.flt-mosaico-celda { border-radius: 9px; padding: 10px 13px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; text-decoration: none; overflow: hidden; transition: transform .15s, box-shadow .15s; position: relative; }
.flt-mosaico-celda:hover { transform: scale(1.015); box-shadow: 0 8px 22px rgba(0,0,0,.22); z-index: 2; }
.flt-mosaico-celda.tam-xl { grid-column: span 4; grid-row: span 3; }
.flt-mosaico-celda.tam-lg { grid-column: span 3; grid-row: span 2; }
.flt-mosaico-celda.tam-md { grid-column: span 2; grid-row: span 2; }
.flt-mosaico-celda.tam-sm { grid-column: span 2; grid-row: span 1; }
.flt-mosaico-nombre { font-size: 11.5px; font-weight: 700; opacity: .95; line-height: 1.25; text-shadow: 0 1px 2px rgba(0,0,0,.15); }
.flt-mosaico-monto { font-family: 'Consolas', monospace; font-weight: 800; text-shadow: 0 1px 2px rgba(0,0,0,.15); }
.tam-xl .flt-mosaico-monto { font-size: 25px; }
.tam-lg .flt-mosaico-monto { font-size: 18px; }
.tam-md .flt-mosaico-monto { font-size: 14.5px; }
.tam-sm .flt-mosaico-monto { font-size: 12px; }
.tam-sm .flt-mosaico-nombre { font-size: 10.5px; }
.flt-mosaico-pct { font-size: 10px; opacity: .88; font-weight: 600; }
.flt-mosaico-leyenda { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #7a829e; margin-top: 10px; }
.flt-mosaico-leyenda-barra { height: 8px; width: 140px; border-radius: 99px; background: linear-gradient(90deg, hsl(3,68%,50%), hsl(46,75%,50%), hsl(140,55%,40%)); }
@media (max-width: 900px) {
  .flt-mosaico { grid-template-columns: repeat(6, 1fr); }
  .flt-mosaico-celda.tam-xl { grid-column: span 6; grid-row: span 2; }
  .flt-mosaico-celda.tam-lg { grid-column: span 3; }
  .flt-mosaico-celda.tam-md { grid-column: span 3; }
  .flt-mosaico-celda.tam-sm { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 480px) {
  .flt-mosaico { grid-template-columns: repeat(2, 1fr); }
  .flt-mosaico-celda.tam-xl, .flt-mosaico-celda.tam-lg, .flt-mosaico-celda.tam-md, .flt-mosaico-celda.tam-sm { grid-column: span 1; grid-row: span 1; min-height: 62px; }
}

/* ── Cuadrícula de sucursales (paso 1 del módulo): un cuadro por tienda ── */
.flt-suc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.flt-suc-cuadro { background: #fff; border: 1px solid #e8eaf4; border-radius: 11px; padding: 15px 17px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 8px; transition: box-shadow .15s, transform .15s, border-color .15s; }
.flt-suc-cuadro:hover { box-shadow: 0 4px 16px rgba(26,35,64,.09); transform: translateY(-1px); border-color: #c7d0f7; }
.flt-suc-cuadro-nombre { font-size: 13px; font-weight: 700; color: #1a2340; line-height: 1.3; }
.flt-suc-cuadro-saldo { font-family: 'Consolas', monospace; font-size: 16.5px; font-weight: 800; color: #1a2340; }
.flt-suc-cuadro-meta { font-size: 11px; color: #94a3b8; }

/* ── Cuadros por sucursal (panel): un bloque cerrado por sucursal, se abre al
   hacer clic — el nombre de la tienda primero, el detalle solo si se pide. ── */
.flt-cuadros { display: flex; flex-direction: column; gap: 10px; }
.flt-cuadro { background: #fff; border: 1px solid #e8eaf4; border-radius: 12px; overflow: hidden; }
.flt-cuadro summary { list-style: none; cursor: pointer; user-select: none; }
.flt-cuadro summary::-webkit-details-marker { display: none; }
.flt-cuadro summary:hover { background: #f4f6fb; }
.flt-cuadro .flt-suc-header { border-bottom: none; }
.flt-cuadro[open] .flt-suc-header { border-bottom: 1px solid #eef0f7; }
.flt-cuadro .flt-suc-chevron { font-size: 13px; color: #94a3b8; transition: transform .15s; flex-shrink: 0; }
.flt-cuadro[open] .flt-suc-chevron { transform: rotate(90deg); }

/* ── Sucursales agrupadas (listado) ── */
.flt-suc-group { background: #fff; border: 1px solid #e8eaf4; border-radius: 12px; overflow: hidden; }
.flt-suc-group + .flt-suc-group { margin-top: 10px; }
.flt-suc-group summary { list-style: none; cursor: pointer; padding: 13px 16px; display: flex; align-items: center; gap: 14px; user-select: none; }
.flt-suc-group summary::-webkit-details-marker { display: none; }
.flt-suc-group summary:hover { background: #fbfbfd; }
.flt-suc-chevron { font-size: 13px; color: #94a3b8; transition: transform .15s; flex-shrink: 0; }
.flt-suc-group[open] .flt-suc-chevron { transform: rotate(90deg); }
.flt-suc-nombre { font-size: 13.5px; font-weight: 700; color: #1a2340; }
.flt-suc-meta { font-size: 11.5px; color: #94a3b8; margin-top: 1px; }
.flt-suc-right { margin-left: auto; display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.flt-suc-bar { width: 120px; }
.flt-suc-saldo { font-family: 'Consolas', monospace; font-weight: 700; color: #157a52; font-size: 13.5px; white-space: nowrap; min-width: 100px; text-align: right; }
.flt-suc-body { border-top: 1px solid #f1f3f9; }
.flt-suc-todo-cancelado summary { opacity: .7; }

/* ── Tile "hero" con ícono en chip + tiles secundarias, panel ── */
.flt-tile-icon { width: 42px; height: 42px; border-radius: 12px; background: color-mix(in srgb, var(--c, #2563eb) 14%, #fff); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.flt-tile-icon i { font-size: 19px; color: var(--c, #2563eb); }
.flt-tile-row { display: flex; align-items: center; gap: 13px; }
.flt-hero { background: #fff; border: 1px solid #e8eaf4; border-radius: 14px; padding: 20px 24px; display: flex; align-items: center; gap: 18px; text-decoration: none; color: inherit; box-shadow: 0 1px 3px rgba(26,35,64,.04); transition: box-shadow .15s, transform .15s; }
a.flt-hero:hover { box-shadow: 0 6px 20px rgba(26,35,64,.09); transform: translateY(-1px); }
.flt-hero .flt-tile-icon { width: 58px; height: 58px; border-radius: 15px; }
.flt-hero .flt-tile-icon i { font-size: 27px; }
.flt-hero-num { font-size: 30px; font-weight: 800; color: #1a2340; font-family: 'Consolas', monospace; line-height: 1.15; }
.flt-hero-lbl { font-size: 12.5px; color: #7a829e; margin-top: 4px; }
.flt-hero-extra { margin-left: auto; text-align: right; flex-shrink: 0; }
.flt-hero-extra b { display: block; font-size: 19px; color: #2563eb; font-family: 'Consolas', monospace; }
.flt-hero-extra span { font-size: 10.5px; color: #94a3b8; text-transform: uppercase; letter-spacing: .03em; }
.flt-secundarios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* ── Filtro rápido de sucursal en el panel ── */
.flt-panel-filtro { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.flt-panel-filtro .flt-select { min-width: 220px; }

/* ── Mini gráfico de barras: cobros por mes ── */
.flt-chart-meses { display: flex; align-items: flex-end; gap: 10px; height: 110px; padding: 10px 4px 0; }
.flt-chart-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; min-width: 0; }
.flt-chart-bar-val { font-size: 10px; color: #5a6077; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.flt-chart-bar-fill { width: 100%; max-width: 34px; background: linear-gradient(180deg, #5f7cec, #2563eb); border-radius: 6px 6px 3px 3px; min-height: 4px; transition: height .4s; }
.flt-chart-bar-fill.flt-chart-actual { background: linear-gradient(180deg, #4caf7d, #2f9e6f); }
.flt-chart-bar-lbl { font-size: 10.5px; color: #94a3b8; text-transform: capitalize; }

/* ── Avatar con iniciales (últimos pagos) ── */
.flt-avatar { width: 30px; height: 30px; border-radius: 50%; background: #e9edfc; color: #2563eb; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; flex-shrink: 0; }

/* ── Empleados sin abono reciente ── */
.flt-stagnant-item { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid #f1f3f9; }
.flt-stagnant-item:last-child { border-bottom: none; }
.flt-dias-badge { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; flex-shrink: 0; }

@media (max-width: 720px) {
  .flt-hero { flex-wrap: wrap; }
  .flt-hero-extra { margin-left: 0; text-align: left; width: 100%; padding-top: 8px; border-top: 1px dashed #eef0f7; }
  .flt-secundarios { grid-template-columns: 1fr 1fr; }
  .flt-chart-meses { height: 80px; }
}

/* ── Modales del módulo ── */
.flt-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(12,18,38,.45); z-index: 2200; align-items: center; justify-content: center; padding: 20px; }
.flt-modal-overlay.open { display: flex; }
.flt-modal { background: #fff; border-radius: 14px; width: 680px; max-width: 100%; max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 12px 48px rgba(0,0,0,.22); }
.flt-modal-sm { width: 460px; }
.flt-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; border-bottom: 1px solid #eef0f7; font-size: 14.5px; font-weight: 700; color: #1a2340; }
.flt-modal-head i { color: #2563eb; margin-right: 6px; }
.flt-modal-x { background: none; border: none; font-size: 22px; line-height: 1; color: #94a3b8; cursor: pointer; padding: 0 4px; }
.flt-modal-x:hover { color: #1a2340; }
.flt-modal-body { padding: 16px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.flt-modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 20px; border-top: 1px solid #eef0f7; background: #fcfcfe; border-radius: 0 0 14px 14px; }
.flt-lbl { display: block; font-size: 11px; font-weight: 700; color: #5a6077; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; }
.flt-req { color: #e05050; }
.flt-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.flt-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.w100 { width: 100%; }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .flt-cols { grid-template-columns: 1fr; }
  .flt-timeline li { grid-template-columns: 100px 1fr; }
  .flt-tl-detalle { grid-column: 1 / -1; }
  .flt-tl-user { grid-column: 1 / -1; text-align: left; }
}
@media (max-width: 720px) {
  .flt-head { flex-direction: column; align-items: stretch; }
  .flt-title { font-size: 17px; }
  .flt-grid2, .flt-grid3 { grid-template-columns: 1fr; }
  .flt-filtros .flt-input, .flt-filtros .flt-select { min-width: 0; width: 100%; }
  .flt-filtros { flex-direction: column; align-items: stretch; }
  .flt-ficha-head { flex-direction: column; }
  .flt-ficha-acciones { width: 100%; }
  .flt-ficha-acciones > * { flex: 1; justify-content: center; }
  .flt-modal { max-height: 96vh; border-radius: 12px; }
  .flt-tabla { font-size: 12px; }
  .flt-tabla th, .flt-tabla td { padding: 8px 9px; }
}
@media (max-width: 480px) {
  .flt-tiles { grid-template-columns: 1fr 1fr; }
  .flt-tile { padding: 11px 12px; gap: 9px; }
  .flt-tile-num { font-size: 18px; }
  .flt-tile-money { font-size: 13px; }
}

/* ============================================================
   FALTANTES — REDISEÑO OPERATIVO 2026
   Una sola identidad visual para panel, sucursales, ficha y reportes.
   ============================================================ */
.flt-wrap {
  --flt-navy: #12213f;
  --flt-blue: #315ee7;
  --flt-cyan: #37a9c4;
  --flt-green: #168566;
  --flt-amber: #c47a13;
  --flt-border: #e4e9f2;
  --flt-soft: #f5f7fb;
  gap: 20px;
  color: #17213a;
}

.flt-head {
  position: relative;
  overflow: hidden;
  align-items: center;
  padding: 24px 26px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 15%, rgba(55,169,196,.28), transparent 28%),
    linear-gradient(135deg, #101d38 0%, #182c53 65%, #163c57 100%);
  box-shadow: 0 12px 32px rgba(18,33,63,.14);
}
.flt-head::after {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  right: -72px;
  bottom: -115px;
  border: 24px solid rgba(255,255,255,.04);
  border-radius: 50%;
  pointer-events: none;
}
.flt-head > * { position: relative; z-index: 1; }
.flt-eyebrow {
  display: block;
  margin-bottom: 7px;
  color: #82d6e9;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.flt-title { color: #fff; font-size: 23px; letter-spacing: -.025em; }
.flt-title i { color: #72d0e5; font-size: 25px; }
.flt-sub { color: rgba(255,255,255,.64); font-size: 13px; margin-top: 6px; }
.flt-head .btn-flt-primary { background: #fff; color: var(--flt-navy); box-shadow: 0 7px 18px rgba(0,0,0,.14); }
.flt-head .btn-flt-primary:hover { background: #ecfaff; filter: none; }
.flt-head .btn-flt-sec { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.2); color: #fff; }
.flt-head .btn-flt-sec:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.38); }

.btn-flt-primary { background: var(--flt-blue); border-radius: 10px; padding: 10px 16px; box-shadow: 0 4px 12px rgba(49,94,231,.18); }
.btn-flt-primary:focus-visible, .btn-flt-sec:focus-visible, .flt-btn-ico:focus-visible,
.flt-input:focus-visible, .flt-select:focus-visible { outline: 3px solid rgba(55,169,196,.28); outline-offset: 2px; }
.btn-flt-sec { border-color: var(--flt-border); border-radius: 10px; }

.flt-statbar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  background: transparent;
  border: 0;
}
.flt-statbar > div {
  position: relative;
  min-height: 104px;
  justify-content: flex-end;
  padding: 16px 17px;
  background: #fff;
  border: 1px solid var(--flt-border);
  border-radius: 15px;
  box-shadow: 0 4px 16px rgba(18,33,63,.045);
}
.flt-statbar > div::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; border-radius: 15px 0 0 15px; background: #8b96aa; }
.flt-statbar > div.is-primary::before { background: var(--flt-blue); }
.flt-statbar > div.is-success::before { background: var(--flt-green); }
.flt-statbar > div.is-info::before { background: var(--flt-cyan); }
.flt-statbar > div.is-muted::before { background: #a5adba; }
.flt-statbar i { position: absolute; top: 15px; right: 15px; font-size: 22px; color: #a6afbf; }
.flt-statbar .is-primary i { color: var(--flt-blue); }
.flt-statbar .is-success i { color: var(--flt-green); }
.flt-statbar .is-info i { color: var(--flt-cyan); }
.flt-statbar span { color: var(--flt-navy); font-family: inherit; font-size: 18px; letter-spacing: -.025em; }
.flt-statbar label { color: #7a8599; font-size: 9.5px; font-weight: 700; line-height: 1.35; }

.flt-section-label { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin: 2px 2px -8px; }
.flt-section-label span { color: var(--flt-navy); font-size: 14px; font-weight: 750; }
.flt-section-label small { color: #8c96a8; font-size: 11px; }

.flt-card, .flt-hoja, .flt-suc-cuadro {
  border-color: var(--flt-border);
  border-radius: 15px;
  box-shadow: 0 4px 18px rgba(18,33,63,.045);
}
.flt-card-pad { padding: 21px 23px; }
.flt-card-titulo { font-size: 14px; color: var(--flt-navy); }
.flt-card-titulo i { color: var(--flt-blue); font-size: 17px; }

.flt-filtros {
  padding: 11px;
  background: #fff;
  border: 1px solid var(--flt-border);
  border-radius: 13px;
  box-shadow: 0 3px 12px rgba(18,33,63,.035);
}
.flt-input, .flt-select { min-height: 40px; border: 1px solid #dce3ee; border-radius: 9px; background: #fbfcfe; }
.flt-input:hover, .flt-select:hover { border-color: #bbc7da; }
.flt-input:focus, .flt-select:focus { border-color: var(--flt-blue); background: #fff; box-shadow: 0 0 0 3px rgba(49,94,231,.08); }

.flt-tabla th { padding: 12px 14px; background: #f6f8fc; border-bottom: 1px solid #dfe5ef; color: #677287; font-size: 9.5px; letter-spacing: .075em; }
.flt-tabla td { padding: 13px 14px; border-bottom-color: #edf1f6; }
.flt-tabla tbody tr:hover td { background: #f7faff; }
.flt-dinero { color: var(--flt-navy); font-family: inherit; font-variant-numeric: tabular-nums; }
.flt-dinero.is-pending {
  color: #b42318;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.flt-badge { padding: 5px 10px; font-size: 10px; letter-spacing: .025em; }
.flt-btn-ico { width: 31px; height: 31px; border-color: #e0e6ef; border-radius: 9px; }

.flt-suc-grid { grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); gap: 14px; }
.flt-suc-cuadro { position: relative; gap: 10px; padding: 18px 19px; overflow: hidden; }
.flt-suc-cuadro::after { content: '\ea4f'; font-family: tabler-icons; position: absolute; right: 15px; bottom: 10px; font-size: 42px; color: rgba(49,94,231,.06); }
.flt-suc-cuadro:hover { transform: translateY(-3px); border-color: #aebfe8; box-shadow: 0 10px 25px rgba(18,33,63,.09); }
.flt-suc-cuadro-nombre { color: var(--flt-navy); font-size: 13.5px; padding-right: 24px; }
.flt-suc-cuadro-saldo { color: var(--flt-blue); font-family: inherit; font-size: 19px; font-variant-numeric: tabular-nums; }
.flt-bar { height: 6px; background: #e9edf4; }
.flt-bar-fill { background: linear-gradient(90deg, var(--flt-blue), var(--flt-cyan)); }

.flt-mosaico { grid-auto-rows: 70px; gap: 10px; }
.flt-mosaico-celda { border: 1px solid rgba(255,255,255,.2); border-radius: 14px; padding: 14px 16px; box-shadow: inset 0 1px rgba(255,255,255,.14); }
.flt-mosaico-celda::after { content: ''; position: absolute; inset: 0; background: linear-gradient(145deg, rgba(15,29,57,.05), rgba(15,29,57,.25)); pointer-events: none; }
.flt-mosaico-celda > * { position: relative; z-index: 1; }
.flt-mosaico-celda:hover { transform: translateY(-3px) scale(1.005); box-shadow: 0 12px 28px rgba(18,33,63,.2); }
.flt-mosaico-nombre { font-size: 12px; letter-spacing: .01em; }
.flt-mosaico-monto { font-family: inherit; font-variant-numeric: tabular-nums; }

/* La ficha abandona la apariencia de Excel y usa tarjetas operativas. */
.flt-hoja { overflow: hidden; border: 1px solid var(--flt-border); }
.flt-hoja + .flt-hoja { margin-top: 0; }
.flt-hoja-tabla { font-size: 13px; }
.flt-hoja-tabla td { padding: 11px 14px; border: 0; border-bottom: 1px solid #edf1f6; }
.flt-hoja-tabla th { padding: 12px 14px; border: 0; border-bottom: 1px solid #dfe5ef; background: #f6f8fc; color: #667187; font-size: 9.5px; letter-spacing: .07em; }
.flt-hoja-tabla tr:last-child td { border-bottom: 0; }
.flt-hoja-label { width: 190px; background: #fafbfe; color: #717c90 !important; font-size: 10px; letter-spacing: .055em; text-transform: uppercase; }
.flt-hoja-money { color: var(--flt-navy); font-family: inherit; font-weight: 750; font-variant-numeric: tabular-nums; }
.flt-hoja-titulo td { padding: 13px 15px; background: #edf3ff; color: #294caa; font-size: 10px; border-bottom: 1px solid #d9e4fa; }
.flt-hoja-titulo i { margin-right: 6px; font-size: 15px; vertical-align: -2px; }
.flt-hoja-saldo-inicial td { background: #f8fafd; }
.flt-hoja-add { gap: 9px; padding: 12px 14px; background: #f8fafd; border-top: 1px solid #e2e8f1; }
.flt-hoja-add .flt-input { min-height: 36px; padding: 7px 9px; }

.flt-timeline { position: relative; padding-left: 15px; }
.flt-timeline::before { content: ''; position: absolute; left: 3px; top: 5px; bottom: 5px; width: 2px; background: #e3e9f3; }
.flt-timeline li { position: relative; padding: 11px 0 11px 12px; }
.flt-timeline li::before { content: ''; position: absolute; left: -15px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--flt-blue); box-shadow: 0 0 0 4px #edf2ff; }
.flt-tl-accion { color: #294caa; }

.flt-modal-overlay { backdrop-filter: blur(4px); background: rgba(10,20,39,.58); }
.flt-modal { border: 1px solid rgba(255,255,255,.3); border-radius: 18px; box-shadow: 0 24px 70px rgba(7,17,34,.3); }
.flt-modal-head { padding: 18px 22px; background: linear-gradient(135deg, #f7f9fd, #fff); }
.flt-modal-body { padding: 20px 22px; gap: 16px; }
.flt-modal-foot { padding: 15px 22px; }

.flt-empty { border-color: #d9e1ed; border-radius: 16px; background: linear-gradient(145deg,#fff,#f8fafd); }

@media (max-width: 1050px) {
  .flt-statbar { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .flt-head { padding: 21px 19px; border-radius: 15px; }
  .flt-title { font-size: 20px; }
  .flt-statbar { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .flt-statbar > div { min-height: 94px; }
  .flt-section-label { align-items: flex-start; flex-direction: column; gap: 3px; }
  .flt-hoja { overflow-x: auto; }
  .flt-hoja-tabla { min-width: 610px; }
  .flt-hoja-add { min-width: 610px; }
}
@media (max-width: 440px) {
  .flt-statbar { grid-template-columns: 1fr; }
  .flt-statbar > div { min-height: 82px; }
  .flt-suc-grid { grid-template-columns: 1fr; }
}
