@import url("repsol-lubricants.css?v=4");
/* =======================================================================
   QR Shortcode Generator — "REAL by Repsol" operations console theme
   Include on every qrgen view, AFTER the design-system stylesheet and
   AFTER app.css:
   <link rel="stylesheet" href="<?php echo base_url('assets/_ds/real-by-repsol-design-system-bbbc9659-8f31-44ad-8b97-ac492fbbebbf/styles.css'); ?>">
   <link rel="stylesheet" href="<?php echo base_url('assets/css/console.css'); ?>">
   Wrap page content in <div class="hx"> ... </div>
   ======================================================================= */
.hx {
  --panel: var(--surface-card);
  --ink: var(--text-strong);
  --ink-soft: var(--text-muted);
  --line: var(--border-subtle);
  --line-soft: var(--neutral-100);
  --accent: var(--brand-primary);
  --accent-d: var(--brand-primary-hover);
  --good-bg: #e7f5ec;
  --good-ink: var(--state-success);
  --warn-bg: var(--yellow-100);
  --warn-ink: #8A6500;          /* yellow-600 darkened for AA text on yellow-100 */
  --info-ink: #0B7F90;          /* teal-500 darkened for AA text on white/teal-100 */
  --zebra: var(--neutral-050);
  --shadow: var(--shadow-card);
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--surface-app);
  min-height: 100vh;
}
.hx * {
  box-sizing: border-box;
}

.hx-shell {
  margin: 0 auto;
  padding: 32px clamp(16px, 3vw, 40px) 64px;
}
.hx-shell.narrow {
  max-width: 860px;
}

/* ---------- Header ---------- */
.hx-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.hx-head .eyebrow {
  font-family: var(--font-ui);
  font-weight: var(--weight-bold);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}
.hx-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: var(--weight-semibold);
  color: var(--ink-soft);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-standard);
}
.hx-back svg {
  width: 16px;
  height: 16px;
  transition: transform var(--dur-fast) var(--ease-standard);
}
.hx-back:hover {
  color: var(--accent);
}
.hx-back:hover svg {
  transform: translateX(-2px);
}
.hx-head .crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.hx-head .crumbs a {
  color: var(--accent);
  text-decoration: none;
}
.hx-head .crumbs a:hover {
  text-decoration: underline;
}
.hx-head .crumbs .crumb-sep,
.hx-head .crumbs .sep {
  color: var(--ink-soft);
  font-weight: 400;
}
.hx-head h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: var(--weight-medium);
  letter-spacing: 0;
  margin: 0;
  line-height: 36px;
}
.hx-head .sub {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 6px 0 0;
  max-width: 540px;
}
.hx-head .actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.hx-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: var(--weight-bold);
  font-size: 14px;
  text-transform: none;
  letter-spacing: var(--tracking-cta);
  text-decoration: none;
  padding: 11px 20px;
  border-radius: var(--radius-button);
  white-space: nowrap;
  border: 1px solid var(--border-default);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-standard),
    border-color var(--dur-fast) var(--ease-standard),
    color var(--dur-fast) var(--ease-standard),
    transform var(--dur-fast) var(--ease-standard);
}
.hx-btn:hover {
  border-color: var(--accent);
  background: var(--brand-050);
  color: var(--accent-d);
  text-decoration: none;
  transform: translateY(var(--hover-lift));
}
.hx-btn:active {
  transform: scale(var(--press-scale));
}
.hx-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-brand);
}
.hx-btn.primary:hover {
  background: var(--accent-d);
  border-color: var(--accent-d);
  color: var(--text-on-brand);
  text-decoration: none;
  transform: translateY(var(--hover-lift));
}
.hx-btn.sm {
  padding: 8px 14px;
  font-size: 13px;
}
.hx-btn.danger {
  border-color: var(--red-100);
  color: var(--state-danger);
}
.hx-btn.danger:hover {
  background: var(--red-100);
  border-color: var(--state-danger);
  color: var(--state-danger);
}
.hx-btn .plus {
  font-size: 15px;
  line-height: 1;
  margin-top: -1px;
}
.hx-btn svg {
  width: 15px;
  height: 15px;
}

.hx-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: var(--weight-bold);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hx-link:hover {
  color: var(--accent-d);
  text-decoration: underline;
}
.hx-link svg {
  width: 14px;
  height: 14px;
}

/* ---------- Panels / cards ---------- */
.hx-panel {
  background: var(--panel);
  border: none;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 20px;
}
.hx-panel-head {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.hx-panel-head h2 {
  font-size: 18px;
  line-height: 26px;
  font-weight: var(--weight-bold);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  margin: 0;
}
.hx-panel-body {
  padding: 22px 24px;
}

/* ---------- Key/value summary grid ---------- */
.hx-kv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--line-soft);
}
.hx-kv .cell {
  background: var(--white);
  padding: 18px 20px;
}
.hx-kv .cell span {
  display: block;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
  margin-bottom: 8px;
  font-weight: var(--weight-semibold);
}
.hx-kv .cell strong {
  font-size: 15px;
  font-weight: var(--weight-bold);
  letter-spacing: -0.01em;
}
.hx-kv .cell strong.mono {
  font-family: var(--font-mono);
  font-size: 15px;
}

/* ---------- Tables ---------- */
.hx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.hx-table thead th {
  text-align: left;
  font-size: 12px;
  font-weight: var(--weight-bold);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
  background: var(--neutral-050);
  padding: 11px 22px;
  border-bottom: none;
  white-space: nowrap;
}
.hx-table tbody td {
  padding: 14px 20px;
  border-bottom: none;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}
.hx-table tbody tr:first-child td {
  border-top: none;
}
.hx-table tbody tr:nth-child(even) {
  background: transparent;
}
.hx-table tbody tr:hover {
  background: var(--neutral-050);
}
.hx-table td.code,
.hx-mono {
  font-family: var(--font-mono);
  font-weight: var(--weight-semibold);
  font-size: 13.5px;
  letter-spacing: -0.01em;
}
.hx-table td.num {
  font-variant-numeric: tabular-nums;
}

.hx-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: var(--weight-bold);
  color: var(--neutral-700);
  background: var(--neutral-100);
  padding: 0 10px;
  border-radius: var(--radius-pill);
  font-variant-numeric: tabular-nums;
}
.hx-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  font-size: 11px;
  font-weight: var(--weight-bold);
  padding: 0 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--line-soft);
  color: var(--ink-soft);
}
.hx-tag.ok {
  background: var(--good-bg);
  color: var(--good-ink);
}
.hx-tag.warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
}
.hx-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- Notes / alerts ---------- */
.hx-note {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 14px 0 0;
}
.hx-alert {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--red-100);
  border: none;
  color: var(--state-danger);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  margin-bottom: 20px;
}
.hx-alert svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.hx-ok {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--good-bg);
  border: none;
  color: var(--good-ink);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  margin-bottom: 20px;
}
.hx-ok svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

/* ---------- Forms (index) ---------- */
.hx-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.hx-field label,
.hx-label {
  font-size: 12px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--ink-soft);
}
.hx-input {
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  padding: 11px 14px;
  font-size: 14px;
  color: var(--ink);
  background: var(--white);
  width: 100%;
  font-family: inherit;
  transition: border-color var(--dur-fast) var(--ease-standard),
    box-shadow var(--dur-fast) var(--ease-standard);
}
.hx-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--ring-focus);
}
.hx-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.hx-search,
input.hx-search {   /* beats app.css input[type="text"], which would drop the icon padding */
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  padding: 10px 14px 10px 36px;
  font-size: 14px;
  color: var(--ink);
  min-width: 260px;
  font-family: var(--font-mono);
  background: var(--white)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A8A8A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E")
    no-repeat 12px center;
}
.hx-search:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--ring-focus);
}
.hx-search::placeholder {
  color: var(--neutral-400);
  font-family: var(--font-ui);
}

/* checkboxes + qty inputs in the picker */
.hx-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
.hx-qty {
  width: 110px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  font-size: 14px;
  font-family: var(--font-mono);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.hx-qty:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--ring-focus);
}

/* ---------- Sticky footer bar (index) ---------- */
.hx-footerbar {
  position: sticky;
  bottom: 0;
  margin-top: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl) var(--radius-2xl) var(--radius-lg)
    var(--radius-lg);
  box-shadow: var(--shadow-sheet);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.hx-summary {
  font-size: 14px;
  color: var(--ink-soft);
}
.hx-summary strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ---------- Empty state ---------- */
.hx-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--ink-soft);
  font-size: 14px;
}

/* ---------- DataTables theming ---------- */
.hx .dt-layout-row:first-child {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
.hx div.dt-container .dt-search {
  margin: 0;
}
.hx div.dt-container .dt-search label {
  font-weight: var(--weight-semibold);
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--ink-soft);
  margin-right: 10px;
}
.hx div.dt-container .dt-search input {
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  padding: 10px 14px 10px 36px;
  font-size: 14px;
  font-family: var(--font-mono);
  min-width: 280px;
  color: var(--ink);
  background: var(--white)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A8A8A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E")
    no-repeat 12px center;
}
.hx div.dt-container .dt-search input::placeholder {
  color: var(--neutral-400);
  font-family: var(--font-ui);
}
.hx div.dt-container .dt-search input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--ring-focus);
}
.hx div.dt-container .dt-length label {
  font-size: 13px;
  color: var(--ink-soft);
}
.hx div.dt-container .dt-length select {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 7px 28px 7px 10px;
  font-size: 13px;
  color: var(--ink);
  background-color: var(--white);
}
.hx table.dataTable {
  width: 100% !important;
  border-collapse: collapse;
  margin: 0;
  font-size: 14px;
}
.hx table.dataTable thead th {
  text-align: left;
  font-size: 12px;
  font-weight: var(--weight-bold);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
  background: var(--neutral-050);
  padding: 11px 22px;
  border-bottom: none;
  white-space: nowrap;
}
.hx table.dataTable tbody td {
  padding: 14px 20px;
  border-bottom: none;
  border-top: 1px solid var(--line);
  vertical-align: middle;
  color: var(--ink);
}
.hx table.dataTable tbody tr:first-child td {
  border-top: none;
}
.hx table.dataTable tbody tr:nth-child(even) {
  background: transparent;
}
.hx table.dataTable tbody tr:hover {
  background: var(--neutral-050);
}
.hx table.dataTable thead th.dt-ordering-asc,
.hx table.dataTable thead th.dt-ordering-desc {
  color: var(--accent);
}
.hx .dt-layout-row:last-child {
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  gap: 16px;
}
.hx div.dt-container .dt-info {
  font-size: 12.5px;
  color: var(--ink-soft);
  padding: 0;
}
.hx div.dt-container .dt-paging .dt-paging-button {
  min-width: 34px;
  padding: 7px 11px;
  margin: 0 2px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink) !important;
  background: var(--white);
  transition: all var(--dur-fast) var(--ease-standard);
}
.hx div.dt-container .dt-paging .dt-paging-button.current,
.hx div.dt-container .dt-paging .dt-paging-button.current:hover {
  background: var(--accent) !important;
  border-color: var(--accent);
  color: var(--text-on-brand) !important;
}
.hx div.dt-container .dt-paging .dt-paging-button:hover {
  background: var(--brand-050) !important;
  border-color: var(--accent);
  color: var(--accent-d) !important;
}
.hx div.dt-container .dt-paging .dt-paging-button.disabled {
  color: var(--neutral-400) !important;
  background: var(--white);
  cursor: default;
}
.hx table.dataTable td.dt-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--ink-soft);
  font-size: 14px;
}

