/* ================================================================
   SARLAFT / SAGRILAFT — Estilos principales
   Extraido de index.html
   QMSPM S.A.S. — Abril 2026
   ================================================================ */

/* --- Bloque CSS 1 --- */
/* ============================================================
   SARLAFT/SAGRILAFT Compliance System - QMSPM Ecosystem
   Dark Theme Professional Enterprise UI
   ============================================================ */
:root {
  --bg-primary: #0a192f;
  --bg-secondary: #112240;
  --bg-card: #1a2d4d;
  --bg-input: #0d1f3c;
  --bg-hover: #1e3a5f;
  --accent: #00d4ff;
  --accent-glow: rgba(0, 212, 255, 0.15);
  --gold: #ffd700;
  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.15);
  --green: #22c55e;
  --green-soft: rgba(34, 197, 94, 0.15);
  --yellow: #f59e0b;
  --yellow-soft: rgba(245, 158, 11, 0.15);
  --orange: #f97316;
  --purple: #a855f7;
  --text-primary: #e2e8f0;
  --text-secondary: #8892b0;
  --text-muted: #5a6a8a;
  --border: #233554;
  --border-light: #2d4a6f;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ---- HEADER ---- */
.app-header {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, #0d2240 100%);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.header-brand .logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent), #0099cc);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  font-weight: 800;
  box-shadow: 0 2px 12px rgba(0,212,255,0.3);
}
.header-brand h1 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.header-brand h1 span {
  color: var(--accent);
  font-weight: 800;
}
.header-brand .subtitle {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-top: -2px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-notifications {
  position: relative;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  color: var(--text-secondary);
}
.header-notifications:hover { background: var(--bg-hover); color: var(--accent); }
.header-notifications .badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  background: var(--red);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}
.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.header-user:hover { background: var(--bg-hover); }
.header-user .avatar {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: white;
}
.header-user .user-info { font-size: 13px; }
.header-user .user-info .name { font-weight: 600; }
.header-user .user-info .role { font-size: 11px; color: var(--text-secondary); }

/* ---- NAVIGATION SIDEBAR ---- */
.nav-bar {
  position: fixed;
  left: 0;
  top: 60px;
  bottom: 0;
  width: 220px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 12px 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 100;
}
.nav-tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}
.nav-tab:hover {
  color: var(--text-primary);
  background: rgba(0,212,255,0.08);
}
.nav-tab.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: rgba(0,212,255,0.1);
  font-weight: 600;
}
.nav-tab i { width: 18px; text-align: center; }
.nav-tab .tab-badge {
  background: var(--red);
  color: white;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 700;
}

/* ---- MAIN CONTENT ---- */
.main-content {
  padding: 24px;
  max-width: 1600px;
  margin-left: 220px;
  overflow-x: hidden;
}
body { overflow-x: hidden; }
.page-section { display: none; }
.page-section.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---- CARDS ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.card:hover { border-color: var(--border-light); }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-title i { color: var(--accent); font-size: 18px; }

/* ---- STAT CARDS ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: default;
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 8px 30px rgba(0,212,255,0.1); }
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.stat-icon.blue { background: rgba(0,212,255,0.15); color: var(--accent); }
.stat-icon.red { background: var(--red-soft); color: var(--red); }
.stat-icon.gold { background: rgba(255,215,0,0.15); color: var(--gold); }
.stat-icon.green { background: var(--green-soft); color: var(--green); }
.stat-icon.purple { background: rgba(168,85,247,0.15); color: var(--purple); }
.stat-info .stat-value { font-size: 28px; font-weight: 800; line-height: 1.1; }
.stat-info .stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; font-weight: 500; }
.stat-info .stat-trend { font-size: 11px; margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.stat-trend.up { color: var(--green); }
.stat-trend.down { color: var(--red); }

/* ---- GRID LAYOUTS ---- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
.grid-7030 { display: grid; grid-template-columns: 7fr 3fr; gap: 24px; }
.grid-4060 { display: grid; grid-template-columns: 4fr 6fr; gap: 24px; }

/* ---- TABLES ---- */
.table-container { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  text-align: left;
  padding: 12px 14px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}
tr:hover td { background: rgba(0,212,255,0.03); }

/* ---- BADGES ---- */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-yellow { background: var(--yellow-soft); color: var(--yellow); }
.badge-blue { background: var(--accent-glow); color: var(--accent); }
.badge-purple { background: rgba(168,85,247,0.15); color: var(--purple); }
.badge-orange { background: rgba(249,115,22,0.15); color: var(--orange); }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #0099cc);
  color: white;
  box-shadow: 0 2px 12px rgba(0,212,255,0.3);
}
.btn-primary:hover { box-shadow: 0 4px 20px rgba(0,212,255,0.5); transform: translateY(-1px); }
.btn-secondary {
  background: var(--bg-hover);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--red); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--green); color: white; }
.btn-success:hover { background: #16a34a; }
.btn-warning { background: var(--yellow); color: #1a1a1a; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-xs { padding: 4px 8px; font-size: 11px; border-radius: var(--radius-xs); }
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.btn-icon:hover { color: var(--accent); border-color: var(--accent); }

/* ---- FORMS ---- */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.form-group label .required { color: var(--red); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,212,255,0.1); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238892b0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
textarea.form-control { min-height: 80px; resize: vertical; }
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.form-row-3 { grid-template-columns: repeat(3, 1fr); }
.form-row-4 { grid-template-columns: repeat(4, 1fr); }
.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
}
.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ---- TABS INNER ---- */
.inner-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.inner-tab {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}
.inner-tab:hover { color: var(--text-primary); }
.inner-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* ---- SEARCH BAR ---- */
.search-bar {
  position: relative;
  margin-bottom: 20px;
}
.search-bar input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}
.search-bar input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,212,255,0.1); }
.search-bar i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
.search-bar input::placeholder { color: var(--text-muted); }

/* ---- FILTERS ROW ---- */
.filters-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.filters-row .form-control { width: auto; min-width: 160px; padding: 8px 12px; }

