/* ============================================================
   MaFel Core — Design System
   ============================================================
   Prefijo `mf-` en todas las clases para evitar colisiones con
   los estilos existentes. Este archivo NO se carga en base.html
   todavía; se usa solo en /playground/ hasta aprobar el look.
   ============================================================ */

:root {
  /* ── Azules principales ─────────────────────────────── */
  --mf-navy-900: #0F1C2E;
  --mf-navy-800: #1E3A5F;
  --mf-navy-700: #152A4A;
  --mf-navy-600: #1E40AF;
  --mf-navy-500: #3B82F6;
  --mf-blue-400: #60A5FA;
  --mf-blue-100: #DBEAFE;
  --mf-blue-50:  #EFF6FF;

  /* ── Grises ─────────────────────────────────────────── */
  --mf-slate-900: #0F1C2E;
  --mf-slate-700: #334155;
  --mf-slate-600: #475569;
  --mf-slate-500: #64748B;
  --mf-slate-400: #94A3B8;
  --mf-slate-300: #CBD5E1;
  --mf-slate-200: #E2E8F0;
  --mf-slate-100: #F1F5F9;
  --mf-slate-50:  #F8F9FA;

  /* ── Bordes ─────────────────────────────────────────── */
  --mf-border:       #E4E4E7;
  --mf-border-light: #F1F5F9;

  /* ── Semánticos ─────────────────────────────────────── */
  --mf-green-50:  #D1FAE5;
  --mf-green-600: #059669;
  --mf-green-700: #065F46;
  --mf-amber-50:  #FEF3C7;
  --mf-amber-600: #D97706;
  --mf-amber-700: #92400E;
  --mf-red-50:    #FEE2E2;
  --mf-red-600:   #DC2626;
  --mf-red-700:   #991B1B;
  --mf-purple-50: #F3E8FF;
  --mf-purple-600: #7C3AED;
  --mf-purple-700: #6B21A8;
  --mf-cyan-50:   #CFFAFE;
  --mf-cyan-100:  #A5F3FC;
  --mf-cyan-600:  #0891B2;
  --mf-cyan-700:  #155E75;

  /* ── Radius ─────────────────────────────────────────── */
  --mf-radius-sm: 4px;
  --mf-radius-md: 6px;
  --mf-radius-lg: 8px;
  --mf-radius-xl: 12px;

  /* ── Tipografía ─────────────────────────────────────── */
  --mf-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mf-font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

/* ============================================================
   Reset scoped — solo dentro de .mf-scope para no contaminar
   el resto del sistema mientras convivimos con el CSS viejo.
   ============================================================ */
.mf-scope,
.mf-scope * {
  box-sizing: border-box;
}

.mf-scope {
  font-family: var(--mf-font-sans);
  color: var(--mf-slate-700);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   LAYOUT raíz — sidebar dual + contenido + footer
   Sidebars sticky: quedan fijos mientras el contenido scrollea.
   ============================================================ */
.mf-app {
  display: flex;
  align-items: flex-start; /* crítico para que position:sticky funcione en flex children */
  min-height: calc(100vh - 48px);
}

.mf-content {
  flex: 1;
  min-width: 0;            /* evita desbordes horizontales con tablas largas */
  padding: 20px 24px;
  background: var(--mf-slate-50);
}

.mf-content-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.mf-content-title {
  font-size: 22px;
  font-weight: 500;
  color: var(--mf-navy-900);
  letter-spacing: -0.3px;
  margin: 0;
}

.mf-content-breadcrumb {
  font-size: 11px;
  color: var(--mf-slate-500);
  margin-top: 4px;
  font-family: var(--mf-font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mf-content-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============================================================
   TIPOGRAFÍA — utilidades de jerarquía
   Regla: tamaños permitidos 22 / 14 / 13 / 12 / 11 / 10 px.
          weights 400 (normal) o 500 (medium). Nunca > 500.
   ============================================================ */

/* Subtítulo / meta bajo el H1 — "X resultados", norma ISO, etc. */
.mf-subtitle {
  font-size: 13px;
  font-weight: 400;
  color: var(--mf-slate-500);
  line-height: 1.4;
  margin: 4px 0 14px;
}

/* Texto muted mono — timestamps, autor, "hace X días" */
.mf-muted {
  font-size: 11px;
  font-weight: 400;
  color: var(--mf-slate-400);
  font-family: var(--mf-font-mono);
}

/* Texto secundario — nombres, descripciones cortas */
.mf-text-sm {
  font-size: 12px;
  font-weight: 400;
  color: var(--mf-slate-500);
}

/* Título de sección interna en panel (mono uppercase) */
.mf-section-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--mf-slate-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--mf-font-mono);
  margin-bottom: 4px;
}

/* ============================================================
   Tipografía por defecto dentro de .mf-content
   Para templates que no usan las clases mf-* explícitas, que hereden
   los tamaños del sistema. Los inline styles siguen ganando sobre esto.
   ============================================================ */
.mf-content h1 {
  font-size: 22px;
  font-weight: 500;
  color: var(--mf-navy-900);
  letter-spacing: -0.3px;
  margin: 0 0 4px;
  font-family: var(--mf-font-sans);
}
.mf-content h2 {
  font-size: 14px;
  font-weight: 500;
  color: var(--mf-navy-900);
  margin: 16px 0 8px;
  font-family: var(--mf-font-sans);
}
.mf-content h3 {
  font-size: 13px;
  font-weight: 500;
  color: var(--mf-navy-900);
  margin: 12px 0 6px;
  font-family: var(--mf-font-sans);
}
.mf-content h4 {
  font-size: 11px;
  font-weight: 500;
  color: var(--mf-slate-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--mf-font-mono);
  margin: 10px 0 4px;
}

/* Tablas sin la clase .mf-table — aplicar look base */
.mf-content table {
  font-size: 13px;
  font-family: var(--mf-font-sans);
  color: var(--mf-slate-700);
}
.mf-content table th {
  font-size: 10px;
  color: var(--mf-slate-500);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--mf-font-mono);
}
.mf-content table td {
  color: var(--mf-slate-700);
}

/* Botones nativos sin clase .mf-btn — darles el look base para que no
   queden como botones browser-default */
.mf-content button:not([class*="mf-"]):not([class*="btn-"]):not([class*="dash-tab"]):not([class*="cc-"]):not([class*="tr-"]),
.mf-content input[type="submit"]:not([class*="mf-"]) {
  padding: 8px 14px;
  border-radius: var(--mf-radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 0.5px solid var(--mf-border);
  background: #fff;
  color: var(--mf-slate-700);
  font-family: var(--mf-font-sans);
}

/* ============================================================
   TOPBAR — barra superior del contenido con alertas / acciones
   Va dentro de .mf-content, arriba del content-header.
   ============================================================ */
.mf-topbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0 14px;
  margin-bottom: 8px;
  border-bottom: 0.5px solid var(--mf-border);
}
.mf-topbar-spacer { flex: 1; }

.mf-topbar-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: var(--mf-radius-md);
  background: #fff;
  border: 0.5px solid var(--mf-border);
  color: var(--mf-slate-500);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
}
.mf-topbar-btn:hover {
  background: var(--mf-slate-50);
  color: var(--mf-navy-900);
  border-color: var(--mf-slate-300);
}
.mf-topbar-btn svg {
  width: 17px;
  height: 17px;
}
.mf-topbar-btn.alert {
  color: var(--mf-amber-700);
  background: var(--mf-amber-50);
  border-color: var(--mf-amber-50);
}
.mf-topbar-btn.alert:hover { background: #fde68a; }

.mf-topbar-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--mf-red-600);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mf-font-mono);
  line-height: 1;
  border: 1.5px solid #fff;
}
.mf-topbar-badge.info {
  background: var(--mf-navy-600);
}
.mf-topbar-badge.amber {
  background: var(--mf-amber-600);
}
.mf-topbar-badge.purple {
  background: var(--mf-purple-600);
}