@media (max-width: 720px) {
  .hx-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .hx-grid2 {
    grid-template-columns: 1fr;
  }
  .hx div.dt-container .dt-search input,
  .hx-search {
    min-width: 0;
    width: 100%;
  }
  .hx-footerbar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ---------- Loading overlay (generate) ---------- */
.hx-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 30, 55, 0.45);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-standard);
}
.hx-overlay.show {
  display: flex;
  opacity: 1;
}
.hx-overlay-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised);
  padding: 32px 28px;
  max-width: 380px;
  width: calc(100% - 48px);
  text-align: center;
}
.hx-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 4px solid var(--brand-100);
  border-top-color: var(--accent);
  animation: hx-spin 0.8s linear infinite;
}
@keyframes hx-spin {
  to {
    transform: rotate(360deg);
  }
}
.hx-overlay-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: var(--weight-medium);
  letter-spacing: 0;
  margin: 0 0 6px;
  color: var(--ink);
}
.hx-overlay-card p {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.5;
}
.hx-overlay-card .count {
  font-family: var(--font-mono);
  font-weight: var(--weight-semibold);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.hx-overlay-card .hint {
  margin-top: 14px;
  font-size: 12px;
  color: var(--neutral-400);
}
.hx-progress {
  height: 6px;
  background: var(--neutral-100);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 16px;
}
.hx-progress-bar {
  height: 100%;
  width: 35%;
  border-radius: 999px;
  background: var(--grad-touch-h);
  animation: hx-indeterminate 1.3s ease-in-out infinite;
}
@keyframes hx-indeterminate {
  0% {
    margin-left: -35%;
  }
  100% {
    margin-left: 100%;
  }
}
/* Real (known-percentage) progress: no sliding animation, width is driven by JS. */
.hx-progress-bar.determinate {
  animation: none;
  margin-left: 0;
  background: var(--accent);
  transition: width var(--dur-fast) var(--ease-standard);
}
@media (prefers-reduced-motion: reduce) {
  .hx-spinner {
    animation-duration: 1.6s;
  }
  .hx-progress-bar:not(.determinate) {
    animation: none;
    width: 100%;
    opacity: 0.6;
  }
}

/* ---------- 3-column settings grid ---------- */
.hx-grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 720px) {
  .hx-grid3 {
    grid-template-columns: 1fr;
  }
}

/* Row number cell in SKU picker */
.hx-table td.row-no {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

/* Thousand-separated qty preview under the input */
.qty-hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  min-height: 13px;
  text-align: right;
  padding-right: 2px;
}

/* ---------- Toast ---------- */
.hx-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: var(--radius-pill);
  background: var(--surface-dark);
  box-shadow: var(--shadow-raised);
  font-size: 13px;
  font-weight: var(--weight-semibold);
  color: var(--white);
  animation: hx-toast 0.18s ease-out;
}
@keyframes hx-toast {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* ---------- Confirm dialog ---------- */
.hx-confirm {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 30, 55, 0.45);
  padding: 24px;
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-standard);
}
.hx-confirm.show {
  display: flex;
  opacity: 1;
}
.hx-confirm-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised);
  padding: 28px;
  max-width: 380px;
  width: 100%;
  text-align: center;
}
.hx-confirm-card .icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--red-100);
  color: var(--state-danger);
}
.hx-confirm-card .icon svg {
  width: 22px;
  height: 22px;
}
.hx-confirm-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: var(--weight-medium);
  letter-spacing: 0;
  margin: 0 0 8px;
  color: var(--ink);
}
.hx-confirm-card p {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.5;
}
.hx-confirm-card .actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
}
.hx-confirm-card .actions .hx-btn {
  flex: 1;
  justify-content: center;
}
.hx-confirm-card .actions .hx-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.hx-confirm-type {
  margin-top: 18px;
  text-align: left;
}
.hx-confirm-type label {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.hx-confirm-type label b {
  color: var(--state-danger);
  font-family: var(--font-mono, monospace);
}
.hx-confirm-type .hx-input {
  width: 100%;
}
/* The confirm dialog opens on top of the Manage dialog. */
#qtConfirm {
  z-index: 1300;
}

/* ---------- QRTrust admin ---------- */
.hx-tag.bad {
  background: var(--red-100);
  color: var(--state-danger);
}
.hx-tag.info {
  background: var(--teal-100);
  color: var(--info-ink);
}
.hx-secret {
  background: var(--brand-050);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 20px;
}
.hx-secret p {
  margin: 0 0 8px;
  font-size: 13.5px;
  color: var(--ink);
}
.hx-secret code {
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  word-break: break-all;
  background: var(--white);
  padding: 10px 12px;
  border-radius: var(--radius-sm, 8px);
  user-select: all;
}
.hx-inline {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
}
.hx-inline .hx-input {
  width: auto;
  min-width: 0;
}
/* Batch page: "Page after scan" picker — explanation left, dropdown + Save right. */
.qt-flow-pick {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
  gap: 16px 32px;
  align-items: center;
  margin: 0;
}
.qt-flow-pick-text label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
  flex-direction: row;
  gap: 10px;
  margin: 0;
  text-align: left;
  font-weight: var(--weight-bold);
  font-size: 14.5px;
  color: var(--ink);
}
.qt-flow-pick-text .hx-note {
  margin: 6px 0 0;
  max-width: 56ch;
}
.qt-flow-state {
  font-size: 11px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--neutral-050);
  color: var(--ink-soft);
}
.qt-flow-state.is-set {
  background: var(--brand-050);
  color: var(--accent);
}
.qt-flow-pick-ctrl {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.qt-flow-pick-ctrl .select2-container {
  flex: 1 1 auto;
  min-width: 0;
}
.qt-flow-pick-ctrl .hx-btn {
  justify-content: center;
}
/* Batch page: product flow per SKU row. */
.qt-sku-flow-note {
  padding: 0 24px 14px;
}
.qt-sku-flow-note .hx-note {
  margin: 0;
}
.qt-sku-flow-form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
}
.qt-sku-flow-form .select2-container {
  min-width: 220px;
  max-width: 300px;
}
.qt-sku-flow td.code,
.qt-sku-flow td:last-child {
  white-space: nowrap;
}
.qt-overridden {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--accent);
}
.qt-sku-flow-form .hx-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
@media (max-width: 760px) {
  .qt-flow-pick {
    grid-template-columns: 1fr;
  }
}
.hx-panel-body .hx-note:first-child {
  margin-top: 0;
}
.hx-scroll {
  overflow-x: auto;
}
.hx-scroll .hx-table td {
  white-space: nowrap;
}

/* ---------- Shared top navigation (views/_nav.php) ---------- */
.hx-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--panel);
  box-shadow: 0 1px 0 var(--line), 0 6px 18px rgba(0, 30, 55, 0.04);
}
/* Brand gradient strip along the top edge of the console. */
.hx-nav::before {
  content: "";
  display: block;
  height: 4px;
  background: var(--grad-touch-h);
}
.hx-nav-inner {
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 40px);
  display: flex;
  align-items: center;
  gap: 28px;
}
.hx-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 12px 0;
  text-decoration: none;
  color: var(--ink);
}
.hx-nav-brand:hover {
  text-decoration: none;
}
.hx-nav-brand img {
  height: 32px;
  width: auto;
}
.hx-nav-brand span {
  padding-left: 10px;
  border-left: 1px solid var(--line, #e5e5e5);
  font-size: 11px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.25;
  color: var(--accent);
}
.hx-nav-links {
  display: flex;
  align-items: stretch;
  gap: 4px;
  flex: 1 1 auto;
  align-self: stretch;
  overflow-x: auto;
  scrollbar-width: none;
}
.hx-nav-links::-webkit-scrollbar {
  display: none;
}
.hx-nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  min-height: 60px;
  font-size: 14px;
  font-weight: var(--weight-bold);
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur-base) var(--ease-standard);
}
.hx-nav-links a svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}
.hx-nav-links a:hover {
  color: var(--ink);
  text-decoration: none;
}
.hx-nav-links a.active {
  color: var(--accent);
}
.hx-nav-links a.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
}
.hx-nav-links a:focus-visible,
.hx-subnav a:focus-visible,
.hx-nav-logout:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: 8px;
}
.hx-nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}
.hx-nav-user .who {
  font-size: 13px;
  color: var(--ink-soft);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hx-nav-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: var(--weight-bold);
  color: var(--ink);
  border: 1.5px solid var(--line);
  text-decoration: none;
}
.hx-nav-logout:hover {
  border-color: var(--ink);
  text-decoration: none;
}
.hx-nav-logout svg {
  width: 15px;
  height: 15px;
}
.hx-subnav {
  border-top: 1px solid var(--line-soft);
  background: var(--zebra);
}
.hx-subnav .hx-nav-inner {
  gap: 6px;
  padding-top: 8px;
  padding-bottom: 8px;
  overflow-x: auto;
}
.hx-subnav-sep {
  flex: 0 0 auto;
  width: 1px;
  height: 20px;
  margin: 0 6px;
  background: var(--line);
}
.hx-subnav a {
  padding: 7px 11px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: var(--weight-bold);
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
}
.hx-subnav a:hover {
  color: var(--ink);
  background: var(--line-soft);
  text-decoration: none;
}
.hx-subnav a.active {
  color: var(--accent);
  background: var(--brand-100);
}
.hx-subnav a.ext {
  margin-left: auto;
}

@media (max-width: 860px) {
  .hx-nav-inner {
    gap: 12px;
    padding: 0 16px;
  }
  .hx-nav-brand span,
  .hx-nav-user .who {
    display: none;
  }
  .hx-nav-links a {
    padding: 0 10px;
  }
}
@media (max-width: 600px) {
  .hx-nav-links a span,
  .hx-nav-logout span {
    display: none;
  }
  .hx-nav-links a {
    min-height: 52px;
    padding: 0 12px;
  }
  .hx-subnav a.ext {
    margin-left: 0;
  }
}

/* "Public Microsite" external link in the QRTrust sub-nav: outlined pill button. */
.hx-subnav a.ext {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  color: var(--ink);
  background: var(--panel);
  border: 1.5px solid var(--line);
}
.hx-subnav a.ext svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}
.hx-subnav a.ext svg:last-child {
  width: 13px;
  height: 13px;
  color: var(--ink-soft);
}
.hx-subnav a.ext:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--panel);
}
.hx-subnav a.ext:hover svg:last-child {
  color: var(--accent);
}

