/* QMS de muestra — app estática */

:root {
  --azul: #0b3d63;
  --azul-claro: #12578c;
  --acento: #d98c1f;
  --fondo: #f4f6f8;
  --texto: #1f2933;
  --gris: #6b7787;
  --borde: #dfe4ea;
  --verde: #1f8a4c;
  --rojo: #c0392b;
  --amarillo: #b7791f;
  --blanco: #fff;
  --radio: 8px;
}

.qms-body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--fondo);
  color: var(--texto);
  min-height: 100vh;
}

.qms-body a { color: var(--azul-claro); text-decoration: none; }
.qms-body a:hover { text-decoration: underline; }

.qms-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--azul), var(--azul-claro));
  padding: 24px 16px;
}

.qms-login-box {
  background: #fff;
  padding: 36px 34px;
  border-radius: 12px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.qms-login-box h1 {
  text-align: center;
  color: var(--azul);
  margin: 0 0 4px;
  font-size: 1.45rem;
}

.qms-login-box .qms-sub {
  text-align: center;
  color: var(--gris);
  margin: 0 0 22px;
  font-size: 0.9rem;
}

.qms-campo { margin-bottom: 14px; }
.qms-campo label {
  display: block;
  font-size: 0.82rem;
  color: var(--gris);
  margin-bottom: 4px;
  font-weight: 600;
}
.qms-campo input,
.qms-campo select,
.qms-campo textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  font-size: 0.9rem;
  font-family: inherit;
  box-sizing: border-box;
}
.qms-campo textarea { min-height: 80px; resize: vertical; }