/* ============================================================
   SIDEBAR RAIL — nivel 1 (solo iconos)
   ============================================================ */
.mf-rail {
  width: 60px;
  background: var(--mf-navy-900);
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  gap: 3px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.mf-rail-logo {
  width: 42px;
  height: 42px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  position: relative;
}
.mf-rail-logo::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 10px;
  right: 10px;
  height: 1px;
  background: var(--mf-navy-800);
}

.mf-rail-item {
  width: 36px;
  height: 36px;
  margin: 0 auto;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mf-slate-400);
  text-decoration: none;
  position: relative;
  transition: all 0.15s;
}
.mf-rail-item:hover {
  background: var(--mf-navy-700);
  color: var(--mf-slate-200);
}
.mf-rail-item.active {
  background: var(--mf-navy-800);
  color: var(--mf-blue-400);
}
.mf-rail-item.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--mf-blue-400);
  border-radius: 0 3px 3px 0;
}
.mf-rail-item svg {
  width: 18px;
  height: 18px;
}
.mf-rail-item[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50px;
  background: var(--mf-navy-900);
  color: #fff;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 100;
  border: 1px solid var(--mf-navy-800);
}
.mf-rail-item:hover[data-tooltip]::after {
  opacity: 1;
}

.mf-rail-user {
  margin: auto auto 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--mf-navy-500);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

