/* ========================================================
   SISTEMA DE DISEÑO Y ESTILOS — SERVICIO DE SISTEMAS Y TI
   AYUNTAMIENTO DE ALCALÁ DE GUADAÍRA
   ======================================================== */

:root {
  /* Paleta Claro (Default) */
  --bg-app: #f8fafc;
  --bg-card: #ffffff;
  --bg-panel: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #f8fafc;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  
  --border-light: #e2e8f0;
  --border-strong: #cbd5e1;
  
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  
  --success: #16a34a;
  --success-light: #f0fdf4;
  
  --warning: #d97706;
  --warning-light: #fffbeb;
  
  --danger: #dc2626;
  --danger-light: #fef2f2;
  
  --purple: #7c3aed;
  --purple-light: #f5f3ff;
  
  --teal: #0d9488;
  --teal-light: #f0fdfa;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* Paleta Oscuro */
body.theme-dark {
  --bg-app: #0f172a;
  --bg-card: #1e293b;
  --bg-panel: #1e293b;
  --bg-subtle: #334155;
  --bg-hover: #293548;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  
  --border-light: #334155;
  --border-strong: #475569;
  
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-light: rgba(59, 130, 246, 0.15);
  
  --success: #22c55e;
  --success-light: rgba(34, 197, 94, 0.15);
  
  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.15);
  
  --danger: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.15);
  
  --purple: #a855f7;
  --purple-light: rgba(168, 85, 247, 0.15);
  
  --teal: #14b8a6;
  --teal-light: rgba(20, 184, 166, 0.15);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

/* RESET BASE */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  font-size: 13.5px;
  -webkit-font-smoothing: antialiased;
}

/* NAVBAR */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  padding: 0 24px;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  font-size: 22px;
}

.brand-text h1 {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
}

.brand-text span {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
}

/* PESTAÑAS DE NAVEGACIÓN */
.nav-tabs {
  display: flex;
  height: 100%;
  gap: 4px;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 0 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  height: 100%;
}

.nav-tab:hover {
  color: var(--text-main);
  background-color: var(--bg-subtle);
}

.nav-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background-color: var(--bg-subtle);
}

.badge-count {
  font-size: 11px;
  font-weight: 700;
  background-color: var(--border-light);
  color: var(--text-muted);
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.nav-tab.active .badge-count {
  background-color: var(--primary);
  color: white;
}

.badge-urgent {
  background-color: var(--danger-light);
  color: var(--danger);
  border: 1px solid var(--danger);
}

/* ACCIONES DE NAVBAR */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.data-source-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 14px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #94a3b8;
}

.status-dot.online {
  background-color: var(--success);
  box-shadow: 0 0 6px var(--success);
}

.status-dot.cached {
  background-color: var(--warning);
}

/* BOTONES */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  font-size: 13px;
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: var(--bg-subtle);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background-color: var(--border-light);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border-strong);
  color: var(--text-main);
}

.btn-outline:hover {
  background-color: var(--bg-subtle);
}

.btn-light {
  background-color: white;
  color: #0f172a;
}

.btn-light:hover {
  background-color: #f1f5f9;
}

.btn-ghost {
  background-color: transparent;
  color: var(--primary);
  padding: 4px 8px;
}

.btn-ghost:hover {
  background-color: var(--primary-light);
}

.btn-icon {
  background-color: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-sm);
  font-size: 15px;
}

.btn-icon:hover {
  background-color: var(--border-light);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

/* CONTENEDOR PRINCIPAL Y PESTAÑAS */
.main-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 16px 24px;
  box-sizing: border-box;
  transition: max-width 0.2s ease, padding 0.2s ease;
}

/* Modo contenedor centrado / compacto opcional */
body.container-boxed .main-container {
  max-width: 1440px;
  margin: 0 auto;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ========================================================
   DASHBOARD / PANEL GENERAL
   ======================================================== */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.dashboard-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

/* KPI GRID */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}

.kpi-card.clickable {
  cursor: pointer;
}

.kpi-card.clickable:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.kpi-blue::before { background-color: var(--primary); }
.kpi-red::before { background-color: var(--danger); }
.kpi-orange::before { background-color: var(--warning); }
.kpi-purple::before { background-color: var(--purple); }
.kpi-indigo::before { background-color: #6366f1; }
.kpi-teal::before { background-color: var(--teal); }
.kpi-green::before { background-color: var(--success); }

.kpi-card .kpi-icon {
  font-size: 22px;
  margin-bottom: 6px;
}

.kpi-data {
  display: flex;
  flex-direction: column;
}

.kpi-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-main);
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-top: 2px;
}

.kpi-sub {
  font-size: 11.5px;
  color: var(--text-subtle);
  margin-top: 8px;
}

/* CAJAS DE PANELES */
.panel-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  overflow: hidden;
}

.panel-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-subtle);
}

.panel-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.panel-body {
  padding: 18px;
}

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .grid-2col {
    grid-template-columns: 1fr;
  }
}

/* BARRAS DE PROGRESO / DISTRIBUCIÓN */
.bars-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
}

.bar-track {
  height: 8px;
  background-color: var(--bg-subtle);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* LISTAS COMPACTAS (MINI-LIST) */
.mini-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background-color: var(--bg-subtle);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.mini-list-item:hover {
  background-color: var(--bg-hover);
  border-color: var(--primary);
}

.mini-list-left {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.mini-list-title {
  font-weight: 600;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 380px;
}

/* ========================================================
   TOOLBAR Y FILTROS
   ======================================================== */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  background-color: var(--bg-card);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex-grow: 1;
  min-width: 260px;
}

.search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  font-size: 14px;
}