/* ---------- QRTrust: API clients page ---------- */
.hx-secret-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--ink);
}
.hx-secret-head svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}
.hx-copyrow {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.hx-copyrow code {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 13.5px;
  word-break: break-all;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: var(--radius-sm, 8px);
  user-select: all;
}
.hx-secret .hx-copyrow code {
  border-color: transparent;
}
.hx-copyrow .hx-btn svg,
.qt-keybtn svg {
  width: 15px;
  height: 15px;
}
.hx-copyrow .hx-btn.copied {
  background: var(--good-bg);
  color: var(--good-ink);
  border-color: transparent;
}

.qt-clients td {
  vertical-align: middle;
}
.qt-clients tr.is-off td {
  opacity: 0.6;
}
.qt-clients tr.is-off td.qt-actions {
  opacity: 1;
}
.qt-name {
  font-weight: var(--weight-bold);
  color: var(--ink);
}
.qt-meta {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
}
.qt-actions {
  text-align: right;
}
/* Scan Flows: allowed vendor sites as removable pills + an Add row. */
.qt-hosts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}
.qt-host {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 6px 6px 6px 14px;
  border: 1px solid var(--brand-200);
  border-radius: var(--radius-pill);
  background: var(--brand-050);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: var(--weight-semibold);
  color: var(--ink);
}
.qt-host button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
}
.qt-host button:hover,
.qt-host button:focus-visible {
  background: var(--red-100);
  color: var(--state-danger);
}
.qt-host button svg {
  width: 12px;
  height: 12px;
}
.qt-host-add {
  margin: 0;
}
.qt-host-add label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: var(--weight-bold);
  color: var(--ink);
}
.qt-host-add-row {
  display: flex;
  gap: 10px;
}
.qt-host-add-row .hx-input {
  flex: 1 1 auto;
  min-width: 0;
}
.qt-host-add .hx-note {
  margin-top: 6px;
}
.qt-ips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.qt-ip {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--line-soft);
  color: var(--ink);
}
.qt-ip.more {
  font-family: var(--font-ui);
  font-weight: var(--weight-bold);
  cursor: help;
}

/* "Key" pill that opens the bubble */
.qt-keybtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 10px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: var(--weight-bold);
  cursor: pointer;
}
.qt-keybtn svg {
  color: var(--accent);
}
.qt-keybtn:hover,
.qt-keybtn.open {
  border-color: var(--accent);
  color: var(--accent);
}
.qt-keybtn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Chat-bubble popover with a tail pointing at the Key button */
.qt-bubble {
  position: fixed;
  z-index: 1100;
  width: 320px;
  max-width: calc(100vw - 24px);
  background: var(--panel);
  border-radius: 14px;
  box-shadow: var(--shadow-raised), 0 0 0 1px var(--line);
  padding: 16px;
  animation: qt-pop 0.14s ease-out;
}
.qt-bubble[hidden] {
  display: none;
}
.qt-bubble::before {
  content: "";
  position: absolute;
  top: -7px;
  left: calc(var(--tail, 36px) - 7px);
  width: 14px;
  height: 14px;
  background: var(--panel);
  transform: rotate(45deg);
  border-radius: 3px 0 0 0;
  box-shadow: -1px -1px 0 var(--line);
}
@keyframes qt-pop {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
.qt-bubble-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
}
.qt-bubble-head svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex: 0 0 auto;
}
.qt-bubble-label {
  display: block;
  font-size: 11px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.qt-bubble #qtBubblePrefix::after {
  content: "••••••••";
  color: var(--ink-soft);
  letter-spacing: 0.1em;
  margin-left: 2px;
}
.qt-bubble-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 12px;
  color: var(--ink-soft);
  margin: 10px 0 8px;
}
.qt-bubble-meta b {
  color: var(--ink);
  font-weight: var(--weight-bold);
}
.qt-bubble-note {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-soft);
  background: var(--zebra);
  border-radius: 8px;
  padding: 8px 10px;
  margin: 0 0 10px;
}

/* Manage dialog (reuses the .hx-confirm overlay) */
.qt-manage .hx-confirm-card {
  max-width: 600px;
  text-align: left;
  padding: 0;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}
.qt-manage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 14px;
  border-bottom: 1px solid var(--line);
}
/* Title and close stay put while the sections scroll. */
.qt-manage .qt-manage-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--white);
}
.qt-manage .qt-modes {
  margin: 0;
}
.qt-manage .nc-cards .qt-mode {
  padding: 12px 14px;
}
.qt-manage .nc-cards b {
  font-size: 13.5px;
}
.qt-manage .nc-scopes {
  flex-wrap: wrap;
  margin-top: 8px;
}
/* Note on the left, its Save on the right. */
.qt-sec-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
}
.qt-sec-foot .hx-note,
.qt-section .qt-sec-foot .hx-note,
.qt-sec-foot .qt-check {
  margin: 0;
}
.qt-sec-foot .hx-btn {
  flex: 0 0 auto;
}
@media (max-width: 560px) {
  .qt-manage .nc-cards.nc-cards-2 { grid-template-columns: 1fr; }
  .qt-sec-foot { flex-direction: column; align-items: stretch; }
}
.qt-manage-head .eyebrow {
  font-size: 11px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 4px;
}
.qt-manage-head h3 {
  margin: 0;
}
.qt-x {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  padding: 4px;
  border-radius: 8px;
  cursor: pointer;
}
.qt-x:hover {
  background: var(--line-soft);
  color: var(--ink);
}
.qt-x svg {
  width: 18px;
  height: 18px;
  display: block;
}
.qt-section {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line-soft);
  margin: 0;
}
.qt-section:last-child {
  border-bottom: 0;
}
.qt-section > label {
  display: block;
  font-size: 13px;
  font-weight: var(--weight-bold);
  color: var(--ink);
  margin-bottom: 8px;
}
.qt-section .hx-note {
  margin: 6px 0 12px;
}
.qt-modes {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.qt-mode {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.qt-mode:has(input:checked) {
  border-color: var(--accent);
  background: var(--brand-050);
}
.qt-mode input {
  margin-top: 3px;
  accent-color: var(--accent);
}
.qt-mode b {
  display: block;
  font-size: 13.5px;
  font-weight: var(--weight-semibold);
  color: var(--ink);
}
.qt-mode small {
  display: block;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.45;
}
.qt-check {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.qt-check input {
  accent-color: var(--accent);
}
.qt-danger {
  background: var(--zebra);
}
.qt-mode input,
.qt-check input {
  width: auto;
  min-width: 0;
  flex: 0 0 auto;
  height: auto;
}
.qt-mode input {
  margin: 3px 0 0;
}
/* app.css stacks every <label> as a column; option rows need a row. */
.qt-mode,
.qt-check {
  flex-direction: row;
}

/* ---------- QRTrust: Fraud report ---------- */
.fr-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.fr-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 14px;
  border-radius: var(--radius-md);
  flex: 1 1 320px;
}
.fr-status > svg {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
}
.fr-status strong {
  display: block;
  font-size: 15px;
}
.fr-status span {
  display: block;
  font-size: 13px;
  opacity: 0.85;
}
.fr-status.ok {
  background: var(--good-bg);
  color: var(--good-ink);
}
.fr-status.medium {
  background: var(--warn-bg);
  color: var(--warn-ink);
}
.fr-status.high {
  background: var(--red-100);
  color: var(--state-danger);
}
.fr-window {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: var(--panel);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
}
.fr-window > span {
  font-size: 12px;
  font-weight: var(--weight-bold);
  color: var(--ink-soft);
  padding: 0 8px 0 10px;
}
.fr-window a {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: var(--weight-bold);
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
}
.fr-window a:hover {
  color: var(--ink);
  text-decoration: none;
}
.fr-window a.active {
  background: var(--accent);
  color: var(--white);
}

.fr-tiles {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.fr-tile {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  padding: 14px 16px;
  background: var(--panel);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  border-top: 3px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: transform var(--dur-base) var(--ease-standard);
}
.fr-tile:hover {
  transform: translateY(-2px);
  text-decoration: none;
}
.fr-tile {
  position: relative;
  cursor: pointer;
}
.fr-tile-off {
  display: none;
  position: absolute;
  top: 8px;
  right: 10px;
  color: var(--ink-soft);
}
.fr-tile-off svg {
  width: 15px;
  height: 15px;
}
.fr-tile.is-off {
  opacity: 0.5;
  box-shadow: none;
  border-top-style: dashed;
  background: transparent;
  outline: 1px dashed var(--line);
  outline-offset: -1px;
}
.fr-tile.is-off .fr-tile-off {
  display: block;
}
.fr-tile.is-off:hover {
  opacity: 0.8;
}
.fr-hidden-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -12px 0 16px;
  font-size: 13px;
  color: var(--ink-soft);
}
.fr-hidden-note[hidden] {
  display: none;
}
.fr-hidden-note button {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: var(--weight-semibold);
  cursor: pointer;
}
.fr-signal[hidden],
.fr-clear[hidden],
.fr-clear li[hidden] {
  display: none;
}
.fr-tile .fr-tile-icon {
  grid-row: 1 / 3;
}
.fr-tile-n {
  font-size: 24px;
  font-weight: var(--weight-bold);
  line-height: 1.1;
}
.fr-tile-t {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.3;
}
.fr-tile-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--line-soft);
  color: var(--ink-soft);
  flex: 0 0 auto;
}
.fr-tile-icon svg {
  width: 18px;
  height: 18px;
}
.fr-tile.is-clear .fr-tile-n {
  color: var(--ink-soft);
}
.lvl-high .fr-tile-icon {
  background: var(--red-100);
  color: var(--state-danger);
}
.lvl-medium .fr-tile-icon {
  background: var(--warn-bg);
  color: var(--warn-ink);
}
.lvl-low .fr-tile-icon {
  background: var(--teal-100);
  color: var(--info-ink);
}
.fr-tile.lvl-high {
  border-top-color: var(--state-danger);
}
.fr-tile.lvl-medium {
  border-top-color: var(--yellow-600, #e0b400);
}
.fr-tile.lvl-low {
  border-top-color: var(--teal-500, #12aec4);
}
.fr-tile.lvl-high .fr-tile-n {
  color: var(--state-danger);
}

.fr-signal {
  scroll-margin-top: 130px;
  border-left: 4px solid var(--line);
}
.fr-signal.lvl-high {
  border-left-color: var(--state-danger);
}
.fr-signal.lvl-medium {
  border-left-color: var(--yellow-600, #e0b400);
}
.fr-signal.lvl-low {
  border-left-color: var(--teal-500, #12aec4);
}
.fr-signal-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.fr-signal-text {
  flex: 1 1 auto;
  min-width: 0;
}
.fr-signal-text h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 16px;
  margin: 0 0 4px;
}
.fr-signal-text p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 720px;
}
.fr-level {
  font-size: 10.5px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}
.lvl-high .fr-level {
  background: var(--red-100);
  color: var(--state-danger);
}
.lvl-medium .fr-level {
  background: var(--warn-bg);
  color: var(--warn-ink);
}
.lvl-low .fr-level {
  background: var(--teal-100);
  color: var(--info-ink);
}
.fr-signal-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: 0 0 auto;
}
.fr-signal-meta small,
.fr-clear li small {
  font-size: 11.5px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.fr-when small {
  color: var(--ink-soft);
}
.fr-act {
  text-align: right;
}
.fr-act .hx-btn svg {
  width: 14px;
  height: 14px;
}
.fr-cap {
  padding: 0 22px 16px;
}
.fr-signal-text p.fr-rule,
.fr-clear li span.fr-rule {
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-sunken, #f4f4f4);
  font-size: 12.5px;
  color: var(--ink);
  max-width: 820px;
}
.fr-rule b {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-right: 6px;
}
.fr-rule a {
  margin-left: 6px;
  white-space: nowrap;
}
.fr-acts {
  display: inline-flex;
  gap: 6px;
  justify-content: flex-end;
}

.fr-clear ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fr-clear li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: 130px;
}
.fr-clear li:first-child {
  border-top: 0;
}
.fr-clear li > div {
  flex: 1 1 auto;
  min-width: 0;
}
.fr-clear li strong {
  display: block;
  font-size: 14px;
}
.fr-clear li span:not(.fr-ok) {
  display: block;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.45;
}
.fr-ok {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--good-bg);
  color: var(--good-ink);
  flex: 0 0 auto;
}
.fr-ok svg {
  width: 15px;
  height: 15px;
}