/* ============================================================
   SIDEBAR SUB — nivel 2 (contextual)
   ============================================================ */
.mf-sub {
  background: #fff;
  border-right: 0.5px solid var(--mf-border);
  padding: 16px 0;
  display: flex;
  flex-direction: column;

  /* Drawer mode: oculto por default. Se abre con click en el ícono activo
     del rail (mf-chrome.js) o con la clase .is-open aplicada. */
  position: fixed;
  top: 0;
  bottom: 48px;          /* descontar altura del footer */
  left: 60px;            /* empieza justo después del rail */
  width: 240px;
  overflow-y: auto;
  transform: translateX(calc(-100% - 60px));
  opacity: 0;
  pointer-events: none;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1),
              opacity 200ms ease;
  z-index: 45;
  box-shadow: 8px 0 24px rgba(15, 28, 46, 0.10);
}
.mf-sub.is-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

/* Backdrop para cierre al clickear fuera */
.mf-sub-backdrop {
  position: fixed;
  top: 0;
  left: 60px;
  right: 0;
  bottom: 48px;
  background: rgba(15, 28, 46, 0.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 44;
}
.mf-sub-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Hint visual: el ícono del rail activo es clickeable para toggle */
.mf-rail-item.active {
  cursor: pointer;
}

/* ============================================================
   Banner global de avisos (críticos / advertencia)
   Fijo al tope del viewport, sobre TODAS las páginas del LIMS.
   Se llena por mafel-chrome.js con polling al endpoint banner.
   ============================================================ */
.mf-banner {
  position: fixed;
  top: 0;
  left: 60px;   /* después del rail */
  right: 0;
  z-index: 55;  /* arriba del sub-drawer (45) pero bajo modales (100) */
  min-height: 38px;
  padding: 8px 16px 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mf-font-sans);
  font-size: 13px;
  color: #fff;
  background: var(--mf-red-600);
  box-shadow: 0 2px 8px rgba(15,28,46,0.15);
  animation: mf-banner-in 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
.mf-banner[hidden] { display: none !important; }
.mf-banner.tone-advertencia {
  background: var(--mf-amber-600);
  color: #fff;
}
.mf-banner.tone-critico {
  background: var(--mf-red-600);
  color: #fff;
}
@keyframes mf-banner-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mf-banner-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  opacity: 0.9;
}
.mf-banner-body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.mf-banner-title {
  font-weight: 600;
  letter-spacing: -0.1px;
  white-space: nowrap;
}
.mf-banner-text {
  opacity: 0.95;
  flex: 1;
  min-width: 0;
}
.mf-banner-close {
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
  opacity: 0.8;
  flex-shrink: 0;
}
.mf-banner-close:hover { opacity: 1; }