.qms-btn {
  display: inline-block;
  background: var(--azul-claro);
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: var(--radio);
  cursor: pointer;
  font-size: 0.88rem;
}
.qms-btn:hover { background: var(--azul); }
.qms-btn-block { width: 100%; }
.qms-btn-sec {
  background: #fff;
  color: var(--azul-claro);
  border: 1px solid var(--azul-claro);
}
.qms-btn-sec:hover { background: #eef5fb; }
.qms-btn-peligro { background: var(--rojo); color: #fff; }
.qms-btn-peligro:hover { background: #96271d; }
.qms-btn-sm { padding: 4px 10px; font-size: 0.78rem; }
.qms-acciones-fila { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
#qms-user-edit-email { background: #f3f6fa; color: var(--gris); }
.qms-link {
  background: none;
  border: none;
  color: var(--azul-claro);
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.85rem;
  padding: 0;
}

.qms-error { color: var(--rojo); font-size: 0.85rem; min-height: 1.2em; margin: 8px 0; }
.qms-ok { color: var(--verde); font-size: 0.85rem; margin: 8px 0; }
.qms-hint { color: var(--gris); font-size: 0.8rem; text-align: center; margin-top: 12px; }

.qms-layout { display: flex; min-height: 100vh; }

.qms-sidebar {
  width: 230px;
  background: var(--azul);
  color: #fff;
  flex-shrink: 0;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
}
.qms-marca {
  padding: 0 20px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: 12px;
}
.qms-marca strong { font-size: 1.05rem; display: block; }
.qms-marca span { font-size: 0.75rem; opacity: 0.7; }
.qms-org-logo {
  display: block;
  max-height: 56px;
  max-width: 180px;
  margin: 0 auto 10px;
  object-fit: contain;
}
.qms-org-logo-side {
  margin: 0 0 10px;
  max-height: 44px;
  max-width: 160px;
}
#qms-org-logo-preview { margin: 0 0 8px; }
.qms-sidebar nav a,
.qms-sidebar nav button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 20px;
  color: #dce8f2;
  font-size: 0.92rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.qms-sidebar nav a:hover,
.qms-sidebar nav button:hover,
.qms-sidebar nav button.activo {
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
  border-left: 3px solid var(--acento);
  color: #fff;
}
.qms-usuario-box {
  margin-top: auto;
  padding: 16px 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.8rem;
}
.qms-usuario-id {
  margin-bottom: 12px;
}
.qms-usuario-id strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.25;
}
.qms-usuario-rol {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #cfe0ee;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}
.qms-usuario-docs {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}
.qms-usuario-docs a,
.qms-manual-link {
  display: block;
  color: #fff;
  font-size: 0.78rem;
  line-height: 1.2;
  padding: 7px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qms-usuario-docs a:hover,
.qms-manual-link:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  text-decoration: none;
}
.qms-usuario-box button,
#qms-btn-logout {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  padding: 7px 10px;
  border-radius: var(--radio);
  cursor: pointer;
  font-size: 0.78rem;
  margin-top: 0;
  text-align: center;
}
.qms-usuario-box button:hover,
#qms-btn-logout:hover {
  background: rgba(255, 255, 255, 0.12);
}

.qms-contenido { flex: 1; padding: 28px 36px; max-width: 1200px; }
.qms-contenido h1 { font-size: 1.5rem; margin: 0 0 4px; color: var(--azul); }
.qms-subtitulo { color: var(--gris); margin: 0 0 24px; font-size: 0.9rem; }

.qms-card {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.qms-card h2 { font-size: 1.1rem; color: var(--azul); margin: 0 0 12px; }

.qms-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.qms-kpi {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 16px;
}
.qms-kpi .valor { font-size: 1.8rem; font-weight: 700; color: var(--azul); }
.qms-kpi .etiqueta { font-size: 0.78rem; color: var(--gris); }
.qms-kpi.alerta .valor { color: var(--rojo); }

.qms-table-wrap { overflow-x: auto; }
.qms-lista-scroll.qms-table-wrap {
  max-height: 60vh;
  overflow-y: auto;
  overflow-x: auto;
}
.qms-lista-scroll .qms-table {
  border-collapse: separate;
  border-spacing: 0;
}
.qms-lista-scroll .qms-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
}
#qms-home-docs-cancel.qms-lista-scroll.qms-table-wrap {
  max-height: 280px;
}
.qms-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.qms-table th,
.qms-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--borde); }
.qms-table th {
  color: var(--gris);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.qms-table tr:hover td { background: #fafbfc; }

.qms-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
}
.qms-badge-gris { background: #eef1f4; color: var(--gris); }
.qms-badge-verde { background: #e5f5eb; color: var(--verde); }
.qms-badge-rojo { background: #fbe9e7; color: var(--rojo); }
.qms-badge-amarillo { background: #fdf3e0; color: var(--amarillo); }
.qms-badge-azul { background: #dceaf7; color: #0b3d63; }
.qms-badge-naranja { background: #fde8d2; color: #b35a00; }
.qms-table-excel th {
  background: #2f75b5;
  color: #fff;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border-bottom: none;
}
.qms-table-excel td { vertical-align: middle; }
.qms-canal {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.qms-canal-whatsapp { background: #d7f3e0; color: #1f8a4c; }
.qms-canal-llamada { background: #d6e8f8; color: #12578c; }
.qms-canal-mail { background: #f8e7c3; color: #8a6a12; }
.qms-canal-gris { background: #eef1f4; color: var(--gris); }
.qms-row-click { cursor: pointer; }
.qms-row-obs td { color: var(--gris); background: #f7f8fa; }
.qms-campo input:disabled,
.qms-campo select:disabled,
.qms-campo textarea:disabled,
.qms-checks input:disabled + span,
.qms-nc-post-eval input:disabled,
.qms-nc-post-eval select:disabled,
.qms-nc-post-eval textarea:disabled {
  background: #f3f4f6;
  color: #6b7787;
  cursor: not-allowed;
}

.qms-acciones { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; flex-wrap: wrap; }
.qms-form-fila { display: flex; gap: 14px; flex-wrap: wrap; }
.qms-form-fila .qms-campo { flex: 1; min-width: 160px; }
.qms-panel { display: none; }
.qms-panel.activo { display: block; }
.qms-vacio { color: var(--gris); font-size: 0.9rem; }
.qms-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--azul);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radio);
  font-size: 0.85rem;
  z-index: 40;
}
.qms-timeline { list-style: none; padding: 0; margin: 0; }
.qms-timeline li { padding: 8px 0; border-bottom: 1px solid var(--borde); font-size: 0.88rem; }
.qms-timeline .meta { color: var(--gris); font-size: 0.75rem; }
.qms-sysadmin-nota {
  background: #eef5fb;
  color: var(--azul);
  padding: 8px 12px;
  border-radius: var(--radio);
  font-size: 0.82rem;
  margin-bottom: 12px;
}

.qms-doc-motivo {
  margin-top: 4px;
  font-size: 0.8rem;
  color: #8a5a12;
}
.qms-prueba-chip {
  display: block;
  text-align: center;
  background: #fdf3e0;
  color: #8a5a12;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 6px;
  margin: 0 0 12px;
}
.qms-demo-lead {
  text-align: left;
  color: var(--gris);
  font-size: 0.84rem;
  line-height: 1.35;
  margin: 0 0 14px;
}
.qms-prueba-banner {
  background: #fdf3e0;
  color: #8a5a12;
  font-size: 0.82rem;
  padding: 8px 12px;
  border-radius: var(--radio);
  margin-bottom: 16px;
}
.qms-hint-left { text-align: left; margin-top: 0; margin-bottom: 10px; }
.qms-empresa-actual {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--azul);
  margin: 0 0 6px;
}
.qms-org-crear-card {
  background: #fff8e8;
  border: 2px solid var(--acento);
  border-radius: var(--radio);
  padding: 16px 18px 18px;
  margin: 0 0 18px;
}
.qms-org-crear-card h2 {
  margin: 0 0 8px;
  color: #8a5a12;
}
.qms-org-crear-aviso {
  background: #fde8e6;
  color: #8a2218;
  border: 1px solid #e8b4ae;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 10px;
}
.qms-btn-crear-org {
  background: var(--acento);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 20px;
}
.qms-btn-crear-org:hover { background: #b87314; color: #fff; text-decoration: none; }
a.qms-btn-crear-org { display: inline-block; }
.qms-org-crear-ok {
  background: #e8f6ee;
  border: 1px solid #9ad4b3;
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
}
.qms-org-esta-card {
  background: #f7f9fb;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 14px 16px 16px;
  margin: 12px 0 18px;
}
.qms-org-esta-card h2 { margin-top: 0; }
#qms-org-crear-wrap[hidden],
#qms-org-switch-wrap[hidden],
#qms-org-crear-url-box[hidden] { display: none !important; }
#qms-org-switch-wrap { margin: 0 0 18px; }
.qms-roles-grid {
  margin-bottom: 10px;
  table-layout: fixed;
  width: 100%;
}
.qms-roles-grid th { white-space: nowrap; }
.qms-roles-grid td {
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.qms-roles-grid th:nth-child(1),
.qms-roles-grid td:nth-child(1) { width: 16%; }
.qms-roles-grid th:nth-child(2),
.qms-roles-grid td:nth-child(2) { width: 24%; }
.qms-roles-grid th:nth-child(3),
.qms-roles-grid td:nth-child(3) { width: 48%; }
.qms-roles-grid th:nth-child(4),
.qms-roles-grid td:nth-child(4) { width: 12%; }
.qms-roles-grid input,
.qms-roles-grid textarea {
  width: 100%;
  padding: 7px 8px;
  border: 1px solid var(--borde);
  border-radius: 6px;
  font: inherit;
  box-sizing: border-box;
}
.qms-roles-grid textarea {
  min-height: 3.2em;
  resize: vertical;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.qms-roles-grid .qms-rol-nombre { min-width: 0; font-weight: 600; }
.qms-roles-grid .qms-rol-personas { min-width: 0; }
.qms-roles-grid .qms-rol-puede-celda { line-height: 1.35; }
.qms-rol-puede-flags {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  margin: 0;
  align-items: start;
}
.qms-rol-puede-flags label {
  font-weight: 500;
  font-size: 0.8rem;
  cursor: pointer;
}
.qms-rol-puede-flags input:disabled {
  cursor: default;
}
.qms-charts {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
.qms-charts .qms-card { margin-bottom: 0; }
.qms-kpi .pct {
  font-size: 0.75rem;
  color: var(--gris);
  margin-top: 4px;
}
.qms-flujo {
  font-size: 0.78rem;
  color: var(--azul-claro);
  background: #eef5fb;
  padding: 8px 10px;
  border-radius: var(--radio);
}
.qms-est-abierto { background: #FFC8AA; color: #1F1F1F; }
.qms-est-proceso { background: #FFE5A0; color: #1F1F1F; }
.qms-est-cerrado { background: #D4EDBC; color: #1F1F1F; }
.qms-est-cancelado { background: #E6E6E6; color: #3A3A3A; }
.qms-flujo .qms-badge { margin: 0 2px; vertical-align: middle; }
.qms-adj-list { list-style: none; padding: 0; margin: 8px 0 0; font-size: 0.85rem; }
.qms-adj-list li { padding: 4px 0; }
.qms-traza { font-size: 0.88rem; }
.qms-traza dt { font-weight: 600; color: var(--gris); font-size: 0.75rem; margin-top: 10px; }
.qms-traza dd { margin: 2px 0 0; white-space: pre-wrap; }
.qms-f06-sec {
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 14px 16px 4px;
  margin: 0 0 16px;
  background: #fafbfc;
}
.qms-f06-sec h3 {
  margin: 0 0 12px;
  font-size: 0.92rem;
  color: var(--azul);
}
.qms-f06-nota {
  font-size: 0.78rem;
  color: var(--gris);
  font-weight: 600;
  margin: 4px 0 8px;
}
.qms-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 12px;
  align-items: center;
}
.qms-checks label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--texto);
  cursor: pointer;
}
.qms-checks input { width: auto; margin: 0; }
.qms-f06-sec .qms-campo textarea { min-height: 72px; }
.qms-link-btn {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--azul-claro);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}
.qms-checks-wrap { gap: 8px 14px; }
.qms-carga-extra {
  background: #fff;
  border: 1px dashed var(--borde);
  border-radius: var(--radio);
  padding: 10px 12px 4px;
  margin: 0 0 12px;
}
.qms-carga-extra h4 {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: var(--azul);
}
.qms-carga-validar { background: #eef5fb; }
.qms-carga-validar p { margin: 0 0 10px; font-size: 0.9rem; }
.qms-asig-fila { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.qms-asig-fila select { min-width: 200px; max-width: 100%; padding: 8px 10px; border: 1px solid var(--borde); border-radius: var(--radio); font: inherit; }
.qms-btn.qms-btn-peligro { background: var(--rojo); color: #fff; }
.qms-collapse-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.qms-collapse-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--azul);
  cursor: pointer;
  text-align: left;
}
.qms-collapse-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.qms-collapsible.qms-collapsed #qms-nc-form-body { display: none; }
.qms-collapsible.qms-collapsed { padding-bottom: 12px; }
.qms-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
}
.qms-modal[hidden] { display: none; }
.qms-modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 22px 22px 18px;
  width: min(480px, 100%);
  box-shadow: 0 20px 50px rgba(0,0,0,.2);
}
.qms-modal-box-lg {
  width: min(640px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
}
.qms-modal-visor {
  width: min(960px, 100%);
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
}
.qms-visor-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.qms-visor-bar h3 { margin: 0; }
.qms-visor-frame {
  width: 100%;
  min-height: 70vh;
  border: 1px solid var(--borde);
  border-radius: 8px;
  background: #f7f9fb;
}
.qms-visor-img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}
.qms-usuario-docs .qms-link,
.qms-usuario-docs button.qms-link {
  display: block;
  color: #dce8f2;
  margin: 4px 0;
  text-align: left;
}
.qms-adj-list { margin: 0; padding-left: 18px; }
.qms-modal-box h3 { margin: 0 0 8px; color: var(--azul); }
.qms-modal-box p { margin: 0 0 12px; color: var(--gris); font-size: 0.9rem; }
.qms-qj-tratar-desc, .qms-qj-tratar-adj { white-space: pre-wrap; word-break: break-word; }
.qms-qj-motivo { margin-top: 4px; font-size: 0.82rem; color: var(--gris); }
.qms-asig-fila select { min-width: 200px; max-width: 100%; padding: 8px 10px; border: 1px solid var(--borde); border-radius: var(--radio); font: inherit; }

@media (max-width: 1100px) {
  .qms-charts { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .qms-layout { flex-direction: column; }
  .qms-sidebar { width: 100%; padding: 12px 0; }
  .qms-sidebar nav { display: flex; flex-wrap: nowrap; overflow-x: auto; }
  .qms-sidebar nav button { white-space: nowrap; }
  .qms-usuario-box { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .qms-contenido { padding: 18px 14px; }
}

.qms-visor-pdf { overflow: auto; max-height: 72vh; background: #525659; padding: 8px 0 16px; border-radius: 8px; }
.qms-visor-page { display: block; margin: 8px auto; max-width: 100%; height: auto; background: #fff; }
.qms-visor-img { pointer-events: none; user-select: none; }

/* Landing comercial de la demo /qms/ */
.qms-venta { min-height: 100vh; background: linear-gradient(180deg, #0b3d63 0 280px, #f4f6f8 280px); color: #1f2933; }
.qms-venta-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 28px 8px; color: #fff; }
.qms-venta-marca strong { display: block; font-size: 1.05rem; }
.qms-venta-marca span { display: block; font-size: 0.78rem; opacity: 0.8; }
.qms-venta-nav { display: flex; flex-wrap: wrap; gap: 14px; }
.qms-venta-nav a { color: #fff; font-size: 0.88rem; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.35); }
.qms-venta-nav a:hover { border-bottom-color: #fff; text-decoration: none; }
.qms-venta-hero { max-width: 760px; margin: 0 auto; padding: 36px 24px 28px; color: #fff; }
.qms-venta-kicker { margin: 0 0 10px; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.85; }
.qms-venta-hero h1 { margin: 0 0 14px; font-size: clamp(1.7rem, 4vw, 2.35rem); line-height: 1.2; }
.qms-venta-lead { margin: 0 0 22px; font-size: 1.05rem; line-height: 1.5; color: #e8eef4; }
.qms-venta-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.qms-venta-btn-pri { background: #d98c1f; color: #fff; text-decoration: none; padding: 12px 20px; font-size: 1rem; border: none; }
.qms-venta-btn-pri:hover { background: #b7791f; text-decoration: none; }
.qms-venta-btn-sec { text-decoration: none; padding: 12px 20px; font-size: 1rem; background: transparent; color: #fff; border: 1px solid #fff; }
.qms-venta-btn-sec:hover { background: rgba(255,255,255,0.12); text-decoration: none; }
.qms-venta-btn-alt { text-decoration: none; padding: 12px 20px; }
.qms-venta-hint { margin: 16px 0 0; font-size: 0.82rem; color: #d5dee8; }
.qms-venta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; max-width: 1040px; margin: 8px auto 0; padding: 0 20px; }
.qms-venta-grid article { background: #fff; border-radius: 10px; padding: 18px 16px; border: 1px solid #dfe4ea; box-shadow: 0 8px 24px rgba(11,61,99,0.06); }
.qms-venta-grid h2 { margin: 0 0 8px; color: #0b3d63; font-size: 1.05rem; }
.qms-venta-grid p { margin: 0; color: #6b7787; font-size: 0.92rem; line-height: 1.45; }
.qms-venta-proceso, .qms-venta-material, .qms-venta-consulta { max-width: 1040px; margin: 22px auto 0; padding: 22px; background: #fff; border-radius: 10px; border: 1px solid #dfe4ea; }
.qms-venta-proceso h2, .qms-venta-material h2, .qms-venta-consulta h2 { margin: 0 0 10px; color: #0b3d63; font-size: 1.2rem; }
.qms-venta-proceso ol { margin: 0; padding-left: 20px; }
.qms-venta-proceso li { margin: 8px 0; line-height: 1.4; }
.qms-venta-material p, .qms-venta-consulta p { margin: 0 0 10px; color: #6b7787; }
.qms-venta-form { max-width: 520px; }
.qms-venta-consulta { margin-bottom: 36px; }
body.qms-venta-abierta #qms-login,
body.qms-venta-abierta #qms-new-password,
body.qms-venta-abierta #qms-app { display: none !important; }
body.qms-venta-abierta #qms-venta { display: block !important; }
.qms-visor-pdf { overflow: auto; max-height: 72vh; background: #525659; padding: 8px 0 16px; border-radius: 8px; }
.qms-visor-page { display: block; margin: 8px auto; max-width: 100%; height: auto; background: #fff; }
.qms-visor-img { pointer-events: none; user-select: none; }
.qms-visor-marca {
  display: none;
  pointer-events: none;
  user-select: none;
}
@media print {
  body * { visibility: hidden; }
  #qms-modal-visor, #qms-modal-visor * { visibility: visible; }
  #qms-modal-visor {
    position: absolute;
    inset: 0;
    background: #fff;
  }
  .qms-visor-bar, .qms-hint { display: none !important; }
  .qms-visor-marca {
    display: block !important;
    visibility: visible !important;
    position: fixed;
    top: 42%;
    left: 8%;
    right: 8%;
    text-align: center;
    font-size: 42px;
    font-weight: 700;
    color: rgba(170, 40, 40, 0.28);
    transform: rotate(-28deg);
    z-index: 9999;
  }
}
@media (max-width: 720px) {
  .qms-venta-top { flex-direction: column; align-items: flex-start; }
  .qms-venta { background: linear-gradient(180deg, #0b3d63 0 400px, #f4f6f8 400px); }
}

.qms-main-col:has(#qms-panel-nc.activo) .qms-contenido {
  max-width: none;
  padding: 20px 16px 24px;
}
#qms-panel-nc > .qms-card:first-of-type {
  padding: 12px 10px 10px;
  margin: 0;
}
.qms-lista-nc.qms-table-wrap {
  overflow-x: hidden;
  width: 100%;
}
.qms-lista-nc .qms-table-nc {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 0.84rem;
}
.qms-lista-nc .qms-table-nc th,
.qms-lista-nc .qms-table-nc td {
  padding: 7px 4px;
  vertical-align: middle;
  overflow-wrap: normal;
  word-break: normal;
}
.qms-lista-nc .qms-table-nc th {
  font-size: 0.72rem;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: nowrap;
}
.qms-lista-nc .qms-table-nc th:nth-child(1),
.qms-lista-nc .qms-table-nc td:nth-child(1) { width: 7.1%; }
.qms-lista-nc .qms-table-nc th:nth-child(2),
.qms-lista-nc .qms-table-nc td:nth-child(2) { width: 6.6%; }
.qms-lista-nc .qms-table-nc th:nth-child(3),
.qms-lista-nc .qms-table-nc td:nth-child(3) { width: 8.7%; }
.qms-lista-nc .qms-table-nc th:nth-child(4),
.qms-lista-nc .qms-table-nc td:nth-child(4) { width: 7%; }
.qms-lista-nc .qms-table-nc th:nth-child(5),
.qms-lista-nc .qms-table-nc td:nth-child(5) { width: 7.7%; }
.qms-lista-nc .qms-table-nc th:nth-child(6),
.qms-lista-nc .qms-table-nc td:nth-child(6) { width: 7.8%; }
.qms-lista-nc .qms-table-nc th:nth-child(7),
.qms-lista-nc .qms-table-nc td:nth-child(7) { width: 12.2%; }
.qms-lista-nc .qms-table-nc th:nth-child(8),
.qms-lista-nc .qms-table-nc td:nth-child(8) { width: 12.1%; }
.qms-lista-nc .qms-table-nc th:nth-child(9),
.qms-lista-nc .qms-table-nc td:nth-child(9) { width: 9.9%; }
.qms-lista-nc .qms-table-nc th:nth-child(10),
.qms-lista-nc .qms-table-nc td:nth-child(10) { width: 9.9%; }
.qms-lista-nc .qms-table-nc th:nth-child(11),
.qms-lista-nc .qms-table-nc td:nth-child(11) { width: 11%; }
.qms-lista-nc .qms-table-nc td:nth-child(2),
.qms-lista-nc .qms-table-nc td:nth-child(3),
.qms-lista-nc .qms-table-nc td:nth-child(4),
.qms-lista-nc .qms-table-nc td:nth-child(9),
.qms-lista-nc .qms-table-nc td:nth-child(10) { white-space: normal; }
.qms-lista-nc .qms-badge {
  white-space: normal;
  line-height: 1.3;
  padding: 2px 7px;
}
.qms-lista-nc .qms-table-nc td { overflow: hidden; }
.qms-lista-nc .qms-table-nc th { overflow: hidden; }
.qms-lista-nc .qms-persona-nombre { white-space: normal; }
.qms-lista-nc .qms-persona-mail {
  display: block;
  margin-top: 2px;
  color: var(--gris);
  font-size: 0.82em;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}
.qms-lista-nc .qms-table-nc td:last-child .qms-btn {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0 0 5px;
  padding: 5px 4px;
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: nowrap;
  text-align: center;
}
.qms-lista-nc .qms-plan-sel {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  padding: 4px 2px 4px 4px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: #fff;
  color: inherit;
}
.qms-plan-pill { vertical-align: middle; white-space: nowrap; }
.qms-plan-est-abierto { background: #FFC8AA; color: #1F1F1F; }
.qms-plan-est-en_proceso { background: #FFE5A0; color: #1F1F1F; }
.qms-plan-est-cerrado { background: #D4EDBC; color: #1F1F1F; }
.qms-plan-est-rechazado { background: #5C2D91; color: #fff; }
.qms-lista-nc .qms-plan-sel.qms-plan-est-abierto { background: #FFC8AA; color: #1F1F1F; }
.qms-lista-nc .qms-plan-sel.qms-plan-est-en_proceso { background: #FFE5A0; color: #1F1F1F; }
.qms-lista-nc .qms-plan-sel.qms-plan-est-cerrado { background: #D4EDBC; color: #1F1F1F; }
.qms-lista-nc .qms-plan-sel.qms-plan-est-rechazado { background: #5C2D91; color: #fff; }
.qms-plan-sel-estado option[value="abierto"] { background: #FFC8AA; color: #1F1F1F; }
.qms-plan-sel-estado option[value="en_proceso"] { background: #FFE5A0; color: #1F1F1F; }
.qms-plan-sel-estado option[value="cerrado"] { background: #D4EDBC; color: #1F1F1F; }
.qms-plan-sel-estado option[value="rechazado"] { background: #5C2D91; color: #fff; }
.qms-plan-sel-estado option[value=""] { background: #fff; color: #1F1F1F; }
@media (max-width: 1279px) {
  .qms-lista-nc.qms-table-wrap { overflow-x: auto; }
  .qms-lista-nc .qms-table-nc {
    width: max-content;
    min-width: 1040px;
    table-layout: auto;
  }
}

.qms-adj-galeria {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 8px;
  margin: 8px 0 4px;
}
.qms-adj-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--borde, #d5dde6);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}
.qms-adj-item:hover { border-color: var(--azul-claro, #12578c); }
.qms-adj-thumb {
  display: block;
  width: 100%;
  height: 104px;
  margin: 0;
  object-fit: contain;
  object-position: center;
  background: #f4f7fa;
  border-radius: 4px;
}
.qms-adj-nombre {
  display: block;
  font-size: 0.72rem;
  line-height: 1.25;
  font-weight: 650;
  color: var(--azul-claro, #12578c);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
