/* Consola de Plataforma — capa de diseño del control plane.
   Regla de la casa: SOLO composición de tokens (tokens.css), sin hex nuevo.
   Todo va scoped a .co-shell: la carpeta de assets se comparte con la app del
   tenant y este archivo también se carga allá — sin el scope, nada aplica. */

/* ── KPIs del portafolio ─────────────────────────────────────────────────── */
.co-shell .co-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.co-shell .co-kpi { padding: var(--space-4) var(--space-5); margin-bottom: 0; }
.co-shell .co-kpi--warning { border-top-color: var(--color-warning); }

/* ── Marca y topbar del operador ─────────────────────────────────────────── */
.co-shell .co-brand {
  padding: 0 var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-deep);
  margin-bottom: var(--space-4);
}
.co-shell .co-brand img { height: 26px; width: auto; display: block; }
.co-shell .co-brand-sub {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: var(--font-weight-semibold);
  color: var(--accent-primary);
  margin-top: var(--space-2);
}
.co-shell .co-topbar-eyebrow {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.co-shell .co-topbar-title { font-weight: var(--font-weight-semibold); font-size: 15px; }
.co-shell .co-operador { display: flex; align-items: center; gap: var(--space-3); font-size: 13px; }
.co-shell .co-rol {
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--color-accent-soft);
  color: var(--color-deep);
}

/* ── Densidad y jerarquía de contenido ───────────────────────────────────── */
.co-shell .niza-content { max-width: 1240px; }
.co-shell .niza-card { margin-bottom: var(--space-6); }
.co-shell .niza-card-title {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: var(--font-weight-semibold);
  color: var(--color-muted);
  margin: 0 0 var(--space-4);
}
.co-shell .niza-hint { color: var(--color-muted); font-size: 12.5px; }

/* Tablas: densas, encabezado en small-caps, hover sutil, números tabulares. */
.co-shell .niza-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.co-shell .niza-table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: var(--font-weight-medium);
  color: var(--color-muted);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}
.co-shell .niza-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-line);
  font-variant-numeric: tabular-nums;
}
.co-shell .niza-table tbody tr:hover { background: var(--bg-app); }

/* Formularios: aire consistente entre grids apiladas. */
.co-shell .niza-form-grid { margin-top: var(--space-3); }
.co-shell button { margin-top: var(--space-3); }

/* ── Sembrar entidad (D167) ───────────────────────────────────────────── */
.co-shell .co-sd-pasos { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-5); }
.co-shell .co-sd-paso { display: flex; align-items: center; gap: var(--space-2); padding: 6px 12px 6px 6px;
  border: 1px solid var(--border-default); border-radius: 999px; font-size: 13px; color: var(--color-muted); }
.co-shell .co-sd-num { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; background: var(--bg-app); font-weight: 600; font-size: 12px; }
.co-shell .co-sd-paso.activo { border-color: var(--color-accent); color: var(--text-primary); }
.co-shell .co-sd-paso.activo .co-sd-num { background: var(--color-accent); color: var(--color-card); }
.co-shell .co-sd-paso.hecho .co-sd-num { background: var(--state-success-bg); color: var(--state-success-fg); }
.co-shell .co-sd-label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.co-shell .co-sd-panel input[type=radio], .co-shell .co-sd-panel input[type=checkbox] {
  accent-color: var(--accent-primary); }
/* Dash 3: label.dash-options-list-option > [span > input] + span.texto. La tarjeta es el
   LABEL completo (radio incluido); `.selected` marca la elegida. */
.co-shell .co-sd-radios { display: flex; gap: var(--space-5); flex-wrap: wrap; padding-top: 6px; }
.co-shell .co-sd-radios .dash-options-list-option { display: inline-flex; align-items: center;
  gap: 6px; font-size: 14px; color: var(--text-primary); cursor: pointer; }
.co-shell .co-sd-opciones { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-3); }
.co-shell .co-sd-opciones .dash-options-list-option { display: flex; gap: var(--space-3);
  align-items: flex-start; padding: var(--space-4); border: 1px solid var(--border-default);
  border-radius: 10px; cursor: pointer; min-width: 0; color: var(--text-primary); }
.co-shell .co-sd-opciones .dash-options-list-option.selected { border-color: var(--color-accent);
  background: var(--accent-soft); }