/* ---- MODAL ---- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; animation: fadeIn 0.2s ease; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-lg { max-width: 900px; }
.modal-xl { max-width: 1100px; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.modal-header h3 i { color: var(--accent); }
.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  background: none;
  border: none;
  font-size: 18px;
}
.modal-close:hover { background: var(--red-soft); color: var(--red); }
.modal-body { padding: 24px; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* ---- TOAST ---- */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
  min-width: 300px;
  max-width: 450px;
}
.toast-success { background: #065f46; color: #a7f3d0; border-left: 4px solid var(--green); }
.toast-error { background: #7f1d1d; color: #fca5a5; border-left: 4px solid var(--red); }
.toast-warning { background: #78350f; color: #fde68a; border-left: 4px solid var(--yellow); }
.toast-info { background: #0c4a6e; color: #bae6fd; border-left: 4px solid var(--accent); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ---- PROGRESS BAR ---- */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-primary);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}
.progress-fill.green { background: var(--green); }
.progress-fill.yellow { background: var(--yellow); }
.progress-fill.red { background: var(--red); }
.progress-fill.blue { background: var(--accent); }

/* ---- RISK HEATMAP ---- */
.heatmap-grid {
  display: grid;
  grid-template-columns: 70px repeat(5,1fr);
  grid-template-rows: repeat(5,52px) 40px;
  gap: 3px;
  max-width: 480px;
}
.heatmap-cell {
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
  transition: var(--transition);
  cursor: default;
}
.heatmap-cell:hover { transform: scale(1.05); }
.heatmap-label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
}
.risk-low { background: #16a34a; }
.risk-medium { background: #eab308; }
.risk-high { background: #f97316; }
.risk-extreme { background: #dc2626; }

/* ---- LISTS CARDS ---- */
.list-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}
.list-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.list-card .list-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.list-card .list-info { flex: 1; min-width: 0; overflow: hidden; }
.list-card .list-info h4 { font-size: 11px; font-weight: 600; margin-bottom: 2px; line-height: 1.3; white-space: normal; word-wrap: break-word; }
.list-card .list-info p { font-size: 9px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-card .list-meta { text-align: right; flex-shrink: 0; }
.list-card .list-meta .count { font-size: 18px; font-weight: 800; color: var(--accent); line-height: 1; }
.list-card .list-meta .date { font-size: 10px; color: var(--text-muted); }

/* ---- LIST DASHBOARD COLLAPSE ---- */
#listaDashboard {
  transition: max-height 0.35s ease, opacity 0.25s ease, margin-bottom 0.35s ease;
  overflow: visible;
}
/* Responsive: 5 columnas en desktop, 3 en tablet, 2 en mobile */
@media (max-width: 1200px) {
  #listaDashboard { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 768px) {
  #listaDashboard { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 480px) {
  #listaDashboard { grid-template-columns: 1fr !important; }
}
#listaDashboard.collapsed {
  max-height: 0 !important;
  opacity: 0;
  margin-bottom: 0 !important;
  overflow: hidden !important;
}
.list-total-banner {
  transition: max-height 0.35s ease, opacity 0.25s ease, margin-top 0.35s ease;
  overflow: hidden;
}
.list-total-banner.collapsed {
  max-height: 0 !important;
  opacity: 0;
  margin-top: 0 !important;
}

/* ---- PIE CHART (CSS) ---- */
.pie-chart-container { position: relative; width: 200px; height: 200px; margin: 0 auto; }
.pie-chart-canvas { width: 200px; height: 200px; }
.pie-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.pie-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.pie-legend-item .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---- ALERT SEVERITY ---- */
.severity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.severity-dot.critica { background: var(--red); box-shadow: 0 0 6px var(--red); }
.severity-dot.alta { background: var(--orange); }
.severity-dot.media { background: var(--yellow); }
.severity-dot.baja { background: var(--green); }

/* ---- SCREENING RESULT ---- */
.screening-result {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.screening-result.limpio { border-color: var(--green); background: rgba(34,197,94,0.05); }
.screening-result.coincidencia { border-color: var(--yellow); background: rgba(245,158,11,0.05); }
.screening-result.alerta { border-color: var(--red); background: rgba(239,68,68,0.05); }
.screening-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.screening-icon.limpio { background: var(--green-soft); color: var(--green); }
.screening-icon.coincidencia { background: var(--yellow-soft); color: var(--yellow); }
.screening-icon.alerta { background: var(--red-soft); color: var(--red); }
.screening-info { flex: 1; }
.screening-info h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.screening-info p { font-size: 12px; color: var(--text-secondary); }
.screening-match { font-size: 12px; font-weight: 700; }

/* ---- WHATSAPP FLOAT ---- */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: var(--transition);
  z-index: 500;
}
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 6px 30px rgba(37,211,102,0.6); }

/* ---- FOOTER ---- */
.app-footer {
  text-align: center;
  padding: 16px 24px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  position: fixed;
  bottom: 0;
  left: 220px;
  right: 0;
  background: var(--bg-primary);
  z-index: 50;
}
.main-content { padding-bottom: 60px; }
.app-footer a { color: var(--accent); text-decoration: none; font-weight: 600; }
.app-footer a:hover { text-decoration: underline; }

/* ---- SECTION HEADER ---- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.section-title {
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title i { color: var(--accent); }
.section-subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

/* ---- DUE DILIGENCE LEVEL ---- */
.dd-level {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.dd-level .dd-step {
  flex: 1;
  padding: 10px;
  text-align: center;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-primary);
  border: 2px solid var(--border);
  transition: var(--transition);
}
.dd-step.active-simple { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.dd-step.active-ordinary, .dd-step.active-ordinaria { border-color: var(--yellow); color: var(--yellow); background: var(--yellow-soft); }
.dd-step.active-enhanced, .dd-step.active-intensificada { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.dd-step:hover { border-color: var(--accent); opacity: 0.9; }

/* ---- DOC UPLOAD ---- */
.doc-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.doc-upload-item {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.doc-upload-item:hover { border-color: var(--accent); background: rgba(0,212,255,0.03); }
.doc-upload-item.uploaded { border-color: var(--green); border-style: solid; background: var(--green-soft); }
.doc-upload-item i { font-size: 24px; color: var(--text-muted); margin-bottom: 8px; display: block; }
.doc-upload-item.uploaded i { color: var(--green); }
.doc-upload-item.uploading { border-color: var(--accent); opacity: 0.7; pointer-events: none; }
.doc-upload-item.uploading i { color: var(--accent); }
.doc-upload-item span { font-size: 11px; color: var(--text-secondary); font-weight: 500; }
.doc-upload-item .doc-filename { min-height: 16px; }
.doc-remove-btn:hover { color: var(--red) !important; text-decoration: underline; }

/* ---- CHIP TAGS ---- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-hover);
  color: var(--text-secondary);
}

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 48px; margin-bottom: 16px; color: var(--border-light); }
.empty-state h3 { font-size: 16px; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 13px; }

/* ---- HAMBURGER BUTTON (hidden on desktop) ---- */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 22px;
  padding: 8px;
  cursor: pointer;
  border-radius: var(--radius-xs);
  transition: var(--transition);
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.hamburger-btn:hover { background: var(--bg-hover); color: var(--accent); }

/* ---- SIDEBAR OVERLAY (hidden on desktop) ---- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ---- RESPONSIVE UTILITY CLASSES ---- */
.mobile-stack { display: flex; gap: 16px; }
.mobile-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.mobile-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mobile-scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mobile-hide { }
.mobile-full { }
.flex-wrap-mobile { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-flex-scroll { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.process-steps { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; font-size: 13px; }
.audit-import-row { display: flex; gap: 16px; align-items: center; }
.firmas-check-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; padding: 12px; background: var(--bg-primary); border-radius: 8px; border: 1px solid var(--border); }
.firmas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.editor-toolbar { display: flex; gap: 4px; flex-wrap: wrap; padding: 6px; background: var(--bg-primary); border: 1px solid var(--border); border-radius: 8px 8px 0 0; }
.contador-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }

/* ============================================================
   RESPONSIVE - TABLET (max-width: 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .grid-2, .grid-3, .grid-7030, .grid-4060 { grid-template-columns: 1fr; }
}

/* ============================================================
   RESPONSIVE - MOBILE (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {
  /* -- Footer mobile -- */
  .app-footer { left: 0; font-size: 10px; padding: 10px; }

  /* -- Hamburger visible -- */
  .hamburger-btn { display: flex; }

  /* -- Header adjustments -- */
  .app-header { padding: 0 12px; height: 56px; gap: 8px; }
  .header-brand .logo-icon { width: 32px; height: 32px; font-size: 16px; border-radius: 8px; }
  .header-brand h1 { font-size: 14px; }
  .header-brand .subtitle { display: none; }
  .header-brand { gap: 8px; }
  .header-right { gap: 6px; }
  .header-user .user-info { display: none; }
  .header-user { padding: 4px; }
  .header-notifications { padding: 10px; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }

  /* -- Sidebar: slide-in drawer on mobile -- */
  .nav-bar {
    width: 260px;
    top: 0;
    left: -260px;
    z-index: 200;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding-top: 70px;
    box-shadow: none;
  }
  .nav-bar.mobile-open {
    left: 0;
    box-shadow: 4px 0 30px rgba(0,0,0,0.5);
  }
  .nav-tab {
    padding: 14px 20px;
    font-size: 14px;
    min-height: 48px;
  }
  .nav-tab span.tab-text { display: inline; }
  .nav-tab .tab-badge { position: static; }
  .nav-tab i { width: 22px; font-size: 16px; }

  /* -- Main content: full width -- */
  .main-content {
    margin-left: 0 !important;
    padding: 16px 12px;
    width: 100%;
  }

  /* -- Section headers -- */
  .section-header { flex-direction: column; align-items: flex-start; }
  .section-title { font-size: 18px; }
  .section-subtitle { font-size: 12px; }
  .section-header .btn { width: 100%; justify-content: center; }

  /* -- Stats grid -- */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px 16px; gap: 12px; }
  .stat-icon { width: 40px; height: 40px; font-size: 16px; }
  .stat-info .stat-value { font-size: 22px; }
  .stat-info .stat-label { font-size: 11px; }

  /* -- Grids -- */
  .grid-2, .grid-3, .grid-7030, .grid-4060 { grid-template-columns: 1fr; gap: 16px; }

  /* -- Forms: single column -- */
  .form-row, .form-row-3, .form-row-4 { grid-template-columns: 1fr 1fr; gap: 12px; }

  /* -- Due diligence levels -- */
  .dd-level { flex-direction: column; }
  .dd-level .dd-step { padding: 12px; font-size: 13px; }

  /* -- Tables: horizontal scroll -- */
  .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -12px; padding: 0 12px; }
  table { min-width: 600px; }
  th { padding: 10px 12px; font-size: 10px; }
  td { padding: 10px 12px; font-size: 12px; }

  /* -- Cards -- */
  .card { padding: 16px; border-radius: 10px; }
  .card-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .card-title { font-size: 14px; }

  /* -- List cards (Listas Restrictivas) -- */
  .list-card { flex-direction: column; text-align: center; padding: 16px; gap: 10px; }
  .list-card .list-meta { text-align: center; }

  /* -- Screening results -- */
  .screening-result { flex-direction: column; text-align: center; padding: 16px; gap: 12px; }
  .screening-icon { width: 44px; height: 44px; font-size: 18px; }

  /* -- Filters row -- */
  .filters-row { flex-direction: column; }
  .filters-row .form-control { width: 100%; min-width: unset; }

  /* -- Inner tabs: scrollable -- */
  .inner-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; gap: 0; }
  .inner-tab { white-space: nowrap; padding: 10px 14px; font-size: 12px; flex-shrink: 0; min-height: 44px; display: flex; align-items: center; }

  /* -- Buttons: touch-friendly -- */
  .btn { padding: 12px 20px; font-size: 14px; min-height: 44px; }
  .btn-sm { padding: 10px 14px; font-size: 13px; min-height: 44px; }
  .btn-xs { padding: 8px 12px; font-size: 12px; min-height: 40px; }
  .btn-icon { width: 44px; height: 44px; }

  /* -- Form controls: touch-friendly -- */
  .form-control { padding: 12px 14px; font-size: 14px; min-height: 44px; }
  select.form-control { min-height: 44px; }
  textarea.form-control { min-height: 100px; }
  .form-check input[type="checkbox"] { width: 22px; height: 22px; }
  .form-check { font-size: 14px; min-height: 44px; }

  /* -- Modals: full screen on mobile -- */
  .modal-overlay { padding: 0; align-items: stretch; }
  .modal {
    max-width: 100% !important;
    max-height: 100vh !important;
    border-radius: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
  }
  .modal-lg, .modal-xl { max-width: 100% !important; }
  .modal-header { padding: 16px; position: sticky; top: 0; background: var(--bg-card); z-index: 10; }
  .modal-header h3 { font-size: 16px; }
  .modal-close { width: 44px; height: 44px; font-size: 20px; }
  .modal-body { padding: 16px; flex: 1; overflow-y: auto; }
  .modal-footer { padding: 12px 16px; position: sticky; bottom: 0; background: var(--bg-card); z-index: 10; flex-wrap: wrap; }
  .modal-footer .btn { flex: 1; min-width: 0; justify-content: center; }

  /* -- Doc upload grid -- */
  .doc-upload-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .doc-upload-item { padding: 12px; }

  /* -- Heatmap -- */
  .heatmap-grid { max-width: 100%; grid-template-rows: repeat(5, 40px) 24px; }

  /* -- Toasts -- */
  .toast-container { right: 12px; left: 12px; top: 62px; }
  .toast { min-width: unset; max-width: 100%; }

  /* -- WhatsApp float -- */
  .whatsapp-float { bottom: 16px; right: 16px; width: 50px; height: 50px; font-size: 24px; }

  /* -- Footer -- */
  .app-footer { padding: 16px 12px; margin-top: 24px; }

  /* -- Search bar -- */
  .search-bar input { font-size: 16px; padding: 14px 16px 14px 44px; }

  /* -- Accordion -- */
  .accordion-header { padding: 14px 16px; font-size: 14px; min-height: 48px; }

  /* -- Config cards -- */
  .config-card { padding: 16px; }

  /* -- ROS sections -- */
  .ros-section { padding: 14px; }

  /* -- Login tweaks for mobile -- */
  .login-card { padding: 24px 20px; max-width: 100%; border-radius: 12px; margin: 16px; }
  .login-card .logo-area i { font-size: 40px; }
  .login-card .logo-area h2 { font-size: 18px; }
  .login-card .login-field input { font-size: 16px; padding: 14px; min-height: 48px; }
  .login-btn { padding: 16px; font-size: 16px; min-height: 52px; }

  /* -- Chip tags -- */
  .chip { font-size: 12px; padding: 4px 12px; }

  /* -- Logout button in header -- */
  .header-right button[onclick="doLogout()"] { padding: 8px; font-size: 0; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
  .header-right button[onclick="doLogout()"] i { font-size: 16px; }

  /* -- Empty state -- */
  .empty-state { padding: 40px 16px; }
  .empty-state i { font-size: 36px; }
}

/* ============================================================
   RESPONSIVE — NIGC CARDS, FIRMA, SUBTABS (768px)
   ============================================================ */
@media (max-width: 768px) {
  /* -- NIGC collapsible cards -- */
  .nigc-card { border-radius: 0 !important; margin: 0 -16px !important; }
  .nigc-card-header { padding: 14px 16px; }
  .nigc-card-header h4 { font-size: 13px; }
  .nigc-card-body { padding: 14px 16px; }
  .nigc-grid-2, .nigc-grid-3 { grid-template-columns: 1fr !important; gap: 10px !important; }

  /* -- Firma slots mobile -- */
  #cartaFirmasGrid { grid-template-columns: 1fr !important; }
  .carta-firma-slot { padding: 12px; }
  .carta-firma-slot canvas { height: 70px; }
  .firma-cadena { flex-direction: column !important; }
  .firma-slot { max-width: 100% !important; min-width: unset !important; }

  /* -- Sub-tabs (Docs, Cartas, etc): scrollable -- */
  [style*="display:flex"][style*="gap:8px"][style*="flex-wrap"] {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  /* -- Section header buttons: stack on mobile -- */
  .section-header > div:last-child {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    width: 100% !important;
  }
  .section-header > div:last-child .btn {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    font-size: 12px !important;
    padding: 10px 12px !important;
    justify-content: center !important;
  }

  /* -- Audit steps: single column -- */
  [style*="grid-template-columns:1fr 1fr 1fr"][style*="gap:16px"] {
    grid-template-columns: 1fr !important;
  }

  /* -- Lista cards grid: 2 cols on mobile -- */
  #listaDashboard { grid-template-columns: 1fr 1fr !important; }

  /* -- Consulta manual links: single column -- */
  [style*="grid-template-columns:repeat(auto-fill,minmax(260px,1fr))"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* -- Contador consultas grid -- */
  #contadorConsultas [style*="grid-template-columns"] {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  /* -- Editor toolbar: wrap -- */
  [contenteditable="true"] { font-size: 14px !important; padding: 16px !important; min-height: 200px !important; }

  /* -- DIAN import card: stack -- */
  [style*="border-left:4px solid #f97316"] > div { flex-direction: column !important; gap: 12px !important; }

  /* -- Beneficiarios search -- */
  #sec-beneficiarios .form-row { grid-template-columns: 1fr !important; }

  /* -- Improve touch targets for checkboxes -- */
  label[style*="cursor:pointer"] { padding: 4px 0; }
  input[type="checkbox"] { width: 20px; height: 20px; }

  /* -- Utility responsive classes -- */
  .mobile-stack { flex-direction: column !important; }
  .mobile-grid-3 { grid-template-columns: 1fr !important; }
  .mobile-grid-2 { grid-template-columns: 1fr 1fr !important; }
  .mobile-hide { display: none !important; }
  .mobile-full { width: 100% !important; }
  .process-steps { grid-template-columns: 1fr !important; gap: 10px !important; }
  .audit-import-row { flex-direction: column !important; align-items: stretch !important; }
  .firmas-check-row { flex-direction: column !important; gap: 10px !important; }
  .firmas-grid { grid-template-columns: 1fr !important; }
  .editor-toolbar { gap: 2px !important; }
  .contador-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 6px !important; }
  .inline-flex-scroll { flex-wrap: nowrap !important; overflow-x: auto !important; }
  .flex-wrap-mobile > .btn { flex: 1 1 auto !important; font-size: 12px !important; }
}

/* ============================================================
   RESPONSIVE - SMALL MOBILE (max-width: 480px)
   ============================================================ */
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .form-row, .form-row-3, .form-row-4 { grid-template-columns: 1fr; }
  .main-content { padding: 12px 8px; }
  .card { padding: 14px; }
  .stat-card { padding: 10px 12px; gap: 10px; }
  .stat-icon { width: 36px; height: 36px; font-size: 14px; }
  .stat-info .stat-value { font-size: 18px; }
  .stat-info .stat-label { font-size: 10px; }
  .section-title { font-size: 15px; gap: 6px; }
  .section-subtitle { font-size: 11px; }
  .doc-upload-grid { grid-template-columns: 1fr 1fr; }
  .header-brand h1 { font-size: 12px; letter-spacing: 0; }
  .header-brand .sector-badge { font-size: 8px; padding: 2px 6px; }
  .login-card { margin: 8px; padding: 20px 16px; }
  .badge-status { font-size: 10px; padding: 3px 8px; }

  /* -- Lista cards: single col on very small -- */
  #listaDashboard { grid-template-columns: 1fr !important; }

  /* -- Consulta links: single col -- */
  [style*="grid-template-columns:repeat(auto-fill,minmax(260px,1fr))"] {
    grid-template-columns: 1fr !important;
  }

  /* -- Contador: 2x2 grid -- */
  #contadorConsultas [style*="grid-template-columns"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* -- Modal footer buttons: full width stack -- */
  .modal-footer { flex-direction: column !important; }
  .modal-footer .btn { width: 100% !important; }

  /* -- Tables: smaller text -- */
  th { font-size: 9px; padding: 8px 6px; letter-spacing: 0; }
  td { font-size: 11px; padding: 8px 6px; }
  table { min-width: 500px; }

  /* -- Firma checkboxes: wrap better -- */
  [style*="display:flex"][style*="Firmantes"] {
    flex-direction: column !important;
    gap: 8px !important;
  }

  /* -- Pie chart -- */
  .pie-chart-container { width: 140px; height: 140px; }
  .pie-chart-canvas { width: 140px; height: 140px; }

  /* -- Hide less important text -- */
  .section-header .section-subtitle { display: none; }

  /* -- Auditoría: compact process steps -- */
  [style*="display:inline-block;width:24px;height:24px;border-radius:50%"] {
    width: 20px !important; height: 20px !important; line-height: 20px !important; font-size: 10px !important;
  }
}

/* ============================================================
   RESPONSIVE - ULTRA SMALL (max-width: 360px)
   ============================================================ */
@media (max-width: 360px) {
  .app-header { padding: 0 8px; }
  .header-brand h1 { font-size: 11px; }
  .header-brand .sector-badge { display: none; }
  .main-content { padding: 10px 6px; }
  .card { padding: 12px; border-radius: 8px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .stat-card { padding: 8px 10px; }
  .stat-info .stat-value { font-size: 16px; }
  .btn { padding: 10px 14px; font-size: 13px; }
  .btn-sm { padding: 8px 10px; font-size: 12px; }
  .nav-bar { width: 240px; left: -240px; }
  .modal-header h3 { font-size: 14px; }
}

/* ---- SCREENING LOADING ---- */
.screening-loading {
  display: none;
  text-align: center;
  padding: 40px;
}
.screening-loading.active { display: block; }
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- ACCORDION ---- */
.accordion-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; overflow: hidden; }
.accordion-header {
  padding: 14px 18px;
  background: var(--bg-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}
.accordion-header:hover { background: var(--bg-hover); }
.accordion-header i { transition: transform 0.3s ease; }
.accordion-header.open i { transform: rotate(180deg); }
.accordion-body { padding: 0 18px; max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; }
.accordion-body.open { max-height: 2000px; padding: 18px; }

/* ---- INLINE EDITABLE TABLE ---- */
.editable-table td input, .editable-table td select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 12px;
  width: 100%;
  font-family: inherit;
}
.add-row-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: none;
  border: 1px dashed var(--border);
  border-radius: var(--radius-xs);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
  font-family: inherit;
}
.add-row-btn:hover { background: var(--accent-glow); border-color: var(--accent); }

/* Placeholder for contenteditable */
[contenteditable][data-placeholder]:empty::before {
  content: attr(data-placeholder);
  color: #999;
  font-style: italic;
  pointer-events: none;
}
[contenteditable]:focus { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ===========================================================================
   WCAG 2.1 AA fundamentos: focus visible, contraste minimo, skip-link
   =========================================================================== */
/* Skip link - visible al focus con tecla Tab */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-to-content:focus { top: 0; outline: 3px solid #fff; }

/* Focus visible fuerte para navegacion por teclado */
:focus-visible {
  outline: 3px solid #0ea5e9 !important;
  outline-offset: 2px;
  border-radius: 3px;
}
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #0ea5e9 !important;
  outline-offset: 2px;
}

/* Contraste AA: asegurar texto-muted minimo 4.5:1 sobre bg-primary */
:root { --text-muted: #9ca3af; }   /* 4.5:1 sobre bg-primary (negro profundo) */

/* Reducir movimiento para usuarios que lo prefieran */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===========================================================================
   PANTALLA HOY - mobile-first, resumen del dia del OC
   (tokens usados: --bg-primary, --bg-secondary, --accent, --text-primary, etc.)
   =========================================================================== */
.hoy-section {
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 40px;
}
.hoy-hero {
  background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
  color: #fff;
  padding: 28px 22px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.25);
}
.hoy-saludo {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.hoy-greeting { font-size: 1.35rem; font-weight: 600; margin-bottom: 4px; }
.hoy-nombre   { font-size: 1rem; opacity: 0.9; margin-bottom: 8px; }
.hoy-fecha    { font-size: 0.85rem; opacity: 0.8; text-transform: capitalize; }
.hoy-refresh-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.18s;
  flex-shrink: 0;
}
.hoy-refresh-btn:hover { background: rgba(255, 255, 255, 0.32); }
.hoy-refresh-btn:active { transform: rotate(180deg); transition: transform 0.4s; }

/* KPIs (4 cards grandes tactiles) */
.hoy-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.hoy-kpi-skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 0%, var(--border) 50%, var(--bg-secondary) 100%);
  background-size: 200% 100%;
  height: 120px;
  border-radius: var(--radius);
  animation: hoySkeleton 1.4s ease-in-out infinite;
}
@keyframes hoySkeleton { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.hoy-kpi {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  min-height: 120px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 4px;
  user-select: none;
}
.hoy-kpi:hover, .hoy-kpi:focus {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  border-color: var(--accent);
  outline: none;
}
.hoy-kpi-icon { font-size: 1.4rem; opacity: 0.85; margin-bottom: 2px; }
.hoy-kpi-valor { font-size: 1.9rem; font-weight: 700; line-height: 1; color: var(--text-primary); }
.hoy-kpi-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.hoy-kpi-extra { font-size: 0.72rem; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: rgba(239, 68, 68, 0.15); color: #ef4444; margin-top: 4px; }

.hoy-kpi-critica .hoy-kpi-icon { color: #ef4444; }
.hoy-kpi-critica { border-color: rgba(239, 68, 68, 0.5); }
.hoy-kpi-alta    .hoy-kpi-icon { color: #f59e0b; }
.hoy-kpi-media   .hoy-kpi-icon { color: #3b82f6; }
.hoy-kpi-ok      .hoy-kpi-icon { color: #10b981; }
.hoy-kpi-info    .hoy-kpi-icon { color: #6366f1; }

/* Cards (alertas, pendientes, acciones, listas) */
.hoy-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.hoy-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}
.hoy-card-header h3 {
  font-size: 1rem;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
  font-weight: 600;
}
.hoy-link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.15s;
}
.hoy-link-btn:hover { background: rgba(14, 165, 233, 0.1); }

/* Alertas list */
.hoy-alerta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 6px;
}
.hoy-alerta:hover { background: var(--bg-hover, rgba(255, 255, 255, 0.03)); }
.hoy-alerta:last-child { border-bottom: none; }
.hoy-alerta-sev {
  font-size: 0.68rem;
  padding: 4px 8px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  flex-shrink: 0;
  min-width: 62px;
  text-align: center;
}
.sev-critica { background: rgba(239, 68, 68, 0.18); color: #ef4444; }
.sev-alta    { background: rgba(245, 158, 11, 0.18); color: #f59e0b; }
.sev-media   { background: rgba(59, 130, 246, 0.18); color: #3b82f6; }
.sev-baja    { background: rgba(107, 114, 128, 0.2); color: #9ca3af; }
.hoy-alerta-body { flex: 1; min-width: 0; }
.hoy-alerta-tipo { font-weight: 600; font-size: 0.9rem; color: var(--text-primary); }
.hoy-alerta-desc { font-size: 0.8rem; color: var(--text-muted); margin: 2px 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hoy-alerta-meta { font-size: 0.72rem; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; }
.hoy-alerta-meta i { margin-right: 3px; opacity: 0.7; }
.hoy-chev { color: var(--text-muted); opacity: 0.5; flex-shrink: 0; }

/* Pendientes grid */
.hoy-pendientes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.hoy-pendiente {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.hoy-pendiente:hover { border-color: var(--accent); transform: translateY(-1px); }
.hoy-pendiente-icon { color: var(--accent); font-size: 1.2rem; margin-bottom: 4px; }
.hoy-pendiente-val  { font-size: 1.6rem; font-weight: 700; color: var(--text-primary); line-height: 1; }
.hoy-pendiente-lbl  { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }

/* Acciones rapidas */
.hoy-acciones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.hoy-accion {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 0.85rem;
  transition: all 0.18s;
  min-height: 88px;
}
.hoy-accion:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}
.hoy-accion i { font-size: 1.4rem; }

/* Listas restrictivas pills */
.hoy-listas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hoy-lista-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-primary);
  font-size: 0.78rem;
}
.hoy-lista-nombre { font-weight: 600; color: var(--text-primary); }
.hoy-lista-count  { color: var(--text-muted); }

/* Estados vacios / carga / error */
.hoy-loading, .hoy-empty, .hoy-empty-small, .hoy-error {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.hoy-empty i, .hoy-loading i { margin-right: 6px; }
.hoy-empty   { color: #10b981; font-weight: 500; }
.hoy-empty-small { padding: 10px; font-size: 0.82rem; }
.hoy-error { color: #ef4444; }
.hoy-error a { color: var(--accent); text-decoration: underline; cursor: pointer; }

/* Responsive: tablet */
@media (max-width: 768px) {
  .hoy-section { padding: 0 4px 40px; }
  .hoy-hero    { padding: 22px 18px; border-radius: var(--radius); }
  .hoy-greeting{ font-size: 1.2rem; }
  .hoy-kpis    { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .hoy-kpi     { min-height: 110px; padding: 14px 10px; }
  .hoy-kpi-valor { font-size: 1.7rem; }
  .hoy-card    { padding: 14px 14px; border-radius: var(--radius); }
}

/* Responsive: movil pequeno */
@media (max-width: 480px) {
  .hoy-hero { padding: 18px 16px; }
  .hoy-greeting { font-size: 1.1rem; }
  .hoy-nombre   { font-size: 0.92rem; }
  .hoy-fecha    { font-size: 0.78rem; }
  .hoy-kpi      { min-height: 100px; padding: 12px 8px; }
  .hoy-kpi-valor{ font-size: 1.5rem; }
  .hoy-kpi-label{ font-size: 0.68rem; }
  .hoy-card-header h3 { font-size: 0.92rem; }
  .hoy-alerta-tipo { font-size: 0.85rem; }
  .hoy-alerta-desc { font-size: 0.75rem; }
  .hoy-pendientes-grid, .hoy-acciones { grid-template-columns: repeat(2, 1fr); }
}

/* Print */
@media print {
  .app-header, .nav-bar, .whatsapp-float, .modal-overlay, .toast-container { display: none !important; }
  body { background: white; color: black; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ---- ROS FORM SECTIONS ---- */
.ros-section {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 16px;
}
.ros-section h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- CONFIG SECTIONS ---- */
.config-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}
.config-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
}
/* ---- LOGIN SCREEN ---- */
.login-overlay {
  position:fixed;top:0;left:0;right:0;bottom:0;background:var(--bg-primary);z-index:10000;
  display:flex;align-items:center;justify-content:center;
}
.login-overlay.hidden { display:none; }
.login-card {
  background:var(--bg-card);border:1px solid var(--border);border-radius:16px;
  padding:40px;width:100%;max-width:420px;box-shadow:0 20px 60px rgba(0,0,0,0.5);
}
.login-card .logo-area { text-align:center;margin-bottom:28px; }
.login-card .logo-area i { font-size:48px;color:var(--accent);margin-bottom:12px; }
.login-card .logo-area h2 { font-size:22px;font-weight:800;color:var(--text-primary);margin:0; }
.login-card .logo-area p { font-size:12px;color:var(--text-muted);margin-top:4px; }
.login-card .login-field { margin-bottom:16px; }
.login-card .login-field label { display:block;font-size:12px;color:var(--text-secondary);margin-bottom:6px;font-weight:600; }
.login-card .login-field input {
  width:100%;padding:12px 14px;background:var(--bg-primary);border:1px solid var(--border);
  border-radius:8px;color:var(--text-primary);font-size:14px;outline:none;transition:border 0.3s;
}
.login-card .login-field input:focus { border-color:var(--accent); }
.login-btn {
  width:100%;padding:14px;background:linear-gradient(135deg,var(--accent),#0099cc);
  border:none;border-radius:10px;color:#fff;font-size:15px;font-weight:700;cursor:pointer;
  margin-top:8px;transition:transform 0.2s,box-shadow 0.2s;
}
.login-btn:hover { transform:translateY(-2px);box-shadow:0 8px 20px rgba(0,212,255,0.3); }
.login-btn:disabled { opacity:0.6;cursor:not-allowed;transform:none; }
.login-error { color:var(--red);font-size:12px;text-align:center;margin-top:12px;min-height:18px; }
.login-links { text-align:center;margin-top:20px;font-size:12px;color:var(--text-muted); }
.login-links a { color:var(--accent);text-decoration:none; }
.login-footer { text-align:center;margin-top:24px;font-size:10px;color:var(--text-muted); }
/* ============================================================
   FIRMA COMPONENT - Canvas + Upload (Estilo NIGC)
   ============================================================ */
.firma-cadena { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; padding: 16px 0; }
.firma-slot { border: 1.5px solid var(--border); border-radius: 12px; padding: 14px; text-align: center; min-width: 220px; flex: 1; max-width: 300px; background: var(--bg-card); }
.firma-slot-label { font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.firma-canvas { border: 1.5px dashed var(--border-light); border-radius: 8px; width: 100%; height: 80px; cursor: crosshair; touch-action: none; background: var(--bg-input); }
.firma-canvas.signed { border-color: var(--green); border-style: solid; }
.firma-actions { display: flex; gap: 6px; justify-content: center; margin-top: 8px; }
.firma-btn { background: none; border: 1px solid var(--border); color: var(--text-secondary); font-size: 11px; padding: 3px 10px; border-radius: 6px; cursor: pointer; transition: var(--transition); }
.firma-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.firma-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.firma-upload-area { display: none; border: 1.5px dashed var(--border-light); border-radius: 8px; padding: 12px; text-align: center; min-height: 80px; cursor: pointer; background: var(--bg-input); }
.firma-upload-area.show { display: block; }
.firma-upload-area:hover { border-color: var(--accent); }
.firma-upload-area img { max-height: 70px; max-width: 100%; border-radius: 4px; }
.firma-select { width: 100%; border: none; border-bottom: 1px solid var(--border); padding: 5px 2px; font-size: 12px; background: transparent; color: var(--text-primary); margin-top: 6px; }
.firma-select option { background: var(--bg-secondary); }
.firma-date { width: 100%; border: none; border-bottom: 1px solid var(--border); padding: 4px 2px; font-size: 12px; background: transparent; color: var(--text-secondary); margin-top: 4px; }
.firma-status { font-size: 11px; margin-top: 6px; font-weight: 600; }
.firma-status.pendiente { color: var(--text-muted); }
.firma-status.firmado { color: var(--green); }
.firma-status.rechazado { color: var(--red); }
/* NIGC-style collapsible cards for PTEE/Cartas */
.nigc-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 14px; overflow: hidden; }
.nigc-card-header { padding: 14px 18px; display: flex; align-items: center; gap: 10px; cursor: pointer; transition: background 0.2s; user-select: none; }
.nigc-card-header:hover { background: var(--bg-hover); }
.nigc-card-header h4 { font-size: 14px; font-weight: 700; color: var(--accent); margin: 0; flex: 1; }
.nigc-card-header .tag-required { background: var(--red); color: #fff; font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 700; }
.nigc-card-header .collapse-icon { color: var(--text-muted); font-size: 12px; transition: transform 0.2s; }
.nigc-card-header.collapsed .collapse-icon { transform: rotate(-90deg); }
.nigc-card-body { padding: 16px 18px; border-top: 1px solid var(--border); }
.nigc-card-body.collapsed { display: none; }
.nigc-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.nigc-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 768px) {
  .firma-cadena { flex-direction: column; align-items: center; }
  .firma-slot { max-width: 100%; }
  .nigc-grid-3, .nigc-grid-2 { grid-template-columns: 1fr; }
}

/* ============================================================
   RESPONSIVE MOBILE — auditoria abril 2026
   Apila grids, reduce paddings y oculta headers menos criticos.
   ============================================================ */
@media (max-width: 768px) {
  /* Stats grid del dashboard se apila a 2 columnas (era 4) */
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
  .stat-card { padding: 10px !important; }
  .stat-value { font-size: 18px !important; }
  .stat-label { font-size: 10px !important; }
  /* Grid de 2 columnas se apila */
  .grid-2, .grid-7030 { grid-template-columns: 1fr !important; }
  /* Tablas con scroll horizontal */
  .table-wrapper, .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* Modales ocupan toda la pantalla */
  .modal { max-width: 95vw !important; max-height: 92vh !important; margin: 4vh auto; }
  /* Forms en columna */
  .form-row, .form-row-3 { flex-direction: column; gap: 8px !important; }
  .form-row .form-group, .form-row-3 .form-group { width: 100% !important; }
  /* Header reducido */
  .section-title { font-size: 16px !important; }
  .section-subtitle { font-size: 11px !important; }
  /* Botones grupales que se desbordan */
  .section-header { flex-wrap: wrap; gap: 8px; }
  .section-header > div:last-child { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr !important; }
  /* En extra-small ocultar tabs largas y mostrar el menu hamburguesa */
  .nav-tab { padding: 8px 10px !important; font-size: 12px !important; }
  /* Botones mas compactos */
  .btn-sm { padding: 4px 8px !important; font-size: 11px !important; }
  /* Inputs un poco mas grandes para dedo */
  input.form-control, select.form-control, textarea.form-control {
    font-size: 16px !important; /* evita zoom auto en iOS */
    padding: 8px !important;
  }
}

/* ============================================================
   MATRIZ DE PERMISOS POR ROL (modal)
   Tabla ancha con muchos roles x acciones. Necesita:
   - Cabecera (thead) pegada arriba al hacer scroll vertical.
   - Primera columna (nombre del modulo) pegada a la izquierda
     al hacer scroll horizontal, asi se sabe a que modulo
     corresponde cada checkbox.
   - La esquina superior-izquierda debe quedar encima de ambas.
   - Las filas separadoras de grupo (PRINCIPAL, REPORTES, etc.)
     tambien quedan pegadas a la izquierda para no perder el
     titulo del grupo al desplazarse.
   ============================================================ */
.matriz-permisos-scroll {
  max-height: 65vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  position: relative;
}
.matriz-permisos {
  width: 100%;
  font-size: 11px;
  border-collapse: separate;   /* separate para que sticky pinte fondo */
  border-spacing: 0;
}
.matriz-permisos thead th {
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  z-index: 3;
}
.matriz-permisos thead tr:nth-child(2) th {
  /* Segunda fila del thead (V C E D X A) queda bajo la primera */
  top: 32px;
  z-index: 3;
}
.matriz-permisos tbody td.modulo-cell,
.matriz-permisos thead th.modulo-head {
  position: sticky;
  left: 0;
  background: var(--bg-secondary);
  z-index: 2;
  min-width: 200px;
  box-shadow: 1px 0 0 var(--border);   /* linea divisoria visible al hacer scroll */
}
/* Esquina superior-izquierda: debe tapar tanto el thead como la
   primera columna. Mayor z-index que ambos. */
.matriz-permisos thead th.modulo-head {
  top: 0;
  z-index: 5;
}
/* Cabecera de grupo (PRINCIPAL / REPORTES / ...) tambien queda
   pegada a la izquierda para que el titulo del grupo siga visible. */
.matriz-permisos tbody tr.grupo-row td {
  position: sticky;
  left: 0;
  background: var(--bg-primary);
  z-index: 2;
  box-shadow: 0 1px 0 var(--border);
}

/* ============================================================
   PWA / MOBILE - Responsive critico anadido para instalacion PWA
   ------------------------------------------------------------
   Objetivos WCAG AA + UX movil:
   - Tap targets minimo 44x44 px (guideline Apple + WCAG 2.5.5)
   - Tablas con scroll horizontal en <768px (no rompen viewport)
   - Modales a pantalla completa en movil (mejor accesibilidad)
   - Fuentes >= 16px en inputs para evitar zoom iOS
   - Dropdowns de search tolerantes a touch
   ============================================================ */
@media (max-width: 768px) {
  /* Inputs minimo 16px para que iOS no haga zoom al enfocar */
  input[type="text"], input[type="email"], input[type="number"],
  input[type="tel"], input[type="password"], input[type="date"],
  input[type="search"], select, textarea {
    font-size: 16px !important;
  }
  /* Tap targets: minimo 44x44 px (botones chicos en filas de tabla) */
  .btn, button.btn, .form-control, select, input[type="checkbox"],
  input[type="radio"], .inner-tab, .nav-item {
    min-height: 40px;
  }
  .btn-xs { min-height: 32px; min-width: 32px; }
  /* Tablas: scroll horizontal en vez de desbordar viewport */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .table-container table { min-width: 640px; }
  /* Modales a pantalla completa */
  .modal-overlay.active .modal,
  .modal-overlay .modal {
    max-width: 100vw !important;
    width: 100vw !important;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    margin: 0;
  }
  .modal-body { max-height: calc(100vh - 140px) !important; }
  /* Sidebar se oculta por defecto, viene por hamburguesa */
  .sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
  .sidebar.open { transform: translateX(0); z-index: 9000; }
  /* Header: menos padding en movil */
  .app-header { padding: 8px 12px; }
  .header-brand h1 { font-size: 14px; }
  .header-brand .subtitle { font-size: 10px; }
  .header-user .user-info { display: none; }  /* solo avatar */
  /* Form rows: apilar verticalmente */
  .form-row, .form-row-3 { flex-direction: column; gap: 10px; }
  .form-row > div, .form-row-3 > div { width: 100%; }
  /* Kpis dashboard: 2 columnas en movil */
  .kpi-grid { grid-template-columns: repeat(2, 1fr) !important; }
  /* Tabs internos: horizontal scroll si no caben */
  .inner-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .inner-tab { white-space: nowrap; padding: 10px 14px; }
  /* Boton PWA install no tape el contenido abajo */
  body { padding-bottom: 70px; }
}

@media (max-width: 480px) {
  /* Dispositivos muy chicos: 1 columna KPIs */
  .kpi-grid { grid-template-columns: 1fr !important; }
  .section-title { font-size: 18px; }
  /* Login card a pantalla completa */
  .login-card { padding: 20px; border-radius: 0; min-height: 100vh; }
}

/* Modo PWA instalada: detectar standalone y ocultar boton instalar */
@media all and (display-mode: standalone) {
  #pwaInstallBtn { display: none !important; }
}

/* ============================================================
   FIN DEL CSS PRINCIPAL — SARLAFT/SAGRILAFT
   NOTA: Los estilos de reportes/impresion (Bloques CSS 2-5)
   fueron removidos de aqui porque sobreescribian body{max-width}
   y danaban el layout. Esos estilos se inyectan inline en las
   ventanas de impresion desde sarlaft.js
   ============================================================ */