@media (max-width: 960px) {
  .fr-tiles {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }
}
@media (max-width: 600px) {
  .fr-signal-head {
    flex-wrap: wrap;
  }
  .fr-clear li small {
    display: none;
  }
}

/* Status tags inside key/value cells: undo the cell-label span styling. */
.hx-kv .cell .hx-tag {
  display: inline-flex;
  vertical-align: middle;
  margin: 0 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hx-kv .cell .hx-tag .dot {
  display: inline-block;
  margin: 0;
}
@media (max-width: 600px) {
  .fr-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .fr-tile {
    padding: 10px 12px;
    column-gap: 8px;
  }
  .fr-tile .fr-tile-icon {
    width: 30px;
    height: 30px;
  }
  .fr-tile-n {
    font-size: 20px;
  }
}

/* ---------- QRTrust: Scan log (IT only) ---------- */
.hx-subnav a svg {
  width: 13px;
  height: 13px;
  vertical-align: -2px;
  margin-right: 4px;
}
.lg-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  background: var(--teal-100);
  color: var(--info-ink);
  font-size: 13px;
}
.lg-note svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}
.lg-groups {
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.lg-filters {
  padding: 18px 22px;
}
.lg-extra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--ink-soft);
}
.lg-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--warn-bg);
  color: var(--warn-ink);
  font-size: 12.5px;
  font-weight: var(--weight-semibold);
  text-decoration: none;
}
.lg-chip:hover {
  text-decoration: none;
  filter: brightness(0.96);
}
.lg-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px 14px;
}
.lg-grid .hx-field {
  margin: 0;
}
.lg-grid .lg-wide {
  grid-column: 1 / -1;
}
.lg-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.lg-count {
  font-size: 13px;
  color: var(--ink-soft);
}
.lg-table td {
  vertical-align: top;
}
.lg-table .qt-meta {
  display: block;
}
.lg-chan {
  display: inline-block;
  font-size: 11px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 6px;
}
.lg-chan.api {
  background: var(--brand-100);
  color: var(--brand-700);
}
.lg-chan.web {
  background: var(--teal-100);
  color: var(--info-ink);
}
.lg-ip {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
}
.lg-ip:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}
.lg-table tr.lg-open td {
  background: var(--brand-050);
}
.lg-detail td {
  background: var(--zebra);
  padding: 14px 22px 18px;
}
.lg-detail dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 20px;
  margin: 0;
}
.lg-detail dl > div {
  min-width: 0;
}
.lg-detail .lg-full {
  grid-column: 1 / -1;
}
.lg-detail dt {
  font-size: 11px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 3px;
}
.lg-detail dd {
  margin: 0;
  font-size: 13px;
  color: var(--ink);
}
.lg-break {
  word-break: break-all;
  white-space: normal;
}
.lg-detail pre {
  margin: 0;
  padding: 10px 12px;
  background: var(--white);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}
.lg-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  padding: 14px 24px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--ink-soft);
}
.lg-pages {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.lg-pg {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  font-weight: var(--weight-bold);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard);
}
a.lg-pg:hover {
  background: var(--brand-050);
  border-color: var(--accent);
  color: var(--accent-d);
  text-decoration: none;
}
.lg-pg.cur {
  background: var(--accent);
  color: var(--text-on-brand);
}
.lg-pg.nav {
  border-color: var(--border-default);
  padding: 0 14px;
}
.lg-pg.off {
  color: var(--ink-soft);
  opacity: .45;
}
.lg-pg.gap {
  min-width: 20px;
  padding: 0;
  color: var(--ink-soft);
}

/* ---------- Sortable headers + pages for every table (assets/js/hx-table.js, hx_sort_th()) ---------- */
.hx-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: -4px -6px;
  padding: 4px 6px;
  border: 0;
  border-radius: 6px;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
}
.hx-sort:hover {
  background: var(--brand-050);
  color: var(--accent-d);
  text-decoration: none;
}
.hx-sort:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}
.hx-sort-ico {
  width: 13px;
  height: 13px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hx-sort-ico path {
  opacity: .35;
}
.hx-sort:hover .hx-sort-ico path {
  opacity: .6;
}
th[aria-sort="ascending"] .hx-sort,
th[aria-sort="descending"] .hx-sort {
  color: var(--accent);
}
th[aria-sort="ascending"] .hx-sort-ico .up,
th[aria-sort="descending"] .hx-sort-ico .down {
  opacity: 1;
}
th[aria-sort="ascending"] .hx-sort-ico .down,
th[aria-sort="descending"] .hx-sort-ico .up {
  opacity: .15;
}
.hx-table tbody tr.dt-off {
  display: none;
}
.hx-table tbody tr.dt-first td {
  border-top: none;
}
.hx-pager[hidden] {
  display: none;
}
.hx-pager-end {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
}
.hx .hx-pager-per {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
}
.hx .hx-pager-per select {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  cursor: pointer;
}
.hx .hx-pager-per select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--ring-focus);
}
button.lg-pg {
  background: none;
  font-family: inherit;
  cursor: pointer;
}
button.lg-pg.nav {
  border-color: var(--border-default);
}
button.lg-pg:hover {
  background: var(--brand-050);
  border-color: var(--accent);
  color: var(--accent-d);
}
@media (max-width: 960px) {
  .lg-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .lg-detail dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .lg-grid,
  .lg-detail dl {
    grid-template-columns: 1fr 1fr;
  }
}

/* --------------------------------------------- QRTrust > Batch > Codes --- */
.lg-grid.cd-grid { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, .8fr); }
.cd-table td { font-size: 13px; vertical-align: middle; }
.cd-nowrap { white-space: nowrap; }
.cd-name { min-width: 240px; }
.cd-link { white-space: nowrap; }
.cd-link .hx-mono {
  display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis;
  vertical-align: middle; font-size: 12px; color: var(--ink-soft);
}
.cd-link .cd-copy,
.cd-link .cd-qr { margin-left: 6px; vertical-align: middle; }
.cd-qrbox .hx-confirm-card { max-width: 380px; }
.cd-qrbody { padding: 18px 24px 22px; text-align: center; }
.cd-qrimg img { display: block; margin: 0 auto; width: 260px; height: 260px; image-rendering: pixelated; }
.cd-qrlink { font-size: 12px; word-break: break-all; margin: 12px 0 6px; color: var(--ink-soft); }
@media (max-width: 960px) {
  .lg-grid.cd-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .lg-grid.cd-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------- QRTrust > Settings --- */
.st-warn { margin: 0 0 16px; }
.st-qr-sample { margin: 12px 0 0; font-size: 12.5px; color: var(--ink-soft); overflow-wrap: anywhere; }
.st-qr-sample code { font-size: 12.5px; }
.st-qr-sample b { color: var(--ink-soft); font-weight: 400; opacity: .7; }
.st-meta { font-size: 12.5px; color: var(--ink-soft); }
/* Settings > Links */
.st-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 16px; padding: 12px 16px;
  border-radius: var(--radius-lg); background: var(--white); border: 1px solid var(--line-soft); font-size: 13px; color: var(--ink-soft); }