.co-shell .co-sd-opciones .dash-options-list-option-wrapper { padding-top: 2px; }
.co-shell .co-sd-opciones .dash-options-list-option-text { min-width: 0; font-size: 14px; }
.co-shell .co-sd-panel .dash-options-list-option.selected,
.co-shell .co-sd-panel .dash-options-list-option.selected * { color: var(--text-primary); }
.co-shell .co-sd-panel .dash-options-list-option.selected .niza-hint { color: var(--color-muted); }
.co-shell .co-sd-panel .dash-options-list-option.selected .co-sd-ejemplo { color: var(--text-accent); }
.co-shell .co-sd-opcion-txt { min-width: 0; }
.co-shell .co-sd-modlista .dash-options-list-option { display: flex; gap: 6px; align-items: flex-start;
  font-size: 13px; padding: 2px 0; color: var(--text-primary); }
.co-shell .co-sd-ejemplo { font-size: 12px; margin-top: 4px; color: var(--text-accent); }
.co-shell .co-sd-nav { display: flex; justify-content: space-between; margin-top: var(--space-5); }
.co-shell .co-sd-modgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-4); }
.co-shell .co-sd-modgrupo { font-weight: 600; font-size: 13px; margin-bottom: var(--space-2); }
.co-shell .co-sd-barra { height: 10px; border-radius: 999px; background: var(--bg-app); overflow: hidden; margin: var(--space-3) 0; }
.co-shell .co-sd-barra-lleno { height: 100%; background: var(--color-accent); transition: width .4s ease; }
.co-shell .co-sd-links { display: flex; gap: var(--space-5); flex-wrap: wrap; margin: var(--space-3) 0; }
.co-shell .co-sd-links a { color: var(--text-link); font-weight: 600; text-decoration: none; }
.co-shell .co-sd-links a:hover { text-decoration: underline; }

/* ── D193 · accesibilidad, menú plegable, versión y responsive ─────────────────── */
.co-shell :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible,
.co-shell .Select-control:focus-within {
  outline: 2px solid var(--accent-primary); outline-offset: 2px;
}
.co-shell .co-grupo > summary { cursor: pointer; list-style: none; }
.co-shell .co-grupo > summary::-webkit-details-marker { display: none; }
.co-version { padding: .5rem 1rem; font-size: .75rem; color: var(--text-secondary);
  display: flex; gap: .75rem; flex-wrap: wrap; }
.co-version [role="status"]:not(:empty) { color: var(--state-warning-fg);
  background: var(--state-warning-bg); padding: 0 .5rem; border-radius: 4px; }
.co-stripe-modo { font-size: .75rem; font-weight: 600; padding: .125rem .5rem;
  border-radius: 999px; margin-right: .5rem; }
.co-stripe-modo.vivo { background: var(--state-danger-bg); color: var(--state-danger-fg); }
.co-stripe-modo.prueba { background: var(--state-warning-bg); color: var(--state-warning-fg); }
.co-stripe-modo.sin { background: var(--accent-soft); color: var(--text-secondary); }
.co-shell .niza-content { min-width: 0; }
@media (max-width: 1024px) {
  .co-shell .niza-sidebar { width: 200px; }
}
@media (max-width: 700px) {
  .co-shell.niza-layout { flex-direction: column; }
  .co-shell .niza-sidebar { width: 100%; max-height: 40vh; overflow-y: auto;
    position: static; height: auto; }
}
.co-shell .co-zona-riesgo { background: var(--state-danger-bg); border-color: var(--color-danger); }
.co-shell .co-hoy-fila { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center;
  justify-content: space-between; padding: var(--space-3) 0; border-bottom: 1px solid var(--border-default); }
.co-shell .co-hoy-fila:last-child { border-bottom: none; }
.co-shell .co-hoy-texto { flex: 1 1 280px; min-width: 0; }
.co-shell .co-hoy-accion { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: flex-end; }
.co-shell .co-buscador { position: relative; flex: 1 1 260px; max-width: 420px; }
.co-shell .co-buscar-panel { position: absolute; z-index: 20; left: 0; right: 0; top: 100%;
  background: var(--bg-card); border: 1px solid var(--border-default); border-radius: 6px;
  padding: var(--space-3); max-height: 60vh; overflow-y: auto; }
.co-shell .co-solo-lectores { position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; }