.search-box input {
  width: 100%;
  padding: 7px 32px 7px 32px;
  font-size: 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background-color: var(--bg-app);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s ease;
}

.search-box input:focus {
  border-color: var(--primary);
  background-color: var(--bg-card);
}

.btn-clear {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.form-select {
  padding: 7px 12px;
  font-size: 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background-color: var(--bg-app);
  color: var(--text-main);
  outline: none;
}

.form-select:focus {
  border-color: var(--primary);
}

/* TOGGLE CONTROL */
.toggle-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 12.5px;
  font-weight: 600;
}

.toggle-control input {
  display: none;
}

.toggle-slider {
  width: 32px;
  height: 18px;
  background-color: var(--border-strong);
  border-radius: 10px;
  position: relative;
  transition: background-color 0.2s ease;
}

.toggle-slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.toggle-control input:checked + .toggle-slider {
  background-color: var(--danger);
}

.toggle-control input:checked + .toggle-slider::after {
  transform: translateX(14px);
}

.view-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.count-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.ml-auto {
  margin-left: auto;
}

/* ========================================================
   TABLAS DE DATOS
   ======================================================== */
.table-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
  table-layout: fixed;
}

#tablaTareas {
  min-width: 1700px;
}

.data-table thead {
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-table th {
  padding: 8px 10px;
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background-color 0.1s ease;
  cursor: pointer;
}

.data-table tbody tr:hover {
  background-color: var(--bg-hover);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* ELEMENTOS DE CELDA */
.id-badge {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.cell-title {
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}

.cell-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* BADGES DE PRIORIDAD Y ESTADO */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

.prio-p1 { background-color: var(--danger-light); color: var(--danger); border: 1px solid rgba(220, 38, 38, 0.3); }
.prio-p2 { background-color: var(--warning-light); color: var(--warning); border: 1px solid rgba(217, 119, 6, 0.3); }
.prio-p3 { background-color: var(--primary-light); color: var(--primary); border: 1px solid rgba(37, 99, 235, 0.3); }
.prio-s1 { background-color: var(--purple-light); color: var(--purple); border: 1px solid rgba(124, 58, 237, 0.3); }
.prio-p4 { background-color: var(--bg-subtle); color: var(--text-muted); border: 1px solid var(--border-light); }
.prio-p5 { background-color: var(--bg-subtle); color: var(--text-muted); border: 1px solid var(--border-light); }


.status-pendiente { background-color: var(--bg-subtle); color: var(--text-muted); }
.status-en-curso { background-color: var(--primary-light); color: var(--primary); }
.status-en-espera { background-color: var(--warning-light); color: var(--warning); }
.status-completado { background-color: var(--success-light); color: var(--success); }
.status-anulado { background-color: var(--danger-light); color: var(--danger); text-decoration: line-through; }

.foco-fire {
  font-size: 16px;
  text-align: center;
  display: block;
}

/* ========================================================
   FOCO DEL DÍA (TAB 3)
   ======================================================== */
.foco-header-banner {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.foco-banner-content h2 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
}

.foco-banner-content p {
  font-size: 13px;
  opacity: 0.9;
}

.foco-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.foco-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-left: 5px solid var(--danger);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.foco-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.foco-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.foco-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 8px;
}

.foco-card-body {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
  background-color: var(--bg-subtle);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.foco-card-footer {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 5px;
  border-top: 1px solid var(--border-light);
  padding-top: 10px;
}

/* ========================================================
   REORDENACIÓN DE TARJETAS EN FOCO DIARIO (DRAG & DROP)
   ======================================================== */
.foco-drag-handle {
  font-size: 15px;
  color: var(--text-muted);
  cursor: grab;
  user-select: none;
  padding: 0 2px;
  line-height: 1;
  transition: color 0.15s ease;
  opacity: 0.6;
}

.foco-card:hover .foco-drag-handle {
  opacity: 1;
  color: var(--primary);
}

.foco-drag-handle:active {
  cursor: grabbing;
}

.foco-card[draggable="true"] {
  cursor: grab;
}

.foco-card.dragging {
  opacity: 0.4;
  border: 2px dashed var(--danger);
  transform: scale(0.97);
  box-shadow: var(--shadow-sm);
}

.foco-card.drag-over {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2), var(--shadow-md) !important;
  transform: translateY(-4px) scale(1.02);
  transition: all 0.15s ease;
}

/* ========================================================
   SUBTABS DE CONTRATOS (PILLS)
   ======================================================== */
.tab-pills {
  display: flex;
  gap: 6px;
}

.pill {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill:hover {
  background-color: var(--border-light);
  color: var(--text-main);
}

.pill.active {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

.subtab-content {
  display: none;
}

.subtab-content.active {
  display: block;
}

/* ========================================================
   GANTT TABLE (OBJETIVOS)
   ======================================================== */
.gantt-months-header {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  padding: 8px 4px;
  background-color: var(--bg-subtle);
  border-left: 1px solid var(--border-light);
}

.gantt-row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  height: 24px;
  align-items: center;
  padding: 0 4px;
  border-left: 1px solid var(--border-light);
}

.gantt-bar {
  height: 14px;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

/* ========================================================
   MODAL DE DETALLE
   ======================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100;
  padding: 20px;
}

.modal-backdrop.show {
  display: flex;
}

.modal-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 960px;
  min-width: 560px;
  max-width: 96vw;
  height: auto;
  min-height: 480px;
  max-height: 92vh;
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: relative;
  resize: both;
  overflow: hidden;
  box-sizing: border-box;
}

.modal-card.is-maximized {
  width: 98vw !important;
  height: 94vh !important;
  max-width: 98vw !important;
  max-height: 94vh !important;
  border-radius: var(--radius-md);
  resize: none;
}

@keyframes modalAttentionPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.018); box-shadow: 0 0 0 6px var(--primary-light), var(--shadow-lg); }
  100% { transform: scale(1); }
}

.modal-card.modal-attention-pulse {
  animation: modalAttentionPulse 0.35s ease;
}

.modal-card::-webkit-resizer {
  background: transparent;
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  user-select: none;
}

.modal-title-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title-area h2 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-main);
}

.modal-id-badge {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  font-weight: 800;
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 3px 8px;
  border-radius: 4px;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.modal-close-btn:hover {
  color: var(--text-main);
}

.modal-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  padding: 16px 24px;
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
}

.modal-meta-item {
  font-size: 12px;
}

.modal-meta-item .lbl {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 10px;
}

.modal-meta-item .val {
  color: var(--text-main);
  font-weight: 700;
  margin-top: 1px;
}

.modal-body-section {
  padding: 14px 24px;
}

.modal-body-section h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.modal-text-block {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-main);
  white-space: pre-wrap;
  line-height: 1.5;
}

.modal-text-block.highlight-blue {
  background-color: var(--primary-light);
  border-color: rgba(37, 99, 235, 0.2);
  color: var(--primary);
  font-weight: 600;
}

.modal-text-block.highlight-green {
  background-color: var(--success-light);
  border-color: rgba(22, 163, 74, 0.2);
  color: var(--success);
}

.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-subtle);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  gap: 12px;
}

.modal-footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* ESTILOS DE EDICIÓN EN MODAL */
.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-edit-mode {
  font-size: 11px;
  font-weight: 700;
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 3px 8px;
  border-radius: 12px;
}

body.theme-dark .badge-edit-mode {
  background-color: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

#modalViewMode {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

#modalEditMode {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

#modalEditMode[style*="display: block"],
#modalEditMode[style*="display: flex"] {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

#modalViewMode[style*="display: block"],
#modalViewMode[style*="display: flex"] {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.modal-edit-body {
  padding: 18px 24px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.modal-action-btn {
  background: none;
  border: 1px solid transparent;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.15s ease;
}

.modal-action-btn:hover {
  color: var(--text-main);
  background-color: var(--bg-hover);
  border-color: var(--border-light);
}

.modal-resize-handle {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  color: var(--text-muted);
  opacity: 0.65;
  z-index: 25;
  user-select: none;
  transition: opacity 0.15s ease, color 0.15s ease, transform 0.15s ease;
  pointer-events: auto;
}

.modal-resize-handle:hover {
  opacity: 1;
  color: var(--primary);
  transform: scale(1.15);
}

.modal-card.is-maximized .modal-resize-handle {
  display: none;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-label .required {
  color: var(--danger);
}

.form-input, .form-textarea {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background-color: var(--bg-card);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-textarea {
  resize: vertical;
  line-height: 1.45;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

.form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.form-grid-2 > *,
.form-grid-3 > *,
.form-grid-4 > * {
  min-width: 0;
}

@media (max-width: 900px) {
  .form-grid-4 {
    grid-template-columns: 1fr 1fr;
  }
}

.flex-center-start {
  display: flex;
  align-items: center;
}

kbd {
  background-color: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.1);
  font-size: 10.5px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  padding: 1px 5px;
  color: var(--text-main);
}

/* ========================================================
   EDICIÓN EN LÍNEA DIRECTA (INLINE EDITING)
   ======================================================== */
.id-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.id-badge.clickable {
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.id-badge.clickable:hover {
  background-color: var(--primary);
  color: white;
  transform: scale(1.06);
}

.save-status-indicator {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  border-radius: 50%;
  transition: all 0.25s ease;
  opacity: 0;
  pointer-events: none;
}

.save-status-indicator.saving {
  opacity: 1;
  width: 10px;
  height: 10px;
  border: 2px solid var(--primary);
  border-top-color: transparent;
  border-radius: 50%;
  animation: inlineSpin 0.6s linear infinite;
}

.save-status-indicator.saved {
  opacity: 1;
  color: var(--success);
  transform: scale(1.15);
}

.save-status-indicator.error {
  opacity: 1;
  color: var(--danger);
}

/* Título editable en línea */
.inline-edit {
  font-family: inherit;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.inline-title {
  width: 100%;
  min-height: 28px;
  line-height: 1.35;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  box-sizing: border-box;
  resize: none;
  overflow: hidden;
  display: block;
}

.inline-title:hover {
  background-color: var(--bg-hover);
  border-color: var(--border-light);
}

.inline-title:focus {
  background-color: var(--bg-card);
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
  outline: none;
}

.cell-sub.clickable {
  cursor: pointer;
  margin-top: 3px;
  transition: color 0.15s ease;
}

.cell-sub.clickable:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Selects en línea (Prioridad, Estado, Categoría) */
.inline-select {
  cursor: pointer;
  outline: none;
  font-family: inherit;
  transition: all 0.15s ease;
}

.inline-select.badge {
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 20px 3px 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid transparent;
  max-width: 100%;
  box-sizing: border-box;
}

.inline-select.badge:hover {
  border-color: currentColor;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.inline-select.badge:focus {
  box-shadow: 0 0 0 2px var(--primary-light);
}

.inline-select.inline-cat {
  background-color: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 20px 4px 7px;
  width: 100%;
  max-width: 140px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  appearance: none;
  -webkit-appearance: none;
}

.inline-select.inline-cat:hover {
  border-color: var(--border-strong);
  background-color: var(--bg-card);
}

.inline-select.inline-cat:focus {
  border-color: var(--primary);
  background-color: var(--bg-card);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.inline-select.inline-tipo {
  background-color: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 18px 3px 6px;
  width: 100%;
  max-width: 130px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 5px center;
  appearance: none;
  -webkit-appearance: none;
}

.inline-select.inline-tipo:hover {
  border-color: var(--border-strong);
  background-color: var(--bg-card);
}

.inline-select.inline-tipo:focus {
  border-color: var(--primary);
  background-color: var(--bg-card);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.inline-select option {
  background-color: var(--bg-card);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 500;
}

/* Responsable y Contacto en línea */
.inline-people-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.inline-input-row {
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: var(--bg-subtle);
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 1px 6px;
  transition: all 0.15s ease;
}

.inline-input-row:hover {
  background-color: var(--bg-card);
  border-color: var(--border-light);
}

.inline-input-row:focus-within {
  background-color: var(--bg-card);
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.inline-person-icon {
  font-size: 11px;
  opacity: 0.6;
  user-select: none;
  flex-shrink: 0;
}

.inline-input-person {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 11.5px;
  color: var(--text-main);
  width: 100%;
  outline: none;
  padding: 2px 0;
}

.inline-input-person::placeholder {
  color: var(--text-subtle);
  font-style: italic;
  font-size: 11px;
}

/* Fecha Límite en línea */
.inline-input-date {
  border: 1px solid var(--border-light);
  background-color: var(--bg-subtle);
  border-radius: 4px;
  font-family: inherit;
  font-size: 11.5px;
  color: var(--text-main);
  padding: 3px 5px;
  outline: none;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
}

.inline-input-date:hover {
  border-color: var(--border-strong);
  background-color: var(--bg-card);
}

.inline-input-date:focus {
  border-color: var(--primary);
  background-color: var(--bg-card);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.inline-input-kr {
  border: 1px solid var(--border-light);
  background-color: var(--bg-subtle);
  border-radius: 4px;
  font-family: inherit;
  font-size: 11.5px;
  color: var(--text-main);
  padding: 3px 6px;
  outline: none;
  width: 100%;
  transition: all 0.15s ease;
}

.inline-input-kr:hover {
  border-color: var(--border-strong);
  background-color: var(--bg-card);
}

.inline-input-kr:focus {
  border-color: var(--primary);
  background-color: var(--bg-card);
  box-shadow: 0 0 0 2px var(--primary-light);
}

/* Botón Detalle */
.btn-detalle-row {
  color: var(--text-muted);
  border-color: var(--border-light);
  background-color: var(--bg-card);
  font-weight: 600;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-detalle-row:hover {
  background-color: var(--bg-subtle);
  color: var(--primary);
  border-color: var(--primary);
}

/* Animaciones y Estados de Guardado */
@keyframes inlineSpin {
  to { transform: rotate(360deg); }
}

@keyframes inlinePulse {
  from { box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2); }
  to { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.6); }
}

@keyframes savedFlash {
  0% {
    background-color: var(--success-light);
    border-color: var(--success);
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.3);
  }
  100% {
    box-shadow: none;
  }
}

.inline-edit.is-saving, .inline-select.is-saving {
  animation: inlinePulse 0.7s infinite alternate !important;
}

.inline-edit.is-saved, .inline-select.is-saved {
  animation: savedFlash 1.2s ease forwards !important;
}

.inline-edit.is-error, .inline-select.is-error {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.3) !important;
}

/* Foco Cards Inline Inputs */
.foco-card-title-input {
  width: 100%;
  min-height: 28px;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 3px 5px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  background: transparent;
  resize: none;
  line-height: 1.35;
  margin-bottom: 6px;
  font-family: inherit;
  transition: all 0.15s ease;
}

.foco-card-title-input:hover {
  background: var(--bg-subtle);
  border-color: var(--border-light);
}

.foco-card-title-input:focus {
  background: var(--bg-card);
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
  outline: none;
}

.foco-card-action-input {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 2px 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: transparent;
  outline: none;
  font-family: inherit;
  transition: all 0.15s ease;
}

.foco-card-action-input:hover {
  background: var(--bg-subtle);
  border-color: var(--border-light);
}

.foco-card-action-input:focus {
  background: var(--bg-card);
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

/* BOTONES DE ACCIÓN EN TABLA */
.btn-xs {
  padding: 3px 8px;
  font-size: 11.5px;
  border-radius: var(--radius-sm);
}

.btn-editar-row {
  color: var(--primary);
  border-color: var(--border-light);
  background-color: var(--bg-card);
  font-weight: 600;
  transition: all 0.15s ease;
}

.btn-editar-row:hover {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-foco-toggle {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: transform 0.15s ease, opacity 0.15s ease;
  opacity: 0.35;
}

.btn-foco-toggle:hover {
  transform: scale(1.25);
  opacity: 1;
}

.btn-foco-toggle.active {
  opacity: 1;
  filter: drop-shadow(0 0 3px rgba(220, 38, 38, 0.4));
}

/* TOASTS FLOTANTES */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 300px;
  max-width: 440px;
  background-color: var(--bg-card);
  color: var(--text-main);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: slideInToast 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast-success {
  border-left: 5px solid var(--success);
}

.toast-error {
  border-left: 5px solid var(--danger);
}

.toast-info {
  border-left: 5px solid var(--primary);
}

@keyframes slideInToast {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .navbar {
    height: auto;
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .nav-tabs {
    order: 3;
    width: 100%;
    overflow-x: auto;
    height: 40px;
  }
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-group {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ========================================================
   SECCIÓN: INFORME TEMPORAL / PLAN OPERATIVO PRIORITARIO
   ======================================================== */

.informe-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  gap: 12px;
}

.informe-top-title h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.informe-top-title .subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

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

.informe-nav-links {
  display: flex;
  gap: 6px;
  margin-right: 6px;
}

.btn-nav {
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-nav:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* CONTENEDOR DEL DOCUMENTO */
.informe-doc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 28px 34px;
  margin-top: 10px;
  position: relative;
}

body.container-boxed .informe-doc-card {
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}

/* CABECERA PRINCIPAL DEL INFORME */
.header-doc {
  border-bottom: 2.5px solid var(--text-main);
  padding-bottom: 12px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.header-title h1 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.header-title p {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.header-meta {
  text-align: right;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

.header-meta strong {
  color: var(--text-main);
}

/* FILTROS RÁPIDOS EN PANTALLA */
.filter-bar {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--bg-subtle);
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 18px;
}

.filter-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-right: 4px;
}

.chip-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chip-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.chip-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* TIRETA DE RESUMEN COGNITIVO */
.summary-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.summary-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 8px 10px;
  text-align: center;
  transition: all 0.15s ease;
}

.summary-box.highlight {
  background: var(--danger-light);
  border-color: rgba(220, 38, 38, 0.35);
}

.summary-box .num {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

.summary-box.highlight .num {
  color: var(--danger);
}

.summary-box .lbl {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  margin-top: 3px;
}

/* SEPARADOR DE GRANDES APARTADOS */
.apartado-divider {
  background: #0f172a;
  color: #ffffff;
  padding: 9px 14px;
  border-radius: 6px;
  margin: 28px 0 12px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.apartado-divider h2 {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #ffffff;
}

.apartado-badge {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.18);
  padding: 2px 9px;
  border-radius: 12px;
  font-weight: 500;
  color: #ffffff;
}

.apartado-intro {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding: 0 4px;
  line-height: 1.45;
}

/* APARTADO 1: MATRIZ ESQUEMÁTICA EN 1 FILA COMPLETA */
.apartado-1-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sch-block {
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: var(--bg-card);
  overflow: hidden;
  page-break-inside: avoid;
  break-inside: avoid;
}

.sch-block.focus-block { border-left: 4px solid #dc2626; border-color: rgba(220, 38, 38, 0.3); }
.sch-block.calls-block { border-left: 4px solid #0284c7; }
.sch-block.deep-block { border-left: 4px solid #7c3aed; }
.sch-block.quick-block { border-left: 4px solid #059669; }
.sch-block.field-block { border-left: 4px solid #d97706; }

.sch-block-header {
  background: var(--bg-subtle);
  padding: 7px 12px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sch-block-title {
  display: flex;
  align-items: center;
  gap: 7px;
}

.sch-block-title .sch-icon { font-size: 14px; }
.sch-block-title h3 { font-size: 12.5px; font-weight: 700; color: var(--text-main); }

.sch-count-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
}

.sch-rows-list {
  display: flex;
  flex-direction: column;
}

.sch-subblock-header {
  background: var(--bg-subtle);
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.sch-subblock-header:first-child {
  border-top: none;
}

.sch-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--border-light);
  font-size: 12px;
  transition: background 0.1s ease;
}

.sch-row:last-child {
  border-bottom: none;
}

.sch-row:hover {
  background: var(--bg-hover);
}

.sch-cb {
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--border-strong);
  border-radius: 3px;
  cursor: pointer;
  flex-shrink: 0;
  background: var(--bg-card);
  position: relative;
  margin-top: 2px;
  transition: all 0.12s ease;
}

.sch-cb.checked {
  background: var(--primary);
  border-color: var(--primary);
}

.sch-cb.checked::after {
  content: "✓";
  color: white;
  font-size: 11px;
  font-weight: bold;
  position: absolute;
  top: -2px;
  left: 2px;
}

.sch-row.checked .sch-desc {
  text-decoration: line-through;
  opacity: 0.55;
}

.sch-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 1px 5px;
  border-radius: 3px;
  text-decoration: none;
  flex-shrink: 0;
  min-width: 58px;
  text-align: center;
  line-height: 1.35;
  margin-top: 1px;
  cursor: pointer;
}

.sch-id:hover {
  text-decoration: underline;
}

.sch-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 70px;
  text-align: center;
  line-height: 1.35;
  margin-top: 1px;
}

.tag-normal { background: var(--bg-subtle); color: var(--text-muted); border: 1px solid var(--border-light); }
.tag-expte { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; font-weight: 700; }
.tag-contact { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.tag-deep { background: var(--purple-light); color: var(--purple); border: 1px solid rgba(124, 58, 237, 0.25); }
.tag-quick { background: var(--success-light); color: var(--success); border: 1px solid rgba(22, 163, 74, 0.25); }
.tag-pc { background: var(--primary-light); color: var(--primary); border: 1px solid var(--primary-hover); }
.tag-field { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.tag-call { background: #e0f2fe; color: #0284c7; }
.tag-urgent { background: #fee2e2; color: #991b1b; font-weight: 700; border: 1px solid #fca5a5; }

.sch-desc {
  color: var(--text-main);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  flex-grow: 1;
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: break-word;
  cursor: pointer;
}

.sch-desc:hover {
  color: var(--primary);
  text-decoration: underline;
}

.sch-edit-btn {
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.35;
  font-size: 12px;
  padding: 1px 3px;
  border-radius: 3px;
  transition: all 0.15s ease;
  flex-shrink: 0;
  margin-top: 1px;
}

.sch-row:hover .sch-edit-btn {
  opacity: 0.9;
}

.sch-edit-btn:hover {
  background: var(--bg-subtle);
  transform: scale(1.15);
}

/* APARTADO 2: DOSSIER DETALLADO */
.section-group {
  margin-bottom: 24px;
}

.section-header {
  border-bottom: 2px solid var(--primary);
  padding-bottom: 6px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.section-header.urgent {
  border-bottom-color: var(--danger);
}

.section-header h2 {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.2px;
}

.section-header.urgent h2 {
  color: var(--danger);
}

.section-badge {
  font-size: 11px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  border: 1px solid var(--border-light);
}

.task-card {
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 12px;
  background: var(--bg-card);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  page-break-inside: avoid;
  break-inside: avoid;
}

.task-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.task-card.focus-card {
  border-left: 4px solid var(--danger);
  background: rgba(220, 38, 38, 0.02);
}

.task-card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}

.task-checkbox {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-strong);
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 1px;
  display: inline-block;
  cursor: pointer;
  background: var(--bg-card);
  position: relative;
  transition: all 0.12s ease;
}

.task-checkbox.checked {
  background: var(--primary);
  border-color: var(--primary);
}

.task-checkbox.checked::after {
  content: "✓";
  color: white;
  font-size: 11px;
  font-weight: bold;
  position: absolute;
  top: -2px;
  left: 2px;
}

.task-card.checked .task-title {
  text-decoration: line-through;
  opacity: 0.55;
}

.task-title-wrap {
  flex-grow: 1;
}

.task-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 1px 5px;
  border-radius: 4px;
  margin-right: 5px;
  cursor: pointer;
}

.task-id:hover {
  text-decoration: underline;
}

.task-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
}

.btn-back-top {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 2px 7px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  flex-shrink: 0;
  transition: all 0.15s ease;
  cursor: pointer;
}

.btn-back-top:hover {
  background: var(--border-light);
  color: var(--primary);
}

.btn-card-edit {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 2px 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-card-edit:hover {
  background: var(--primary);
  color: #ffffff;
}

.task-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 6px 0 8px 26px;
  font-size: 11px;
}

.meta-tag {
  background: var(--bg-subtle);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--text-muted);
  font-weight: 500;
  border: 1px solid var(--border-light);
}

.meta-tag strong {
  color: var(--text-main);
}

.meta-tag.expte {
  background: #fef3c7;
  color: #92400e;
  font-weight: 700;
  border: 1px solid #fde68a;
}

.meta-tag.contact {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 600;
  border: 1px solid #bae6fd;
}

.task-body {
  margin-left: 26px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.45;
}

.task-deliverable {
  margin: 6px 0 0 26px;
  font-size: 11.5px;
  color: var(--text-main);
}

.task-next-action {
  margin: 7px 0 0 26px;
  padding: 6px 10px;
  background: var(--primary-light);
  border-left: 3px solid var(--primary);
  border-radius: 0 4px 4px 0;
  font-size: 11.5px;
  color: var(--primary);
  line-height: 1.4;
}

.task-next-action strong {
  color: var(--primary-hover);
}

.task-next-action.pending {
  background: var(--bg-subtle);
  border-left-color: var(--border-strong);
  color: var(--text-muted);
}

.informe-footer {
  margin-top: 28px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* EFECTO PULSO AL SALTAR DESDE EL ESQUEMA AL DETALLE */
@keyframes pulseHighlight {
  0% { background-color: rgba(37, 99, 235, 0.28); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.35); }
  50% { background-color: rgba(37, 99, 235, 0.14); box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2); }
  100% { background-color: transparent; box-shadow: none; }
}

.card-highlight-pulse {
  animation: pulseHighlight 1.8s ease-out;
}

/* MODO OSCURO PARA INFORME TEMPORAL */
body.theme-dark .apartado-divider {
  background: #090e17;
  border: 1px solid var(--border-strong);
}

body.theme-dark .tag-expte {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

body.theme-dark .tag-contact {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.35);
}

body.theme-dark .tag-urgent {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
}

body.theme-dark .tag-field {
  background: rgba(217, 119, 6, 0.18);
  color: #fbbf24;
  border-color: rgba(217, 119, 6, 0.35);
}

body.theme-dark .meta-tag.expte {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

body.theme-dark .meta-tag.contact {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.35);
}

body.theme-dark .task-next-action {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border-left-color: #3b82f6;
}

body.theme-dark .task-next-action strong {
  color: #bfdbfe;
}

/* ========================================================
   SECCIÓN: SUPERVISIÓN Y EN ESPERA (WAITING FOR)
   ======================================================== */
.supervision-header-banner {
  background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
  color: white;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  gap: 16px;
  flex-wrap: wrap;
}

.supervision-banner-content h2 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
  color: #ffffff;
}

.supervision-banner-content p {
  font-size: 13px;
  opacity: 0.92;
  color: #e0e7ff;
}

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

.btn-warning-soft {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-warning-soft:hover {
  background: #fde68a;
  color: #78350f;
}

.btn-outline-white {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
}

.supervision-stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.supervision-stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  user-select: none;
}

.supervision-stat-box.clickable {
  cursor: pointer;
}

.supervision-stat-box.clickable:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--primary);
}

.supervision-stat-box .num {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  margin-bottom: 4px;
}

.supervision-stat-box .lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.supervision-stat-box.urgent {
  border-left: 4px solid var(--danger);
}

.supervision-stat-box.urgent .num {
  color: var(--danger);
}

.supervision-stat-box.warning {
  border-left: 4px solid var(--warning);
}

.supervision-stat-box.warning .num {
  color: var(--warning);
}

.supervision-stat-box.success {
  border-left: 4px solid var(--success);
}

.supervision-stat-box.success .num {
  color: var(--success);
}

.supervision-stat-box.neutral {
  border-left: 4px solid var(--text-muted);
}

.supervision-stat-box.neutral .num {
  color: var(--text-muted);
}

.supervision-stat-box.active {
  border-color: var(--primary);
  background-color: var(--primary-light);
  box-shadow: 0 0 0 2px var(--primary);
  transform: translateY(-2px);
}

.supervision-stat-box.urgent.active {
  border-color: var(--danger);
  background-color: var(--danger-light);
  box-shadow: 0 0 0 2px var(--danger);
}

.supervision-stat-box.warning.active {
  border-color: var(--warning);
  background-color: var(--warning-light);
  box-shadow: 0 0 0 2px var(--warning);
}

.supervision-stat-box.success.active {
  border-color: var(--success);
  background-color: var(--success-light);
  box-shadow: 0 0 0 2px var(--success);
}

.supervision-stat-box.neutral.active {
  border-color: var(--text-muted);
  background-color: var(--bg-subtle);
  box-shadow: 0 0 0 2px var(--text-muted);
}

.supervision-date-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.supervision-alert-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  white-space: nowrap;
}

.badge-alerta-vencida {
  background-color: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(220, 38, 38, 0.4);
}

.badge-alerta-hoy {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #f87171;
  font-weight: 800;
}

.row-revision-urgente {
  background-color: rgba(239, 68, 68, 0.035);
}

.row-revision-urgente td:first-child {
  border-left: 3px solid var(--danger);
}

.badge-alerta-proxima {
  background-color: var(--purple-light);
  color: var(--purple);
  border: 1px solid rgba(124, 58, 237, 0.3);
}

.badge-alerta-ok {
  background-color: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-alerta-sin-fecha {
  background-color: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px dashed var(--border-light);
  font-style: italic;
}

.action-buttons-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn-posponer {
  background: var(--bg-subtle);
  color: var(--purple);
  border-color: rgba(124, 58, 237, 0.3);
  font-weight: 700;
  font-size: 11px;
  padding: 2px 6px;
}

.btn-posponer:hover {
  background: var(--purple-light);
  border-color: var(--purple);
}

.inline-input-action {
  width: 100%;
  border: 1px solid transparent;
  background-color: var(--bg-subtle);
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 12px;
  color: var(--text-main);
  transition: all 0.15s ease;
}

.inline-input-action:hover {
  border-color: var(--border-light);
  background-color: var(--bg-card);
}

.inline-input-action:focus {
  border-color: var(--primary);
  background-color: var(--bg-card);
  box-shadow: 0 0 0 1px var(--primary);
  outline: none;
}

body.theme-dark .btn-warning-soft {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}

body.theme-dark .badge-alerta-hoy {
  background-color: rgba(220, 38, 38, 0.25);
  color: #fca5a5;
  border-color: rgba(220, 38, 38, 0.5);
}

/* ========================================================
   REGLAS PARA IMPRESIÓN Y PDF A4 (IDÉNTICO A INFORME-TEMPORAL)
   ======================================================== */
@media print {
  @page {
    size: A4 portrait;
    margin: 7mm 8mm 7mm 8mm;
  }

  body {
    background-color: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
    font-size: 8pt !important;
  }

  .navbar,
  .toolbar,
  .no-print,
  .modal-backdrop,
  .toast-container,
  #tab-dashboard,
  #tab-tareas,
  #tab-foco,
  #tab-contratos,
  #tab-objetivos,
  #tab-historico {
    display: none !important;
  }

  #tab-informe {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .informe-doc-card {
    max-width: 100% !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: #ffffff !important;
    color: #000000 !important;
  }

  .header-doc {
    border-bottom: 1.5px solid #000000 !important;
    margin-bottom: 6px !important;
    padding-bottom: 3px !important;
  }

  .header-title h1 {
    font-size: 13pt !important;
    margin-bottom: 1px !important;
    color: #000000 !important;
  }

  .header-title p {
    font-size: 8pt !important;
    color: #333333 !important;
  }

  .header-meta {
    font-size: 7.5pt !important;
    line-height: 1.3 !important;
    color: #333333 !important;
  }

  .summary-strip {
    gap: 4px !important;
    margin-bottom: 6px !important;
  }

  .summary-box {
    padding: 2px 4px !important;
    border: 1px solid #94a3b8 !important;
    background: #ffffff !important;
  }

  .summary-box .num {
    font-size: 11pt !important;
    color: #000000 !important;
  }

  .summary-box.highlight .num {
    color: #dc2626 !important;
  }

  .summary-box .lbl {
    font-size: 6.5pt !important;
    color: #333333 !important;
  }

  .apartado-divider {
    background: #000000 !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    padding: 4px 8px !important;
    margin: 6px 0 4px 0 !important;
    border-radius: 3px !important;
  }

  .apartado-divider h2 {
    font-size: 9.5pt !important;
    color: #ffffff !important;
  }

  .apartado-badge {
    font-size: 7pt !important;
    color: #ffffff !important;
  }

  .apartado-1-container {
    gap: 4px !important;
  }

  .sch-block {
    border: 1px solid #94a3b8 !important;
    border-radius: 3px !important;
    margin-bottom: 4px !important;
    page-break-inside: auto !important;
    break-inside: auto !important;
    background: #ffffff !important;
  }

  .sch-block.focus-block { border-left: 3px solid #000000 !important; }
  .sch-block.calls-block { border-left: 3px solid #475569 !important; }
  .sch-block.deep-block { border-left: 3px solid #475569 !important; }
  .sch-block.quick-block { border-left: 3px solid #475569 !important; }
  .sch-block.field-block { border-left: 3px solid #475569 !important; }

  .sch-block-header {
    background: #e2e8f0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    padding: 2px 6px !important;
    page-break-after: avoid !important;
    break-after: avoid !important;
  }

  .sch-block-title h3 {
    font-size: 8pt !important;
    color: #000000 !important;
  }

  .sch-count-badge {
    font-size: 6.5pt !important;
    color: #000000 !important;
    border: 1px solid #000000 !important;
    padding: 0 3px !important;
    background: #ffffff !important;
  }

  .sch-subblock-header {
    background: #f8fafc !important;
    padding: 1px 6px !important;
    font-size: 7pt !important;
    color: #000000 !important;
    page-break-after: avoid !important;
    break-after: avoid !important;
  }

  .sch-row {
    height: auto !important;
    min-height: 14px !important;
    padding: 1.5px 4px !important;
    gap: 5px !important;
    font-size: 7.5pt !important;
    line-height: 1.2 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    display: flex !important;
    align-items: flex-start !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    background: #ffffff !important;
  }

  .sch-cb {
    width: 8.5px !important;
    height: 8.5px !important;
    border: 1px solid #000000 !important;
    margin-top: 1.5px !important;
    flex-shrink: 0 !important;
    background: #ffffff !important;
  }

  .sch-id {
    font-size: 7pt !important;
    width: 44px !important;
    padding: 0 2px !important;
    background: #f1f5f9 !important;
    color: #000000 !important;
    line-height: 1.15 !important;
    margin-top: 0.5px !important;
    flex-shrink: 0 !important;
    text-align: center !important;
  }

  .sch-badge {
    font-size: 6.5pt !important;
    padding: 0 3px !important;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #000000 !important;
    min-width: 52px !important;
    line-height: 1.15 !important;
    margin-top: 0.5px !important;
    flex-shrink: 0 !important;
    text-align: center !important;
  }

  .sch-desc {
    font-size: 7.5pt !important;
    color: #000000 !important;
    line-height: 1.2 !important;
    flex-grow: 1 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  .sch-edit-btn {
    display: none !important;
  }

  .page-break-after-apartado-1 {
    page-break-after: always !important;
    break-after: page !important;
  }

  .section-group {
    margin-bottom: 14px !important;
  }

  .section-header {
    border-bottom: 2px solid #000000 !important;
    margin-bottom: 8px !important;
    padding-bottom: 4px !important;
  }

  .section-header h2 {
    font-size: 9pt !important;
    color: #000000 !important;
  }

  .task-card {
    border: 1px solid #94a3b8 !important;
    padding: 4px 6px !important;
    margin-bottom: 5px !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    background: #ffffff !important;
  }

  .task-card.focus-card {
    border-left: 3px solid #000000 !important;
  }

  .task-card-header {
    display: flex !important;
    align-items: flex-start !important;
    gap: 6px !important;
    margin-bottom: 3px !important;
  }

  .task-checkbox {
    width: 9px !important;
    height: 9px !important;
    border: 1px solid #000000 !important;
    margin-top: 2px !important;
    flex-shrink: 0 !important;
    background: #ffffff !important;
  }

  .task-id {
    font-size: 7.5pt !important;
    padding: 0 3px !important;
    background: #f1f5f9 !important;
    color: #000000 !important;
    border: 1px solid #cbd5e1 !important;
    line-height: 1.15 !important;
    flex-shrink: 0 !important;
  }

  .task-title {
    font-size: 8.5pt !important;
    line-height: 1.22 !important;
    color: #000000 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  .btn-back-top, .btn-card-edit {
    display: none !important;
  }

  .task-meta-bar {
    margin: 2px 0 3px 18px !important;
    font-size: 7pt !important;
    gap: 4px !important;
  }

  .meta-tag {
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 4px !important;
    line-height: 1.15 !important;
  }

  .task-body {
    margin-left: 18px !important;
    padding: 3px 5px !important;
    font-size: 7.5pt !important;
    line-height: 1.2 !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #000000 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  .task-deliverable {
    margin: 2px 0 0 18px !important;
    font-size: 7.5pt !important;
    line-height: 1.2 !important;
    color: #000000 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  .task-next-action {
    margin: 2px 0 0 18px !important;
    padding: 2px 5px !important;
    font-size: 7.5pt !important;
    line-height: 1.2 !important;
    color: #000000 !important;
    background: #ffffff !important;
    border-left: 2px solid #000000 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  .task-next-action strong {
    background: #e2e8f0 !important;
    color: #000000 !important;
  }

  .informe-footer {
    font-size: 7pt !important;
    margin-top: 10px !important;
    padding-top: 4px !important;
  }
}
