/* ── Reset & Variables ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #1a1a2e;
  --surface:  #16213e;
  --card:     #0d1b36;
  --accent:   #0f3460;
  --accent2:  #e94560;
  --text:     #e0e0e0;
  --text-dim: #8892a4;
  --border:   #1e3a5f;
  --success:  #2ecc71;
  --warning:  #f39c12;
  --danger:   #e74c3c;
  --radius:   12px;
  --shadow:   0 4px 24px rgba(0,0,0,0.4);
  --transition: 0.25s ease;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ── Login Page ────────────────────────────────────────────── */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1a2e 0%, #0d1b36 50%, #0f3460 100%);
}

.login-container {
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
  box-shadow: var(--shadow), 0 0 60px rgba(15,52,96,0.3);
  animation: fadeInUp 0.5s ease;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo img {
  max-width: 120px;
  max-height: 80px;
  object-fit: contain;
}

.login-logo-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 50%;
  font-size: 36px;
  margin-bottom: 12px;
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 4px;
}

.login-slogan {
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 32px;
}

/* ── Forms ─────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 15px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--accent2);
  box-shadow: 0 0 0 3px rgba(233,69,96,0.15);
}

.form-control::placeholder { color: var(--text-dim); opacity: 0.6; }

select.form-control option { background: var(--card); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent2), #c0392b);
  color: #fff;
  width: 100%;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(233,69,96,0.4); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: #1a4a80; }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #27ae60; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c0392b; }

.btn-warning { background: var(--warning); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-icon { padding: 8px; border-radius: 8px; }

/* ── Alert ─────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}
.alert.show { display: block; }
.alert-error { background: rgba(231,76,60,0.15); border: 1px solid rgba(231,76,60,0.4); color: #e74c3c; }
.alert-success { background: rgba(46,204,113,0.15); border: 1px solid rgba(46,204,113,0.4); color: #2ecc71; }

/* ── Layout ────────────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  width: 250px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
}

.sidebar-brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.sidebar-brand-text { overflow: hidden; }
.sidebar-brand-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-brand-slogan {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto;
}

.nav-section {
  padding: 0 12px;
  margin-bottom: 8px;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  padding: 8px 8px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 2px;
}

.nav-item:hover { background: var(--card); color: var(--text); }
.nav-item.active { background: var(--accent); color: #fff; }
.nav-item-icon { font-size: 18px; width: 20px; text-align: center; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.user-name { font-size: 13px; font-weight: 600; color: var(--text); }
.user-rol {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: capitalize;
}

.btn-logout {
  width: 100%;
  padding: 9px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-logout:hover { background: rgba(231,76,60,0.1); border-color: var(--danger); color: var(--danger); }

/* ── Main Content ──────────────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: 250px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title { font-size: 20px; font-weight: 700; color: #fff; }
.topbar-subtitle { font-size: 13px; color: var(--text-dim); }

.page-content {
  padding: 32px;
  flex: 1;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

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

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

/* ── Stats Grid ────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition);
  cursor: pointer;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  border-color: var(--accent2);
}

.stat-icon {
  font-size: 32px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border-radius: 12px;
  flex-shrink: 0;
}

.stat-label { font-size: 12px; color: var(--text-dim); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { font-size: 22px; font-weight: 700; color: #fff; }

/* ── Departments Grid ──────────────────────────────────────── */
.deptos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.depto-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.depto-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity var(--transition);
}

.depto-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.depto-card:hover::before { opacity: 1; }

.depto-icon { font-size: 36px; margin-bottom: 12px; }
.depto-name { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.depto-desc { font-size: 13px; color: var(--text-dim); margin-bottom: 16px; }
.depto-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

/* ── Table ─────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  background: var(--card);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(30,58,95,0.5);
  color: var(--text);
  vertical-align: middle;
}

tr:hover td { background: rgba(15,52,96,0.2); }

/* ── Badge ─────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}
.badge-director  { background: rgba(233,69,96,0.2);  color: #e94560; border: 1px solid rgba(233,69,96,0.4); }
.badge-gerente   { background: rgba(243,156,18,0.2); color: #f39c12; border: 1px solid rgba(243,156,18,0.4); }
.badge-coordinador { background: rgba(15,52,96,0.4); color: #4a9ede; border: 1px solid rgba(74,158,222,0.4); }
.badge-empleado  { background: rgba(46,204,113,0.2); color: #2ecc71; border: 1px solid rgba(46,204,113,0.4); }

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.status-dot::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.status-dot.active::before  { background: var(--success); box-shadow: 0 0 6px var(--success); }
.status-dot.inactive::before { background: var(--danger); }

/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow);
  transform: translateY(20px);
  transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-title { font-size: 18px; font-weight: 700; color: #fff; }

.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  transition: color var(--transition);
}
.modal-close:hover { color: var(--danger); }

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* ── Config Page ───────────────────────────────────────────── */
.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 768px) { .config-grid { grid-template-columns: 1fr; } }

