/* ============================================================
   NeoLabQC — Catálogo de Equipos
   Sirve a dos contextos:
     · #nlqc-eq-selector  → widget dentro de los plugins de guía
     · #nlqc-eq-app       → página central "Mis Equipos"
   Los tokens del plugin de guía (--border, --accent…) están scoped a #ep15-app,
   así que dentro del widget se heredan; en la página central se declaran aquí.
   ============================================================ */

#nlqc-eq-app {
  font-family: 'Inter', -apple-system, sans-serif;
  max-width: 860px;
  margin: 0 auto;
  padding: 8px 0 48px;
  color: #0F1117;

  --eq-border:  #E2E5E9;
  --eq-border2: #CDD1D8;
  --eq-surface: #FFFFFF;
  --eq-bg:      #F5F6F7;
  --eq-text:    #0F1117;
  --eq-text2:   #4B5563;
  --eq-text3:   #8D95A1;
  --eq-accent:  #2D6BC4;
  --eq-indigo:  #4338CA;
}

/* ── Toolbar / filtros (página central) ── */
.nlqc-eq-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.nlqc-eq-filters { display: flex; gap: 6px; flex-wrap: wrap; }

.nlqc-eq-filter {
  padding: 6px 14px;
  border-radius: 99px;
  border: 1px solid var(--eq-border2, #CDD1D8);
  background: #fff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--eq-text2, #4B5563);
  cursor: pointer;
  transition: all 0.15s;
}
.nlqc-eq-filter:hover  { border-color: #4338CA; color: #4338CA; background: #EEF2FF; }
.nlqc-eq-filter.active { background: #4338CA; color: #fff; border-color: #4338CA; }

/* ── Botones ── */
.nlqc-eq-picker .nlqc-btn,
#nlqc-eq-app .nlqc-btn,
.nlqc-eq-form .nlqc-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s, background 0.15s;
  line-height: 1;
  white-space: nowrap;
}
.nlqc-btn--primary {
  background: linear-gradient(135deg, #2D6BC4, #7C5CBF);
  color: #fff;
  box-shadow: 0 1px 6px rgba(45,107,196,0.3);
}
.nlqc-btn--primary:hover { opacity: 0.88; transform: translateY(-1px); color: #fff; }
.nlqc-btn--primary:disabled { opacity: 0.55; cursor: default; transform: none; }

.nlqc-btn--ghost {
  background: #F5F6F7;
  color: #4B5563;
  border: 1px solid #E2E5E9;
}
.nlqc-btn--ghost:hover { background: #E2E5E9; color: #0F1117; }

.nlqc-btn--danger {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
}
.nlqc-btn--danger:hover { background: #DC2626; color: #fff; }

/* ── Selector inline (dentro de los plugins de guía) ── */
#nlqc-eq-selector { margin-bottom: 14px; }

.nlqc-eq-picker {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: #EEF2FF;
  border: 1px solid #C7D2FE;
  border-radius: 8px;
}

.nlqc-eq-picker__field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 200px;
}

.nlqc-eq-picker__field label,
.nlqc-eq-form label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #4B5563;
}

.nlqc-eq-picker__field select,
.nlqc-eq-picker__field input,
.nlqc-eq-form input {
  padding: 8px 12px;
  border: 1px solid #CDD1D8;
  border-radius: 7px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  color: #0F1117;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.nlqc-eq-picker__field select:focus,
.nlqc-eq-picker__field input:focus,
.nlqc-eq-form input:focus {
  outline: none;
  border-color: #2D6BC4;
  box-shadow: 0 0 0 3px rgba(45,107,196,0.12);
}

.nlqc-eq-manage {
  font-size: 11.5px;
  font-weight: 600;
  color: #4338CA;
  text-decoration: none;
  padding-bottom: 10px;
  white-space: nowrap;
}
.nlqc-eq-manage:hover { text-decoration: underline; }

.nlqc-eq-inline-note {
  font-size: 11.5px;
  color: #4B5563;
  line-height: 1.5;
  padding: 8px 12px;
  background: #F5F6F7;
  border: 1px solid #E2E5E9;
  border-radius: 7px;
}

/* Marca de obligatorio, alineada con la de ep15-style.css */
.nlqc-eq-req { color: #DC2626; font-weight: 700; }

.nlqc-eq-inline-note--warn {
  background: #FFFBEB;
  border-color: #FDE68A;
  color: #92400E;
}
.nlqc-eq-inline-note--warn a { color: #92400E; font-weight: 600; }

/* ── Formulario ── */
.nlqc-eq-form {
  margin-top: 10px;
  padding: 14px;
  background: #fff;
  border: 1px solid #C7D2FE;
  border-radius: 8px;
}

.nlqc-eq-form__title {
  font-size: 13px;
  font-weight: 700;
  color: #4338CA;
  margin-bottom: 12px;
}

.nlqc-eq-form__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.nlqc-eq-form__wide { grid-column: 1 / -1; }

.nlqc-eq-form__actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* ── Cards (página central) ── */
.nlqc-eq-cards { display: flex; flex-direction: column; gap: 8px; }

.nlqc-eq-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  border: 1px solid #E2E5E9;
  border-radius: 10px;
  padding: 14px 18px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.nlqc-eq-card:hover { border-color: #A5B4FC; box-shadow: 0 0 0 3px rgba(67,56,202,0.06); }
.nlqc-eq-card.is-inactive { opacity: 0.62; background: #F5F6F7; }

.nlqc-eq-card-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.nlqc-eq-card-name {
  font-size: 14px;
  font-weight: 700;
  color: #0F1117;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nlqc-eq-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 99px;
  background: #FFFBEB;
  color: #D97706;
  border: 1px solid #FDE68A;
}

.nlqc-eq-card-meta {
  font-size: 12px;
  font-weight: 600;
  color: #2D6BC4;
  font-family: 'JetBrains Mono', monospace;
}
.nlqc-eq-card-notas { font-size: 11.5px; color: #8D95A1; }

.nlqc-eq-card-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }
.nlqc-eq-card-actions .nlqc-btn { padding: 7px 10px; }

/* ── Estados ── */
.nlqc-eq-msg {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  background: #F5F6F7;
  border: 1px solid #E2E5E9;
}
.nlqc-eq-loading { text-align: center; color: #8D95A1; font-size: 14px; padding: 48px 0; }
.nlqc-eq-error {
  color: #DC2626;
  font-size: 13px;
  padding: 16px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 8px;
}
.nlqc-eq-empty { text-align: center; padding: 56px 24px; color: #8D95A1; }
.nlqc-eq-empty p { font-size: 14px; margin-bottom: 6px; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .nlqc-eq-card { flex-direction: column; align-items: flex-start; }
  .nlqc-eq-card-actions { width: 100%; justify-content: flex-end; }
  .nlqc-eq-picker { flex-direction: column; align-items: stretch; }
  .nlqc-eq-manage { padding-bottom: 0; }
}

/* ── Impresión: el selector es entrada, no informe ── */
@media print {
  #nlqc-eq-selector { display: none !important; }
}
/* ============================================================
   v2 — catálogo compartido por laboratorio
   ============================================================ */

/* Autoría: solo se muestra en fichas ajenas, para no repetir lo obvio */
.nlqc-eq-card-autor {
  font-size: 11px;
  color: #8D95A1;
  font-style: italic;
}

/* Puerta: sin laboratorio o sin suscripción vigente */
.nlqc-eq-gate {
  max-width: 860px;
  margin: 0 auto 20px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 12px;
  padding: 28px 32px;
  font-family: 'Inter', -apple-system, sans-serif;
  color: #92400E;
  text-align: center;
}
.nlqc-eq-gate h3 {
  margin: 0 0 10px;
  font-size: 17px;
  color: #92400E;
}
.nlqc-eq-gate p {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #92400E;
}
.nlqc-eq-gate a { color: #92400E; font-weight: 600; }

.nlqc-eq-gate--inline {
  text-align: left;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 16px;
}
.nlqc-eq-gate--inline a { margin-left: 4px; white-space: nowrap; }

/* La página central también necesita el botón primario cuando la puerta está abierta */
.nlqc-eq-gate .nlqc-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  line-height: 1;
}
.nlqc-eq-gate .nlqc-btn--primary {
  background: linear-gradient(135deg, #2D6BC4, #7C5CBF);
  color: #fff;
  box-shadow: 0 1px 6px rgba(45,107,196,0.3);
}
.nlqc-eq-gate .nlqc-btn--primary:hover { opacity: 0.88; color: #fff; }