.st-flow-step { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: var(--weight-semibold); min-width: 0; }
.st-flow-step svg { width: 16px; height: 16px; color: var(--accent); flex: 0 0 auto; }
.st-flow-step code { font-weight: 400; overflow-wrap: anywhere; }
.st-flow-step code b { font-weight: 400; color: var(--ink-soft); }
.st-flow-arrow { color: var(--ink-soft); }
.st-links { display: grid; gap: 16px; }
.st-link { transition: box-shadow .15s; }
.st-link.is-dirty { box-shadow: 0 0 0 2px var(--accent); }
.st-link-head { display: flex; gap: 14px; align-items: flex-start; padding: 20px 24px 6px; }
.st-link-head > div { flex: 1 1 auto; min-width: 0; }
.st-link-head h2 { margin: 0 0 4px; font-size: 17px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.st-link-head p { margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.45; }
.st-link-head .st-meta { white-space: nowrap; padding-top: 3px; }
.st-badge { font-size: 11px; font-weight: var(--weight-bold); letter-spacing: .04em; padding: 2px 9px; border-radius: var(--radius-pill);
  background: var(--neutral-050, #f3f3f3); color: var(--ink-soft); }
.st-badge.custom { background: var(--brand-050); color: var(--accent-d); }
.st-url { display: flex; gap: 8px; align-items: center; }
.st-url .hx-input { flex: 1 1 auto; min-width: 0; }
.st-url .hx-btn { flex: 0 0 auto; }
.st-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 12.5px; color: var(--ink-soft); }
.st-chip { border: 1px solid var(--line); background: var(--white); color: var(--ink); border-radius: var(--radius-pill);
  padding: 4px 12px; font: inherit; font-size: 12.5px; cursor: pointer; }
.st-chip:hover { border-color: var(--accent); }
.st-chip.ghost { color: var(--ink-soft); }
.st-chip.on { background: var(--brand-050); border-color: var(--accent); color: var(--accent-d); font-weight: var(--weight-semibold); }
.st-link .hx-note { margin: 8px 0 0; }
.st-mismatch { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; padding: 8px 12px; border-radius: 10px;
  background: var(--yellow-100); color: var(--warn-ink); font-size: 12.5px; line-height: 1.45; }
.st-mismatch[hidden] { display: none; }
.st-mismatch svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 1px; }
@media (max-width: 640px) {
  .st-link-head { flex-wrap: wrap; padding: 18px 16px 4px; }
  .st-link-head .st-meta { white-space: normal; }
  .st-flow { display: none; }
}
.st-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.st-card { border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 18px 20px; background: var(--white); }
.st-card-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.st-card-head h3 { margin: 0; font-size: 16px; }
.st-card-head p { margin: 0; font-size: 12.5px; color: var(--ink-soft); }
.st-ico { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.st-ico svg { width: 20px; height: 20px; }
.st-ico.warn { background: var(--yellow-100); color: var(--warn-ink); }
.st-ico.ok { background: var(--brand-050); color: var(--accent-d); }
.st-sentence { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; line-height: 1.6; margin: 0 0 10px; }
.st-sentence .hx-input { width: auto; padding-top: 8px; padding-bottom: 8px; }
.st-num { width: 84px !important; text-align: center; font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }
.st-example { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--neutral-050); font-size: 13px; color: var(--ink); }
.st-help { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.55; }
.st-help li + li { margin-top: 4px; }
.st-qm { position: relative; margin-left: auto; align-self: flex-start; width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: var(--weight-bold);
  background: var(--neutral-050); color: var(--ink-soft); border: 1px solid var(--line-soft); cursor: help; flex: 0 0 auto; }
.st-qm:hover, .st-qm:focus { background: var(--brand-050); color: var(--accent-d); outline: none; }
.st-qm-box { display: none; position: absolute; z-index: 20; top: 32px; right: 0; width: 340px; max-width: 80vw; padding: 12px 14px 12px 8px;
  border-radius: 12px; background: var(--white); border: 1px solid var(--line-soft); box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
  font-weight: normal; text-align: left; }
.st-qm:hover .st-qm-box, .st-qm:focus .st-qm-box, .st-qm:focus-within .st-qm-box { display: block; }
.st-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.st-tabs a {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: var(--radius-pill);
  background: var(--panel); box-shadow: var(--shadow); font-size: 13.5px; font-weight: var(--weight-bold);
  color: var(--ink-soft); text-decoration: none; white-space: nowrap;
}
.st-tabs a svg { width: 16px; height: 16px; }
.st-tabs a:hover { color: var(--ink); text-decoration: none; }
.st-tabs a.active { background: var(--accent); color: var(--white); }
.st-tab-n { min-width: 20px; padding: 1px 6px; border-radius: var(--radius-pill); background: var(--neutral-100, #eee);
  color: var(--ink-soft); font-size: 11.5px; text-align: center; }
.st-tabs a.active .st-tab-n { background: rgba(255, 255, 255, .25); color: var(--white); }
.fl-lead { margin: 0 0 16px; font-size: 14px; color: var(--ink-soft); }
.fl-lead b { color: var(--ink); }
/* Flow resolution: step, "else", step, "else", step. */
.fl-steps { list-style: none; margin: 0; padding: 0; display: grid; align-items: stretch;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; }
.fl-step { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px 18px;
  border: 1px solid var(--line-soft); border-radius: var(--radius-lg); background: var(--white); }
.fl-step b { font-size: 14.5px; }
.fl-step small { font-size: 12.5px; line-height: 1.45; color: var(--ink-soft); }
.fl-step-n { width: 26px; height: 26px; margin-bottom: 6px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--brand-050); color: var(--accent-d); font-size: 13px; font-weight: var(--weight-bold); }
.fl-step.is-default { background: var(--neutral-050); }
.fl-step.is-default .fl-step-n { background: var(--accent); color: var(--white); }
.fl-where { align-self: flex-start; margin-top: auto; gap: 6px; border-color: var(--accent); color: var(--accent-d); }
.fl-where:hover { background: var(--accent); border-color: var(--accent); color: var(--white); }
.fl-where svg { width: 13px; height: 13px; }
.fl-where-note { margin-top: auto; padding-top: 10px; font-size: 12.5px; color: var(--ink-soft); }
.fl-default-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 5px 12px; border-radius: var(--radius-pill);
  background: var(--white); border: 1px solid var(--accent); color: var(--accent-d); font-size: 13px; font-weight: var(--weight-bold); }
.fl-default-chip svg { width: 14px; height: 14px; }
.fl-else { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 10.5px; font-weight: var(--weight-bold); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.fl-else svg { width: 16px; height: 16px; }
.fl-rules { list-style: none; margin: 16px 0 0; padding: 12px 16px; border-radius: 12px; background: var(--neutral-050);
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; font-size: 13px; color: var(--ink-soft); }
.fl-rules li { display: flex; gap: 10px; align-items: flex-start; }
.fl-rules svg { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 1px; color: var(--ink-soft); }
.fl-rules b { color: var(--ink); }
.fl-opt { font-weight: 400; color: var(--ink-soft); margin-left: 6px; }
.hx-field label.fl-label-row { flex-direction: row; align-items: baseline; gap: 0; }
@media (max-width: 860px) { .fl-steps, .fl-rules { grid-template-columns: 1fr; } .fl-else { flex-direction: row; } .fl-else svg { transform: rotate(90deg); } }
.st-fcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.st-fcard { display: flex; flex-direction: column; border-top-width: 3px; }
.st-fcard.lvl-medium { border-top-color: var(--warn-ink); }
.st-fcard.lvl-low { border-top-color: var(--info-ink); }
.st-fcard .st-card-head p { margin-top: 4px; }
.st-fcard .st-sentence { font-size: 14.5px; }
.st-ico.medium { background: var(--yellow-100); color: var(--warn-ink); }
.st-ico.low { background: var(--teal-100); color: var(--info-ink); }
.st-tip { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-soft); flex: 1 1 auto; }
.st-default { margin: 12px 0 0; font-size: 11.5px; color: var(--ink-soft); }
.st-default.is-changed { color: var(--accent-d); font-weight: var(--weight-semibold); }
.st-always { display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px 18px; align-items: baseline; margin-top: 16px;
  padding: 12px 16px; border-radius: 12px; background: var(--neutral-050); font-size: 13px; color: var(--ink-soft); }
.st-always b { color: var(--ink); }
.st-always-t { font-size: 10.5px; font-weight: var(--weight-bold); letter-spacing: .08em; text-transform: uppercase; }
.st-foot-r { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.st-foot .hx-btn[disabled] { opacity: .45; cursor: default; }
@media (max-width: 1100px) { .st-fcards { grid-template-columns: 1fr; } }
/* Settings > Rate limits: labelled number boxes with the unit attached. */
.sr-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sr-card { display: flex; flex-direction: column; gap: 16px; }
.sr-card .st-card-head { margin: 0; }
.sr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sr-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; }
.sr-grid > .sr-field:only-child { grid-column: 1 / -1; }  /* a lone field fills the card */
.sr-label { font-size: 12px; font-weight: var(--weight-semibold); color: var(--ink-soft); }
.sr-box {
  display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--radius-input);
  background: var(--white); overflow: hidden;
  transition: border-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard);
}
.sr-box:focus-within { border-color: var(--border-focus); box-shadow: var(--ring-focus); }
.sr-box.is-changed { border-color: var(--accent); }
.sr-num {
  flex: 1 1 auto; min-width: 0; width: 100%; border: 0; outline: none; background: transparent; padding: 11px 14px;
  font: inherit; font-size: 18px; font-weight: var(--weight-bold); color: var(--ink); font-variant-numeric: tabular-nums;
  -moz-appearance: textfield; appearance: textfield;
}
.sr-num::-webkit-outer-spin-button, .sr-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sr-unit {
  display: flex; align-items: center; padding: 0 14px; background: var(--neutral-050); border-left: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-soft); white-space: nowrap;
}
.sr-def { min-height: 16px; font-size: 11.5px; color: var(--ink-soft); }
.sr-grid.sr-stack { grid-template-columns: 1fr; gap: 6px; }
.st-card > .sr-grid { margin-bottom: 14px; }
.sr-field .select2-container { width: 100% !important; }
.sr-field .sr-sel { width: 100%; }
.sr-def.is-changed { color: var(--accent-d); font-weight: var(--weight-semibold); }
@media (max-width: 1100px) { .sr-cards { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .sr-grid { grid-template-columns: 1fr; } }

@media (max-width: 760px) { .st-always { grid-template-columns: 1fr; } }
.st-help code { font-size: 11.5px; }
.st-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 24px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--ink-soft); }
.st-foot.inline { padding: 16px 0 0; border-top: 0; justify-content: flex-end; }
.st-inherit { color: var(--ink-soft); }
.st-actions { display: flex; gap: 8px; justify-content: flex-end; }
.st-actions form { margin: 0; }
.st-lead { margin: 0 0 14px; font-size: 13px; color: var(--ink-soft); }
.st-batch-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 960px) {
  .st-cols { grid-template-columns: 1fr; }
  .st-batch-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .st-batch-grid { grid-template-columns: 1fr; }
}

/* ---------- QRTrust: Code lookup search ---------- */
.lk-search {
  padding: 22px 24px 18px;
}
.lk-search label {
  display: block;
  font-size: 13px;
  font-weight: var(--weight-bold);
  color: var(--ink);
  margin-bottom: 8px;
}
.lk-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 5px 5px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--white);
  transition: border-color var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard);
}
.lk-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--brand-100);
}
.lk-icon {
  display: inline-flex;
  color: var(--ink-soft);
  flex: 0 0 auto;
}
.lk-icon svg {
  width: 20px;
  height: 20px;
}
.lk-bar:focus-within .lk-icon {
  color: var(--accent);
}
.lk-bar input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 10px 8px;
  font-size: 18px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}