/* Cuando el banner está visible empujamos el contenido para no taparlo */
body.has-mf-banner .mf-content { padding-top: 46px; }
body.has-mf-banner .mf-rail    { padding-top: 46px; }
body.has-mf-banner .mf-sub     { top: 46px; }

.mf-sub-header {
  padding: 0 16px 14px;
  border-bottom: 0.5px solid var(--mf-border);
  margin-bottom: 8px;
}
.mf-sub-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--mf-navy-900);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.2px;
}
.mf-sub-subtitle {
  font-size: 11px;
  color: var(--mf-slate-500);
  margin-top: 2px;
}

.mf-sub-items {
  padding: 0 10px;
  flex: 1;
  overflow-y: auto;
}
.mf-sub-section {
  padding: 10px 8px 4px;
  font-size: 10px;
  font-weight: 500;
  color: var(--mf-slate-400);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-family: var(--mf-font-mono);
}

.mf-sub-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--mf-slate-700);
  font-size: 12px;
  margin-bottom: 2px;
  text-decoration: none;
  transition: background 0.1s;
}
.mf-sub-item:hover {
  background: var(--mf-slate-100);
}
.mf-sub-item.active {
  background: var(--mf-blue-50);
  color: var(--mf-navy-600);
  font-weight: 500;
}
.mf-sub-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.mf-sub-badge {
  margin-left: auto;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  background: var(--mf-red-50);
  color: var(--mf-red-700);
  font-weight: 500;
  font-family: var(--mf-font-mono);
}