.logo-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}
.logo-upload-area:hover { border-color: var(--accent2); background: rgba(233,69,96,0.05); }
.logo-upload-area.dragover { border-color: var(--accent2); background: rgba(233,69,96,0.1); }

#logoPreview {
  max-width: 160px;
  max-height: 100px;
  object-fit: contain;
  margin-bottom: 12px;
  display: none;
}

.color-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 2px solid var(--border);
  transition: background var(--transition);
}

/* ── Welcome Banner ────────────────────────────────────────── */
.welcome-banner {
  background: linear-gradient(135deg, var(--accent) 0%, #1a4a80 100%);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
}

.welcome-text h2 { font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.welcome-text p  { font-size: 14px; color: rgba(255,255,255,0.7); }
.welcome-emoji { font-size: 48px; }

/* ── Loading Spinner ───────────────────────────────────────── */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
  display: block;
}

/* ── Section Title ─────────────────────────────────────────── */
.section-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.fade-in { animation: fadeInUp 0.4s ease; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .page-content { padding: 20px; }
}

/* ── Toast ─────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 14px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeInUp 0.3s ease;
  max-width: 320px;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error   { border-left: 4px solid var(--danger); }
.toast.info    { border-left: 4px solid var(--accent2); }

/* ── Botón regresar ─────────────────────────────────────────── */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  margin-bottom: 12px;
  text-decoration: none;
  transition: background 0.2s;
}
.btn-back:hover {
  background: var(--card);
  color: #fff;
}