.lk-bar input::placeholder {
  color: var(--ink-soft);
  opacity: 0.55;
  letter-spacing: 0.12em;
}
.lk-count {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: var(--weight-bold);
  color: var(--ink-soft);
  padding: 0 6px;
  white-space: nowrap;
}
.lk-count.ok {
  color: var(--good-ink);
}
.lk-count.bad {
  color: var(--state-danger);
}
.lk-clear {
  display: inline-flex;
  padding: 6px;
  border-radius: 50%;
  color: var(--ink-soft);
}
.lk-clear:hover {
  background: var(--line-soft);
  color: var(--ink);
}
.lk-clear svg {
  width: 16px;
  height: 16px;
}
.lk-bar .hx-btn {
  flex: 0 0 auto;
  padding-left: 22px;
  padding-right: 22px;
}
.lk-hint {
  margin: 10px 0 0 4px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.lk-hint b {
  color: var(--ink);
}
.lk-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.lk-guide > div {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1.5px dashed var(--line);
}
.lk-guide strong {
  display: block;
  font-size: 14px;
  margin: 10px 0 4px;
}
.lk-guide > div > span:last-child {
  display: block;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.lk-guide-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-050);
  color: var(--accent);
}
.lk-guide-icon svg {
  width: 18px;
  height: 18px;
}
@media (max-width: 760px) {
  .lk-guide {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .lk-count {
    display: none;
  }
  .lk-bar .hx-btn {
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* ---------- QRTrust: Code lookup scan history ---------- */
.sh-panel .hx-panel-head {
  flex-wrap: wrap;
  gap: 10px;
}
.sh-panel .hx-panel-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.sh-filter {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--line-soft);
}
.sh-filter button {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 12.5px;
  font-weight: var(--weight-semibold);
  color: var(--ink-soft);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.sh-filter button b {
  margin-left: 4px;
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
}
.sh-filter button:hover {
  color: var(--ink);
}
.sh-filter button.on {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.sh-table th.r,
.sh-table td.r {
  text-align: right;
}
.sh-table tbody td {
  padding-top: 12px;
  padding-bottom: 12px;
  vertical-align: top;
}
.sh-table tbody tr.sh-day td {
  padding: 16px 20px 6px;
  font-size: 11px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}
.sh-table tbody tr.sh-day:hover {
  background: transparent;
}
.sh-table tbody tr.sh-day + tr td {
  border-top: none;
}
.sh-table .sh-time {
  position: relative;
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  padding-left: 24px;
}
.sh-table .sh-time::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--line);
}
.sh-row.ok .sh-time::before { background: var(--good-ink); }
.sh-row.info .sh-time::before { background: var(--info-ink); }
.sh-row.warn .sh-time::before { background: var(--warn-ink); }
.sh-row.bad .sh-time::before { background: var(--state-danger); }
.sh-table .sh-date {
  display: none;
  font-family: var(--font-ui);
  font-size: 11.5px;
  color: var(--ink-soft);
}
.sh-table.dt-sorted .sh-date {   /* sorted: the day lines are gone, so each row shows its date */
  display: block;
}
.sh-ch {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: var(--weight-semibold);
}
.sh-ch svg {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex: 0 0 auto;
  color: var(--ink-soft);
}
.sh-ch small,
.sh-member {
  display: block;
  font-size: 12px;
  font-weight: normal;
  color: var(--ink-soft);
}
.sh-who {
  font-weight: var(--weight-semibold);
}
.sh-sub {
  margin-top: 5px;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11.5px;
  font-weight: normal;
  color: var(--ink-soft);
}
.sh-ip {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
}
.sh-no {
  font-family: var(--font-mono);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
}
.sh-none {
  color: var(--ink-soft);
  opacity: 0.6;
}

/* ---------- Select2 (views/_select2.php) ----------
   The dropdown is appended to <body>, outside .hx, so only :root tokens are used here. */
.select2-container {
  font-family: var(--font-ui);
  font-size: 14px;
}
.select2-container--default .select2-selection--single {
  height: auto;
  min-height: 47px;
  display: flex;
  align-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-input);
  background: var(--white);
  transition: border-color var(--dur-fast) var(--ease-standard),
    box-shadow var(--dur-fast) var(--ease-standard);
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  flex: 1 1 auto;
  padding: 0 40px 0 14px;
  line-height: 1.4;
  color: var(--text-strong);
}
.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: var(--text-muted);
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  top: 0;
  right: 12px;
  width: 18px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.select2-container--default .select2-selection--single .select2-selection__arrow b {
  position: static;
  margin: 0;
  width: 8px;
  height: 8px;
  border: solid var(--text-muted);
  border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--dur-fast) var(--ease-standard);
}
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
  border-color: var(--brand-primary);
  border-width: 0 2px 2px 0;
  transform: translateY(2px) rotate(-135deg);
}
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--ring-focus);
}
.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,
.select2-container--default.select2-container--open.select2-container--above .select2-selection--single {
  border-radius: var(--radius-input);
}
.select2-container--default.select2-container--disabled .select2-selection--single {
  background: var(--neutral-050);
  cursor: not-allowed;
}

/* Compact variant: DataTables "entries" and the inline Settings sentence. */
.select2-container.hx-s2-sm .select2-selection--single {
  min-height: 38px;
}
.select2-container.hx-s2-sm .select2-selection--single .select2-selection__rendered {
  padding: 0 34px 0 12px;
  font-size: 13.5px;
  font-weight: var(--weight-semibold);
}
.st-sentence .select2-container.hx-s2-sm .select2-selection--single .select2-selection__rendered {
  font-size: 15px;
}
.select2-container.hx-s2-sm .select2-selection--single .select2-selection__arrow {
  right: 10px;
}
.dt-length .select2-container {
  margin: 0 6px;
  vertical-align: middle;
}

/* Dropdown panel */
.select2-dropdown {
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-raised);
  overflow: hidden;
  background: var(--white);
}
.select2-container--open .select2-dropdown--below {
  margin-top: 6px;
}
.select2-container--open .select2-dropdown--above {
  margin-top: -6px;
}
.select2-search--dropdown {
  position: relative;
  padding: 8px 8px 4px;
}
.select2-search--dropdown::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  background: var(--text-muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px 8px 32px;
  font: inherit;
  outline: none;
}
.select2-container--default .select2-search--dropdown .select2-search__field:focus {
  border-color: var(--border-focus);
  box-shadow: var(--ring-focus);
}
.select2-container--default .select2-results > .select2-results__options {
  max-height: 280px;
  padding: 4px;
}
.select2-container--default .select2-results__option {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-strong);
}
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background: var(--neutral-050);
  color: var(--text-strong);
}
.select2-container--default .select2-results__option--selected {
  background: var(--brand-050);
  color: var(--brand-primary-hover, var(--brand-primary));
  font-weight: var(--weight-semibold);
}
.select2-container--default .select2-results__option--selected.select2-results__option--highlighted {
  background: var(--brand-100);
}
.select2-results__message {
  color: var(--text-muted);
}

/* ---------- Date-range picker (views/_daterange.php) ----------
   The panel is portalled to <body>, outside .hx, so only :root tokens are used for it. */
.lg-grid .lg-dates {
  grid-column: span 2;
}
.hx-drp {
  position: relative;
}
.hx-drp-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 47px;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}
.hx-drp-trigger:hover {
  border-color: var(--border-focus);
}
.hx-drp-trigger[aria-expanded="true"] {
  border-color: var(--border-focus);
  box-shadow: var(--ring-focus);
}
.hx-drp-trigger svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--ink-soft);
}
.hx-drp-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.hx-drp-trigger.is-empty span {
  color: var(--ink-soft);
}

.hx-drp-pop[hidden] {
  display: none;
}
.hx-drp-pop {
  position: fixed;
  z-index: 1060;
  display: flex;
  font-family: var(--font-ui);
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-raised);
}
.hx-drp-pop button {
  font: inherit;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.hx-drp-pop button:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 1px;
}
.hx-drp-cals {
  padding: 14px 16px 12px;
}
.hx-drp-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}
.hx-drp-nav button {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  line-height: 1;
  color: var(--text-muted);
}
.hx-drp-nav button:hover {
  background: var(--neutral-050);
  color: var(--text-strong);
}
.hx-drp-title {
  flex: 1;
  display: flex;
  gap: 20px;
}
.hx-drp-title span {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: var(--weight-bold);
  color: var(--text-strong);
}
.hx-drp-grids {
  display: flex;
  gap: 20px;
}
.hx-drp-grid {
  display: grid;
  grid-template-columns: repeat(7, 34px);
  row-gap: 2px;
}
.hx-drp-dow {
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: var(--weight-bold);
  color: var(--text-muted);
}
.hx-drp-pop .hx-drp-day {
  height: 32px;
  padding: 0;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}