.mf-sub-user {
  padding: 12px 14px;
  border-top: 0.5px solid var(--mf-border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.mf-sub-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--mf-navy-500);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 13px;
}
.mf-sub-user-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--mf-navy-900);
}
.mf-sub-user-role {
  font-size: 10px;
  color: var(--mf-slate-500);
  font-family: var(--mf-font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.mf-sub-user-pass {
  font-size: 10px;
  color: var(--mf-slate-500);
  margin-top: 3px;
  font-family: var(--mf-font-mono);
}
.mf-sub-user-pass.alerta  { color: var(--mf-amber-600); }
.mf-sub-user-pass.critica { color: var(--mf-amber-700); font-weight: 600; }
.mf-sub-user-pass.vencida { color: var(--mf-red-600); font-weight: 600; }

/* La card del usuario es clickeable — sutil hover */
a.mf-sub-user { color: inherit; transition: background 0.1s; }
a.mf-sub-user:hover { background: var(--mf-slate-50); }

/* ============================================================
   FOOTER
   ============================================================ */
.mf-footer {
  background: var(--mf-navy-900);
  color: var(--mf-slate-400);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  border-top: 1px solid var(--mf-navy-800);
  height: 48px;
}
.mf-footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mf-footer-name {
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.2px;
  line-height: 1.2;
}
.mf-footer-company {
  color: var(--mf-blue-400);
  font-size: 10px;
  font-family: var(--mf-font-mono);
  line-height: 1.2;
}
.mf-footer-sep {
  width: 0.5px;
  height: 24px;
  background: var(--mf-navy-800);
}
.mf-footer-meta {
  display: flex;
  gap: 14px;
  align-items: center;
  font-family: var(--mf-font-mono);
  font-size: 10px;
}
.mf-footer-meta span { color: var(--mf-slate-400); }
.mf-footer-meta strong { color: var(--mf-slate-300); font-weight: 500; }
.mf-footer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mf-green-600);
  margin-right: 4px;
  display: inline-block;
}
.mf-footer-links {
  margin-left: auto;
  display: flex;
  gap: 14px;
}
.mf-footer-links a {
  color: var(--mf-slate-400);
  text-decoration: none;
  transition: color 0.15s;
}
.mf-footer-links a:hover { color: #fff; }

/* ============================================================
   BOTONES
   ============================================================ */
.mf-btn {
  padding: 8px 14px;
  border-radius: var(--mf-radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 0.5px solid var(--mf-border);
  background: #fff;
  color: var(--mf-slate-700);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mf-font-sans);
  transition: all 0.15s;
  text-decoration: none;
}
.mf-btn:hover { background: var(--mf-slate-50); }
.mf-btn:active { transform: scale(0.98); }
.mf-btn svg { width: 14px; height: 14px; }

.mf-btn-primary {
  background: var(--mf-navy-600);
  color: #fff;
  border: none;
}
.mf-btn-primary:hover { background: var(--mf-navy-900); }

.mf-btn-secondary {
  background: var(--mf-navy-900);
  color: #fff;
  border: none;
}
.mf-btn-secondary:hover { background: var(--mf-navy-800); }

.mf-btn-danger {
  background: var(--mf-red-50);
  color: var(--mf-red-700);
  border-color: var(--mf-red-50);
}
.mf-btn-danger:hover { background: #fecaca; }

.mf-btn-success {
  background: var(--mf-green-50);
  color: var(--mf-green-700);
  border-color: var(--mf-green-50);
}
.mf-btn-success:hover { background: #bbf7d0; }

.mf-btn-warning {
  background: var(--mf-amber-50);
  color: var(--mf-amber-700);
  border-color: var(--mf-amber-50);
}
.mf-btn-warning:hover { background: #fde68a; }

.mf-btn-info {
  background: var(--mf-blue-50);
  color: var(--mf-navy-600);
  border-color: var(--mf-blue-50);
}
.mf-btn-info:hover { background: var(--mf-blue-100); }

/* Botón sin fondo, estilo link discreto. Útil para acciones secundarias
   en tablas densas que no deben competir con el contenido. */
.mf-btn-ghost {
  background: transparent;
  color: var(--mf-slate-600);
  border-color: transparent;
}
.mf-btn-ghost:hover { background: var(--mf-slate-100); color: var(--mf-navy-900); }

.mf-btn-sm { padding: 4px 10px; font-size: 11px; }
.mf-btn-xs { padding: 3px 8px; font-size: 10px; }

/* ============================================================
   STAT CARDS
   ============================================================ */
.mf-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.mf-stat {
  background: #fff;
  border: 0.5px solid var(--mf-border);
  border-radius: var(--mf-radius-lg);
  padding: 12px 14px;
}
.mf-stat-label {
  font-size: 11px;
  color: var(--mf-slate-500);
  margin-bottom: 4px;
  font-family: var(--mf-font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.mf-stat-value {
  font-size: 22px;
  font-weight: 500;
  color: var(--mf-navy-900);
  letter-spacing: -0.3px;
}
.mf-stat-change {
  font-size: 11px;
  margin-top: 2px;
  color: var(--mf-green-600);
  font-family: var(--mf-font-mono);
}
.mf-stat-change.negative { color: var(--mf-red-600); }

/* ============================================================
   PANELES
   ============================================================ */
.mf-panel {
  background: #fff;
  border: 0.5px solid var(--mf-border);
  border-radius: var(--mf-radius-lg);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.mf-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.mf-panel-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--mf-navy-900);
}
.mf-panel-action {
  font-size: 12px;
  color: var(--mf-navy-600);
  cursor: pointer;
  text-decoration: none;
}
.mf-panel-action:hover { text-decoration: underline; }

/* ============================================================
   TABLAS
   ============================================================ */
.mf-table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
}
.mf-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 10px;
  color: var(--mf-slate-500);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 0.5px solid var(--mf-border);
  font-family: var(--mf-font-mono);
}
.mf-table td {
  padding: 10px 12px;
  border-bottom: 0.5px solid var(--mf-border-light);
  color: var(--mf-slate-700);
}
.mf-table tr:last-child td { border-bottom: none; }
.mf-table tr:hover td { background: var(--mf-slate-50); }

.mf-code {
  font-family: var(--mf-font-mono);
  font-size: 11px;
  color: var(--mf-navy-600);
  font-weight: 500;
}

/* ============================================================
   BADGES / TAGS
   ============================================================ */
.mf-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 500;
  display: inline-block;
  font-family: var(--mf-font-mono);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.mf-tag-green  { background: var(--mf-green-50);  color: var(--mf-green-700);  }
.mf-tag-blue   { background: var(--mf-blue-100);  color: var(--mf-navy-600);   }
.mf-tag-amber  { background: var(--mf-amber-50);  color: var(--mf-amber-700);  }
.mf-tag-red    { background: var(--mf-red-50);    color: var(--mf-red-700);    }
.mf-tag-purple { background: var(--mf-purple-50); color: var(--mf-purple-700); }

/* ============================================================
   FORMULARIOS
   ============================================================ */
.mf-form-group { margin-bottom: 12px; }
.mf-form-label {
  font-size: 11px;
  color: var(--mf-slate-500);
  margin-bottom: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: block;
  font-family: var(--mf-font-mono);
}
.mf-form-input,
.mf-form-select,
.mf-form-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 0.5px solid var(--mf-border);
  border-radius: var(--mf-radius-md);
  font-size: 13px;
  color: var(--mf-navy-900);
  font-family: var(--mf-font-sans);
  background: #fff;
  transition: border-color 0.15s;
}
.mf-form-input:focus,
.mf-form-select:focus,
.mf-form-textarea:focus {
  outline: 2px solid var(--mf-blue-100);
  border-color: var(--mf-navy-600);
}
.mf-form-textarea { resize: vertical; min-height: 72px; }

.mf-form-row   { display: grid; gap: 10px; }
.mf-form-row-2 { grid-template-columns: 1fr 1fr; }
.mf-form-row-3 { grid-template-columns: 1fr 1fr 1fr; }

/* ============================================================
   WIZARD (pasos horizontales)
   ============================================================ */
.mf-wizard {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  background: #fff;
  padding: 12px 16px;
  border-radius: var(--mf-radius-lg);
  border: 0.5px solid var(--mf-border);
}
.mf-wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--mf-slate-400);
  flex-shrink: 0;
}
.mf-wizard-step .num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--mf-slate-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  color: var(--mf-slate-400);
  font-size: 11px;
  flex-shrink: 0;
}
.mf-wizard-step.done       { color: var(--mf-green-600); }
.mf-wizard-step.done .num  { background: var(--mf-green-50); color: var(--mf-green-700); }
.mf-wizard-step.active     { color: var(--mf-navy-600); font-weight: 500; }
.mf-wizard-step.active .num{ background: var(--mf-navy-600); color: #fff; }
.mf-wizard-line {
  flex: 1;
  height: 1px;
  background: var(--mf-border);
  margin: 0 4px;
  min-width: 8px;
}
/* Mobile: ocultar labels, dejar solo los círculos numerados. */
@media (max-width: 520px) {
  .mf-wizard-step .lbl { display: none; }
  .mf-wizard { padding: 10px 12px; }
}

/* ============================================================
   TIMELINE
   ============================================================ */
.mf-timeline { display: flex; flex-direction: column; gap: 10px; }
.mf-timeline-item {
  display: flex;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 0.5px solid var(--mf-border-light);
}
.mf-timeline-item:last-child { border-bottom: none; padding-bottom: 0; }
.mf-timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.mf-timeline-dot-green { background: var(--mf-green-600); }
.mf-timeline-dot-blue  { background: var(--mf-navy-600);  }
.mf-timeline-dot-amber { background: var(--mf-amber-600); }
.mf-timeline-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--mf-navy-900);
}
.mf-timeline-desc {
  font-size: 11px;
  color: var(--mf-slate-500);
  margin-top: 2px;
}