/* ── NOM-010-STPS-2014 ──────────────────────────────────────────────────────── */
.prioridad-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-block;
}
.prioridad-muy_alta { background: #fee2e2; color: #991b1b; }
.prioridad-alta     { background: #ffedd5; color: #9a3412; }
.prioridad-moderada { background: #fef9c3; color: #854d0e; }
.prioridad-baja     { background: #f0fdf4; color: #166534; }
.prioridad-muy_baja { background: #f1f5f9; color: #64748b; }

.nom010-progress-bar { display: flex; gap: 4px; margin-bottom: 24px; }
.nom010-step {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
}
.nom010-step.active { background: var(--primary, #0f3460); }
.nom010-step.done   { background: #86efac; }

@media print {
  .sidebar, .topbar, button, .no-print { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .nom010-resultado { font-size: 12px; }
  .app-layout { display: block; }
}

/* ── NOM-011-STPS-2001 ──────────────────────────────────────────────────────── */
.cumple-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  background: #d1fae5;
  color: #065f46;
}
.no-cumple-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  background: #fee2e2;
  color: #991b1b;
}
.resultado-row-cumple td  { background: #f0fdf4; }
.resultado-row-nocumple td { background: #fff1f2; }

.nivel-bar-container {
  background: #e2e8f0;
  border-radius: 4px;
  height: 8px;
  width: 100px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
}
.nivel-bar { height: 100%; border-radius: 4px; }
.nivel-bar.safe    { background: #86efac; }
.nivel-bar.warning { background: #fbbf24; }
.nivel-bar.danger  { background: #f87171; }

.calibrado-ok { color: #16a34a; font-weight: 600; font-size: 12px; }
.calibrado-no { color: #dc2626; font-weight: 600; font-size: 12px; }

/* ── NOM-015-STPS-2001 ──────────────────────────────────────────────────────── */
.badge-elevada { background: #fee2e2; color: #991b1b; }
.badge-abatida { background: #dbeafe; color: #1e40af; }
.badge-mixta   { background: #f3e8ff; color: #6b21a8; }

.termico-ok      { color: #16a34a; font-weight: 700; }
.termico-warning { color: #d97706; font-weight: 700; }
.termico-danger  { color: #dc2626; font-weight: 700; }

.axilar-alta {
  background: #fee2e2;
  border-left: 4px solid #dc2626;
  padding: 8px 12px;
  border-radius: 4px;
}
.axilar-baja {
  background: #dbeafe;
  border-left: 4px solid #2563eb;
  padding: 8px 12px;
  border-radius: 4px;
}

.tabla-lmpe td, .tabla-lmpe th { text-align: center; padding: 6px 12px; }
.lmpe-ligero   { background: #dcfce7; }
.lmpe-moderado { background: #fef9c3; }
.lmpe-pesado   { background: #fee2e2; }

/* ── NOM-025-STPS-2008 ──────────────────────────────────────────────────────── */
.lux-cumple  { color: #16a34a; font-weight: 600; }
.lux-nocumple{ color: #dc2626; font-weight: 600; }

.lux-bar {
  height: 8px;
  border-radius: 4px;
  background: #e2e8f0;
  overflow: hidden;
  margin-top: 4px;
}
.lux-bar-inner {
  height: 100%;
  border-radius: 4px;
  background: var(--primary);
  transition: width .4s;
}

.grid-medicion {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  max-width: 340px;
  margin: 12px 0;
}
.grid-punto {
  background: #f8fafc;
  border: 2px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s;
}
.grid-punto.filled { background: #d1fae5; border-color: #10b981; }
.grid-punto:hover  { border-color: var(--primary); }
.grid-punto .lux-val  { font-size: 14px; font-weight: 700; color: var(--primary); }
.grid-punto .punto-num{ font-size: 10px; color: var(--text-dim); }

.reflex-ok  { color: #16a34a; font-weight: 600; }
.reflex-mal { color: #dc2626; font-weight: 600; }

/* ── NOM-024-STPS-2001 ──────────────────────────────────────────────────────── */
.alerta-gestante {
  background: #7f1d1d;
  color: #fecaca;
  border: 2px solid #ef4444;
  padding: 14px 18px;
  border-radius: 8px;
  font-weight: 700;
  text-align: center;
}

.vib-ce { background: #dbeafe; color: #1e40af; }
.vib-es { background: #fef3c7; color: #92400e; }

.banda-cumple { background: #f0fdf4; }
.banda-excede { background: #fee2e2; }

.nev-ok      { color: #16a34a; font-weight: 700; }
.nev-warning { color: #d97706; font-weight: 700; }
.nev-danger  { color: #dc2626; font-weight: 700; }

.veredicto-cumple   { background: #d1fae5; border: 2px solid #10b981; border-radius: 12px; padding: 24px; text-align: center; }
.veredicto-nocumple { background: #fee2e2; border: 2px solid #ef4444; border-radius: 12px; padding: 24px; text-align: center; }

.firma-box {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

@media print {
  .sidebar, .topbar, .no-print, button { display: none !important; }
  .card { break-inside: avoid; margin-bottom: 16px; }
  body  { font-size: 11px; }
}

/* ── NOM-022-STPS-2015  Electricidad Estática ─────────────────────────────── */
.ohm-safe    { background: #dcfce7; color: #166534; }
.ohm-warning { background: #fef9c3; color: #854d0e; }
.ohm-danger  { background: #fee2e2; color: #991b1b; }

.cumple-ohms   { color: #16a34a; font-weight: 600; }
.no-cumple-ohms{ color: #dc2626; font-weight: 600; }

.alerta-critica {
  background: #fee2e2;
  border: 2px solid #dc2626;
  border-radius: 8px;
  padding: 14px 16px;
  color: #991b1b;
  font-size: 13px;
  font-weight: 600;
}

.riesgo-alto  { background: #fee2e2; color: #991b1b; }
.riesgo-medio { background: #fef9c3; color: #854d0e; }
.riesgo-bajo  { background: #dcfce7; color: #166534; }

.resultado-022-cumple  { background: linear-gradient(135deg,#f0fdf4,#dcfce7); border: 2px solid #16a34a; }
.resultado-022-incumple{ background: linear-gradient(135deg,#fff5f5,#fee2e2); border: 2px solid #dc2626; }

.punto-cumple   { border-left: 4px solid #16a34a; }
.punto-nocumple { border-left: 4px solid #dc2626; }

.ohm-bar-container { background: #e2e8f0; border-radius: 4px; height: 8px; overflow: hidden; }
.ohm-bar           { height: 100%; border-radius: 4px; transition: width 0.3s; }
.ohm-bar.ohm-safe    { background: #16a34a; }
.ohm-bar.ohm-warning { background: #eab308; }
.ohm-bar.ohm-danger  { background: #dc2626; }

@media print {
  .nom022-step, .btn-avanzar, #modal-punto, #modal-area { display: none !important; }
  .alerta-critica { border: 2px solid #dc2626 !important; }
  .resultado-022-cumple, .resultado-022-incumple { break-inside: avoid; }
}

/* ── NOM-012-STPS-2012  Radiaciones Ionizantes ────────────────────────────── */
.badge-radiacion {
  background: #fef3c7;
  color: #92400e;
  padding: 4px 10px;
  border-radius: 10px;
  font-weight: 700;
}
.alerta-prohibicion {
  background: #7f1d1d;
  color: #fecaca;
  border: 2px solid #ef4444;
  padding: 14px;
  border-radius: 8px;
  font-weight: 700;
  text-align: center;
}
.dosis-verde    { background: #dcfce7; color: #166534; }
.dosis-amarillo { background: #fef9c3; color: #854d0e; }
.dosis-naranja  { background: #ffedd5; color: #9a3412; }
.dosis-rojo     { background: #fee2e2; color: #991b1b; }

.dosis-bar-track {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 5px;
  overflow: hidden;
}
.dosis-bar { height: 10px; border-radius: 5px; }

.zona-badge       { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.zona-controlada  { background: #fee2e2; color: #991b1b; }
.zona-supervisada { background: #fef9c3; color: #854d0e; }
.zona-libre       { background: #dcfce7; color: #166534; }

.poe-section { border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; margin-bottom: 14px; }
.poe-header  { background: #f8fafc; padding: 12px 18px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.poe-body    { padding: 16px 18px; border-top: 1px solid #e2e8f0; }

@media print {
  .nom012-step, #modal-fuente, #modal-poe, #modal-reg, #modal-zona { display: none !important; }
  .alerta-prohibicion { border: 2px solid #ef4444 !important; }
  .poe-section { break-inside: avoid; }
}

/* ── NOM-013 Radiaciones No Ionizantes ─────────────────────────────────────── */
.badge-uv      { background: #f5f3ff; color: #6d28d9; }
.badge-ir      { background: #fff7ed; color: #c2410c; }
.badge-visible { background: #fefce8; color: #a16207; }
.badge-laser   { background: #fee2e2; color: #991b1b; }
.badge-rf      { background: #ecfdf5; color: #065f46; }

.rni-cumple      { background: #dcfce7; color: #166534; padding: 3px 10px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.rni-nocumple    { background: #fee2e2; color: #991b1b; padding: 3px 10px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.rni-sinmedicion { background: #f1f5f9; color: #64748b; padding: 3px 10px; border-radius: 10px; font-size: 11px; font-weight: 600; }

.laser-clase-I    { background: #f0fdf4; color: #166534; border: 1px solid #86efac; padding: 2px 8px; border-radius: 8px; font-size: 11px; font-weight: 700; }
.laser-clase-II   { background: #fefce8; color: #a16207; border: 1px solid #fef08a; padding: 2px 8px; border-radius: 8px; font-size: 11px; font-weight: 700; }
.laser-clase-IIIa { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; padding: 2px 8px; border-radius: 8px; font-size: 11px; font-weight: 700; }
.laser-clase-IIIb { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; padding: 2px 8px; border-radius: 8px; font-size: 11px; font-weight: 700; }
.laser-clase-IV   { background: #7f1d1d; color: #fecaca; padding: 2px 8px; border-radius: 8px; font-size: 11px; font-weight: 700; }

/* ── Reloj Checador ─────────────────────────────────────────────────────────── */
.reloj-display{font-size:3rem;font-weight:800;font-family:'Courier New',monospace;color:var(--primary,#0f3460);letter-spacing:4px;line-height:1}
.fecha-display{font-size:1.05rem;color:#64748b;margin-bottom:20px}

.btn-checar-principal{font-size:1.2rem;font-weight:700;padding:18px 40px;border-radius:12px;border:none;cursor:pointer;width:100%;max-width:380px;transition:all 0.2s;box-shadow:0 4px 12px rgba(0,0,0,0.15)}
.btn-checar-principal:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 6px 16px rgba(0,0,0,0.2)}
.btn-checar-principal:disabled{background:#e2e8f0!important;color:#94a3b8;cursor:default;transform:none}
.btn-checar-entrada{background:#16a34a;color:#fff}
.btn-checar-comida {background:#d97706;color:#fff}
.btn-checar-regreso{background:#2563eb;color:#fff}
.btn-checar-salida {background:#7c3aed;color:#fff}

.chequeo-item     {display:flex;align-items:center;gap:12px;padding:10px 16px;border-radius:8px;margin-bottom:8px}
.chequeo-ok       {background:#f0fdf4;border-left:4px solid #22c55e}
.chequeo-tardanza {background:#fff7ed;border-left:4px solid #f59e0b}
.chequeo-pendiente{background:#f8fafc;border-left:4px solid #cbd5e1;color:#94a3b8}

.fila-ok      {background:#f0fdf4}
.fila-tardanza{background:#fff7ed}
.fila-ausente {background:#fff1f2}
.fila-nolaboral{background:#f8fafc;color:#94a3b8}

.bono-conservado{background:#dcfce7;color:#166534;padding:2px 8px;border-radius:10px;font-size:0.8rem;font-weight:600}
.bono-perdido   {background:#fee2e2;color:#991b1b;padding:2px 8px;border-radius:10px;font-size:0.8rem;font-weight:600}

@media print{
  .no-print,.sidebar,.topbar,button{display:none!important}
  body{font-size:11px}
  .main-content{margin-left:0!important}
  .app-layout{grid-template-columns:0 1fr}
}