.hx-drp-pop .hx-drp-day:hover {
  background: var(--neutral-100);
}
.hx-drp-pop .hx-drp-day.is-out {
  color: var(--border-subtle);
  pointer-events: none;
}
.hx-drp-pop .hx-drp-day.is-today {
  box-shadow: inset 0 0 0 1px var(--brand-primary);
}
.hx-drp-pop .hx-drp-day.is-in {
  background: var(--brand-100);
  color: var(--brand-primary-hover, var(--brand-primary));
  border-radius: 0;
}
.hx-drp-pop .hx-drp-day.is-end {
  background: var(--brand-primary);
  color: var(--white);
  font-weight: var(--weight-bold);
}
.hx-drp-pop .hx-drp-day.is-lo { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.hx-drp-pop .hx-drp-day.is-hi { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.hx-drp-pop .hx-drp-day.is-lo.is-hi { border-radius: var(--radius-sm); }
.hx-drp-hint {
  margin: 8px 2px 0;
  font-size: 12px;
  color: var(--text-muted);
}
.hx-drp-presets {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 150px;
  padding: 14px;
  border-left: 1px solid var(--border-subtle);
  background: var(--neutral-050);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.hx-drp-presets button {
  text-align: left;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: var(--weight-semibold);
  color: var(--text-strong);
}
.hx-drp-presets button:hover {
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--border-subtle);
}
.hx-drp-presets button.is-active {
  background: var(--brand-primary);
  color: var(--white);
  box-shadow: none;
}
@media (max-width: 760px) {
  .hx-drp-grids > :last-child,
  .hx-drp-title span:last-child {
    display: none;
  }
}
@media (max-width: 520px) {
  .hx-drp-pop {
    flex-direction: column;
  }
  .hx-drp-presets {
    flex-direction: row;
    flex-wrap: wrap;
    border-left: 0;
    border-top: 1px solid var(--border-subtle);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
  }
}

/* ---------- Users module (views/users) ---------- */
.us-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.us-stats > div {
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.us-stats strong {
  display: block;
  font-size: 26px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.us-stats span {
  font-size: 12.5px;
  color: var(--ink-soft);
}
.us-toolbar {
  flex-wrap: wrap;
}
.us-filter {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--line-soft);
}
.us-filter button {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 12.5px;
  font-weight: var(--weight-semibold);
  color: var(--ink-soft);
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.us-filter button b {
  margin-left: 4px;
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
}
.us-filter button:hover {
  color: var(--ink);
}
.us-filter button.on {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.us-search {
  min-width: 240px;
  font-family: var(--font-ui);
}
.us-table th.r,
.us-table td.r {
  text-align: right;
}
.us-who {
  display: flex;
  align-items: center;
  gap: 12px;
}
.us-who strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: var(--weight-semibold);
}
.us-who .hx-mono {
  font-size: 12px;
  font-weight: normal;
  color: var(--ink-soft);
}
.us-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: var(--weight-bold);
  background: var(--neutral-100);
  color: var(--neutral-700);
}
.us-avatar.it {
  background: var(--brand-050);
  color: var(--accent-d);
  box-shadow: inset 0 0 0 1.5px var(--brand-100);
}
.hx-chip.us-you {
  height: 20px;
  padding: 0 8px;
  font-size: 10.5px;
  background: var(--brand-050);
  color: var(--accent-d);
}
.us-off .us-who,
.us-off .us-date {
  opacity: 0.55;
}
.us-date {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.us-date small {
  display: block;
  font-size: 12px;
  color: var(--ink-soft);
}
.us-never {
  font-size: 13px;
  color: var(--ink-soft);
  font-style: italic;
}
.us-actions {
  display: inline-flex;
  gap: 6px;
  justify-content: flex-end;
}
.us-actions form {
  margin: 0;
}
.hx-btn.us-deact {
  color: var(--state-danger);
}
.hx-btn.us-deact:hover {
  background: var(--red-100);
  border-color: transparent;
}

/* Form */
.us-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.us-layout:has(.us-side) {
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
}
.us-side {
  display: grid;
  gap: 20px;
}
.us-side .hx-panel,
.us-layout > .hx-panel {
  margin: 0;
}
/* Edit user: both columns end at the same line, and each form's buttons sit at its bottom. */
.us-layout:has(.us-side) {
  align-items: stretch;
}
.us-side {
  grid-template-rows: auto 1fr;
}
.us-layout > .us-form,
.us-side > .us-form {
  display: flex;
  flex-direction: column;
}
.us-layout > .us-form > .hx-panel-body,
.us-side > .us-form > .hx-panel-body {
  flex: 1 1 auto;
}
.us-help {
  font-size: 12px;
  color: var(--ink-soft);
}
.us-roles {
  border: 0;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.us-roles legend {
  padding: 0;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.us-role {
  display: flex;
  flex-direction: row;   /* app.css makes every label a column */
  gap: 10px;
  color: var(--ink);
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-standard), background var(--dur-fast) var(--ease-standard);
}
.us-role:hover {
  border-color: var(--neutral-300, #ccc);
}
.us-role:has(input:checked) {
  border-color: var(--accent);
  background: var(--brand-050);
}
.us-roles[disabled] .us-role {
  cursor: not-allowed;
  opacity: 0.7;
}
.us-role input {
  flex: 0 0 auto;
  width: auto;
  margin-top: 3px;
  accent-color: var(--accent);
}
.us-role strong,
.us-switch strong {
  display: block;
  font-size: 14px;
}
.us-role small,
.us-switch small {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.us-switch {
  display: flex;
  flex-direction: row;
  color: var(--ink);
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
  cursor: pointer;
}
.us-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.us-switch-ui {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 22px;
  margin-top: 1px;
  border-radius: var(--radius-pill);
  background: var(--neutral-300, #ccc);
  transition: background var(--dur-fast) var(--ease-standard);
}
.us-switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform var(--dur-fast) var(--ease-standard);
}
.us-switch input:checked + .us-switch-ui {
  background: var(--good-ink);
}
.us-switch input:checked + .us-switch-ui::after {
  transform: translateX(18px);
}
.us-switch input:focus-visible + .us-switch-ui {
  box-shadow: var(--ring-focus);
}
.us-switch input:disabled ~ * {
  opacity: 0.6;
  cursor: not-allowed;
}
.us-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.us-section h3 {
  margin: 0 0 12px;
  font-size: 14px;
}
.us-pw {
  position: relative;
}
.us-pw .hx-input {
  padding-right: 44px;
}
.us-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  padding: 7px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}
.us-eye:hover,
.us-eye.on {
  color: var(--accent);
}
.us-eye svg {
  width: 17px;
  height: 17px;
}
.us-pw-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.us-pw-hint {
  margin: 0;
  font-size: 12px;
  color: var(--ink-soft);
}
.us-pw-hint .ok {
  color: var(--good-ink);
  font-weight: var(--weight-semibold);
}
.us-pw-hint .bad {
  color: var(--state-danger);
  font-weight: var(--weight-semibold);
}
.us-pw-panel .hx-grid2 {
  grid-template-columns: 1fr;
  gap: 12px;
}
.us-pw-panel .us-pw-foot {
  flex-direction: column;
  align-items: stretch;
}
.us-pw-panel .us-pw-foot .hx-btn {
  justify-content: center;
}
.us-form-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
}
.us-meta dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 16px;
  margin: 0;
  font-size: 13.5px;
}
.us-meta dt {
  color: var(--ink-soft);
}
.us-meta dd {
  margin: 0;
  text-align: right;
}
@media (max-width: 860px) {
  .us-layout:has(.us-side) {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 600px) {
  .us-stats,
  .us-roles {
    grid-template-columns: 1fr;
  }
  .us-search {
    min-width: 0;
    width: 100%;
  }
}

/* ---------- QRTrust: scan flows (design r4) ---------- */
.fl-types {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 6px;
}
/* Flow list "Sends to": icon tile, app name or host, path, then store / vendor chips. */
.fl-to {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 260px;
  max-width: 420px;
}
.fl-to-ico {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fl-to-ico svg {
  width: 18px;
  height: 18px;
}
.fl-to-ico.is-app {
  background: var(--brand-050);
  color: var(--brand-600);
}
.fl-to-ico.is-site {
  background: var(--neutral-100);
  color: var(--ink);
}
.fl-to-ico.is-page {
  background: var(--good-bg);
  color: var(--good-ink);
}
.fl-to-body {
  min-width: 0;
  flex: 1;
}
.fl-to-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.fl-to-head b,
.fl-to-body > b {
  font-size: 14px;
  font-weight: var(--weight-bold);
  color: var(--ink);
  overflow-wrap: anywhere;
}
.fl-to-kind {
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: var(--neutral-100);
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: var(--weight-bold);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.fl-to-sub {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.fl-to-url {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-soft);
  word-break: break-all;
  white-space: normal;   /* table cells are nowrap: let the address wrap, then clamp */
  /* a long address stops at two lines with "..." (the full URL is in the hover title) */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fl-to-ph {
  display: inline-block;
  padding: 0 5px;
  border-radius: 5px;
  background: var(--brand-050);
  color: var(--brand-600);
  font-weight: var(--weight-bold);
}
.fl-to-ph::before { content: "{"; opacity: .5; }
.fl-to-ph::after { content: "}"; opacity: .5; }
.fl-to-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.fl-to-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--white);
  font-size: 12px;
  font-weight: var(--weight-semibold);
  color: var(--ink);
  white-space: nowrap;
  text-decoration: none;
}
.fl-to-chip svg {
  width: 13px;
  height: 13px;
  color: var(--ink-soft);
}
a.fl-to-chip:hover {
  border-color: var(--accent);
  color: var(--brand-600);
}
.fl-to-chip.is-warn {
  border-color: transparent;
  background: var(--warn-bg);
  color: var(--warn-ink);
}
.fl-to-chip.is-warn svg {
  color: currentColor;
}
.fl-target[hidden],
.fl-dest[hidden],
.fl-warn[hidden] {
  display: none;
}

/* Mode cards: icon, text, and the route a scan takes. */
.fl-types .fl-type {
  position: relative;
  padding: 14px 14px 12px;
  gap: 10px;
  transition: border-color .15s, background .15s;
}
.fl-types .fl-type:hover {
  border-color: var(--neutral-300);
}
.fl-types .fl-type:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}
.fl-type input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.fl-type:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.fl-type-ico {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--neutral-100);
  color: var(--ink-soft);
}
.fl-type-ico svg {
  width: 18px;
  height: 18px;
}
.fl-type:has(input:checked) .fl-type-ico {
  background: var(--accent);
  color: var(--white);
}
.fl-type-txt {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  align-self: stretch;
}
.fl-type-txt b {
  font-size: 14px;
  line-height: 1.3;
  margin-bottom: 2px;
}
.fl-type-route {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 10px;
}

/* Section sub-headings inside the form. */
.fl-sub {
  display: flex;
  align-items: baseline;
  gap: 0;
  margin: 26px 0 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: var(--weight-semibold);
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.fl-sub .fl-opt {
  text-transform: none;
  letter-spacing: 0;
}

/* Placeholder chips that insert into the URL. */
.fl-ph {
  display: inline-block;
  padding: 1px 7px;
  margin: 0 1px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
}
.fl-ph:hover {
  border-color: var(--accent);
  color: var(--brand-600);
}
.fl-warn {
  margin: 6px 0 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--warn-bg);
  color: var(--warn-ink);
  font-size: 12.5px;
  line-height: 1.4;
}
.hx-input.is-warn {
  border-color: var(--warn-ink);
}

/* What the app button will look like on the genuine page. */
.fl-btn-demo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 16px;
  border: 1px dashed var(--neutral-300);
  border-radius: 12px;
  background: var(--neutral-050);
}
.fl-btn-mock {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--white);
  font-size: 14px;
  font-weight: var(--weight-semibold);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Live "example scan" route. */
.fl-flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  gap: 6px;
}
.fl-flow > li:not(.fl-flow-next) {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--neutral-050);
}
.fl-flow-next {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  color: var(--neutral-400);
}
.fl-flow-next svg {
  width: 16px;
  height: 16px;
}
.fl-flow-ico {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
}
.fl-flow-ico svg {
  width: 16px;
  height: 16px;
}
.fl-flow > li:last-child .fl-flow-ico {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}
.fl-flow-txt {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.fl-flow-txt b {
  font-size: 13.5px;
  color: var(--ink);
}
.fl-flow-txt small {
  font-size: 12px;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fl-flow-txt small.is-muted {
  font-style: italic;
}
.fl-dest {
  display: flex;
  gap: 8px;
  margin: 8px 0 0;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-soft);
}
.fl-dest .hx-mono {
  color: var(--ink);
  word-break: break-all;
}
@media (max-width: 760px) {
  .fl-flow {
    flex-direction: column;
  }
  .fl-flow-next svg {
    transform: rotate(90deg);
  }
  .fl-flow-next {
    justify-content: center;
  }
}
.hx-kv .cell.lk-link {
  grid-column: 1 / -1;
}
/* .hx-kv .cell span is the cell label (block, muted); route chips are spans too. */
.hx-kv .cell.lk-flow .hx-route {
  display: flex;
  margin-bottom: 6px;
}
.hx-kv .cell.lk-flow .hx-route span {
  margin: 0;
  letter-spacing: normal;
}
.hx-kv .cell.lk-flow .hx-route .hx-route-seg {
  display: inline-flex;
}
.hx-kv .cell.lk-flow .hx-route .hx-route-step {
  display: inline-flex;
  font-size: 11.5px;
  color: var(--ink);
}
.hx-kv .cell.lk-flow .hx-route .hx-route-step.is-check {
  color: var(--good-ink);
}
.hx-kv .cell.lk-flow .hx-route .hx-route-arrow {
  display: inline;
  font-size: 14px;
}
.hx-kv .cell.lk-flow .qt-meta {
  display: block;
  font-weight: 400;
}
.hx-kv .cell.lk-link strong.mono {
  font-size: 13px;
  word-break: break-all;
}

/* ---------- QRTrust: new API client ---------- */
.nc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.nc-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--ink-soft);
}
.nc-type {
  margin-top: 20px;
}
.nc-cards {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin: 6px 0 0;
}
.nc-cards .qt-mode {
  padding: 14px 16px;
}
.nc-cards b {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}
.nc-cards .nc-ico {
  width: 18px;
  height: 18px;
  color: var(--accent);
}
.nc-cards small {
  margin-top: 4px;
}
.nc-scopes {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.nc-scopes code {
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--zebra);
  color: var(--ink);
}
/* Entity + legacy cards sit on the same 3-column rhythm as the vendor cards above. */
.nc-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 8px;
}
.nc-row .nc-span2 {
  grid-column: span 2;
}
.nc-cards.nc-cards-2 {
  grid-template-columns: 1fr 1fr;
}
.nc-row .qt-modes {
  margin-bottom: 0;
}
.nc-row .qt-mode {
  height: 100%;
}
.nc-cards b .hx-mono {
  font-size: 13px;
}
.nc-form .st-foot .hx-btn svg {
  width: 16px;
  height: 16px;
}
@media (max-width: 720px) {
  .nc-grid { grid-template-columns: 1fr; }
  .nc-row,
  .nc-cards.nc-cards-2 { grid-template-columns: 1fr; }
  .nc-row .nc-span2 { grid-column: auto; }
}

