/* =============================================================================
   main.css — Gestión material sanitario / centro de control operativo
   1.Tokens  2.Layout  3.Header/nav  4.Tipografía  5.Botones  6.Cards  7.KPIs
   8.Tablas  9.Forms  10.Dashboard  11.Recursos  12.Ficha vehículo  13.Revisión
   14.Alertas  15.Inventario/stock  16.Responsive  17.Utilidades  18.Print
   ============================================================================= */

:root {
  --color-primary: #c62828;
  --color-secondary: #455a64;
  --color-text: #1f2937;
  --color-text-on-primary: #ffffff;
  --color-text-on-secondary: #ffffff;
  --color-bg: #f3f5f7;
  --surface: #ffffff;
  --surface-soft: #eef2f6;
  --border: #d1dae4;
  --app-primary: var(--color-primary);
  --app-secondary: var(--color-secondary);
  --app-bg: var(--color-bg);
  --app-surface: #ffffff;
  --app-border: var(--border);
  --app-text: var(--color-text);
  --app-muted: #64748b;
  --app-danger: #b91c1c;
  --app-warning: #c2410c;
  --app-success: #15803d;
  --app-info: #0369a1;
  /* Corporativo operativo */
  --app-red: var(--color-primary);
  --app-red-dark: #9e1e1e;
  --app-blue: #1e4d7a;
  --app-green: var(--app-success);
  --app-orange: #ea580c;
  --app-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --app-shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  /* Altura reservada para barra inferior fija (técnico móvil); debe coincidir ~con .mobile-nav */
  --mobile-bottom-nav-h: 96px;
}

/* ── Layout escritorio: ancho útil, menos aire ─────────────────────────────── */
main.app-main-wide {
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 993px) {
  body.app-role-desk main.app-main-wide {
    padding-top: var(--space-3) !important;
    padding-bottom: var(--space-4) !important;
  }
}

