/* antiruptura.css — Styles specific to the Anti-ruptura module.
   Reuses existing tokens and component classes from app.css whenever possible. */

/* ============ Role switcher (mock-only) ============ */
.ar-role-switcher {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 12px 24px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ar-role-switcher-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-3);
}
.ar-role-btn {
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--fg-2);
  cursor: pointer;
  font-family: inherit;
  transition: all 140ms ease;
}
.ar-role-btn:hover { border-color: var(--shopper-navy); color: var(--fg-1); }
.ar-role-btn.active {
  background: var(--shopper-navy);
  border-color: var(--shopper-navy);
  color: #fff;
}

/* ============ Top context strip (run meta) ============ */
.ar-meta-strip {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 8px 24px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--fg-3);
}
.ar-meta-strip strong { color: var(--fg-1); font-weight: 700; }
.ar-meta-strip .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--fg-4, #9ca3af); }

/* ============ Risk pill ============ */
.risk-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.risk-pill.critico  { background: rgba(208,31,49,0.10);  color: var(--color-danger); }
.risk-pill.alto     { background: rgba(247,128,34,0.14); color: #B0570B; }
.risk-pill.medio    { background: rgba(196,113,26,0.10); color: #8a4f0a; }
.risk-pill.baixo    { background: rgba(1,188,110,0.12);  color: #07734A; }

/* ============ Status pill (item execution) ============ */
.ar-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.ar-status-pill.neutral { background: var(--bg-3); color: var(--fg-2); }
.ar-status-pill.warn    { background: rgba(247,128,34,0.14); color: #B0570B; }
.ar-status-pill.ok      { background: rgba(1,188,110,0.12);  color: #07734A; }
.ar-status-pill.bad     { background: rgba(208,31,49,0.10);  color: var(--color-danger); }
.ar-status-dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}

/* ============ Score chip (numeric) ============ */
.ar-score {
  font-family: var(--font-numeric);
  font-weight: 800;
  font-size: 13px;
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
  min-width: 32px;
  text-align: center;
}
.ar-score.bad  { background: rgba(208,31,49,0.10);  color: var(--color-danger); }
.ar-score.warn { background: rgba(247,128,34,0.14); color: #B0570B; }
.ar-score.ok   { background: rgba(1,188,110,0.12);  color: #07734A; }

/* ============ MOBILE OPERATOR (Tela 1) ============ */
.ar-mobile-shell {
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 16px 100px;
}

/* ── Operator continuous-flow header ─────────────────────────────────── */
.ar-op-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.ar-op-head > :first-child { flex: 1; min-width: 0; }
.ar-op-head-eyebrow {
  font-size: 11px;
  font-weight: 800;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.ar-op-head-progress {
  display: flex; align-items: center; gap: 10px;
}
.ar-op-head-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-3);
  border-radius: 999px;
  overflow: hidden;
}
.ar-op-head-progress-bar-fill {
  height: 100%; background: var(--shopper-green); border-radius: 999px;
  transition: width 320ms ease;
}
.ar-op-head-progress-num {
  font-family: var(--font-numeric);
  font-size: 12px;
  font-weight: 800;
  color: var(--fg-2);
}
.ar-op-list-btn {
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--fg-2);
  cursor: pointer;
  font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
  align-self: flex-end;
}
.ar-op-list-btn:hover { border-color: var(--shopper-navy); color: var(--fg-1); }

/* ── Operator done state ─────────────────────────────────────────────── */
.ar-op-done {
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: 16px;
  padding: 40px 24px 30px;
  text-align: center;
  margin-top: 16px;
}
.ar-op-done-check {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--shopper-green);
  color: #fff;
  display: grid; place-items: center;
  margin: 0 auto 16px;
}
.ar-op-done-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--fg-1);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.ar-op-done-sub {
  font-size: 14px;
  color: var(--fg-3);
  margin: 0;
}

/* ── Operator list sheet (bottom modal) ──────────────────────────────── */
.ar-sheet-overlay {
  position: fixed; inset: 0;
  background: rgba(0,45,98,0.4);
  z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
  animation: ar-sheet-fade 180ms ease;
}
@keyframes ar-sheet-fade {
  from { opacity: 0; } to { opacity: 1; }
}
.ar-sheet {
  background: var(--bg-1);
  width: 100%;
  max-width: 440px;
  max-height: 85vh;
  border-radius: 18px 18px 0 0;
  display: flex; flex-direction: column;
  animation: ar-sheet-up 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 -8px 32px rgba(0,45,98,0.18);
}
@keyframes ar-sheet-up {
  from { transform: translateY(100%); } to { transform: translateY(0); }
}
.ar-sheet-handle {
  width: 40px; height: 4px;
  background: var(--border-2, #d1d5db);
  border-radius: 999px;
  margin: 10px auto 6px;
}
.ar-sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px 12px;
  border-bottom: 1px solid var(--border-1);
}
.ar-sheet-title {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
  color: var(--fg-1);
}
.ar-sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 24px;
}
.ar-mobile-item-card.current {
  border-color: var(--shopper-navy);
  box-shadow: 0 0 0 2px rgba(0,45,98,0.10);
}
.ar-mobile-item-num {
  /* Make sure current dot shows */
}
.ar-mobile-item-card.current .ar-mobile-item-num {
  background: var(--shopper-navy);
  color: #fff;
  font-size: 22px; line-height: 1;
}
.ar-mobile-progress {
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.ar-mobile-progress-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 8px;
}
.ar-mobile-progress-label {
  font-size: 12px; font-weight: 700; color: var(--fg-3);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.ar-mobile-progress-count {
  font-family: var(--font-numeric);
  font-size: 22px;
  font-weight: 800;
  color: var(--fg-1);
}
.ar-mobile-progress-count small {
  font-size: 13px; color: var(--fg-3); font-weight: 600;
}
.ar-mobile-progress-bar {
  height: 8px; background: var(--bg-3); border-radius: 999px; overflow: hidden;
}
.ar-mobile-progress-bar-fill {
  height: 100%; background: var(--shopper-green); border-radius: 999px;
  transition: width 320ms ease;
}

.ar-mobile-list-title {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--fg-3);
  margin: 0 4px 10px;
}
.ar-mobile-item-card {
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 160ms ease;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ar-mobile-item-card:hover, .ar-mobile-item-card:active {
  border-color: var(--shopper-navy);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.ar-mobile-item-card.done { background: var(--bg-2); opacity: 0.85; }
.ar-mobile-item-num {
  flex-shrink: 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-3); color: var(--fg-2);
  font-family: var(--font-numeric);
  font-weight: 800;
  font-size: 14px;
  display: grid; place-items: center;
}
.ar-mobile-item-num.done { background: var(--shopper-green); color: #fff; }
.ar-mobile-item-num.divergente { background: var(--color-danger); color: #fff; }
.ar-mobile-item-num.em_execucao { background: #C4711A; color: #fff; }
.ar-mobile-item-body { flex: 1; min-width: 0; }
.ar-mobile-item-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--fg-1);
  line-height: 1.3;
  margin-bottom: 3px;
}
.ar-mobile-item-meta {
  font-size: 12px; color: var(--fg-3);
  display: flex; align-items: center; gap: 8px;
}
.ar-mobile-item-meta .sep { color: var(--fg-4, #9ca3af); }
.ar-mobile-item-chev { flex-shrink: 0; color: var(--fg-3); }

/* ── Item detail (Tela 1 — full screen) ────────────────────────────────── */
.ar-mobile-detail {
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 16px 140px;
}
.ar-mobile-detail-back {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none;
  color: var(--fg-2); font-weight: 700; font-size: 13px;
  padding: 8px 0;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 8px;
}
.ar-product-hero {
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: 16px;
  padding: 18px 18px 16px;
  margin-bottom: 14px;
}
.ar-product-name {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--fg-1);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.ar-product-code {
  font-family: var(--font-numeric);
  font-size: 13px;
  color: var(--fg-3);
  font-weight: 600;
}

.ar-section-label {
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 4px 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.ar-section-label-count {
  font-family: var(--font-numeric);
  background: var(--bg-3);
  color: var(--fg-2);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0;
}

.ar-addr-list {
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 18px;
}
.ar-addr-row {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-1);
}
.ar-addr-row:last-child { border-bottom: none; }
.ar-addr-row.scanned { background: rgba(1,188,110,0.06); }
.ar-addr-check {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--border-2, #d1d5db);
  background: var(--bg-1);
  display: grid; place-items: center;
  flex-shrink: 0;
  color: transparent;
  transition: all 120ms ease;
}
.ar-addr-check.scanned {
  background: var(--shopper-green);
  border-color: var(--shopper-green);
  color: #fff;
}
.ar-addr-text {
  flex: 1;
  font-family: var(--font-numeric);
  font-size: 14px;
  font-weight: 700;
  color: var(--fg-1);
  letter-spacing: 0.01em;
}
.ar-addr-text.scanned { color: var(--fg-3); text-decoration: line-through; }

/* ── Scan input ─────────────────────────────────────────────────────────── */
.ar-scan-row {
  display: flex; gap: 8px;
  margin-bottom: 18px;
}
.ar-scan-input {
  flex: 1;
  background: var(--bg-1);
  border: 2px solid var(--shopper-navy);
  border-radius: 12px;
  padding: 14px 16px;
  font-family: var(--font-numeric);
  font-size: 15px;
  font-weight: 700;
  color: var(--fg-1);
  letter-spacing: 0.02em;
  outline: none;
  width: 100%;
}
.ar-scan-input::placeholder { color: var(--fg-3); font-weight: 500; letter-spacing: 0; }
.ar-scan-btn {
  background: var(--shopper-navy);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px;
}
.ar-scan-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Qty input ──────────────────────────────────────────────────────────── */
.ar-qty-card {
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 18px;
}
.ar-qty-row {
  display: flex; align-items: center; gap: 12px;
  margin-top: 10px;
}
.ar-qty-btn {
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border-2, #d1d5db);
  background: var(--bg-1);
  font-size: 20px; font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  color: var(--fg-1);
  flex-shrink: 0;
}
.ar-qty-btn:hover { border-color: var(--shopper-navy); }
.ar-qty-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ar-qty-input {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: 12px;
  padding: 12px 16px;
  font-family: var(--font-numeric);
  font-size: 28px;
  font-weight: 800;
  color: var(--fg-1);
  text-align: center;
  outline: none;
  width: 100%;
  -moz-appearance: textfield;
}
.ar-qty-input::-webkit-outer-spin-button,
.ar-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.ar-obs-input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: 12px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  color: var(--fg-1);
  resize: vertical;
  outline: none;
  min-height: 60px;
  margin-top: 10px;
}

/* ── Sticky confirm bar ──────────────────────────────────────────────────── */
.ar-mobile-sticky {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 440px;
  background: var(--bg-1);
  border-top: 1px solid var(--border-1);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  z-index: 50;
  box-shadow: 0 -8px 24px rgba(0,45,98,0.06);
}
.ar-mobile-cta {
  width: 100%;
  height: 54px;
  background: var(--shopper-green);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.ar-mobile-cta:hover { background: var(--shopper-green-2, #07a776); }
.ar-mobile-cta:disabled { background: var(--bg-3); color: var(--fg-3); cursor: not-allowed; }
.ar-mobile-cta.secondary {
  background: var(--bg-1);
  color: var(--fg-1);
  border: 1px solid var(--border-2, #d1d5db);
}

/* ── Toast / feedback ──────────────────────────────────────────────────── */
.ar-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--shopper-navy);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  display: flex; align-items: center; gap: 8px;
  animation: ar-toast-in 220ms ease;
}
.ar-toast.success { background: var(--shopper-green); }
.ar-toast.error   { background: var(--color-danger); }
@keyframes ar-toast-in {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ============ STORE GERENCIAL (Tela 2) ============ */
.ar-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
@media (max-width: 980px) { .ar-summary-grid { grid-template-columns: repeat(2, 1fr); } }
.ar-sum-card {
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: 12px;
  padding: 14px 16px;
}
.ar-sum-label {
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-3);
}
.ar-sum-value {
  font-family: var(--font-numeric);
  font-size: 32px;
  font-weight: 800;
  color: var(--fg-1);
  line-height: 1.1;
  margin-top: 4px;
}
.ar-sum-value.ok  { color: #07734A; }
.ar-sum-value.bad { color: var(--color-danger); }
.ar-sum-value.warn { color: #B0570B; }
.ar-sum-foot {
  font-size: 11px;
  color: var(--fg-3);
  margin-top: 4px;
}
.ar-sum-card.full {
  grid-column: span 1;
}

/* Big progress card */
.ar-progress-card {
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 24px;
}
.ar-progress-num {
  font-family: var(--font-numeric);
  font-size: 36px;
  font-weight: 800;
  color: var(--fg-1);
  line-height: 1;
}
.ar-progress-num small {
  font-size: 18px;
  color: var(--fg-3);
  font-weight: 600;
}
.ar-progress-meta {
  font-size: 12px;
  color: var(--fg-3);
  margin-top: 4px;
}
.ar-progress-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ar-progress-bar-stack {
  height: 14px;
  background: var(--bg-3);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
}
.ar-progress-bar-stack .seg {
  height: 100%;
  transition: width 320ms ease;
}
.ar-progress-bar-stack .seg.ok   { background: var(--shopper-green); }
.ar-progress-bar-stack .seg.bad  { background: var(--color-danger); }
.ar-progress-bar-stack .seg.warn { background: #C4711A; }
.ar-progress-legend {
  display: flex; gap: 14px;
  font-size: 11px;
  color: var(--fg-3);
}
.ar-progress-legend-item {
  display: inline-flex; align-items: center; gap: 5px;
}
.ar-progress-legend-dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.ar-progress-legend-dot.ok { background: var(--shopper-green); }
.ar-progress-legend-dot.bad { background: var(--color-danger); }
.ar-progress-legend-dot.warn { background: #C4711A; }
.ar-progress-legend-dot.neutral { background: var(--fg-4, #9ca3af); }

/* ── Items table ────────────────────────────────────────────────────────── */
.ar-tbl td.product { min-width: 260px; }
.ar-tbl td.product .name { font-size: 13px; }
.ar-tbl td.product .code { font-size: 11px; color: var(--fg-3); font-family: var(--font-numeric); margin-top: 2px; }
.ar-addr-chips {
  display: flex; flex-wrap: wrap; gap: 4px;
  max-width: 260px;
}
.ar-addr-chip {
  font-family: var(--font-numeric);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg-3);
  color: var(--fg-2);
  white-space: nowrap;
}
.ar-addr-chip.scanned {
  background: rgba(1,188,110,0.14);
  color: #07734A;
}
.ar-addr-chip-more {
  font-size: 10px;
  font-weight: 700;
  color: var(--fg-3);
  padding: 2px 4px;
}
.ar-qty-cell {
  font-family: var(--font-numeric);
  font-weight: 800;
  font-size: 14px;
  color: var(--fg-1);
}
.ar-qty-cell.zero { color: var(--color-danger); }
.ar-qty-cell.match { color: #07734A; }

.ar-row-actions {
  display: flex; gap: 4px;
  justify-content: flex-end;
}
.ar-action-btn {
  background: none;
  border: 1px solid var(--border-1);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--fg-2);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.ar-action-btn:hover { border-color: var(--shopper-navy); color: var(--fg-1); }
.ar-action-btn.primary {
  border-color: var(--shopper-green);
  color: var(--shopper-green);
}
.ar-action-btn.primary:hover {
  background: var(--shopper-green);
  color: #fff;
}
.ar-action-btn.danger {
  border-color: rgba(208,31,49,0.3);
  color: var(--color-danger);
}
.ar-action-btn.danger:hover {
  background: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
}

/* ============ Tab inside module ============ */
.ar-subtabs {
  max-width: 1400px; width: 100%;
  margin: 0 auto;
  padding: 12px 24px 0;
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border-1);
}
.ar-subtab {
  background: none;
  border: none;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--fg-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: -1px;
}
.ar-subtab:hover { color: var(--fg-1); }
.ar-subtab.active {
  color: var(--shopper-navy);
  border-bottom-color: var(--shopper-navy);
}
.ar-subtab-count {
  background: var(--bg-3);
  color: var(--fg-2);
  font-family: var(--font-numeric);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 700;
}
.ar-subtab.active .ar-subtab-count {
  background: var(--shopper-navy);
  color: #fff;
}

/* ============ Filters (admin) ============ */
.ar-filters {
  display: flex; gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.ar-filter {
  display: flex; flex-direction: column; gap: 4px;
}
.ar-filter-label {
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-3);
}
.ar-filter select, .ar-filter input {
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-1);
  font-family: inherit;
  min-width: 160px;
  outline: none;
}
.ar-filter select:focus, .ar-filter input:focus { border-color: var(--shopper-navy); }

/* ============ Item detail modal (supervisor/admin) ============ */
.ar-detail-overlay {
  position: fixed; inset: 0;
  background: rgba(0,45,98,0.4);
  z-index: 100;
  display: grid; place-items: center;
  padding: 20px;
  overflow-y: auto;
}
.ar-detail-modal {
  background: var(--bg-1);
  border-radius: 16px;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.ar-detail-head {
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border-1);
  display: flex; align-items: flex-start; gap: 16px;
}
.ar-detail-head-body { flex: 1; min-width: 0; }
.ar-detail-title {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 4px;
  color: var(--fg-1);
  line-height: 1.2;
}
.ar-detail-sub {
  font-size: 12px;
  color: var(--fg-3);
  font-family: var(--font-numeric);
}
.ar-detail-close {
  background: none; border: none;
  cursor: pointer;
  font-size: 22px;
  color: var(--fg-3);
  line-height: 1;
  padding: 4px 8px;
}
.ar-detail-section {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-1);
}
.ar-detail-section:last-child { border-bottom: none; }
.ar-detail-section-title {
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 0 10px;
}
.ar-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 18px;
}
.ar-detail-field-label {
  font-size: 11px; color: var(--fg-3); font-weight: 600;
  margin-bottom: 2px;
}
.ar-detail-field-value {
  font-size: 13px; color: var(--fg-1); font-weight: 700;
}
.ar-detail-field-value.num { font-family: var(--font-numeric); }
.ar-detail-rationale {
  font-size: 13px; color: var(--fg-2);
  line-height: 1.55;
  background: var(--bg-2);
  padding: 12px 14px;
  border-radius: 10px;
  border-left: 3px solid var(--shopper-navy);
}
.ar-detail-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 8px;
}
.ar-detail-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--fg-2);
}

/* JSON-ish blocks */
.ar-detail-json {
  background: var(--bg-2);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--font-numeric);
  font-size: 11px;
  color: var(--fg-2);
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre-wrap;
}

/* Footer actions */
.ar-detail-footer {
  padding: 16px 24px 22px;
  display: flex; gap: 8px; justify-content: flex-end;
  flex-wrap: wrap;
}

/* ============ Admin store cards ============ */
.ar-store-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 1100px) { .ar-store-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px)  { .ar-store-grid { grid-template-columns: 1fr; } }

.ar-store-card {
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: all 160ms ease;
}
.ar-store-card:hover {
  border-color: var(--shopper-navy);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.ar-store-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}
.ar-store-card-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--fg-1);
  line-height: 1.2;
}
.ar-store-card-code {
  font-family: var(--font-numeric);
  font-size: 11px;
  color: var(--fg-3);
  font-weight: 600;
  margin-top: 2px;
}
.ar-store-card-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--border-1);
  border-bottom: 1px solid var(--border-1);
}
.ar-store-card-metric {
  text-align: center;
}
.ar-store-card-metric-value {
  font-family: var(--font-numeric);
  font-size: 18px;
  font-weight: 800;
  color: var(--fg-1);
  line-height: 1.1;
}
.ar-store-card-metric-value.bad { color: var(--color-danger); }
.ar-store-card-metric-value.ok  { color: #07734A; }
.ar-store-card-metric-value.warn { color: #B0570B; }
.ar-store-card-metric-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.ar-store-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px;
  font-size: 12px;
  color: var(--fg-3);
}
.ar-store-card-progress {
  width: 100%;
  height: 6px;
  background: var(--bg-3);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
  display: flex;
}
.ar-store-card-progress .seg.ok { background: var(--shopper-green); }
.ar-store-card-progress .seg.bad { background: var(--color-danger); }
.ar-store-card-progress .seg.warn { background: #C4711A; }

/* ============ Empty state ============ */
.ar-empty {
  background: var(--bg-1);
  border: 1px dashed var(--border-2, #d1d5db);
  border-radius: 14px;
  padding: 40px 20px;
  text-align: center;
  color: var(--fg-3);
}
.ar-empty-icon { color: var(--shopper-green); margin-bottom: 8px; }
.ar-empty-title { font-size: 15px; font-weight: 800; color: var(--fg-1); margin-bottom: 4px; }
.ar-empty-sub { font-size: 13px; }

/* ============ Hub tile variant ============ */
.hub-tile.purple {
  background: linear-gradient(145deg, var(--bg-1), var(--bg-2));
}
.hub-tile.purple .hub-tile-icon {
  background: var(--shopper-navy);
  color: #fff;
}
.hub-tile.orange .hub-tile-icon {
  background: var(--unica-orange, #F59C00);
  color: #fff;
}
.hub-tile.orange .hub-tile-cta { color: var(--unica-orange, #F59C00); }

/* ============ Mobile responsiveness for tables ============ */
@media (max-width: 768px) {
  .ar-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .ar-detail-grid { grid-template-columns: repeat(2, 1fr); }
  .ar-progress-card { flex-direction: column; align-items: stretch; gap: 12px; }
}