/* ---------- QRTrust > API Docs: the guide in a framed panel ---------- */
.dc-frame {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.dc-frame iframe {
  display: block;
  width: 100%;
  height: calc(100vh - 220px);
  min-height: 560px;
  border: 0;
}
.dc-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}
.dc-note a { margin-left: 6px; }

/* Elements styled with display: flex/inline-flex still honour the hidden attribute. */
.hx-link[hidden],
.hx-btn[hidden] {
  display: none;
}

/* ---------------------------------------------- QRTrust > Batch > Release --- */
.rl-intro { padding-top: 14px; padding-bottom: 4px; }
.rl-intro .st-lead { margin: 0; }
.rl-table td { vertical-align: middle; }
.rl-bar { display: inline-block; width: 90px; height: 6px; border-radius: 999px; background: var(--line-soft); overflow: hidden;
  vertical-align: middle; margin-right: 8px; }
.rl-bar span { display: block; height: 100%; background: var(--good-ink); }
.rl-n { font-variant-numeric: tabular-nums; }
.rl-form { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.rl-form .st-num { width: 96px !important; padding-top: 7px; padding-bottom: 7px; }
.rl-history { border-top: 1px solid var(--line-soft); }
.rl-history-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.rl-history-head h3 { margin: 0; font-size: 14px; }
.rl-history-n { font-size: 12.5px; color: var(--ink-soft); }
/* Timeline: newest first, a tick per release joined by a line. */
.rl-tl { list-style: none; margin: 0; padding: 0; }
.rl-tl li { position: relative; display: grid; grid-template-columns: 26px 1fr auto; gap: 14px; align-items: start; padding-bottom: 18px; }
.rl-tl li:last-child { padding-bottom: 0; }
.rl-tl li:not(:last-child)::before { content: ""; position: absolute; left: 12px; top: 28px; bottom: 2px; width: 2px;
  background: var(--line-soft); border-radius: 2px; }
.rl-tl-dot { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--good-bg); color: var(--good-ink); }
.rl-tl-dot svg { width: 14px; height: 14px; }
.rl-tl-what { font-size: 14px; line-height: 26px; }
.rl-tl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.rl-tl-tag { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--neutral-050, #f4f4f4); color: var(--ink); }
.rl-tl-tag.soft { background: transparent; border: 1px solid var(--line-soft); color: var(--ink-soft); }
.rl-tl-when { padding-top: 4px; }
@media (max-width: 760px) {
  .rl-tl li { grid-template-columns: 26px 1fr; }
  .rl-tl-when { grid-column: 2; text-align: left; padding-top: 0; }
  .rl-tl-when .hx-stamp.stack { align-items: flex-start; }
  .rl-tl-when .hx-stamp.stack time, .rl-tl-when .hx-stamp.stack .hx-stamp-by { justify-content: flex-start; }
}

/* ------------------------------------------------------- access denied --- */
.dn-card { max-width: 560px; margin: 48px auto; padding: 36px 32px; text-align: center; }
.dn-card h1 { margin: 14px 0 10px; font-size: 22px; }
.dn-card p { margin: 0 0 8px; color: var(--ink); line-height: 1.55; }
.dn-card .dn-sub { color: var(--ink-soft); font-size: 13.5px; margin-bottom: 20px; }
.dn-icon { width: 56px; height: 56px; margin: 0 auto; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  background: var(--brand-050); color: var(--accent-d); }
.dn-icon svg { width: 26px; height: 26px; }
.us-role small.us-role-n { margin-top: 6px; font-weight: var(--weight-semibold); color: var(--accent-d); }

/* ------------------------------------------------------------ Users > Roles --- */
.rl-roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rl-role { margin: 0; display: flex; flex-direction: column; border-top: 3px solid var(--line); }
.rl-role.is-admin { border-top-color: var(--accent); }
.rl-role-head { display: flex; justify-content: space-between; gap: 16px; padding: 18px 22px 12px; }
.rl-role-head h2 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.rl-role-head p { margin: 4px 0 0; font-size: 13px; color: var(--ink-soft); }
.rl-role-n { text-align: right; flex: 0 0 auto; }
.rl-role-n strong { display: block; font-size: 22px; line-height: 1.1; }
.rl-role-n span { font-size: 11.5px; color: var(--ink-soft); }
.rl-role-perms { padding: 0 22px 14px; flex: 1 1 auto; display: grid; gap: 8px; align-content: start; }
.rl-perm-group { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.rl-perm-g { font-size: 10.5px; font-weight: var(--weight-bold); letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-soft); margin-right: 4px; min-width: 120px; }
.rl-perm { font-size: 12px; padding: 3px 9px; border-radius: var(--radius-pill); background: var(--neutral-050, #f4f4f4); color: var(--ink); }
.rl-perm.all { background: var(--brand-050); color: var(--accent-d); font-weight: var(--weight-semibold); }
.rl-role-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 22px; border-top: 1px solid var(--line-soft); }
.rl-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rl-group { border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 10px 16px 12px; margin: 0; min-width: 0; }
.rl-group legend { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 0;
  font-size: 11px; font-weight: var(--weight-bold); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.rl-group legend span { padding: 0 6px 0 0; background: var(--white); }
.rl-all { border: 0; background: none; font: inherit; font-size: 12px; text-transform: none; letter-spacing: 0; cursor: pointer; padding: 0 0 0 6px; }
.rl-perm-row { display: flex; flex-direction: row; gap: 10px; align-items: flex-start; padding: 8px 0; color: var(--ink);
  border-top: 1px solid var(--line-soft); cursor: pointer; }
.rl-perm-row:first-of-type { border-top: 0; }
.rl-perm-row input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex: 0 0 auto; }
.rl-perm-row strong { display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
.rl-perm-row small { display: block; font-size: 12px; color: var(--ink-soft); line-height: 1.45; margin-top: 2px; }
.rl-perm-row.is-forced { opacity: .75; }
.rl-group[disabled] .rl-perm-row { cursor: default; }
.rl-sens { font-size: 10px; font-weight: var(--weight-bold); letter-spacing: .05em; text-transform: uppercase; padding: 1px 6px;
  border-radius: var(--radius-pill); background: var(--warn-bg); color: var(--warn-ink); }
@media (max-width: 960px) { .rl-roles, .rl-groups { grid-template-columns: 1fr; } }

/* Batch › Page after scan: what a scan does, as step pills (Genuine check › Continue). */
/* ------------------------------------------- flow route (hx_flow_route) --- */
/* What a scan does under a flow type: the same chips on every page that shows one. */
.hx-route { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; vertical-align: middle; }
.hx-route-step { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface, #fff); font-size: 12.5px; font-weight: var(--weight-bold);
  white-space: nowrap; color: var(--ink); }
.hx-route-step.is-check { border-color: transparent; background: var(--good-bg); color: var(--good-ink); }
.hx-route-arrow { color: var(--ink-soft); font-size: 16px; line-height: 1; }
.hx-route-seg { display: inline-flex; align-items: center; gap: inherit; }
.hx-table .hx-route { flex-wrap: nowrap; }
.hx-route.sm { gap: 4px; }
.hx-route.sm .hx-route-step { height: 22px; padding: 0 9px; font-size: 11.5px; }
.hx-route.sm .hx-route-arrow { font-size: 14px; }
.hx-route + .qt-meta, .qt-meta + .hx-route { margin-top: 4px; }
.qt-meta + .hx-route { display: flex; width: max-content; max-width: 100%; }

/* ------------------------------------------------- change stamps (hx_stamp) --- */
/* calendar + date, clock + time, person + user; the same on every "changed by" line. */
.hx-stamp { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12.5px; line-height: 1.4;
  color: var(--ink-soft); vertical-align: middle; }
.hx-stamp time, .hx-stamp-by { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.hx-stamp time { color: var(--ink); font-variant-numeric: tabular-nums; }
.hx-stamp time svg:nth-of-type(2) { margin-left: 7px; }
.hx-stamp svg { width: 14px; height: 14px; flex: 0 0 auto; color: var(--ink-soft); }
.hx-stamp.stack { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 13px; }
.hx-stamp.stack .hx-stamp-by { font-size: 12px; }
.hx-stamp-row { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.qt-meta.hx-stamp-row { display: flex; flex-wrap: nowrap; white-space: nowrap; }
.qt-meta.hx-stamp-row .hx-stamp { flex-wrap: nowrap; }

/* Flow list "Used by": one small link per kind, each opening the list behind the number. */
.fl-use { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.fl-use-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 12px; border-radius: var(--radius-pill);
  background: var(--neutral-050); border: 1px solid var(--line-soft); color: var(--ink); font-size: 13px; text-decoration: none; white-space: nowrap; }
.fl-use-chip b { font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }
.fl-use-chip svg { width: 14px; height: 14px; color: var(--ink-soft); }
.fl-use-chip:hover { background: var(--brand-050); border-color: var(--accent-d); color: var(--accent-d); }
.fl-use-chip:hover svg { color: var(--accent-d); }
.fl-use-else { font-size: 12px; color: var(--ink-soft); }
.fl-used-sec + .fl-used-sec { margin-top: 20px; }
.fl-used-sec h3 { margin: 0 0 8px; font-size: 15px; }

/* ---------------------------------------------------- Product (masteritem) list --- */
.mi-table th.r,
.mi-table td.r {
  text-align: right;
}
.mi-table td.mi-name {
  min-width: 260px;
}
.mi-table .us-off td.code,
.mi-table .us-off td.mi-name {
  opacity: 0.55;
}
.mi-table .hx-stamp.stack {
  white-space: nowrap;
}

/* ---------------------------------------------- History (qrgen) list + batch --- */
.hs-table th.r,
.hs-table td.r,
.qg-files th.r,
.qg-files td.r {
  text-align: right;
}
.hs-table .hx-stamp.stack {
  white-space: nowrap;
}
.qg-files td.code {
  white-space: nowrap;
}
.qg-head {
  flex-wrap: wrap;
}
.qg-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
/* A stacked stamp inside a table cell lines up with the column, not the right edge. */
.hx-table td .hx-stamp.stack {
  align-items: flex-start;
}
/* hx_stamp() inside a summary cell: its spans are not cell labels. */
.hx-kv .cell .hx-stamp span {
  display: inline;
  margin: 0;
  font-size: inherit;
  color: inherit;
  font-weight: inherit;
}
.hx-kv .cell .hx-stamp {
  font-size: 14px;
  font-weight: var(--weight-semibold);
}
.hx-kv .cell .hx-stamp .hx-stamp-by {
  display: inline-flex;
  gap: 5px;
  margin-left: 6px;
  font-weight: var(--weight-medium, 500);
  color: var(--ink-soft);
}