/* ── Sistema de botones operativo (compacto escritorio, táctil móvil) ─────── */
.btn-app-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--app-red);
  --bs-btn-border-color: var(--app-red-dark);
  --bs-btn-hover-bg: var(--app-red-dark);
  --bs-btn-hover-border-color: var(--app-red-dark);
  --bs-btn-active-bg: var(--app-red-dark);
  --bs-btn-active-border-color: var(--app-red-dark);
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--app-shadow-sm);
}
.btn-app-secondary {
  color: var(--app-text);
  background: var(--app-surface);
  border: 1px solid color-mix(in srgb, var(--app-secondary) 35%, var(--app-border));
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
}
.btn-app-secondary:hover {
  background: color-mix(in srgb, var(--app-secondary) 8%, #fff);
  border-color: color-mix(in srgb, var(--app-secondary) 45%, var(--app-border));
  color: var(--app-text);
}
.btn-app-outline {
  color: var(--app-secondary);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--app-secondary) 40%, var(--app-border));
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
}
.btn-app-outline:hover {
  background: color-mix(in srgb, var(--app-secondary) 6%, #fff);
  color: var(--app-text);
}
.btn-app-danger {
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
}
/* Eliminar plantilla en tarjetas (lista tipos): discreto, mismo tamaño que btn-sm */
.btn-app-delete {
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0.28rem 0.45rem;
  line-height: 1.2;
  border-radius: var(--radius-sm);
}
.btn-app-delete:hover {
  color: #fff;
  background-color: var(--bs-danger);
  border-color: var(--bs-danger);
}
.btn-compact {
  padding-top: 0.3rem !important;
  padding-bottom: 0.3rem !important;
  font-size: 0.78rem !important;
  line-height: 1.2;
}
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0 !important;
  min-height: 2.15rem !important;
  border-radius: var(--radius-sm);
}
.btn-icon.btn-sm {
  width: 1.95rem;
  height: 1.95rem;
  min-height: 1.95rem !important;
}
.btn-icon-danger {
  color: var(--app-danger);
  border-color: color-mix(in srgb, var(--app-danger) 45%, var(--app-border));
}
@media (min-width: 993px) {
  body.app-role-desk .btn:not(.btn-lg):not(.btn-quick):not(.mobile-nav a):not(.btn-icon) {
    min-height: 34px;
    padding-top: 0.28rem;
    padding-bottom: 0.28rem;
    font-size: 0.8125rem;
  }
  body.app-role-desk .btn-sm:not(.btn-icon) {
    min-height: 30px;
    font-size: 0.78rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/* Badges operativos */
.badge-app-ok { background: #ecfdf5 !important; color: #065f46 !important; border: 1px solid #a7f3d0; font-weight: 600; font-size: 0.68rem; }
.badge-app-pending { background: #fffbeb !important; color: #92400e !important; border: 1px solid #fde68a; font-weight: 600; font-size: 0.68rem; }
.badge-app-danger { background: #fef2f2 !important; color: #991b1b !important; border: 1px solid #fecaca; font-weight: 600; font-size: 0.68rem; }
.badge-app-muted { background: #f1f5f9 !important; color: #475569 !important; border: 1px solid #e2e8f0; font-weight: 600; font-size: 0.68rem; }

/* Dashboard KPI strip genérico (detalle en .dashboard-pro) */
.dash-kpis .dash-kpi-card {
  min-height: 5rem;
}
.dash-kpis .metric-card,
.dash-kpis .card.kpi {
  border-radius: var(--radius-md);
  box-shadow: var(--app-shadow-sm);
}
.dash-header-actions .btn {
  font-size: 0.8125rem;
}
.chart-panel-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--app-muted);
}
.dash-bottom-grid .list-group-item,
.dashboard-bottom-grid .list-group-item {
  padding: var(--space-2) var(--space-3);
  font-size: 0.8125rem;
}

.vd-icon-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.vd-icon-actions .btn { white-space: nowrap; }

.alert-board-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--app-border);
  box-shadow: var(--app-shadow-sm);
}
.alert-board-card.border-danger-subtle { border-left: 4px solid var(--app-danger); }
.alert-board-card.border-warning-subtle { border-left: 4px solid #ca8a04; }
.alert-board-card.border-info-subtle { border-left: 4px solid var(--app-info); }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, color-mix(in srgb, var(--app-bg) 94%, #fff 6%), var(--app-bg));
  color: var(--app-text);
  font-family: Inter, "Segoe UI", system-ui, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.app-main { flex: 1 0 auto; }
.app-main:not(.app-main-wide) { max-width: 1240px; margin-left: auto; margin-right: auto; }

/* Contenedor tipo shell (opcional en bloques) */
.app-shell-inset {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 12px;
  padding-right: 12px;
}

/* Cabecera de página reutilizable */
.page-header--app {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--app-border) 70%, transparent);
}
.page-header--app .page-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--app-text);
  margin: 0 0 0.25rem;
}
.page-header--app .page-subtitle {
  font-size: 0.9rem;
  color: var(--app-muted);
  margin: 0;
  max-width: 58ch;
  line-height: 1.45;
}
.section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--app-muted);
  margin-bottom: 0.5rem;
}
.soft-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.action-card {
  display: block;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: var(--app-surface);
  transition: border-color 0.15s, box-shadow 0.15s;
  text-decoration: none;
  color: inherit;
}
.action-card:hover {
  border-color: color-mix(in srgb, var(--app-primary) 28%, var(--app-border));
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}
.metric-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.status-badge { font-weight: 600; font-size: 0.72rem; letter-spacing: 0.02em; }
.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--app-muted);
  font-size: 0.9rem;
}
/* Listas móviles */
.mobile-list {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 10px;
  overflow: hidden;
}
.mobile-list-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0.4rem 0.9rem;
  border-bottom: 1px solid #f0f2f4;
  text-decoration: none;
  color: inherit;
  transition: background 0.1s;
}
.mobile-list-item:last-child { border-bottom: none; }
.mobile-list-item:active { background: #f8fafb; }
.mobile-list-item--unreviewed { background: #fffaf9; }
/* Fila revisión (review_location) */
.review-row { cursor: pointer; }
.review-bottom-bar {
  z-index: 1095;
}

/* Revisión ubicación — filas artículo (layout en todas las anchuras; antes solo estaba en ≤992px) */
.rl-review-shell {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}
.rl-article-list.rl-articles-block {
  border: 1px solid color-mix(in srgb, var(--app-border) 92%, #cbd5e1 8%);
  border-radius: 12px;
  overflow: hidden;
  background: var(--app-surface, #fff);
}
.rl-article-list .rl-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  min-height: 52px;
  cursor: pointer;
  transition: background 0.12s;
  user-select: none;
}
.rl-article-list .rl-row:hover {
  background: #fafafa;
}
.rl-article-list .rl-row:active {
  background: #f9fafb;
}
.rl-dot {
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  font-size: 1rem;
}
.rl-info.rl-info--stack {
  flex-grow: 1;
  min-width: 0;
}
.rl-desk-grid-head {
  grid-template-columns: 76px minmax(140px, 1fr) 96px 110px 88px;
  gap: 10px;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--app-muted);
}
@media (min-width: 993px) {
  .rl-articles-block.rl-desk-grid .rl-row {
    display: grid;
    grid-template-columns: 76px minmax(140px, 1fr) 96px 110px 88px;
    gap: 10px;
    align-items: center;
    min-height: 48px;
    padding: 10px 16px;
  }
  .rl-articles-block.rl-desk-grid .rl-dot {
    grid-column: 1;
  }
  .rl-articles-block.rl-desk-grid .rl-info.rl-info--stack {
    grid-column: 2;
    flex-direction: column;
  }
  .rl-articles-block.rl-desk-grid .rl-meta-esperado {
    grid-column: 3;
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    text-align: right;
    color: var(--app-text);
  }
  .rl-articles-block.rl-desk-grid .rl-meta-cad {
    grid-column: 4;
    font-size: 0.78rem;
    color: var(--app-muted);
  }
  .rl-articles-block.rl-desk-grid .rl-badge {
    grid-column: 5;
    justify-self: end;
    text-align: right;
    min-width: 72px;
  }
}
/* Tablas app */
.table-app {
  --bs-table-bg: transparent;
  border-collapse: separate;
  border-spacing: 0 6px;
  width: 100%;
}
.table-app thead th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--app-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--app-border) !important;
  background: #f1f5f9 !important;
  padding: 0.6rem 0.75rem;
  white-space: nowrap;
}
.table-app tbody tr {
  background: var(--app-surface);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
  border-radius: 8px;
}
.table-app tbody td {
  border: none;
  padding: 0.65rem 0.75rem;
  vertical-align: middle;
}
/* Formularios: compactos de escritorio */
.form-label { font-size: 0.82rem; font-weight: 600; color: #334155; }
.form-control-sm, .form-select-sm { border-radius: 8px; }

.app-nav {
  background: var(--color-primary);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid color-mix(in srgb, var(--color-primary) 65%, #000 35%);
  padding-top: 0.22rem;
  padding-bottom: 0.22rem;
  min-height: 2.65rem;
}
.app-nav .navbar-brand {
  color: var(--color-text-on-primary) !important;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}
.app-nav .nav-link,
.app-nav .navbar-toggler { color: var(--color-text-on-primary) !important; }
.app-nav .nav-link { font-size: 0.9rem; font-weight: 500; }
.app-nav .nav-link:hover { opacity: .9; }
.app-nav .dropdown-menu { border: 1px solid var(--app-border); border-radius: 10px; box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12); }

.app-footer {
  color: color-mix(in srgb, var(--color-text) 62%, #8fa1b2 38%);
  font-size: 0.82rem;
  flex-shrink: 0;
  border-top: 1px solid color-mix(in srgb, var(--app-border) 55%, transparent);
  background: color-mix(in srgb, var(--app-bg) 88%, #fff 12%);
}

.page-hero {
  background: linear-gradient(140deg, color-mix(in srgb, var(--color-primary) 14%, #fff 86%), color-mix(in srgb, var(--color-secondary) 10%, #fff 90%));
  border: 1px solid color-mix(in srgb, var(--color-primary) 18%, var(--border) 82%);
  border-radius: 14px;
  padding: 14px 16px;
}
.page-title { font-size: 1.3rem; font-weight: 800; margin: 0 0 4px; }
.page-subtitle { color: color-mix(in srgb, var(--color-text) 72%, #8ea2b3 28%); }

.card {
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 3px 14px rgba(15, 23, 42, 0.06);
  background: var(--surface);
}
.card-header {
  background: color-mix(in srgb, var(--color-secondary) 10%, #fff 90%);
  color: var(--color-text);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.btn, .form-control, .form-select { min-height: 44px; border-radius: 10px; }
.btn-danger, .btn-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-on-primary);
}
.btn-outline-secondary {
  color: var(--color-secondary);
  border-color: color-mix(in srgb, var(--color-secondary) 65%, #fff 35%);
}
.btn-outline-secondary:hover { background: var(--color-secondary); color: var(--color-text-on-secondary); }
.btn-outline-dark {
  color: var(--color-text);
  border-color: color-mix(in srgb, var(--color-text) 40%, #fff 60%);
}
.btn-quick {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  font-size: 1.03rem;
  font-weight: 700;
}

.form-control:focus, .form-select:focus {
  border-color: color-mix(in srgb, var(--color-primary) 55%, #fff 45%);
  box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--color-primary) 20%, transparent 80%);
}

.kpi { transition: box-shadow .18s; }
.kpi:hover { box-shadow: 0 6px 22px rgba(15,23,42,.12); }
.kpi .h3, .kpi .h4 { color: var(--color-primary); font-weight: 800; margin-bottom: 0; font-size: 2rem; }
.kpi small { color: color-mix(in srgb, var(--color-text) 65%, #8fa3b4 35%); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.kpi .kpi-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--color-primary) 15%, #fff 85%);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  font-size: 1.3rem;
}
/* KPI color variants */
.kpi-danger .h3, .kpi-danger .h4 { color: #dc2626; }
.kpi-danger .kpi-icon { background: #fef2f2; color: #dc2626; }
.kpi-warning .h3, .kpi-warning .h4 { color: #d97706; }
.kpi-warning .kpi-icon { background: #fffbeb; color: #d97706; }
.kpi-info .h3, .kpi-info .h4 { color: #0284c7; }
.kpi-info .kpi-icon { background: #e0f2fe; color: #0284c7; }
.kpi-success .h3, .kpi-success .h4 { color: #16a34a; }
.kpi-success .kpi-icon { background: #f0fdf4; color: #16a34a; }
.kpi-primary .h3, .kpi-primary .h4 { color: var(--color-primary); }
.kpi-primary .kpi-icon { background: color-mix(in srgb, var(--color-primary) 15%, #fff 85%); color: var(--color-primary); }

.list-group-item {
  border-left: 0;
  border-right: 0;
  border-color: var(--border);
}

.mobile-card-list .list-group-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  background: var(--surface);
}

.table {
  --bs-table-bg: transparent;
  border-collapse: separate;
  border-spacing: 0 8px;
}
.table thead th {
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .76rem;
  color: color-mix(in srgb, var(--color-text) 60%, #8fa3b4 40%);
  border-bottom: 0;
}
.table tbody tr {
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(15,23,42,.05);
}
.table tbody td { border-top: 0; vertical-align: middle; }

.badge.text-bg-secondary {
  background-color: var(--color-secondary) !important;
  color: var(--color-text-on-secondary) !important;
}
.badge.text-bg-warning { color: #2c2c2c !important; }

a, .link-primary {
  color: color-mix(in srgb, var(--color-primary) 82%, #28323d 18%);
}
a:hover { color: var(--color-primary); }

/* Barra inferior: solo técnico en móvil; admin usa menú superior */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1085;
  display: none;
  background: #1e293b;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
}
.mobile-nav a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 600;
  flex: 1;
  text-align: center;
  line-height: 1.2;
  padding: 4px 2px;
  border-radius: 8px;
  transition: background 0.12s, color 0.12s;
}
.mobile-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.mobile-nav .mn-icon {
  display: block;
  font-size: 1.25rem;
  margin-bottom: 2px;
  opacity: 0.95;
}
/* Técnico: hub operación */
.tecnico-hub { max-width: 520px; margin: 0 auto; }
.tecnico-hub__clock {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--app-muted);
  text-transform: capitalize;
  letter-spacing: 0.02em;
}
.tecnico-hub__name {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0.15rem 0 0.75rem;
  color: var(--app-text);
  letter-spacing: -0.02em;
}
.tecnico-hub__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}
.tecnico-hub__scan {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.9rem;
  font-weight: 800;
  font-size: 0.95rem;
  border-radius: 12px;
  border: none;
  color: #fff;
  background: var(--app-primary);
  text-decoration: none;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--app-primary) 35%, transparent);
}
.tecnico-hub__scan i { font-size: 1.4rem; }
.tecnico-hub__primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  font-weight: 700;
  font-size: 0.88rem;
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  background: var(--app-primary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  padding: 0 0.75rem;
}
.tecnico-hub__tile {
  display: block;
  border-radius: 12px;
  border: 1px solid var(--app-border);
  background: var(--app-surface);
  padding: 0.7rem 0.4rem 0.55rem;
  text-align: center;
  text-decoration: none;
  color: var(--app-text);
  min-height: 4.2rem;
  position: relative;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.tecnico-hub__tile:hover { border-color: color-mix(in srgb, var(--app-primary) 30%, var(--app-border)); color: var(--app-text); }
.tecnico-hub__tile i { display: block; font-size: 1.45rem; margin-bottom: 0.2rem; color: #475569; }
.tecnico-hub__tile .tecnico-hub__tilabel { font-size: 0.8rem; font-weight: 700; }
.tecnico-hub__tile .tecnico-hub__subl { font-size: 0.7rem; color: var(--app-muted); }
.tecnico-hub__scanbadge {
  position: absolute;
  top: -0.2rem;
  right: 0.35rem;
  min-width: 1.1rem;
  font-size: 0.7rem;
  padding: 0.15em 0.4em;
}
.tecnico-hub__reslist { border-radius: 12px; overflow: hidden; border: 1px solid var(--app-border); background: var(--app-surface); }
.tecnico-hub__resrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.9rem;
  min-height: 3.1rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f0f2f4;
  font-size: 0.9rem;
}
.tecnico-hub__resrow:last-child { border-bottom: none; }
.tecnico-hub__resrow:active { background: #f8fafb; }

/* Técnico: menos aire en pantallas pequeñas */
@media (max-width: 992px) {
  body.app-role-tecnico .tecnico-hub {
    padding-top: 0 !important;
    padding-bottom: 0.25rem;
  }
  body.app-role-tecnico .tecnico-hub__name {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
  }
  body.app-role-tecnico .tecnico-hub__tile {
    min-height: 3.5rem;
    padding-top: 0.55rem;
    padding-bottom: 0.45rem;
  }
  body.app-role-tecnico .tecnico-hub__scan {
    min-height: 2.65rem;
    font-size: 0.92rem;
  }
  body.app-role-tecnico .tecnico-hub__primary {
    min-height: 2.55rem;
  }
  body.app-role-tecnico .tecnico-hub__resrow {
    padding: 0.5rem 0.75rem;
    min-height: 2.85rem;
    font-size: 0.88rem;
  }
}

/* Modal bottom-sheet (global: escritorio y móvil) */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1110;
  background: rgba(15, 23, 42, 0.45);
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.modal-overlay--hidden {
  display: none !important;
}
.modal-overlay:not(.modal-overlay--hidden) {
  display: flex;
}
.modal-sheet {
  background: #fff;
  border-radius: 18px 18px 0 0;
  width: 100%;
  max-width: 540px;
  max-height: 92vh;
  overflow-y: auto;
  animation: rl-sheet-up 0.18s ease-out;
}
@keyframes rl-sheet-up {
  from { transform: translateY(48px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: #e5e7eb;
  margin: 10px auto 4px;
}
.modal-sheet-body {
  padding: 8px 18px max(28px, env(safe-area-inset-bottom));
}

@media (min-width: 993px) {
  .modal-overlay:not(.modal-overlay--hidden) {
    align-items: center;
    padding: 16px;
  }
  .modal-overlay .modal-sheet {
    border-radius: 14px;
    max-height: min(88vh, 620px);
    animation: none;
  }
  .modal-overlay .modal-handle {
    display: none;
  }
}

.label-sheet {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(65mm, 1fr));
}
.label-card {
  border: 2px solid #111;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.label-card.small { min-height: 40mm; }
.label-card.medium { min-height: 56mm; }
.label-title { font-size: 13px; font-weight: 700; line-height: 1.1; margin-bottom: 3px; }
.label-meta { font-size: 11px; margin-bottom: 2px; color: #333; }
.label-foot { font-size: 11px; font-weight: 700; margin-top: 6px; text-transform: uppercase; letter-spacing: .04em; }
.label-qr { width: 100%; max-width: 160px; image-rendering: pixelated; margin: 4px 0; }
.qr-panel img { max-width: 260px; width: 100%; border: 2px solid #111; background: #fff; border-radius: 8px; }

.thumb-sm {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.thumb-lg {
  width: 100%;
  max-width: 360px;
  max-height: 220px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}

/* Article review cards */
.article-review-card {
  transition: border-color .18s, box-shadow .18s;
  border-width: 2px !important;
}
.article-review-card:has(input[value="falta"]:checked)      { border-color: #dc2626 !important; background: #fff8f8; }
.article-review-card:has(input[value="caducado"]:checked)   { border-color: #d97706 !important; background: #fffdf0; }
.article-review-card:has(input[value="bajo_minimo"]:checked){ border-color: #6b7280 !important; }
.article-review-card:has(input[value="repuesto"]:checked)   { border-color: var(--color-primary) !important; }
.article-review-card:has(input[value="correcto"]:checked)   { border-color: #16a34a !important; }

/* btn-check radio buttons styled as action buttons — mobile-friendly sizing */
.btn-check + .btn-sm {
  min-height: 48px;
  font-size: .88rem;
  font-weight: 600;
  padding-left: .65rem;
  padding-right: .65rem;
}
.btn-check:checked + .btn-outline-success  { background: #16a34a; color: #fff; border-color: #16a34a; }
.btn-check:checked + .btn-outline-danger   { background: #dc2626; color: #fff; border-color: #dc2626; }
.btn-check:checked + .btn-outline-warning  { background: #d97706; color: #fff; border-color: #d97706; }
.btn-check:checked + .btn-outline-secondary{ background: var(--color-secondary); color: var(--color-text-on-secondary); border-color: var(--color-secondary); }
.btn-check:checked + .btn-outline-primary  { background: var(--color-primary); color: var(--color-text-on-primary); border-color: var(--color-primary); }

/* Review progress bar */
.review-progress-bar { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; }
.review-progress-bar .progress { height: 8px; border-radius: 8px; background: var(--border); }
.review-progress-bar .progress-bar { transition: width .3s; }

/* Barra Guardar revisión: visible siempre (antes solo ≤992px; en escritorio estaba display:none → no había POST) */
.review-sticky-btn {
  display: block;
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 1rem;
  padding: 12px 16px;
  background: var(--app-surface, #fff);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
  z-index: 5;
}
@media (min-width: 993px) {
  body.has-review-sticky main.app-main {
    padding-bottom: 1.25rem !important;
  }
}

/* Resaltado breve del botón «Completar revisión» cuando el último artículo se marca en el modal */
@keyframes rl-complete-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(229, 37, 32, 0.45);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(229, 37, 32, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(229, 37, 32, 0);
  }
}
.review-sticky-btn .rl-btn-complete.rl-btn-complete--pulse {
  animation: rl-complete-pulse 1s ease-out 2;
}

/* Color preview strip for entity config */
.color-preview-nav {
  border-radius: 10px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: .95rem;
}
.color-preview-card {
  border-radius: 10px;
  padding: 14px;
  border: 1px solid var(--border);
}

/* ── Mobile: simplificación visual completa ─────────────────────────────── */
@media (max-width: 992px) {
  /* Técnico: barra inferior; admin: solo menú hamburguesa superior */
  body.app-role-desk .mobile-nav { display: none !important; }
  body.app-role-tecnico .mobile-nav {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-end;
    justify-content: space-between;
  }
  /* Padding inferior: técnico con menú fijo — espacio para barra + safe area + margen de lectura */
  body.app-role-desk main.app-main {
    margin-bottom: 0 !important;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom)) !important;
  }
  body.has-mobile-bottom-nav main.app-main,
  body.app-role-tecnico main.app-main {
    margin-bottom: 0 !important;
    padding-bottom: calc(var(--mobile-bottom-nav-h) + env(safe-area-inset-bottom) + 24px) !important;
  }
  body.app-role-desk.has-review-sticky main.app-main {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)) !important;
  }
  body.app-role-tecnico.has-review-sticky main.app-main {
    padding-bottom: calc(var(--mobile-bottom-nav-h) + env(safe-area-inset-bottom) + 24px + 5.25rem) !important;
  }

  /* legacy name — si se usa como fixed bottom */
  body.app-role-tecnico .review-bottom-bar,
  body.has-mobile-bottom-nav .review-bottom-bar {
    bottom: calc(var(--mobile-bottom-nav-h) + env(safe-area-inset-bottom));
  }

  /* Layout */
  .desktop-table { display: none; }
  .mobile-only { display: block; }

  /* Header: sin página hero grande */
  .page-hero { padding: 8px 12px; border-radius: 8px; background: transparent; border: none; }
  .page-title { font-size: 1rem; margin-bottom: 2px; }
  .page-subtitle { font-size: .8rem; }

  /* Cards: menos sombra, menos radio, menos padding */
  .card { box-shadow: 0 1px 4px rgba(15,23,42,.06); border-radius: 10px; }
  .card-header { padding: 8px 12px; font-size: .88rem; }
  .card-body { padding: 10px 12px; }

  /* Botones: táctiles pero no gigantes */
  .btn { min-height: 44px; }
  .btn-quick { min-height: 56px; font-size: .98rem; }
  .btn-sm { min-height: 36px; font-size: .82rem; }

  /* Sticky inferior revisión (móvil / tablet): fijo abajo */
  body.app-role-desk .review-sticky-btn {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: none;
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
    padding: 8px 14px calc(10px + env(safe-area-inset-bottom));
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    z-index: 1095;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.08);
  }
  .review-sticky-btn {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: none;
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
    padding: 8px 14px calc(10px + env(safe-area-inset-bottom));
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    z-index: 1095;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.08);
  }
  .review-sticky-btn .btn { min-height: 48px; border-radius: 10px; font-size: 0.93rem; }
  /* Por encima del menú inferior técnico (sobrescribe bottom/padding) */
  body.app-role-tecnico .review-sticky-btn,
  body.has-mobile-bottom-nav .review-sticky-btn {
    bottom: calc(var(--mobile-bottom-nav-h) + env(safe-area-inset-bottom));
    padding: 8px 14px 10px;
  }

  /* ── Modal bottom sheet (refuerzo táctil) ── */
  #m-cant:focus { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.12); }

  .art-row    { min-height: 48px; }
  .art-radios { border-top: 1px solid #e5e7eb; background: #fafafa; }
}
@media (min-width: 993px) { .mobile-only { display: none; } }

/* ── Ficha recurso (detalle vehículo): compacta, poco blanco ── */
.vehicle-detail-compact {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
.vehicle-detail-compact .vd-help summary { list-style: none; }
.vehicle-detail-compact .vd-help summary::-webkit-details-marker { display: none; }
.vehicle-detail-compact .vd-admin-bar {
  border-color: #e5e7eb !important;
}
.vehicle-detail-compact .vd-datos-vh {
  padding: 0.5rem 0.75rem 0.55rem;
  border-radius: 0.5rem;
  /* fondo/borde también en línea en la plantilla por si el CSS va cacheado */
  background: #fff;
  border: 1px solid #dee2e6;
  border-left: 3px solid var(--color-primary, #c62828);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.vehicle-detail-compact .vd-datos-foto {
  width: 56px;
  height: 44px;
  object-fit: cover;
  display: block;
}
.vehicle-detail-compact .vd-stat { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.35rem; max-width: 100%; }
.vehicle-detail-compact .vd-lbl {
  color: var(--bs-secondary-color, #6c757d);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.vehicle-detail-compact .vd-val {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--bs-body-color, #212529);
}
.vehicle-detail-compact .vd-stat--notas { flex: 1 1 9rem; }
.vehicle-detail-compact .vd-notas-val { max-width: min(18rem, 100%); vertical-align: bottom; }
.vehicle-detail-compact .vd-datos-campos { row-gap: 0.25rem; }
.vehicle-detail-compact .vd-actions .btn { min-height: 34px; font-size: 0.82rem; padding: 0.25rem 0.5rem; }
.vehicle-detail-compact .vd-loc-list .list-group-item { border-color: #e8e8e8; }
.vehicle-detail-compact .vd-sub-row:last-child { border-bottom: none !important; }
.vehicle-detail-compact .vd-actions-wrap .vd-actions-app a:hover { text-decoration: underline !important; }
.vehicle-detail-compact .vd-qr-card .card-body { padding-top: 0.35rem !important; padding-bottom: 0.35rem !important; }

/* Menos aire bajo la ficha recurso (main/footer) */
main.app-main.vd-main-tight {
  padding-top: 0.5rem;
  padding-bottom: 0.75rem !important;
}
.app-footer.vd-footer-tight {
  padding-top: 0.35rem !important;
  padding-bottom: 0.35rem !important;
  font-size: 0.85rem;
}
@media (min-width: 993px) {
  main.app-main.vd-main-tight {
    padding-top: 0.6rem;
    padding-bottom: 0.85rem !important;
  }
}
@media (max-width: 992px) {
  main.app-main.vd-main-tight {
    padding-bottom: calc(0.65rem + env(safe-area-inset-bottom)) !important;
  }
}

/* ── Revisión de vehículo / cabecera ── */
.rv-kicker { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--app-muted); font-weight: 600; }
.rv-title { font-size: 1rem; font-weight: 800; }
.btn-icon-tight { min-width: 2.4rem; min-height: 2.4rem; display: inline-flex; align-items: center; justify-content: center; }
.rv-progress__bar { height: 5px; border-radius: 4px; background: #e2e8f0; }
.rv-progress__bar .progress-bar {
  width: var(--rv-fill-pct, 0%);
  transition: width 0.35s ease;
}
.rv-dot-col { width: 1.1rem; flex-shrink: 0; text-align: center; }
.rv-orden-num { font-size: 0.7rem; color: var(--app-muted); }
.rv-meta-line { font-size: 0.75rem; color: var(--app-muted); }
.rv-precinto-ico { font-size: 0.75rem; }
.rv-card { border: 1px solid var(--app-border) !important; }
.rv-card.border-start { border-left-width: 4px !important; }
.review-loc-sticky {
  position: sticky;
  top: 0;
  z-index: 1060;
  background: color-mix(in srgb, var(--app-bg) 92%, #fff 8%);
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--app-border);
  backdrop-filter: blur(8px);
}

/* ── Revisión ubicación: tarjeta de contexto (.review-context-*) ── */
.rl-location-header.review-loc-sticky {
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0.28rem;
  padding-bottom: 0.28rem;
  margin-bottom: 0.5rem;
}

.review-context-card {
  display: flex;
  flex-direction: column;
  border: 1px solid color-mix(in srgb, var(--app-border) 88%, var(--app-secondary) 12%);
  border-radius: 18px;
  background: var(--app-surface);
  box-shadow: var(--app-shadow-md);
  overflow: hidden;
  max-width: 100%;
}

.review-context-card-body {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.72rem 0.85rem 0.68rem 0.72rem;
  min-width: 0;
}

.review-context-back {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 0.12rem;
}

.review-context-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.review-context-block {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.review-context-block + .review-context-block {
  margin-top: 0.38rem;
  padding-top: 0.4rem;
  border-top: 1px solid color-mix(in srgb, var(--app-border) 78%, transparent);
}

.review-context-label {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--app-muted);
  line-height: 1.15;
}

.review-context-resource {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  max-width: 100%;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.15;
  color: color-mix(in srgb, var(--app-text) 88%, var(--app-secondary) 12%);
  background: color-mix(in srgb, var(--app-secondary) 18%, var(--app-surface));
  border: 1px solid color-mix(in srgb, var(--app-secondary) 36%, var(--app-border));
  box-shadow: 0 1px 0 color-mix(in srgb, var(--app-border) 48%, transparent);
}

.review-context-location {
  margin: 0;
  padding: 0;
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.022em;
  color: var(--app-text);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.review-context-parent {
  margin: 0.22rem 0 0;
  padding: 0 0 0 0.48rem;
  border-left: 3px solid color-mix(in srgb, var(--app-secondary) 42%, var(--app-border));
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.28;
  color: var(--app-muted);
}

.review-context-progress-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  align-self: stretch;
  justify-content: center;
  padding-left: 0.15rem;
}

.review-context-progress {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.55rem;
  padding: 0.44rem 0.68rem;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--app-text);
  background: color-mix(in srgb, var(--app-primary) 12%, var(--app-surface));
  border: 1px solid color-mix(in srgb, var(--app-primary) 38%, var(--app-border));
  box-shadow: 0 1px 2px color-mix(in srgb, var(--app-border) 50%, transparent);
}

.rl-progress-track {
  border-top: 1px solid color-mix(in srgb, var(--app-border) 72%, transparent);
  padding: 0;
  background: color-mix(in srgb, var(--app-bg) 48%, var(--app-surface));
}

.rl-progress-track__inner.rl-mini-progress {
  height: 4px;
  border-radius: 0;
  margin: 0;
  background: color-mix(in srgb, var(--app-muted) 16%, var(--app-bg));
}

.rl-progress-track__fill {
  background-color: var(--app-success);
  transition: width 0.28s ease;
}

@media (min-width: 993px) {
  .review-context-card-body {
    padding: 0.82rem 1rem 0.75rem 0.85rem;
    gap: 0.85rem;
  }
  .review-context-location {
    font-size: 1.34rem;
    line-height: 1.1;
  }
  .review-context-resource {
    font-size: 0.92rem;
  }
}

@media (max-width: 380px) {
  .review-context-card-body {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .review-context-progress-wrap {
    flex-basis: 100%;
    justify-content: flex-end;
    padding-left: 0;
    margin-top: 0.15rem;
    align-self: stretch;
  }
}

.rl-header-title {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}
.rl-modal-art-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}
.rl-add-label { font-size: 0.82rem; }
.rl-add-label-muted { font-size: 0.8rem; color: #64748b; }
.rl-add-label-soft { font-size: 0.78rem; color: #94a3b8; }
.rl-done-icon { color: var(--app-success); }
.rl-row.rl-row--done { background: #f0fdf4; }
.rl-badge-num { font-weight: 700; font-size: 0.82rem; }
.rl-badge-num--same { color: var(--app-success); }
.rl-badge-num--up { color: #2563eb; }
.rl-badge-num--down { color: var(--app-danger); }
.rl-cad-hint {
  font-size: 0.72rem;
  color: var(--app-muted);
  white-space: nowrap;
}
@media (max-width: 992px) {
  .review-loc-sticky {
    margin-left: -0.35rem;
    margin-right: -0.35rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }
}
#m-cant.rl-modal-qty-input,
input.rl-modal-qty-input {
  font-size: 1.35rem;
  font-weight: 700;
}
#m-diff.m-diff--up { color: #1d4ed8; }
#m-diff.m-diff--down { color: var(--app-danger); }
.g-add-art { border-style: dashed !important; opacity: 0.92; font-weight: 500 !important; }
.rl-info.rl-info--stack {
  flex-direction: column;
  align-items: stretch !important;
  gap: 0.15rem;
  flex-wrap: nowrap;
}
.rl-info.rl-info--stack .rl-name {
  white-space: normal;
  line-height: 1.25;
  flex: 1;
  min-width: 0;
}
.rl-mini-progress-wrap { margin-top: -0.15rem; }
.rl-mini-progress {
  height: 5px;
  border-radius: 99px;
  background: #e2e8f0;
  overflow: hidden;
}
.rl-mini-progress .progress-bar { transition: width 0.28s ease; }
.rl-badge:not(:empty) { min-width: 2.25rem; text-align: right; }
.rl-article-list .rl-row:not(:last-of-type) { border-bottom: 1px solid #f0f2f4; }
.rl-dot-pending { color: #d1d5db; }
.rl-precinto { background: #fffbeb; border: 1px solid #fde68a; }
.rl-modal-diff { min-height: 1.25em; }
.rl-modal-diff.m-diff--up { color: #1d4ed8; font-weight: 600; }
.rl-modal-diff.m-diff--down { color: var(--app-danger); font-weight: 600; }
.rl-modal-save { min-height: 3rem; border-radius: 10px; font-size: 1rem; }

/* Dashboard / listados: tablas legibles */
.kpi-figure-heavy { font-weight: 800; }

/* ── Dashboard escritorio: centro de mando compacto ── */
.dashboard-pro {
  max-width: 1560px;
  margin: 0 auto;
}

.dashboard-pro .page-header--app,
.dashboard-pro .dash-header-wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--app-border) 88%, transparent);
}

.dashboard-pro .dash-header-wide .page-title {
  font-size: 1.15rem;
  line-height: 1.15;
  margin: 0;
}

.dashboard-pro .dash-header-wide .page-subtitle {
  font-size: 0.82rem;
  margin: 3px 0 0;
  color: var(--app-muted);
}

.dashboard-pro .dash-header-titles {
  min-width: 0;
}

.dashboard-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-actions .btn,
.dashboard-actions .btn-app-primary,
.dashboard-actions .btn-app-outline {
  height: 32px;
  padding: 0 10px;
  font-size: 0.78rem;
  border-radius: 8px;
  min-height: 32px !important;
}

@media (min-width: 993px) {
  body.app-role-desk main.app-main-wide .dashboard-pro {
    padding-top: 2px;
    margin-top: -4px;
  }
}

@media (min-width: 1200px) {
  .dashboard-pro .dash-header-wide {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    min-height: 56px;
    max-height: 68px;
    padding-top: 6px;
    padding-bottom: 8px;
  }
  .dashboard-pro .dash-header-wide .page-subtitle {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: min(52ch, 56vw);
  }
}

@media (max-width: 1199px) {
  .dashboard-pro .dash-header-wide {
    flex-direction: column;
    align-items: stretch;
  }
  .dashboard-actions {
    justify-content: flex-start;
  }
}

.dashboard-pro .dash-kpis {
  margin-bottom: 8px;
}

.dashboard-pro .dash-kpis .metric-card,
.dashboard-pro .dash-kpis .kpi-card,
.dashboard-pro .dash-kpis .soft-card.kpi {
  min-height: 82px;
  height: 82px;
  max-height: 90px;
}

.dashboard-pro .dash-kpis .kpi .card-body {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 0;
}

.dashboard-pro .dash-kpis .kpi-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  margin-bottom: 0;
  border-radius: 10px;
  font-size: 1rem;
  flex-shrink: 0;
}

.dashboard-pro .dash-kpis .kpi-text {
  flex: 1;
  min-width: 0;
}

.dashboard-pro .dash-kpis .kpi-label {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
  color: color-mix(in srgb, var(--app-text) 62%, #8fa3b4 38%);
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1.15;
}

.dashboard-pro .dash-kpis .kpi-value {
  font-size: 1.35rem;
  line-height: 1;
  margin: 0;
  font-weight: 800;
}

.dashboard-pro .dash-kpis .kpi-value--compact {
  font-size: 1.05rem;
  font-weight: 800;
}

.dashboard-pro .dash-kpis .kpi-sub {
  font-size: 0.65rem;
  margin: 1px 0 0;
  line-height: 1.1;
  color: var(--app-muted);
}

.dashboard-pro .dash-kpis .kpi-primary .kpi-value {
  color: var(--color-primary);
}
.dashboard-pro .dash-kpis .kpi-danger .kpi-value {
  color: #dc2626;
}
.dashboard-pro .dash-kpis .kpi-warning .kpi-value {
  color: #d97706;
}
.dashboard-pro .dash-kpis .kpi-info .kpi-value {
  color: #0284c7;
}

.dashboard-pro .dash-charts {
  margin-bottom: 8px;
}

.dashboard-pro .dash-charts .soft-card {
  padding: 0;
}

.dashboard-pro .dash-charts .card-body.chart-canvas-h {
  padding: 10px 12px 8px !important;
}

.dashboard-pro .dash-charts .chart-panel-title {
  font-size: 0.78rem;
  margin-bottom: 4px;
  letter-spacing: 0.03em;
}

.dashboard-pro .chart-canvas-h {
  height: 150px !important;
  max-height: 155px !important;
}

.dashboard-pro .chart-canvas-h canvas {
  max-height: 155px !important;
}

.dashboard-pro .table-panel,
.dashboard-pro .soft-card.table-panel {
  border-radius: 12px;
}

.dashboard-pro .dash-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
}

@media (min-width: 992px) {
  .dashboard-pro .dash-table-head {
    flex-wrap: nowrap;
  }
  .dashboard-pro .dash-table-title {
    flex-shrink: 0;
  }
  .dashboard-pro .dashboard-filters {
    margin-left: auto;
    flex-wrap: nowrap;
  }
}

@media (max-width: 991px) {
  .dashboard-pro .dash-table-head {
    align-items: flex-start;
  }
}

.dashboard-pro .dash-table-title {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.dashboard-pro .dashboard-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.dashboard-pro .dashboard-filters .form-control,
.dashboard-pro .dashboard-filters .form-select {
  height: 32px;
  font-size: 0.78rem;
  padding: 4px 8px;
  border-radius: 8px;
}

.dashboard-pro .dash-resource-table.table-saas thead th {
  height: 34px;
  padding: 7px 10px;
  font-size: 0.72rem;
}

.dashboard-pro .dash-resource-table.table-saas tbody td {
  padding: 8px 10px;
  height: 44px;
  max-height: 48px;
  font-size: 0.82rem;
  vertical-align: middle;
}

.dashboard-pro .dash-table-panel .table-saas {
  border-collapse: separate;
  border-spacing: 0;
}

.dashboard-pro .dash-table-panel .table-saas tbody tr {
  box-shadow: none;
}

.dashboard-pro .dash-table-panel .table-saas tbody td {
  border-bottom: 1px solid #f0f2f4;
}

.dashboard-pro .dashboard-bottom-grid .dash-bottom-card,
.dashboard-pro .dashboard-bottom-grid .soft-card.dash-bottom-card {
  height: 230px;
  max-height: 240px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dashboard-pro .dash-bottom-card__head {
  font-size: 0.72rem;
  font-weight: 700;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.dashboard-pro .dash-bottom-card__body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.dashboard-pro .dash-bottom-card__body .list-group {
  max-height: 178px;
  overflow-y: auto;
}

.dashboard-pro .dashboard-bottom-grid .dash-bottom-row {
  min-height: 30px;
  padding: 5px 10px !important;
  font-size: 0.78rem !important;
}

.dashboard-pro .badge-desk-tiny {
  font-size: 0.62rem !important;
  padding: 0.15em 0.38em !important;
}

.text-meta-tiny { font-size: 0.78rem; line-height: 1.35; }
.dashboard-filters { gap: 0.5rem; }
.filter-w-narrow { width: 120px; max-width: 100%; }
.filter-w-tipo { width: 130px; max-width: 100%; }
.table-saas { font-size: 0.9rem; }
.table-saas thead th {
  background: #e2e8f0 !important;
  color: #475569;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  border-bottom: 2px solid var(--app-border) !important;
  padding: 0.65rem 0.75rem;
  white-space: nowrap;
}
.table-saas tbody tr { border-bottom: 1px solid #f0f2f4; }
.table-saas.table-hover tbody tr:hover { background: #fafbfc; }
.dashboard-panels .list-group-item { border-color: #eef2f6; }
.dashboard-panels .card-header { font-weight: 600; }

/* Ficha vehículo: sustituir inline */
.vd-details-summary { cursor: pointer; user-select: none; }
.vd-text-help { font-size: 0.8rem; line-height: 1.45; }
.vd-precheck-note { font-size: 0.75rem; }
.vd-qr-img { max-width: 88px; border: 1px solid #ddd; border-radius: 4px; }
.vd-qr-btns { min-width: 120px; }
.vd-app-hint { font-size: 0.7rem; white-space: nowrap; }
.vd-app-link { font-size: 0.8rem; }
.vd-admin-kicker { font-size: 0.65rem; letter-spacing: 0.06em; }
.vd-loc-bar { background: var(--bs-light-bg-subtle, #f8f9fa); }
.vd-loc-ico { width: 36px; }
.badge--tiny { font-size: 0.65rem; }
.vd-meta-ico { font-size: 0.7rem; }
.vd-child-meta { font-size: 0.75rem; }
.vd-loc-seal-ico { font-size: 0.75rem; }
.vd-articulos-line { font-size: 0.75rem; }
.vd-sep-dot { font-size: 0.75rem; user-select: none; }

/* Listado de recursos */
.th-w-icon { width: 50px; }
.list-thumb-ico { font-size: 1.4rem; }
.inventory-thumb-ico { font-size: 1.2rem; }
.list-search-wrap { max-width: 640px; }
.list-search-shell {
  border: 1px solid var(--app-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--app-surface);
}
.vehicle-m-card .card-body { padding: 0.85rem 1rem; }
.vehicle-m-card--inactive { opacity: 0.55; }
.btn-vehicle-view { min-width: 5rem; }

/* Stock / alertas */
.stock-search-card { border-radius: 12px; border: 1px solid var(--app-border); }
.alert-line-compact { font-size: 0.85rem; line-height: 1.35; }
.severity-ico { min-width: 24px; text-align: center; }

/* ── Por vista: técnico móvil / revisión móvil / escritorio admin ───────────── */
@media (max-width: 992px) {
  body.app-role-tecnico .tecnico-hub--field {
    max-width: 100%;
    padding-left: 2px;
    padding-right: 2px;
  }
  .tecnico-hub--field .tecnico-hub__scan {
    border-radius: 14px;
    box-shadow: 0 4px 18px color-mix(in srgb, var(--app-primary) 28%, transparent);
  }
  .rv-header--mob-line {
    padding-bottom: 0.35rem;
    margin-bottom: 0.6rem !important;
    border-bottom: 1px solid color-mix(in srgb, var(--app-border) 85%, transparent);
  }
  .rv-mobile-panel.mobile-list {
    border-radius: 11px;
  }
  .rv-mobile-panel .mobile-list-item {
    min-height: 48px;
    padding-top: 0.38rem;
    padding-bottom: 0.38rem;
  }
  .rl-child-block.mobile-list .mobile-list-item {
    min-height: 46px;
  }
  .rl-articles-block.rl-article-list.mobile-list {
    border-radius: 11px;
  }
  body.has-review-sticky .rl-modal-save {
    letter-spacing: 0.02em;
  }
}
@media (min-width: 993px) {
  .dash-header-wide .page-subtitle,
  .list-header-wide .page-subtitle {
    max-width: 70ch;
  }
  .dash-resource-table.table-saas tbody td {
    font-size: 0.92rem;
    vertical-align: middle;
    padding-top: 0.58rem;
    padding-bottom: 0.58rem;
  }
  .dash-resource-table.table-saas tbody td:first-child a.fw-bold {
    font-weight: 700 !important;
  }
  .list-desktop-wrap .list-desktop-table.table-saas tbody td:nth-child(2) strong {
    font-weight: 700;
    color: var(--app-text);
  }
  .list-desktop-wrap .list-desktop-table.table-saas .btn-danger.btn-sm {
    min-width: 4.5rem;
  }
  .list-desktop-wrap .list-desktop-table.table-saas tbody td:last-child .btn-outline-dark,
  .list-desktop-wrap .list-desktop-table.table-saas tbody td:last-child .btn-outline-warning {
    opacity: 0.92;
  }
}

@media (min-width: 993px) {
  .dashboard-pro .dash-resource-table.table-saas tbody td {
    font-size: 0.82rem !important;
    padding: 8px 10px !important;
    height: 44px;
    box-sizing: border-box;
  }
}

/* Ubicación: vista consulta (técnicos / administración) */
.dl-loc-header.compact .badge {
  font-size: 0.72rem;
  font-weight: 600;
}
.dl-loc-qr-img {
  max-width: 120px;
  border: 1px solid var(--app-border);
  border-radius: 8px;
}
.dl-loc-actions .btn-primary-review {
  min-height: 48px;
  font-weight: 700;
}
@media (min-width: 993px) {
  .dl-loc-actions .btn-primary-review.btn-quick {
    min-height: 52px;
  }
}

/* ═══ Técnico móvil: sin menú superior duplicado (solo marca + barra inferior) ═══ */
@media (max-width: 992px) {
  body.app-role-tecnico .app-nav.app-nav--tecnico-mobile .navbar-toggler,
  body.app-role-tecnico .app-nav.app-nav--tecnico-mobile #mainNav.collapse {
    display: none !important;
  }
  body.app-role-tecnico .app-nav.app-nav--tecnico-mobile .navbar-collapse {
    display: none !important;
  }
  body.app-role-tecnico .app-nav.app-nav--tecnico-mobile {
    min-height: 2.35rem;
    padding-top: 0.18rem;
    padding-bottom: 0.18rem;
  }
  body.app-role-tecnico .app-nav.app-nav--tecnico-mobile .navbar-brand {
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    padding-top: 0.15rem;
    padding-bottom: 0.15rem;
  }
}

/* Hub técnico v2 (lista compacta, sin tarjetas grandes) */
.tecnico-hub-v2 {
  max-width: 520px;
  margin: 0 auto;
}
.tecnico-hub-v2__title {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.tecnico-hub-v2__time {
  font-size: 0.68rem;
}
.tecnico-hub-v2__line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.55rem;
  margin-bottom: 0.28rem;
  border: 1px solid var(--app-border);
  border-radius: var(--radius-sm);
  background: var(--app-surface);
  text-decoration: none;
  color: var(--app-text);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--app-shadow-sm);
}
.tecnico-hub-v2__line:active {
  background: color-mix(in srgb, var(--app-bg) 88%, #fff);
}
.tecnico-hub-v2__line--accent {
  border-color: color-mix(in srgb, var(--app-red) 35%, var(--app-border));
  background: color-mix(in srgb, var(--app-red) 7%, #fff);
}
.tecnico-hub-v2__ico {
  width: 1.85rem;
  text-align: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  color: var(--app-secondary);
}
.tecnico-hub-v2__line--accent .tecnico-hub-v2__ico {
  color: var(--app-red);
}
.tecnico-hub-v2__lbl {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}
.tecnico-hub-v2__chev {
  flex-shrink: 0;
  opacity: 0.35;
  font-size: 0.9rem;
}
.tecnico-hub-v2__mini li {
  padding: 0.15rem 0;
  border-bottom: 1px solid #f0f2f4;
}
.tecnico-hub-v2__mini li:last-child {
  border-bottom: none;
}

/* Escanear QR compacto */
.qr-scan-page {
  max-width: 420px;
  margin: 0 auto;
}
.qr-scan-title {
  font-size: 1rem;
  font-weight: 800;
}
.qr-scan-reader {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--app-border);
  min-height: 200px;
  background: #0f172a;
}
.qr-scan-reader video {
  border-radius: var(--radius-md);
}
.qr-scan-hint {
  font-size: 0.78rem;
  line-height: 1.35;
}

/* Alertas móvil más densas */
@media (max-width: 992px) {
  .alerts-page-compact .page-title {
    font-size: 1.05rem !important;
    margin-bottom: 0.25rem !important;
  }
  .alerts-page-compact .page-subtitle .badge {
    font-size: 0.65rem !important;
    padding: 0.2em 0.45em !important;
  }
  .alerts-page-compact header.page-header--app {
    margin-bottom: 0.5rem !important;
    padding-bottom: 0.35rem !important;
  }
  .alerts-page-compact header .btn-sm {
    padding: 0.2rem 0.45rem !important;
    font-size: 0.72rem !important;
    min-height: 30px !important;
  }
  .alerts-page-compact .alert-board-card .card-body {
    padding: 0.45rem 0.55rem !important;
  }
  .alerts-page-compact .alert-board-card .fw-bold.fs-6 {
    font-size: 0.88rem !important;
  }
  .alerts-page-compact .alert-board-card .badge {
    font-size: 0.62rem !important;
    padding: 0.15em 0.35em !important;
  }
  .alerts-page-compact .alert-board-card .btn-app-primary {
    padding: 0.22rem 0.45rem !important;
    font-size: 0.72rem !important;
    min-height: 30px !important;
  }
  .alerts-page-compact .alert-line-compact {
    padding-top: 0.28rem !important;
    padding-bottom: 0.28rem !important;
    font-size: 0.8rem !important;
  }
}

/* Revisión recurso: filas ubicación compactas en móvil */
@media (max-width: 992px) {
  .rv-mobile-panel--compact.mobile-list .mobile-list-item {
    min-height: auto !important;
    padding: 0.38rem 0.55rem !important;
    align-items: flex-start;
  }
  .rv-mobile-panel--compact .rv-meta-line {
    font-size: 0.72rem !important;
  }
  .rv-mobile-panel--compact .fw-semibold.small {
    font-size: 0.82rem !important;
  }
}

/* Dashboard admin en viewport estrecho: KPI y cabecera un poco más compactos */
@media (max-width: 992px) {
  body.app-role-desk .dash-admin-wrap .dashboard-pro .dash-kpis .kpi-value {
    font-size: 1.1rem !important;
  }
  body.app-role-desk .dash-admin-wrap .dashboard-pro .dash-kpis .kpi .card-body {
    padding: 0.45rem 0.55rem !important;
  }
  body.app-role-desk .dash-admin-wrap .dashboard-pro .dash-kpis .kpi-icon {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.85rem !important;
    margin-bottom: 0 !important;
  }
  body.app-role-desk .dash-admin-wrap .dashboard-pro .chart-canvas-h {
    height: 140px !important;
    max-height: 145px !important;
  }
  body.app-role-desk .dash-admin-wrap .dashboard-pro .dash-header-wide .page-title {
    font-size: 1.05rem !important;
  }
}

/* ── Pulido final UI móvil: hub técnico, revisar recurso, ubicación, alertas ── */
@media (max-width: 992px) {
  body.app-role-tecnico .tecnico-hub-v2--final .tecnico-hub-v2__title {
    font-size: 0.98rem;
    line-height: 1.22;
  }
  body.app-role-tecnico .tecnico-hub-v2--final .tecnico-hub-v2__line {
    padding: 0.32rem 0.45rem;
    margin-bottom: 0.2rem;
    font-size: 0.82rem;
    gap: 0.35rem;
  }
  body.app-role-tecnico .tecnico-hub-v2--final .tecnico-hub-v2__ico {
    width: 1.65rem;
    font-size: 1rem;
  }
  body.app-role-tecnico .tecnico-hub-v2--final .tecnico-hub-v2__subs .section-title {
    margin-top: 0.35rem;
    margin-bottom: 0.28rem;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
  }
  body.app-role-tecnico .tecnico-hub-v2--final .tecnico-hub-v2__subs {
    font-size: 0.78rem;
  }
  body.app-role-tecnico .tecnico-hub-v2--final .tecnico-hub-v2__subs p.mb-2 {
    margin-bottom: 0.45rem !important;
  }
  body.app-role-tecnico .tecnico-hub-v2--final .tecnico-hub-v2__mini li {
    padding: 0.1rem 0;
  }

  .rv-header--final {
    margin-bottom: 0.45rem !important;
    padding-bottom: 0.3rem !important;
    gap: 0.35rem !important;
  }
  .rv-header--final .rv-kicker {
    font-size: 0.62rem;
  }
  .rv-header--final .rv-title {
    font-size: 0.92rem;
    line-height: 1.2;
  }
  .rv-header--final .btn-app-primary.btn-sm {
    font-size: 0.72rem;
    padding: 0.2rem 0.45rem;
    min-height: 32px;
  }
  .rv-progress--final.soft-card {
    padding: 0.45rem 0.55rem !important;
    margin-bottom: 0.45rem !important;
  }

  .review-loc-sticky--final {
    margin-bottom: 0.35rem !important;
    padding-top: 0.18rem !important;
    padding-bottom: 0.18rem !important;
    gap: 0.35rem !important;
  }
  .review-loc-sticky--final .review-context-location {
    font-size: 1.12rem !important;
    line-height: 1.12 !important;
  }
  .review-loc-sticky--final .review-context-resource {
    font-size: 0.82rem !important;
    padding: 0.26rem 0.52rem !important;
  }
  .review-loc-sticky--final .review-context-progress {
    font-size: 0.88rem !important;
    min-width: 3.15rem !important;
    padding: 0.36rem 0.55rem !important;
  }
  .review-loc-sticky--final .review-context-label {
    font-size: 0.58rem !important;
    letter-spacing: 0.11em !important;
  }
  .review-loc-sticky--final .review-context-card-body {
    padding: 0.58rem 0.62rem 0.52rem 0.55rem !important;
    gap: 0.5rem !important;
  }
  .mobile-list.rl-child-block {
    margin-bottom: 0.55rem !important;
  }
  .rl-child-block .mobile-list-item {
    padding: 0.35rem 0.45rem !important;
    min-height: 0 !important;
  }
  .rl-precinto.mb-2 {
    padding: 0.55rem 0.65rem !important;
    margin-bottom: 0.55rem !important;
  }
  .rl-article-list .rl-row {
    padding: 0.42rem 0.5rem !important;
    min-height: 44px !important;
    gap: 0.4rem !important;
  }
  .review-sticky-btn .rl-sticky-save {
    padding-top: 0.65rem !important;
    padding-bottom: 0.65rem !important;
    font-size: 0.88rem !important;
  }
  .review-sticky-btn .rl-warn-pend {
    margin-bottom: 0.28rem !important;
    font-size: 0.72rem !important;
  }

  .alerts-head-final.page-header--app {
    margin-bottom: 0.4rem !important;
    padding-bottom: 0.3rem !important;
  }
  .alerts-page-compact .alerts-head-final .page-title {
    font-size: 1rem !important;
    margin-bottom: 0.2rem !important;
  }
  .alerts-page-compact .alerts-head-final .gap-2 {
    gap: 0.35rem !important;
  }
}

/* ══ UX: modal revisión móvil, rojo corporativo (#e52520), flashes compactos, alertas ══ */
.app-brand-danger-fill.btn-danger {
  --bs-btn-bg: #e52520;
  --bs-btn-border-color: #c91f1a;
  --bs-btn-hover-bg: #c91f1a;
  --bs-btn-hover-border-color: #b01a16;
  --bs-btn-active-bg: #b01a16;
  --bs-btn-active-border-color: #b01a16;
}
.btn-outline-danger {
  --bs-btn-color: #c91f1a;
  --bs-btn-border-color: color-mix(in srgb, #e52520 55%, var(--app-border));
}

.app-flash-msg {
  padding: 0.35rem 2.15rem 0.35rem 0.65rem !important;
  font-size: 0.82rem !important;
  line-height: 1.35 !important;
  margin-bottom: 0.5rem !important;
  border-radius: 8px !important;
}
.app-flash-msg.alert-success {
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  color: #065f46 !important;
}
.app-flash-msg .app-flash-msg__close {
  padding: 0.35rem;
  transform: scale(0.88);
  opacity: 0.75;
}

.rl-count-modal.modal-sheet {
  display: flex;
  flex-direction: column;
  max-height: min(92vh, 100dvh);
}
.rl-modal-sheet-inner {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  max-height: calc(100dvh - 16px);
}
.rl-modal-sheet-scroll {
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 auto;
}
.rl-modal-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}
.rl-modal-subtitle {
  font-size: 0.78rem;
}
.rl-modal-label {
  font-size: 0.78rem;
  margin-bottom: 0.25rem;
}
.rl-modal-actions {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid #eef2f6;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), #fff);
}
.rl-modal-save-sticky {
  min-height: 46px;
  font-size: 0.95rem;
}

@media (max-width: 992px) {
  #modal.modal-overlay:not(.modal-overlay--hidden) {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  #modal .rl-count-modal.modal-sheet {
    width: 100% !important;
    max-width: none !important;
    border-radius: 22px 22px 0 0 !important;
    max-height: calc(100dvh - 12px) !important;
  }
  #modal .rl-modal-sheet-inner {
    max-height: calc(100dvh - 12px);
  }
  #modal .rl-modal-title {
    font-size: 1.05rem !important;
    margin-bottom: 2px !important;
  }
  #modal .rl-modal-subtitle {
    font-size: 0.82rem !important;
    margin-bottom: 0.35rem !important;
  }
  #modal #m-cant.rl-modal-qty-input {
    font-size: 1.38rem !important;
    min-height: 52px !important;
    scroll-margin-bottom: 140px;
  }
  #modal .rl-modal-actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
    box-shadow: 0 -10px 22px rgba(15, 23, 42, 0.1);
  }
}

@media (max-width: 992px) {
  .alerts-page-compact .alert-board-card .card-body {
    padding: 0.35rem 0.45rem !important;
  }
  .alerts-page-compact .alert-board-card .fw-bold.fs-6 {
    font-size: 0.82rem !important;
  }
  .alerts-page-compact header.page-header--app .btn-sm {
    padding: 0.18rem 0.38rem !important;
    font-size: 0.68rem !important;
    min-height: 28px !important;
  }
  .alerts-page-compact .alert-line-compact {
    padding-top: 0.22rem !important;
    padding-bottom: 0.22rem !important;
    font-size: 0.76rem !important;
  }
}

/* Importación checklist Excel (admin) */
.checklist-import-card .form-label { font-size: 0.9rem; }
.checklist-preview-table-wrap { max-height: min(70vh, 720px); overflow: auto; }
.checklist-preview-table { font-size: 0.82rem; }
.checklist-preview-table td { vertical-align: top; }

@media print {
  body { background: #fff !important; }
  .no-print, .btn, nav, footer, .alert { display: none !important; }
  main.container-fluid.app-main { max-width: none; margin: 0; padding: 0; }
  .label-sheet { gap: 6mm; grid-template-columns: repeat(auto-fill, minmax(60mm, 1fr)); }
  .label-card { page-break-inside: avoid; box-shadow: none; }
}
