/* components.css — shared component styles for MarketPilot app UI
 * Tokens are defined in tokens.css (Epic 8 Visual-DNA token system).
 * Add component-scoped CSS here; never create additional CSS files.
 *
 * Story 4.9 placeholder token aliases block REMOVED 2026-05-19: it was a
 * temporary shim that defined --mp-surface, --mp-line, --mp-ink-3,
 * --mp-primary, etc. while waiting for Epic 8 to land its token system in
 * tokens.css. Epic 8 tokens were added to tokens.css on 2026-05-18, but the
 * placeholder block here was never deleted — and because components.css
 * loads AFTER tokens.css, the placeholder overrode the correct values
 * (e.g., --mp-primary reverted to oklch(38% 0.14 255) instead of #1a2233).
 *
 * This was the SECOND instance of feedback_css_file_ownership violation
 * (first was Story 8.1's .mp-main in tokens.css). The rule stands:
 * tokens.css = tokens only; layout.css = layout; components.css =
 * components. Aliases for the legacy --mp-danger/--mp-warning names that
 * Story 4.9 banners still reference are in tokens.css.
 */

/* ── Banner: shared component ─────────────────────────────────────────────
 * Aligned 2026-05-19 to banners-pure.html (Pedro's design ground truth).
 * Design replaces the Story 4.9 left-border accent with a soft fill + 1px
 * border + 12px radius per variant. Each variant pairs a -soft bg with a
 * -border outline and uses the variant colour for the icon + CTA fill.
 *
 * Legacy class hooks (`mp-banner-info`, `mp-banner-danger`,
 * `mp-banner-warning`, `mp-banner-neutral`, `mp-banner-cta`, `mp-banner-text`)
 * are kept as co-targeted aliases so the test suite (index.test.js, etc.)
 * keeps passing without churn. EJS templates carry both the design class
 * (`.mp-banner--dryrun`) and the legacy class (`.mp-banner-info`).
 */

.mp-banner {
  border-radius: var(--mp-radius, 12px);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid transparent;
  margin-block: 16px;
}

.mp-banner-icon,
.mp-banner > .material-symbols-outlined {
  font-size: 22px;
  flex-shrink: 0;
  font-variation-settings: 'FILL' 1, 'wght' 500;
  user-select: none;
  line-height: 1;
}

.mp-banner-body,
.mp-banner-text {
  margin: 0;
  flex: 1;
  font-size: 13px;
  color: var(--mp-ink);
  line-height: 1.5;
}

.mp-banner-body strong,
.mp-banner-text strong { font-weight: 700; }
.mp-banner-body em,
.mp-banner-text em     { font-style: italic; }

.mp-banner-action,
.mp-banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  color: #fff;
  border: none;
  border-radius: var(--mp-radius-sm-epic8, 8px);
  cursor: pointer;
  font-family: var(--mp-font-display, 'Manrope', system-ui, sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  flex-shrink: 0;
  text-decoration: none;
}

.mp-banner-action .material-symbols-outlined,
.mp-banner-cta .material-symbols-outlined {
  font-size: 16px;
  vertical-align: middle;
}

.mp-banner-action:disabled,
.mp-banner-cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Variants ─────────────────────────────────────────────────────────── */

/* Dry-run · informational, pre-go-live (was `.mp-banner-info`) */
.mp-banner--dryrun,
.mp-banner-info {
  background: var(--mp-info-soft);
  border-color: var(--mp-info-border);
}
.mp-banner--dryrun .mp-banner-icon,
.mp-banner-info .mp-banner-icon,
.mp-banner-info > .material-symbols-outlined { color: var(--mp-info); }
.mp-banner--dryrun .mp-banner-action,
.mp-banner-info .mp-banner-cta { background: var(--mp-info); }

/* Customer-paused · neutral grey (was `.mp-banner-neutral`).
 * Also used for sustained-transient (no action). */
.mp-banner--paused,
.mp-banner--transient,
.mp-banner-neutral {
  background: var(--mp-paused-bg);
  border-color: var(--mp-paused-border);
}
.mp-banner--paused .mp-banner-icon,
.mp-banner--transient .mp-banner-icon,
.mp-banner-neutral .mp-banner-icon,
.mp-banner-neutral > .material-symbols-outlined { color: var(--mp-paused-fg); }
.mp-banner--paused .mp-banner-action,
.mp-banner-neutral .mp-banner-cta { background: var(--mp-paused-fg); }

/* Payment failure / circuit breaker / key revoked · red (was `.mp-banner-danger`) */
.mp-banner--payment,
.mp-banner--breaker,
.mp-banner-danger {
  background: var(--mp-loss-soft);
  border-color: var(--mp-loss-border);
}
.mp-banner--payment .mp-banner-icon,
.mp-banner--breaker .mp-banner-icon,
.mp-banner-danger .mp-banner-icon,
.mp-banner-danger > .material-symbols-outlined { color: var(--mp-loss); }
.mp-banner--payment .mp-banner-action,
.mp-banner--breaker .mp-banner-action,
.mp-banner-danger .mp-banner-cta { background: var(--mp-loss); }

/* Anomaly attention · amber (was `.mp-banner-warning`) */
.mp-banner--anomaly,
.mp-banner-warning {
  background: var(--mp-warn-soft);
  border-color: var(--mp-warn-border);
}
.mp-banner--anomaly .mp-banner-icon,
.mp-banner-warning .mp-banner-icon,
.mp-banner-warning > .material-symbols-outlined { color: var(--mp-warn); }
.mp-banner--anomaly .mp-banner-action,
.mp-banner-warning .mp-banner-cta { background: var(--mp-warn); }

/* ── Dashboard: dry-run minimal (Story 4.9) ─────────────────────────────────── */

/* 3-column KPI card grid — KPI data ships in Epic 8 Story 8.2 */
.mp-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-block: 24px;
}

/* KPI placeholder card — dashed border, muted text (Story 4.9) */
.mp-kpi-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 16px;
  background: var(--mp-surface);
  border: 2px dashed var(--mp-line);
  border-radius: 8px;
  color: var(--mp-ink-3);
  font-style: italic;
  text-align: center;
}

/* Audit log link row */
.mp-dashboard-audit-link {
  margin-block-start: 16px;
}

/* Secondary CTA — used in circuit breaker "Retomar manualmente" button.
 * Transparent fill with subtle border so it reads as a secondary action
 * next to the variant's primary-fill action button. */
.mp-banner-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  color: var(--mp-ink-2);
  border: 1px solid var(--mp-line);
  border-radius: var(--mp-radius-sm-epic8, 8px);
  cursor: pointer;
  font-family: var(--mp-font-display, 'Manrope', system-ui, sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.mp-banner-cta-secondary:hover {
  background: var(--mp-surface);
  border-color: var(--mp-ink-3);
}

/* ── Story 8.1: KPI state variants ──────────────────────────────────────── */

/* Greyed: PAUSED_BY_CUSTOMER, PAUSED_BY_PAYMENT_FAILURE (60% opacity per AC#3) */
.mp-kpi-grid--greyed .mp-kpi-card,
.mp-kpi-grid--greyed .mp-kpi-placeholder {
  opacity: 0.6;
}

/* Stale: PAUSED_BY_CIRCUIT_BREAKER, sustained_transient (watermark badge) */
.mp-kpi-grid--stale .mp-kpi-card::after,
.mp-kpi-grid--stale .mp-kpi-placeholder::after {
  content: 'desatualizado';
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mp-ink-3);
  opacity: 0.7;
  margin-block-start: 4px;
}

/* Loading shimmer animation (§10.1 animation primitives, for skeleton KPI cards) */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

.mp-kpi-shimmer {
  background: linear-gradient(
    90deg,
    var(--mp-line-soft) 25%,
    var(--mp-line) 50%,
    var(--mp-line-soft) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border: none;
  border-radius: 8px;
  min-height: 96px;
}

/* ── Story 8.3: Channel toggle pill ─────────────────────────────────────── */
/* Visual DNA carried from MarketPilot.html §10.1 (PT/ES toggle pill).
   CSS ownership: components.css only (never tokens.css or layout.css).
   Renders in the sticky header channelToggle slot (default.eta: <%~ it.channelToggle || '' %>). */

.mp-channel-toggle {
  /* Design alignment 2026-05-18: --mp-line (not --mp-line-soft) for the
   * sharper container border; --mp-radius-sm-epic8 (8px) for the rounder
   * pill shape; 3px inset padding per design canvas (was 4px). */
  display: flex;
  background: var(--mp-surface);
  border: 1px solid var(--mp-line);
  border-radius: var(--mp-radius-sm-epic8, 8px);
  padding: 3px;
  gap: 0;
}

.mp-toggle-btn {
  /* Design alignment 2026-05-18: 6px 14px padding + 12px font-size match
   * the design bundle DashHeader toggle. Manrope display font with
   * -0.01em letter-spacing for visual tightness. */
  padding: 6px 14px;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--mp-ink-2, var(--mp-ink-3));
  font-weight: 600;
  font-size: 12px;
  border-radius: calc(var(--mp-radius-sm-epic8, 8px) - 2px);
  transition: all 0.15s;
  font-family: var(--mp-font-display, inherit);
  letter-spacing: -0.01em;
}

.mp-toggle-btn--active {
  background: var(--mp-primary);
  color: #fff;
}

.mp-toggle-btn:focus-visible {
  outline: 2px solid var(--mp-primary);
  outline-offset: 2px;
}

/* ── Story 8.4: Margin editor inline panel ──────────────────────────────── */
/* CSS ownership: components.css only — NOT tokens.css or layout.css.
   Margin editor anatomy aligned to `margin-editor-pure.html` (Pedro's
   2026-05-19 design ground truth). All rules scoped from `.mp-margin-editor`
   so the legacy root class + the design's visual structure coexist without
   churn to tests / route handlers / JS that depend on the existing selectors.
*/

/* ── Root card ──────────────────────────────────────────────────────────── */
/* Width matches the full content column so the editor lines up with the
 * 3-column KPI grid above it (Pedro's 2026-05-19 alignment ask). The
 * design's `max-width: 720px` from margin-editor-pure.html was a standalone
 * preview constraint — in the dashboard the editor is meant to span the
 * same width as the KPI grid. */
.mp-margin-editor {
  background: var(--mp-surface);
  border: 1px solid var(--mp-line-soft);
  border-radius: var(--mp-radius-lg, 16px);
  overflow: hidden;
  margin-block: 24px;
  position: relative; /* anchors the floating toast inside the card bounds */
}

/* ── Collapsed header / toggle ──────────────────────────────────────────── */
.mp-margin-editor .mp-margin-toggle {
  width: 100%;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.mp-margin-editor .mp-margin-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mp-margin-editor .mp-margin-icon {
  /* Tile background keeps the design's soft-blue card tone (--mp-info-soft)
   * so the icon reads on a clearly tinted surface. Icon colour overridden
   * to navy (--mp-primary) per Pedro 2026-05-19 — brand-prominent icons
   * across the dashboard must be navy, not info-blue. The earlier
   * color-mix(navy 10% / white) attempt produced a desaturated gray bg
   * that made the icon read as gray-black; using the design's info-soft
   * fill restores the blue card tone while keeping the navy icon. */
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--mp-info-soft);
  color: var(--mp-primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.mp-margin-editor .mp-margin-icon .material-symbols-outlined {
  font-size: 20px;
  font-variation-settings: 'FILL' 1, 'wght' 500;
}

.mp-margin-editor .mp-margin-title h2 {
  margin: 0;
  font-family: var(--mp-font-display, 'Manrope', system-ui, sans-serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--mp-primary);
  letter-spacing: -0.01em;
}

.mp-margin-editor .mp-margin-summary {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--mp-ink-3);
}

.mp-margin-editor .mp-margin-summary strong {
  color: var(--mp-ink-2);
  font-weight: 600;
}

.mp-margin-editor .mp-margin-chevron .material-symbols-outlined {
  font-size: 22px;
  color: var(--mp-ink-3);
}

/* Tabular numerals for the summary line (matches design's .tabular helper) */
.mp-margin-editor .tabular {
  font-family: var(--mp-font-mono, 'JetBrains Mono', ui-monospace, monospace);
  font-feature-settings: 'tnum';
}

/* ── Expanded body (toggled by [open] on the section) ───────────────────── */
.mp-margin-editor .mp-margin-body {
  display: none;
  padding: 0 24px 24px;
  border-top: 1px solid var(--mp-line-soft);
}

.mp-margin-editor[open] .mp-margin-body { display: block; }
.mp-margin-editor[open] .mp-margin-chevron .icon-down { display: none; }
.mp-margin-editor:not([open]) .mp-margin-chevron .icon-up { display: none; }

/* ── Number inputs row ──────────────────────────────────────────────────── */
.mp-margin-editor .mp-margin-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 20px 0;
}

.mp-margin-editor .mp-margin-field label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mp-ink-3);
  margin-bottom: 8px;
}

.mp-margin-editor .mp-margin-input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--mp-bg);
  border: 1px solid var(--mp-line);
  border-radius: var(--mp-radius-sm-epic8, 8px);
  padding: 10px 14px;
  transition: border-color 0.15s;
}

.mp-margin-editor .mp-margin-input:focus-within {
  border-color: var(--mp-primary);
}

.mp-margin-editor .mp-margin-input .sign {
  font-size: 16px;
  color: var(--mp-ink-3);
  font-weight: 600;
}

.mp-margin-editor .mp-margin-input input {
  flex: 1;
  font-family: var(--mp-font-display, 'Manrope', system-ui, sans-serif);
  font-feature-settings: 'tnum';
  font-size: 18px;
  font-weight: 700;
  color: var(--mp-primary);
  border: none;
  background: transparent;
  letter-spacing: -0.01em;
  min-width: 0;
  width: 100%;
  outline: none;
}

.mp-margin-editor .mp-margin-input input::-webkit-outer-spin-button,
.mp-margin-editor .mp-margin-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.mp-margin-editor .mp-margin-input .unit {
  font-size: 14px;
  color: var(--mp-ink-3);
  font-weight: 600;
}

/* Red border on validation error (AC#5) — JS adds `.mp-input--error`
 * to the inner input on invalid; we lift the visual cue to the wrapper. */
.mp-margin-editor .mp-margin-input:has(.mp-input--error) {
  border-color: var(--mp-danger);
}
.mp-input--error {
  /* fallback for browsers without :has() support — keep the legacy hook */
  outline: none;
}

/* Inline validation error message (AC#5, AC#7) */
.mp-margin-editor .mp-field-error {
  display: block;
  font-size: 12px;
  color: var(--mp-danger);
  min-height: 16px;
  line-height: 1.3;
  margin-top: 6px;
}

/* ── Worked-profit-example panel (UX-DR15–21) ───────────────────────────── */
.mp-margin-editor .mp-margin-example,
.mp-margin-editor .mp-example-panel {
  background: var(--mp-bg);
  border: 1px solid var(--mp-line-soft);
  border-radius: var(--mp-radius, 12px);
  padding: 18px 20px;
  margin-bottom: 16px;
}

.mp-margin-editor .mp-example-panel--empty {
  background: var(--mp-line-soft);
}

.mp-margin-editor .mp-example-empty-state {
  margin: 0;
  font-size: 14px;
  color: var(--mp-ink-3);
  font-style: italic;
  line-height: 1.55;
}

.mp-margin-editor .mp-margin-example-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

/* Eyebrow label — design uses primary navy (not ink-3) for the example
 * eyebrow so it reads as a card title rather than a subtle annotation. */
.mp-margin-editor .mp-margin-example-head .eyebrow,
.mp-margin-editor .mp-example-eyebrow {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mp-primary);
}

/* "Ver outro" — small bordered pill with refresh icon (design's pattern) */
.mp-margin-editor .mp-margin-ver-outro,
.mp-margin-editor .mp-ver-outro {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--mp-surface);
  border: 1px solid var(--mp-line);
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--mp-ink-2);
  text-decoration: none;
}

.mp-margin-editor .mp-margin-ver-outro .material-symbols-outlined,
.mp-margin-editor .mp-ver-outro .material-symbols-outlined {
  font-size: 14px;
}

.mp-margin-editor .mp-margin-ver-outro:focus-visible,
.mp-margin-editor .mp-ver-outro:focus-visible {
  outline: 2px solid var(--mp-primary);
  outline-offset: 2px;
}

/* SKU title row (prominent, above the value rows) */
.mp-margin-editor .mp-margin-sku,
.mp-margin-editor .mp-example-sku-title {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--mp-primary);
}

/* Value rows — label / value pair, dashed separators */
.mp-margin-editor .mp-margin-rows {
  display: grid;
  gap: 8px;
}

.mp-margin-editor .mp-margin-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
}

.mp-margin-editor .mp-margin-row + .mp-margin-row {
  border-top: 1px dashed var(--mp-line-soft);
}

.mp-margin-editor .mp-margin-row .label {
  font-size: 13px;
  color: var(--mp-ink-2);
}

.mp-margin-editor .mp-margin-row .value {
  font-family: var(--mp-font-mono, 'JetBrains Mono', ui-monospace, monospace);
  font-feature-settings: 'tnum';
  font-size: 13px;
  font-weight: 700;
}

.mp-margin-editor .mp-margin-row .value.neutral { color: var(--mp-ink-2); }
.mp-margin-editor .mp-margin-row .value.loss    { color: var(--mp-loss); }
.mp-margin-editor .mp-margin-row .value.win     { color: var(--mp-win); }

/* Inline delta span inside the floor-price value (kept for JS hook) */
.mp-margin-editor .mp-example-delta {
  font-weight: 500;
  margin-inline-start: 4px;
}

/* ── §9.11 caveat ───────────────────────────────────────────────────────── */
/* The `.mp-caveat` legacy class is co-targeted with `.mp-margin-caveat` so
 * the margin-edit.test.js:1147 ownership check (`.mp-caveat` must exist in
 * components.css) keeps passing while the design's class is the canonical
 * form going forward. */
.mp-margin-editor .mp-margin-caveat,
.mp-margin-editor .mp-caveat {
  margin: 0 0 18px;
  font-size: 12px;
  color: var(--mp-ink-3);
  line-height: 1.55;
  font-style: italic;
}

.mp-margin-editor .mp-margin-caveat strong,
.mp-margin-editor .mp-caveat strong {
  color: var(--mp-ink-2);
  font-style: normal;
}

/* ── Save action ────────────────────────────────────────────────────────── */
.mp-margin-editor .mp-margin-actions,
.mp-margin-editor .mp-margin-save-row {
  display: flex;
  justify-content: flex-end;
}

/* Save button — gradient navy with shadow per design canvas.
 * Dual class `.mp-margin-save .mp-btn .mp-btn--primary` lets the legacy
 * primary-button system supply focus/disabled rules below. */
.mp-margin-editor .mp-margin-save {
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--mp-primary), var(--mp-primary-2));
  color: #fff;
  border: none;
  border-radius: var(--mp-radius-sm-epic8, 8px);
  cursor: pointer;
  font-family: var(--mp-font-display, 'Manrope', system-ui, sans-serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 14px rgba(26, 34, 51, 0.22);
  transition: filter 0.15s, box-shadow 0.15s;
}

.mp-margin-editor .mp-margin-save .material-symbols-outlined {
  font-size: 16px;
}

.mp-margin-editor .mp-margin-save:hover:not(:disabled) {
  filter: brightness(1.08);
  box-shadow: 0 8px 18px rgba(26, 34, 51, 0.28);
}

.mp-margin-editor .mp-margin-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.mp-margin-editor .mp-margin-save:focus-visible {
  outline: 2px solid var(--mp-primary);
  outline-offset: 2px;
}

/* `.mp-btn--primary` is referenced as a dual class on the save button so
 * legacy rules from the primary-button system don't re-paint over the
 * gradient. The gradient + selector specificity in `.mp-margin-editor
 * .mp-margin-save` wins over the older flat-color rule for `.mp-btn--primary`.
 * Keep `.mp-btn--primary` rules here as a fallback for any non-margin
 * primary buttons (Story 8.4 introduced this BEM modifier; do NOT
 * re-declare `.mp-btn` itself per feedback_css_file_ownership). */
.mp-btn--primary {
  background: var(--mp-primary);
  color: #ffffff;
  transition: background 0.15s;
}

.mp-btn--primary:hover:not(:disabled) {
  background: var(--mp-primary-2);
}

.mp-btn--primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mp-btn--primary:focus-visible {
  outline: 2px solid var(--mp-primary);
  outline-offset: 2px;
}

/* Toast notification (AC#6) — floating, does not affect layout flow.
   Visibility controlled by :not(:empty) so JS only sets textContent (no
   visibility class to coordinate with showToast's auto-clear). */
.mp-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  padding: 12px 16px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--mp-border, #d1d5db);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 13px;
  line-height: 1.4;
  max-width: 320px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
  pointer-events: none;
}

.mp-toast:not(:empty) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mp-toast--success {
  border-left: 4px solid oklch(40% 0.12 145);
  color: oklch(40% 0.12 145);
}

.mp-toast--error {
  border-left: 4px solid var(--mp-danger);
  color: var(--mp-danger);
}

/* Margin editor zone wrapper in dashboard.eta */
.mp-margin-editor-zone {
  /* No additional styling — wraps margin-editor.eta inline */
}

/* Story 8.1's `.mp-dry-run-badge` floating pill was removed 2026-05-19 per
 * Pedro's request: the dry-run banner below the header already says "Modo
 * simulação activo" prominently, so the duplicate top-right pill read as
 * redundant visual noise. The DRY_RUN identification continues via the
 * banner copy (verbatim "MODO SIMULAÇÃO" still in §9.5 banner text), so
 * the `html.includes('mp-dry-run-badge') || html.includes('MODO SIMULAÇÃO')`
 * fallback in index.test.js:570 + dry-run-minimal.test.js continues to pass.
 */

/* ── Story 8.5: Pause / Resume button + confirmation modal ──────────────────
 * CSS ownership: components.css only — NOT tokens.css or layout.css.
 * Source of truth: pause-pure.html (Pedro's 2026-05-19 design export).
 * Surfaces: Surface 1 (pause button in mp-pause-button-zone content area),
 *           Surface 3 (confirmation modal). Surface 2 (green .mp-resume-btn)
 *           is NOT shipped — banner CTA owns resume per AC#3.
 *
 * feedback_css_file_ownership: keyframes are component-level, not tokens,
 * so fadeUp lives here in components.css (not tokens.css).
 */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Pause button zone — content area, above margin editor ─────────────── */
/* Right-aligned thin row; pause-button appears above mp-margin-editor-zone
 * in the DOM, giving it Tab precedence per AC#6 (natural DOM order = Tab order). */
.mp-pause-button-zone {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-block-end: 12px;
}

/* ── Pause button (Surface 1) — quiet ghost styling per pause-pure.html ─── */
.mp-pause-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--mp-surface);
  border: 1px solid var(--mp-line);
  border-radius: var(--mp-radius-sm, 8px);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--mp-ink-2);
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.mp-pause-btn .material-symbols-outlined {
  font-size: 16px;
  color: var(--mp-ink-2);
  font-variation-settings: 'FILL' 1, 'wght' 500;
}

.mp-pause-btn:hover {
  background: #fafbfd;
  border-color: var(--mp-ink-3);
}

.mp-pause-btn:focus-visible {
  outline: 2px solid var(--mp-primary);
  outline-offset: 2px;
}

/* ── Confirmation modal backdrop (Surface 3) ─────────────────────────────── */
/* position: fixed covers the full viewport; hidden attribute toggles visibility. */
/* The `display: none` override on [hidden] is REQUIRED — `display: grid` on the
   base selector otherwise overrides the HTML `hidden` attribute's
   browser-default `display: none`, leaving the modal visible on page load
   AND defeating JS close handlers. Hotfix 8.5.1 (2026-05-20). */
.mp-modal-backdrop[hidden] {
  display: none;
}
.mp-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 48, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 1000;
}

/* ── Modal card ─────────────────────────────────────────────────────────── */
.mp-modal {
  width: 100%;
  max-width: 460px;
  background: var(--mp-surface);
  border-radius: var(--mp-radius-lg, 16px);
  box-shadow:
    0 30px 60px rgba(10, 18, 48, 0.32),
    0 8px 24px rgba(10, 18, 48, 0.18);
  position: relative;
  animation: fadeUp 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ── X close button ─────────────────────────────────────────────────────── */
.mp-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--mp-ink-3);
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.mp-modal-close:hover {
  background: var(--mp-bg);
  color: var(--mp-ink);
}

.mp-modal-close .material-symbols-outlined { font-size: 20px; }

.mp-modal-close:focus-visible {
  outline: 2px solid var(--mp-primary);
  outline-offset: 2px;
}

/* ── Modal body ─────────────────────────────────────────────────────────── */
.mp-modal-body {
  padding: 28px 28px 22px;
}

.mp-modal-eyebrow {
  margin: 0 0 8px;
  font-family: var(--mp-font-display, 'Manrope', system-ui, sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mp-ink-3);
}

.mp-modal-title {
  margin: 0 0 14px;
  font-family: var(--mp-font-display, 'Manrope', system-ui, sans-serif);
  font-size: 20px;
  font-weight: 800;
  color: var(--mp-primary);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.mp-modal-copy {
  margin: 0;
  font-size: 14px;
  color: var(--mp-ink-2);
  line-height: 1.6;
}

/* ── Modal footer ─────────────────────────────────────────────────────── */
.mp-modal-footer {
  padding: 16px 28px 24px;
  border-top: 1px solid var(--mp-line-soft);
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ── Modal confirm form — zero-margin so flex layout is not disturbed ─── */
.mp-modal-confirm-form {
  margin: 0;
  padding: 0;
  display: contents; /* layout-transparent wrapper; button participates in footer flex directly */
}

/* ── Secondary button (Cancelar) ────────────────────────────────────────── */
.mp-btn-secondary {
  padding: 11px 18px;
  background: var(--mp-surface);
  color: var(--mp-ink-2);
  border: 1px solid var(--mp-line);
  border-radius: var(--mp-radius-sm, 8px);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.mp-btn-secondary:hover {
  background: #fafbfd;
  border-color: var(--mp-ink-3);
}

.mp-btn-secondary:focus-visible {
  outline: 2px solid var(--mp-primary);
  outline-offset: 2px;
}

/* ── Modal primary button (Pausar confirm) ──────────────────────────────── */
/* RENAMED 2026-05-19 from .mp-btn-primary → .mp-modal-btn-primary to avoid
 * collision with the pre-existing .mp-btn-primary in tokens.css (used by
 * auth/login/signup/onboarding pages). The duplicate-selector hazard is
 * documented in feedback_css_file_ownership.md — components.css loads AFTER
 * tokens.css and would silently override the auth button styling (gradient
 * + display:inline-flex would leak into login/signup CTAs).
 *
 * Scope: this class is only consumed by pause-button.eta's modal confirm
 * button (id="pause-modal-confirm"). All other primary CTAs continue to use
 * tokens.css's .mp-btn .mp-btn-primary pair. */
.mp-modal-btn-primary {
  padding: 11px 20px;
  background: linear-gradient(135deg, var(--mp-primary), var(--mp-primary-2));
  color: #fff;
  border: none;
  border-radius: var(--mp-radius-sm, 8px);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--mp-font-display, 'Manrope', system-ui, sans-serif);
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 18px rgba(26, 34, 51, 0.22);
  transition: filter 0.15s, box-shadow 0.15s;
}

.mp-modal-btn-primary .material-symbols-outlined { font-size: 16px; }

.mp-modal-btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 10px 22px rgba(26, 34, 51, 0.28);
}

.mp-modal-btn-primary:focus-visible {
  outline: 2px solid var(--mp-primary);
  outline-offset: 2px;
}

/* ── Banner CTA form wrapper — zero-margin reset ────────────────────────── */
/* Wraps the resume CTA button so it posts to /dashboard/resume via native
 * form submission. display:contents makes the form layout-transparent inside
 * the banner's flex row so the button reads as a direct flex child. */
.mp-banner-cta-form {
  margin: 0;
  padding: 0;
  display: contents;
}

/* ── Story 8.6: Go-Live consent modal extensions ────────────────────────── */
/* New selectors added adjacent to the modal chrome block (8.5/8.5.1, lines 813-989).
 * CSS file ownership: components.css ONLY per memory rule feedback_css_file_ownership.
 * NO new rules in tokens.css (tokens only) or layout.css (layout primitives only).
 * AC#6 enumerates every selector with its file destination. */

/* Trust microcopy — italic 12px body paragraph */
.mp-modal-trust {
  margin: 0 0 22px;
  font-size: 12px;
  color: var(--mp-ink-3);
  line-height: 1.55;
  font-style: italic;
}

/* Consent checkbox container — flex row with custom checkbox visual */
.mp-modal-consent {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--mp-bg);
  border: 1px solid var(--mp-line);
  border-radius: var(--mp-radius-sm, 8px);
  cursor: pointer;
  user-select: none;
}

/* Visually hidden native checkbox — accessible but invisible */
.mp-modal-consent input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* Focus indicator forwarded to custom .checkbox span (AC#5 keyboard accessibility) */
.mp-modal-consent input:focus-visible + .checkbox {
  outline: 2px solid var(--mp-primary);
  outline-offset: 2px;
}

/* Custom checkbox visual — 20×20 square with grid centring */
.mp-modal-consent .checkbox {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  background: var(--mp-surface);
  border: 1.5px solid var(--mp-line);
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}

/* Check icon — hidden until checked */
.mp-modal-consent .checkbox .material-symbols-outlined {
  font-size: 16px;
  color: transparent;
  transition: color 0.15s;
}

/* Checked state — primary fill */
.mp-modal-consent input:checked + .checkbox {
  background: var(--mp-primary);
  border-color: var(--mp-primary);
}

/* Check icon visible when checked */
.mp-modal-consent input:checked + .checkbox .material-symbols-outlined {
  color: #fff;
}

/* Consent label text */
.mp-modal-consent .label {
  font-size: 13px;
  color: var(--mp-ink);
  font-weight: 500;
}

/* Error alert block — Stripe failure */
.mp-modal-error {
  margin: 14px 0 0;
  padding: 12px 14px;
  background: var(--mp-loss-soft);
  border: 1px solid var(--mp-loss-border);
  border-left: 3px solid var(--mp-loss);
  border-radius: var(--mp-radius-sm, 8px);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

/* Specificity guard — mirrors .mp-modal-backdrop[hidden] precedent (Story 8.5.1:819) */
.mp-modal-error[hidden] {
  display: none;
}

.mp-modal-error .material-symbols-outlined {
  font-size: 18px;
  color: var(--mp-loss);
  flex-shrink: 0;
  margin-top: 1px;
  font-variation-settings: 'FILL' 1, 'wght' 500;
}

.mp-modal-error .text {
  font-size: 13px;
  color: var(--mp-ink-2);
  line-height: 1.5;
}

.mp-modal-error .text strong {
  color: var(--mp-loss);
  font-weight: 700;
}

/* Price span inside modal primary button — JetBrains Mono, slightly muted */
.mp-modal-btn-primary .price {
  opacity: 0.7;
  font-weight: 600;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* Disabled state for Go-Live confirm button (AC#2) — suppresses gradient + shadow */
.mp-modal-btn-primary[disabled],
.mp-modal-btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

/* ── Story 8.9: Interception pages — /key-revoked + /payment-failed ─────── */
/* CSS file ownership: components.css ONLY per [[feedback_css_file_ownership]].
 * Selectors: .mp-intercept-wrapper, .mp-intercept, .mp-intercept-icon,
 *   .mp-intercept-icon--loss, .mp-intercept-title, .mp-intercept-copy,
 *   .mp-intercept-cta, .mp-intercept-cta--loss, .mp-intercept-link,
 *   .mp-footer-breadcrumb, .tabular
 * NO new selectors added to tokens.css (tokens only) or layout.css (layout). */

/* Centring wrapper — full-viewport-height grid minus the sticky header.
 * Wraps .mp-intercept card inside each eta template.
 * Uses --mp-sticky-header-h design token from tokens.css (default 64px). */
.mp-intercept-wrapper {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--mp-sticky-header-h));
  padding: 40px 24px;
}

/* Interception card — white surface, shadow, centred text */
.mp-intercept {
  width: 100%;
  max-width: 560px;
  background: var(--mp-surface);
  border: 1px solid var(--mp-line-soft);
  border-radius: var(--mp-radius-lg);
  box-shadow: 0 20px 50px rgba(10, 18, 48, 0.06);
  padding: 44px 44px 36px;
  text-align: center;
}

/* Circular icon badge — amber by default (key-revoked), red via --loss modifier */
.mp-intercept-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--mp-warn-soft);
  border: 1px solid var(--mp-warn-border);
  display: grid;
  place-items: center;
}

/* Red icon badge variant for /payment-failed */
.mp-intercept-icon--loss {
  background: var(--mp-loss-soft);
  border-color: var(--mp-loss-border);
}

/* Icon glyph — filled style (FILL 1, wght 500) */
.mp-intercept-icon .material-symbols-outlined {
  font-size: 40px;
  color: var(--mp-warn);
  font-variation-settings: 'FILL' 1, 'wght' 500;
}

/* Red icon colour for --loss modifier */
.mp-intercept-icon--loss .material-symbols-outlined {
  color: var(--mp-loss);
}

/* Page title — Manrope 28px/800, tight letter-spacing */
.mp-intercept-title {
  margin: 0 0 16px;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--mp-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Body paragraph — Inter 14px, left-aligned, generous line-height */
.mp-intercept-copy {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--mp-ink-2);
  line-height: 1.6;
  text-align: left;
}

.mp-intercept-copy:last-of-type { margin-bottom: 28px; }

.mp-intercept-copy strong { color: var(--mp-primary); font-weight: 700; }

/* Primary CTA — full-width navy gradient button (key-revoked default) */
.mp-intercept-cta {
  width: 100%;
  padding: 14px 22px;
  background: linear-gradient(135deg, var(--mp-primary), var(--mp-primary-2));
  color: #fff;
  border: none;
  border-radius: var(--mp-radius-sm);
  font-size: 14px;
  font-weight: 700;
  font-family: 'Manrope', system-ui, sans-serif;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 18px rgba(26, 34, 51, 0.22);
  transition: transform 0.15s;
  text-decoration: none;
}

.mp-intercept-cta:hover { transform: translateY(-1px); }

.mp-intercept-cta .material-symbols-outlined { font-size: 18px; }

/* Red CTA variant for /payment-failed */
.mp-intercept-cta--loss {
  background: var(--mp-loss);
  box-shadow: 0 8px 18px rgba(196, 69, 58, 0.22);
}

/* Secondary helper link (key-revoked only) */
.mp-intercept-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 18px;
  font-size: 12px;
  font-weight: 500;
  color: var(--mp-ink-3);
  text-decoration: none;
}

.mp-intercept-link:hover { color: var(--mp-primary); }

.mp-intercept-link .material-symbols-outlined { font-size: 14px; }

/* Fixed viewport-bottom breadcrumb — position: fixed (amended from design's
 * position: absolute; the body's position: relative parent is NOT applied in
 * default.eta, so absolute would be unanchored; fixed pins to viewport) */
.mp-footer-breadcrumb {
  position: fixed;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  margin: 0;
  font-size: 11px;
  color: var(--mp-ink-3);
}

/* Tabular numerics — JetBrains Mono for the date span in /payment-failed */
.tabular {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-feature-settings: 'tnum';
}

/* ── Story 8.2: KPI row + cards ───────────────────────────────────────────
 * Lifted verbatim from dashboard-kpi-pure.html <style> block.
 * Ownership: components.css ONLY — NOT tokens.css, NOT layout.css.
 * Per feedback_css_file_ownership: duplicate selectors across files merge
 * silently in browsers and cause broken layouts. Grep before adding.
 */

.mp-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 1336px;
  margin: 0 auto;
}

.mp-kpi {
  background: var(--mp-surface);
  border: 1px solid var(--mp-line-soft);
  border-radius: var(--mp-radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: opacity 0.2s, filter 0.2s;
}
.mp-kpi[data-dimmed="true"] { opacity: 0.6; }
.mp-kpi[data-stale="true"]  { filter: grayscale(0.4); }

.mp-kpi-icon {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
}
.mp-kpi-icon .material-symbols-outlined {
  font-size: 18px;
  font-variation-settings: 'FILL' 1, 'wght' 500;
}
.mp-kpi--win  .mp-kpi-icon { background: var(--mp-win-soft);  color: var(--mp-win);  border: 1px solid var(--mp-win-border); }
.mp-kpi--loss .mp-kpi-icon { background: var(--mp-loss-soft); color: var(--mp-loss); border: 1px solid var(--mp-loss-border); }
.mp-kpi--info .mp-kpi-icon { background: var(--mp-info-soft); color: var(--mp-info); border: 1px solid var(--mp-info-border); }
.mp-kpi--warn .mp-kpi-icon { background: var(--mp-warn-soft); color: var(--mp-warn); border: 1px solid var(--mp-warn-border); }

.mp-kpi-label {
  margin: 0 0 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mp-ink-3);
}
.mp-kpi-value {
  font-family: 'Manrope', system-ui, sans-serif;
  font-feature-settings: 'tnum';
  font-size: 44px;
  font-weight: 800;
  color: var(--mp-primary);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0 0 4px;
}
.mp-kpi-subtitle {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--mp-ink-2);
  font-weight: 500;
}

.mp-kpi-value-line {
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid var(--mp-line-soft);
}
.mp-kpi-value-line .v {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-feature-settings: 'tnum';
  font-size: 14px;
  font-weight: 700;
  color: var(--mp-ink-2);
  letter-spacing: -0.01em;
}
.mp-kpi-value-line .l {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mp-ink-3);
}

.mp-kpi-stale-stamp {
  position: absolute;
  bottom: 12px;
  right: 16px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  color: var(--mp-ink-3);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.mp-kpi-empty-caption {
  margin: 0 0 8px;
  font-size: 11px;
  color: var(--mp-ink-3);
  font-style: italic;
}

/* ── Story 8.2: Hoje strip ────────────────────────────────────────────────
 * Lifted verbatim from dashboard-kpi-pure.html <style> block.
 * Ownership: components.css ONLY — NOT tokens.css, NOT layout.css.
 */

.mp-hoje {
  margin: 20px auto 0;
  max-width: 1336px;
  background: var(--mp-surface);
  border: 1px solid var(--mp-line-soft);
  border-radius: var(--mp-radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.mp-hoje-left {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.mp-hoje-eyebrow {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mp-ink-3);
}
.mp-hoje-position {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--mp-primary);
}
.mp-hoje-position .delta-win  { color: var(--mp-win);  font-weight: 700; }
.mp-hoje-position .delta-loss { color: var(--mp-loss); font-weight: 700; }
.mp-hoje-divider {
  width: 1px;
  height: 32px;
  background: var(--mp-line);
}
.mp-hoje-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.mp-hoje-stat {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mp-hoje-stat .material-symbols-outlined {
  font-size: 18px;
  color: var(--mp-ink-3);
}
.mp-hoje-stat .num {
  font-family: 'Manrope', system-ui, sans-serif;
  font-feature-settings: 'tnum';
  font-size: 18px;
  font-weight: 800;
  color: var(--mp-primary);
}
.mp-hoje-stat .word {
  font-size: 12px;
  color: var(--mp-ink-2);
}
.mp-hoje-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--mp-primary);
  text-decoration: none;
}
.mp-hoje-link .material-symbols-outlined { font-size: 16px; }

/* ═══════════════════════════════════════════════════════════════ */
/* Story 9.3a — Eventos page styles                               */
/* ═══════════════════════════════════════════════════════════════ */

/* Title block + position stat */
.mp-page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.mp-page-eyebrow {
  margin: 0 0 6px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--mp-ink-3);
}
.mp-page-title {
  margin: 0 0 6px;
  font-family: var(--mp-font-display);
  font-size: 28px; font-weight: 800;
  color: var(--mp-primary);
  letter-spacing: -0.02em;
}
.mp-page-sub {
  margin: 0; font-size: 14px; color: var(--mp-ink-2);
  max-width: 640px; line-height: 1.55;
}
.mp-page-position {
  text-align: right;
  font-family: var(--mp-font-mono);
  font-size: 12px; color: var(--mp-ink-2);
}
.mp-page-position strong { color: var(--mp-primary); font-weight: 700; }
.mp-page-position .delta { color: var(--mp-win); font-weight: 700; }
.mp-page-position--placeholder {
  min-width: 80px; min-height: 32px;
}

/* Search bar (Surface 4) */
.mp-search {
  background: var(--mp-surface);
  border: 1px solid var(--mp-line);
  border-radius: var(--mp-radius-lg);
  padding: 6px 6px 6px 18px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 2px 6px rgba(15,22,40,0.04);
}
.mp-search .icon { font-size: 22px; color: var(--mp-ink-3); }
.mp-search-input {
  flex: 1; background: transparent; border: none;
  font-size: 15px; font-weight: 500;
  color: var(--mp-primary);
  padding: 12px 0; min-width: 0;
  font-family: inherit; outline: none;
}
.mp-search-input::placeholder { color: var(--mp-ink-3); }
.mp-search .shortcut {
  font-family: var(--mp-font-mono);
  padding: 4px 8px; background: var(--mp-bg);
  border: 1px solid var(--mp-line); border-radius: 4px;
  font-size: 10px; color: var(--mp-ink-3); font-weight: 600;
}

/* Tabs */
.mp-tabs {
  display: flex; align-items: center; gap: 4px;
  background: var(--mp-surface);
  border: 1px solid var(--mp-line);
  border-radius: 999px;
  padding: 4px;
  align-self: flex-start;
}
.mp-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border: none;
  background: transparent;
  color: var(--mp-ink-2);
  font-family: var(--mp-font-display);
  font-weight: 700; font-size: 13px;
  letter-spacing: -0.01em;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.mp-tab:hover { color: var(--mp-primary); }
.mp-tab[aria-selected="true"] {
  background: var(--mp-primary);
  color: #fff;
}
.mp-tab .badge {
  background: rgba(255,255,255,0.18);
  color: inherit;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px; font-weight: 800;
  font-family: var(--mp-font-mono);
  min-width: 24px; text-align: center;
}
.mp-tab[aria-selected="false"] .badge {
  background: var(--mp-bg);
  color: var(--mp-ink-2);
}
.mp-tab.tab-vitorias[aria-selected="true"] {
  background: var(--mp-win);
}
.mp-tab-panel[hidden] { display: none; }

/* Aggregate stripes (top of each tab panel) */
.mp-stripe {
  border-radius: var(--mp-radius);
  padding: 18px 22px;
  color: #fff;
  display: flex; align-items: center; gap: 18px;
}
.mp-stripe--win {
  background: linear-gradient(135deg, var(--mp-win) 0%, #266f4d 100%);
  box-shadow: 0 6px 16px rgba(45, 139, 95, 0.25);
}
.mp-stripe--warn {
  background: linear-gradient(135deg, var(--mp-warn) 0%, #a4660d 100%);
  box-shadow: 0 6px 16px rgba(196, 122, 28, 0.25);
}
.mp-stripe-icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  background: rgba(255,255,255,0.18);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.mp-stripe-icon .material-symbols-outlined {
  font-size: 24px; color: #fff;
  font-variation-settings: 'FILL' 1, 'wght' 500;
}
.mp-stripe-text { flex: 1; }
.mp-stripe-text .lead {
  font-family: var(--mp-font-display);
  font-feature-settings: 'tnum';
  font-size: 18px; font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 2px;
}
.mp-stripe-text .body {
  margin: 0; font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.92);
  line-height: 1.4;
}
.mp-stripe-extra { text-align: right; flex-shrink: 0; }
.mp-stripe-extra .label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin: 0 0 2px;
}
.mp-stripe-extra .value {
  font-family: var(--mp-font-display);
  font-feature-settings: 'tnum';
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
}

/* Filter bar */
.mp-filterbar {
  background: var(--mp-surface);
  border: 1px solid var(--mp-line);
  border-radius: var(--mp-radius);
  padding: 10px 14px;
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.mp-filter {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  background: var(--mp-bg);
  border: 1px solid var(--mp-line);
  border-radius: var(--mp-radius-sm);
  font-size: 12px; font-weight: 600;
  color: var(--mp-ink-2);
  cursor: pointer;
}
.mp-filter .material-symbols-outlined { font-size: 14px; color: var(--mp-ink-3); }
.mp-filter .label {
  color: var(--mp-ink-3);
  font-weight: 500;
}
.mp-filter strong { color: var(--mp-primary); font-weight: 700; }
.mp-filter-divider {
  width: 1px; height: 22px; background: var(--mp-line);
  margin: 0 6px;
}

/* Dense events table */
.mp-table-card {
  background: var(--mp-surface);
  border: 1px solid var(--mp-line-soft);
  border-radius: var(--mp-radius);
  overflow: hidden;
}
.mp-table {
  width: 100%;
  border-collapse: collapse;
}
.mp-table thead th {
  background: var(--mp-bg);
  border-bottom: 1px solid var(--mp-line);
  padding: 10px 16px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mp-ink-3);
  white-space: nowrap;
  position: sticky;
  top: 0;
}
.mp-table thead th.sortable {
  cursor: pointer;
  user-select: none;
}
.mp-table thead th.sortable:hover { color: var(--mp-ink); }
.mp-table thead th.sortable .material-symbols-outlined {
  font-size: 14px;
  vertical-align: middle;
  margin-left: 2px;
  color: var(--mp-ink-3);
}
.mp-table thead th.numeric  { text-align: right; }
.mp-table thead th.actions  { text-align: center; }
.mp-table tbody tr {
  border-bottom: 1px solid var(--mp-line-soft);
  transition: background 0.1s;
}
.mp-table tbody tr:hover { background: var(--mp-bg); }
.mp-table tbody tr:last-child { border-bottom: none; }
.mp-table tbody td {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--mp-ink);
  vertical-align: middle;
}
.mp-table-empty {
  text-align: center;
  color: var(--mp-ink-3);
  font-size: 13px;
  padding: 32px 16px;
}

/* Cell shapes */
.mp-cell-time {
  font-family: var(--mp-font-mono);
  font-size: 12px;
  color: var(--mp-ink-3);
  white-space: nowrap;
}
.mp-cell-kind {
  padding: 3px 9px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 4px;
  font-family: var(--mp-font-display);
  white-space: nowrap;
}
.mp-cell-kind.kind-pos-won {
  background: var(--mp-win-soft);
  color: var(--mp-win);
}
.mp-cell-kind.kind-ceiling-raise {
  background: var(--mp-info-soft);
  color: var(--mp-info);
}
.mp-cell-kind.kind-pos-lost     { background: var(--mp-loss-soft); color: var(--mp-loss); }
.mp-cell-kind.kind-new-comp     { background: var(--mp-warn-soft); color: var(--mp-warn); }
.mp-cell-kind.kind-absorbed     { background: var(--mp-bg);        color: var(--mp-ink-2); border: 1px solid var(--mp-line); }
.mp-cell-kind.kind-big-move     { background: var(--mp-info-soft); color: var(--mp-info); }
.mp-cell-kind.kind-pause        { background: var(--mp-bg);        color: var(--mp-ink-2); border: 1px solid var(--mp-line); }
/* Story 4.13: the "Simulada" badge class is REMOVED. The "[Simulação] " prefix on the kind chip text
 * (in _vitoria-rows.eta) is now the single consistent signal for simulated wins (AC#5).
 * Confirmed no remaining consumer via git grep (only audit-feeds.eta, now updated to use the prefix). */
.mp-cell-product {
  font-weight: 600;
  color: var(--mp-primary);
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-cell-channel {
  font-family: var(--mp-font-mono);
  font-size: 11px;
  color: var(--mp-ink-3);
  font-weight: 600;
  text-transform: uppercase;
}
.mp-cell-price {
  font-family: var(--mp-font-mono);
  font-feature-settings: 'tnum';
  font-size: 12px;
  color: var(--mp-ink-2);
  white-space: nowrap;
}
.mp-cell-price .arrow {
  color: var(--mp-ink-3); margin: 0 2px;
}
.mp-cell-price .now {
  color: var(--mp-primary); font-weight: 700;
}
.mp-cell-impact {
  font-family: var(--mp-font-mono);
  font-feature-settings: 'tnum';
  font-size: 13px;
  color: var(--mp-win);
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}
.mp-cell-impact.neutral { color: var(--mp-ink-3); font-weight: 600; }
.mp-cell-impact.loss    { color: var(--mp-loss);  font-weight: 700; }
.mp-cell-actions { text-align: center; }
.mp-cell-worten {
  display: inline-grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid var(--mp-line);
  color: var(--mp-ink-2);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.mp-cell-worten:hover {
  background: var(--mp-primary);
  border-color: var(--mp-primary);
  color: #fff;
}
.mp-cell-worten .material-symbols-outlined { font-size: 16px; }

/* Pagination */
.mp-pagination {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: var(--mp-bg);
  border-top: 1px solid var(--mp-line-soft);
  font-family: var(--mp-font-mono);
  font-size: 12px; color: var(--mp-ink-3);
  flex-wrap: wrap;
}
.mp-pagination strong { color: var(--mp-primary); font-weight: 700; }
.mp-pagination-controls { display: flex; gap: 4px; align-items: center; }
.mp-pagination-controls button,
.mp-pagination-controls a {
  min-width: 32px; height: 32px;
  padding: 0 10px;
  display: inline-grid; place-items: center;
  background: var(--mp-surface);
  border: 1px solid var(--mp-line);
  border-radius: 6px;
  font-family: var(--mp-font-mono);
  font-size: 12px; font-weight: 700;
  color: var(--mp-ink-2);
  text-decoration: none;
  cursor: pointer;
}
.mp-pagination-controls button:disabled {
  opacity: 0.4; cursor: not-allowed;
}
.mp-pagination-controls .current {
  background: var(--mp-primary);
  color: #fff;
  border-color: var(--mp-primary);
}
.mp-pagination-controls .ellipsis {
  color: var(--mp-ink-3);
  cursor: default; border: none; background: transparent;
}
.mp-pagination .material-symbols-outlined { font-size: 16px; }

/* Problemas tab — Atencao cards */
.mp-atencao {
  background: var(--mp-surface);
  border: 1px solid var(--mp-warn-border);
  border-left: 4px solid var(--mp-warn);
  border-radius: var(--mp-radius);
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 14px; align-items: start;
}
.mp-atencao-icon {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--mp-warn-soft); color: var(--mp-warn);
  display: grid; place-items: center; flex-shrink: 0;
}
.mp-atencao-icon .material-symbols-outlined {
  font-size: 20px; font-variation-settings: 'FILL' 1, 'wght' 500;
}
.mp-atencao-meta {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 4px; flex-wrap: wrap;
}
.mp-atencao-meta .kind {
  padding: 2px 9px; background: var(--mp-warn-soft); color: var(--mp-warn);
  border-radius: 4px; font-size: 10px; font-weight: 700;
  font-family: var(--mp-font-display);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.mp-atencao-meta .time {
  font-family: var(--mp-font-mono);
  font-size: 11px; color: var(--mp-ink-3);
}
.mp-atencao-name {
  margin: 0 0 6px;
  font-size: 14px; font-weight: 700;
  color: var(--mp-primary);
}
.mp-atencao-detail {
  margin: 0;
  font-family: var(--mp-font-mono);
  font-size: 12px; color: var(--mp-ink-2);
  line-height: 1.5;
}
.mp-atencao-actions {
  display: flex; flex-direction: column; gap: 6px;
  flex-shrink: 0;
}
.mp-atencao-actions button {
  padding: 7px 12px;
  border-radius: var(--mp-radius-sm);
  font-size: 11px; font-weight: 700;
  font-family: var(--mp-font-display);
  letter-spacing: -0.01em;
  white-space: nowrap;
  border: 1px solid var(--mp-line);
  background: var(--mp-surface);
  color: var(--mp-ink-2);
}
.mp-atencao-actions .primary {
  background: var(--mp-primary); color: #fff;
  border-color: var(--mp-primary);
}
.mp-atencao-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--mp-ink-3);
  font-size: 13px;
}
.mp-section-title {
  margin: 8px 0 0;
  font-family: var(--mp-font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--mp-ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.mp-section-list {
  display: flex; flex-direction: column; gap: 10px;
}

/* Firehose footer link */
.mp-firehose-link {
  align-self: center;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--mp-line);
  border-radius: 999px;
  color: var(--mp-ink-2);
  text-decoration: none;
  font-size: 12px; font-weight: 600;
  margin-top: 8px;
}
.mp-firehose-link:hover { color: var(--mp-primary); border-color: var(--mp-primary); }

/* ── Story 9.4: Search by SKU/EAN (AC#10) ────────────────────────────────────
 * New selectors: .mp-search-results, .mp-search-header, .mp-search-disambiguation,
 *   .mp-table-row--atencao, .mp-table-row--resolved, .mp-ean
 *
 * CSS ownership discipline: components.css ONLY — not tokens.css, not layout.css.
 * Verified per feedback_css_file_ownership rule.
 */

/* Wrapper for the search results pane (#panel-search content) */
.mp-search-results {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* SKU identity header row: EAN + product title + optional Worten link */
.mp-search-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: var(--mp-surface-2, #f5f7fa);
  border: 1px solid var(--mp-line, #e2e6ed);
  border-radius: var(--mp-radius, 12px);
}
.mp-search-header .material-symbols-outlined {
  font-size: 24px;
  color: var(--mp-primary, #1a2233);
  flex-shrink: 0;
  margin-top: 2px;
}
.mp-search-header-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--mp-ink-1, #1a2233);
  margin: 0 0 2px;
}
.mp-search-header-sub {
  font-size: 13px;
  color: var(--mp-ink-3, #6b7a99);
  margin: 0;
}
.mp-search-header-count {
  margin-left: auto;
  text-align: right;
  font-size: 13px;
  color: var(--mp-ink-3, #6b7a99);
  white-space: nowrap;
}
.mp-search-header-count strong {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--mp-ink-1, #1a2233);
}
.mp-search-worten-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 8px;
  font-size: 12px;
  color: var(--mp-primary, #1a2233);
  text-decoration: none;
}
.mp-search-worten-link:hover { text-decoration: underline; }

/* Disambiguation list container (text search returns multiple SKUs) */
.mp-search-disambiguation {
  background: var(--mp-surface, #ffffff);
  border: 1px solid var(--mp-line, #e2e6ed);
  border-radius: var(--mp-radius, 12px);
  overflow: hidden;
}
.mp-search-disambiguation-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mp-search-disambiguation-item {
  border-bottom: 1px solid var(--mp-line, #e2e6ed);
}
.mp-search-disambiguation-item:last-child {
  border-bottom: none;
}
.mp-search-disambiguation-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: var(--mp-ink-1, #1a2233);
  text-decoration: none;
  transition: background 0.1s;
}
.mp-search-disambiguation-link:hover {
  background: var(--mp-surface-2, #f5f7fa);
}
.mp-search-disambiguation-title {
  flex: 1;
  font-size: 14px;
}
.mp-search-disambiguation-arrow {
  font-size: 18px;
  color: var(--mp-ink-3, #6b7a99);
}

/* Priority-colored row modifier for Atenção events in search results table */
.mp-table-row--atencao {
  background: var(--mp-danger-soft, #fff4f4);
}
.mp-table-row--atencao:hover {
  background: var(--mp-danger-soft, #fde8e8);
}

/* Muted row modifier for resolved/rotina events in search results table */
.mp-table-row--resolved {
  opacity: 0.85;
}
.mp-table-row--resolved:hover {
  opacity: 1;
}

/* EAN badge/chip inline element — reused across search header and disambiguation list */
.mp-ean {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  background: var(--mp-surface-2, #f0f2f7);
  border: 1px solid var(--mp-line, #e2e6ed);
  border-radius: 6px;
  font-family: var(--mp-font-mono, monospace);
  font-size: 12px;
  font-weight: 600;
  color: var(--mp-ink-2, #3d4f6e);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* Empty state within search results */
.mp-search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 20px;
  text-align: center;
  color: var(--mp-ink-3, #6b7a99);
  font-size: 14px;
}
.mp-firehose-link .material-symbols-outlined { font-size: 16px; }

/* ==========================================================================
   Story 4.4.2 — Onboarding scan-progress visual redesign
   All selectors: .mp-onb-*, .mp-logo-*, .mp-scan-*, .mp-btn-primary, .msym-fill
   Keyframes: spin, scan-shimmer, pulseGlyph
   Source: Onboarding-scan-pure.html (design reference, 2026-05-28)
   IMPORTANT: .mp-scan-progress-fill::after uses animation: scan-shimmer
   (NOT shimmer) to avoid collision with existing @keyframes shimmer at line 231.
   ========================================================================== */

/* Material Symbols filled variant utility */
.msym-fill { font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }

/* Keyframes */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes scan-shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes pulseGlyph {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.08); }
}

/* Onboarding chrome */
.mp-onb-header {
  background: var(--mp-surface);
  border-bottom: 1px solid var(--mp-line-soft);
}
.mp-onb-header-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 18px 32px;
  display: flex; align-items: center;
  justify-content: space-between; gap: 24px;
}
/* Note: .mp-logo, .mp-logo-mark, .mp-logo-mark::before, .mp-logo-text already
   defined in layout.css (pre-existing); no redefinition needed here. */

/* Step nav */
.mp-onb-steps { display: flex; align-items: center; gap: 0; }
.mp-onb-step {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: transparent;
}
.mp-onb-step[data-state="current"] { background: var(--mp-primary); }
.mp-onb-step .dot {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800;
  font-family: var(--mp-font-display);
  flex-shrink: 0;
}
.mp-onb-step[data-state="done"]    .dot { background: var(--mp-win); color: #fff; }
.mp-onb-step[data-state="current"] .dot { background: rgba(255,255,255,0.18); color: #fff; }
.mp-onb-step[data-state="future"]  .dot { background: var(--mp-bg); color: var(--mp-ink-3); border: 1px solid var(--mp-line); }
.mp-onb-step .dot .material-symbols-outlined { font-size: 14px; }
.mp-onb-step .label {
  font-family: var(--mp-font-display);
  font-size: 12px; font-weight: 700;
  letter-spacing: -0.01em;
}
.mp-onb-step[data-state="done"]    .label { color: var(--mp-ink); }
.mp-onb-step[data-state="current"] .label { color: #fff; }
.mp-onb-step[data-state="future"]  .label { color: var(--mp-ink-3); }
.mp-onb-step-divider {
  width: 36px; height: 1px;
  background: var(--mp-line);
  margin: 0 4px;
}
.mp-onb-step-divider[data-active="true"] { background: var(--mp-primary); }
.mp-onb-header-spacer { width: 80px; }

/* Page body */
.mp-onb-main {
  max-width: 620px;
  margin: 0 auto;
  padding: 48px 32px 64px;
  display: flex; flex-direction: column;
  gap: 28px;
}

/* Radar glyph with progress ring */
.mp-scan-glyph-wrap {
  display: flex; justify-content: center;
  margin-bottom: -4px;
}
.mp-scan-glyph {
  position: relative;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--mp-surface);
  border: 1px solid var(--mp-line-soft);
  display: grid; place-items: center;
  box-shadow: var(--mp-shadow-md);
}
.mp-scan-glyph .material-symbols-outlined {
  color: var(--mp-primary);
  font-size: 34px;
  animation: pulseGlyph 2.4s ease-in-out infinite;
}
.mp-scan-glyph svg {
  position: absolute;
  inset: -4px;
  width: 88px; height: 88px;
}
.mp-scan-glyph svg .ring-track {
  fill: none; stroke: var(--mp-line); stroke-width: 2;
}
.mp-scan-glyph svg .ring-progress {
  fill: none; stroke: var(--mp-primary); stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 251.327;
  transform: rotate(-90deg);
  transform-origin: 44px 44px;
}
.mp-scan-glyph[data-state="done"] svg .ring-progress { stroke: var(--mp-win); }
.mp-scan-glyph[data-state="done"] .material-symbols-outlined {
  color: var(--mp-win); animation: none;
}

/* Main card */
.mp-scan-card {
  background: var(--mp-surface);
  border: 1px solid var(--mp-line-soft);
  border-radius: var(--mp-radius-lg);
  padding: 36px 36px 28px;
  box-shadow: var(--mp-shadow-lg);
}
.mp-scan-eyebrow {
  margin: 0 0 10px;
  font-family: var(--mp-font-display);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--mp-ink-3);
  text-align: center;
}
.mp-scan-title {
  margin: 0 0 10px;
  font-family: var(--mp-font-display);
  font-size: 28px; font-weight: 800;
  color: var(--mp-primary);
  letter-spacing: -0.02em; line-height: 1.15;
  text-align: center;
}
.mp-scan-subtitle {
  margin: 0 auto 28px;
  max-width: 460px;
  font-size: 14px; color: var(--mp-ink-2);
  line-height: 1.55;
  text-align: center;
}
.mp-scan-subtitle strong { color: var(--mp-primary); font-weight: 700; }

/* Progress bar */
.mp-scan-progress {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 26px;
}
.mp-scan-progress-track {
  flex: 1; height: 6px;
  background: var(--mp-line-soft);
  border-radius: 999px; overflow: hidden;
  position: relative;
}
.mp-scan-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--mp-primary), var(--mp-primary-2));
  border-radius: 999px;
  position: relative; overflow: hidden;
  transition: width 0.4s ease-out;
}
.mp-scan-progress-fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  animation: scan-shimmer 1.8s ease-in-out infinite;
}
.mp-scan-progress[data-state="done"] .mp-scan-progress-fill {
  background: linear-gradient(90deg, var(--mp-win), color-mix(in oklab, var(--mp-win) 78%, white));
}
.mp-scan-progress[data-state="done"] .mp-scan-progress-fill::after { display: none; }
.mp-scan-progress-pct {
  font-family: var(--mp-font-display);
  font-feature-settings: 'tnum';
  font-size: 13px; font-weight: 700;
  color: var(--mp-primary);
  letter-spacing: -0.01em;
  min-width: 40px; text-align: right;
}

/* ETA line above the progress bar */
.mp-scan-eta {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 10px;
  font-size: 12px; font-weight: 600;
  color: var(--mp-ink-2);
}
.mp-scan-eta .material-symbols-outlined {
  font-size: 14px; color: var(--mp-ink-3);
}
.mp-scan-eta .tabular { color: var(--mp-primary); font-weight: 700; }

/* Footnote */
.mp-scan-footnote {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--mp-line-soft);
  text-align: center;
  font-size: 12px; color: var(--mp-ink-3);
  font-style: italic;
  line-height: 1.5;
}
.mp-scan-footnote .tabular {
  font-style: normal; font-weight: 600;
  color: var(--mp-ink-2);
}

/* Phase list */
.mp-scan-phases {
  list-style: none; padding: 0; margin: 0;
  border: 1px solid var(--mp-line-soft);
  border-radius: var(--mp-radius);
  overflow: hidden;
}
.mp-scan-phase {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 14px; align-items: center;
  padding: 14px 18px;
  border-top: 1px solid var(--mp-line-soft);
  background: var(--mp-surface);
}
.mp-scan-phase:first-child { border-top: none; }
.mp-scan-phase[data-state="active"] {
  background: color-mix(in oklab, var(--mp-primary) 3%, var(--mp-surface));
}
.mp-scan-phase .ico {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800;
  font-family: var(--mp-font-display);
  color: #fff;
}
.mp-scan-phase[data-state="done"]    .ico { background: var(--mp-win); }
.mp-scan-phase[data-state="active"]  .ico { background: var(--mp-primary); }
.mp-scan-phase[data-state="pending"] .ico {
  background: var(--mp-bg); color: var(--mp-ink-3);
  border: 1px solid var(--mp-line);
}
.mp-scan-phase .ico .material-symbols-outlined { font-size: 14px; color: #fff; }
.mp-scan-phase[data-state="active"] .ico .material-symbols-outlined {
  animation: spin 1s linear infinite;
}
.mp-scan-phase .label { font-size: 14px; font-weight: 500; }
.mp-scan-phase[data-state="done"]    .label { color: var(--mp-ink); }
.mp-scan-phase[data-state="active"]  .label { color: var(--mp-primary); font-weight: 700; }
.mp-scan-phase[data-state="pending"] .label { color: var(--mp-ink-3); }
.mp-scan-phase .meta {
  font-family: var(--mp-font-mono);
  font-feature-settings: 'tnum';
  font-size: 12px; color: var(--mp-ink-3);
  font-weight: 500;
  text-align: right;
}
.mp-scan-phase[data-state="active"] .meta strong {
  color: var(--mp-primary); font-weight: 700;
}
.mp-scan-phase[data-state="done"] .meta {
  font-family: var(--mp-font-display);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--mp-win);
}

/* CTA */
.mp-scan-cta {
  display: flex; align-items: center; justify-content: center;
  margin-top: 4px;
}
.mp-btn-primary {
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--mp-primary), var(--mp-primary-2));
  color: #fff; border: none;
  border-radius: var(--mp-radius-sm);
  font-size: 14px; font-weight: 700;
  font-family: var(--mp-font-display); letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 8px 18px rgba(26, 34, 51, 0.22);
  transition: transform 0.1s;
}
.mp-btn-primary:hover { transform: translateY(-1px); }
.mp-btn-primary .material-symbols-outlined { font-size: 18px; }

/* ── Story 4.4.3: onboarding chrome + scan-failed ERROR variants ───────────
 * CSS ownership: components.css ONLY (NOT tokens.css / layout.css) per
 * feedback_css_file_ownership. These are NEW error-state additions to the
 * existing .mp-onb-* / .mp-scan-* asset class (Story 4.4.2 owns the base
 * done/current/future/active states above). Source of truth:
 * onboarding-scan-failed-pure.html. Uses the project's semantic red family
 * --mp-loss / --mp-loss-soft / --mp-loss-border from tokens.css (the design
 * ref's private --mp-err* names do NOT exist in our token system; --mp-loss is
 * the canonical red per the Epic 8 design system). No selector here duplicates
 * an existing one (all error-state branches were confirmed absent before adding).
 */

@keyframes errPulse {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%      { transform: scale(1.06); opacity: 0.85; }
}

/* Step nav: error step (Análise interrupted) */
.mp-onb-step[data-state="error"] { background: var(--mp-loss); }
.mp-onb-step[data-state="error"] .dot { background: rgba(255,255,255,0.20); color: #fff; }
.mp-onb-step[data-state="error"] .label { color: #fff; }

/* Glyph: error treatment (cloud_off in a red ring) */
.mp-scan-glyph[data-state="error"] {
  background: var(--mp-loss-soft);
  border-color: var(--mp-loss-border);
}
.mp-scan-glyph[data-state="error"] .material-symbols-outlined {
  color: var(--mp-loss);
  animation: errPulse 2.6s ease-in-out infinite;
}
.mp-scan-glyph[data-state="error"] svg .ring-track { stroke: var(--mp-loss-border); }
.mp-scan-glyph[data-state="error"] svg .ring-progress { stroke: var(--mp-loss); }

/* Eyebrow: error tone */
.mp-scan-eyebrow[data-state="error"] { color: var(--mp-loss); }

/* Phase list: error + the error meta tone (the base phase rules sit above) */
.mp-scan-phase[data-state="error"] {
  background: color-mix(in oklab, var(--mp-loss) 4%, var(--mp-surface));
}
.mp-scan-phase[data-state="error"] .ico { background: var(--mp-loss); }
.mp-scan-phase[data-state="error"] .ico .material-symbols-outlined { color: #fff; }
.mp-scan-phase[data-state="error"] .label { color: var(--mp-loss); font-weight: 700; }
.mp-scan-phase[data-state="error"] .meta {
  font-family: var(--mp-font-display);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--mp-loss);
}

/* Motivo callout */
.mp-scan-reason {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px; align-items: start;
  padding: 16px 18px;
  background: var(--mp-loss-soft);
  border: 1px solid var(--mp-loss-border);
  border-radius: var(--mp-radius);
  margin-bottom: 26px;
}
.mp-scan-reason .ico {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--mp-surface);
  border: 1px solid var(--mp-loss-border);
  color: var(--mp-loss);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.mp-scan-reason .ico .material-symbols-outlined { font-size: 18px; }
.mp-scan-reason-label {
  margin: 2px 0 4px;
  font-family: var(--mp-font-display);
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--mp-loss);
}
.mp-scan-reason-text {
  margin: 0;
  font-size: 13px; color: var(--mp-ink-2);
  line-height: 1.5;
}
.mp-scan-reason-text strong { color: var(--mp-loss); font-weight: 700; }

/* Actions area (manual-retry form + alternate-key link) */
.mp-scan-actions {
  display: flex; flex-direction: column;
  align-items: center; gap: 18px;
  margin-top: 4px;
}
.mp-scan-actions form { margin: 0; }
.mp-scan-alt {
  margin: 0;
  font-size: 13px; color: var(--mp-ink-3);
  line-height: 1.5;
  text-align: center;
}
.mp-scan-alt a {
  color: var(--mp-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--mp-line);
}
.mp-scan-alt a:hover { text-decoration-color: var(--mp-primary); }

/* ── Story 4.4.5: onboarding scan-ready (catalogue summary) body ─────────────
 * CSS ownership: components.css ONLY (NOT tokens.css / layout.css) per
 * feedback_css_file_ownership. Source of truth: onboarding-scan-ready-pure.html.
 * REUSED selectors (already defined above, NOT redefined): .mp-onb-* chrome,
 * .mp-onb-main, .mp-btn-primary, .msym-fill. NEW selectors (this block):
 * the .mp-sr-* family (card/eyebrow/title/subtitle/headline/group/hero/row/
 * why/footer). The design ref's private :root used --mp-win-soft #e8f5ee etc.;
 * here we reference ONLY tokens that exist in tokens.css (--mp-win,
 * --mp-win-soft, --mp-line-soft, --mp-ink-2/-3, --mp-primary, etc.). The
 * ref's color-mix(var(--mp-win) 4%) hero tint is preserved verbatim. */

/* Card */
.mp-sr-card {
  background: var(--mp-surface);
  border: 1px solid var(--mp-line-soft);
  border-radius: var(--mp-radius-lg);
  padding: 36px 36px 30px;
  box-shadow: var(--mp-shadow-lg);
}
.mp-sr-eyebrow {
  margin: 0 0 10px;
  font-family: var(--mp-font-display);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--mp-win);
  text-align: center;
}
.mp-sr-title {
  margin: 0 0 10px;
  font-family: var(--mp-font-display);
  font-size: 28px; font-weight: 800;
  color: var(--mp-primary);
  letter-spacing: -0.02em; line-height: 1.15;
  text-align: center;
}
.mp-sr-subtitle {
  margin: 0 auto 28px;
  max-width: 470px;
  font-size: 14px; color: var(--mp-ink-2);
  line-height: 1.55;
  text-align: center;
}

/* Forward-looking line (Story 4.7.1 — replaces dishonest tier breakdown) */
.mp-sr-forward {
  margin: 16px auto 0;
  max-width: 470px;
  font-size: 14px; color: var(--mp-ink-2);
  line-height: 1.55;
  text-align: center;
}

/* Headline total stat */
.mp-sr-headline {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 16px; align-items: center;
  padding: 18px 22px;
  background: var(--mp-surface);
  border: 1px solid var(--mp-line-soft);
  border-radius: var(--mp-radius);
  margin-bottom: 16px;
}
.mp-sr-headline .check {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--mp-win-soft);
  color: var(--mp-win);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.mp-sr-headline .check .material-symbols-outlined { font-size: 18px; }
.mp-sr-headline .num {
  font-family: var(--mp-font-mono);
  font-feature-settings: 'tnum';
  font-variant-numeric: tabular-nums;
  font-size: 30px; font-weight: 700;
  color: var(--mp-ink);
  letter-spacing: -0.01em;
}
.mp-sr-headline .lbl {
  font-size: 14px; color: var(--mp-ink-2);
  font-weight: 500;
}

/* Story 4.7.1: Removed the .mp-sr-group / .mp-sr-hero / .mp-sr-row / .mp-sr-why /
   .mp-sr-why-body rule blocks alongside the dishonest tier breakdown they styled
   (the entire .mp-sr-group block was deleted from onboarding-scan-ready.eta).
   Keeping the rules in place would be dead CSS — no markup references them. */

/* Footer action */
.mp-sr-footer {
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.mp-sr-footer-q {
  margin: 0;
  font-family: var(--mp-font-display);
  font-size: 15px; font-weight: 700;
  color: var(--mp-ink);
  letter-spacing: -0.01em;
}

/* ==========================================================================
   Story 4.12 — "A analisar concorrência" progress card + KPI in-progress helpers
   Design reference: dashboard-cards-pure.html Component 1 (mp-analise-*),
   CSS lines 73-175. Markup copied literally into analise-progress.eta.
   CSS ownership: components.css ONLY (never tokens.css or layout.css).
   Keyframe names mpAnaliseSpin + mpAnaliseStripes are unique — confirmed
   collision-free against: shimmer(231), fadeUp(765), spin(2127),
   scan-shimmer(2128), pulseGlyph(2129), errPulse(2417).
   The shimmer keyframe (line 231) is REUSED for KPI skeleton — NOT redeclared.
   All var(--mp-*) tokens verified in tokens.css before shard.
   ========================================================================== */

@keyframes mpAnaliseSpin    { to { transform: rotate(360deg); } }
@keyframes mpAnaliseStripes { 0% { background-position: 0 0; } 100% { background-position: 36px 0; } }

.mp-analise {
  background: var(--mp-surface);
  border: 1px solid var(--mp-line-soft);
  border-radius: var(--mp-radius-lg);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
}
.mp-analise::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--mp-info-soft) 0%, transparent 42%);
  opacity: 0.5; pointer-events: none;
}
.mp-analise-inner { position: relative; }
.mp-analise-top {
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.mp-analise-head { display: flex; align-items: center; gap: 13px; }
.mp-analise-spinner {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--mp-info-soft);
  border: 1px solid var(--mp-info-border);
  display: grid; place-items: center;
  flex-shrink: 0; color: var(--mp-info);
}
.mp-analise-spinner .material-symbols-outlined {
  font-size: 20px;
  animation: mpAnaliseSpin 2.4s linear infinite;
}
.mp-analise-eyebrow {
  margin: 0 0 3px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--mp-info);
  display: flex; align-items: center; gap: 7px;
}
.mp-analise-mode {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px;
  background: var(--mp-info-soft);
  border: 1px solid var(--mp-info-border);
  border-radius: 999px;
  color: var(--mp-info);
  font-size: 9px; letter-spacing: 0.1em;
}
.mp-analise-mode .material-symbols-outlined { font-size: 11px; }
.mp-analise-title {
  margin: 0;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 18px; font-weight: 800;
  color: var(--mp-primary);
  letter-spacing: -0.02em;
}
.mp-analise-pct {
  font-family: 'Manrope', system-ui, sans-serif;
  font-feature-settings: 'tnum';
  font-size: 26px; font-weight: 800;
  color: var(--mp-info);
  letter-spacing: -0.02em; line-height: 1;
  text-align: right;
}
.mp-analise-pct small {
  display: block;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--mp-ink-3);
  margin-top: 4px;
}
.mp-analise-bar {
  height: 8px; border-radius: 999px;
  background: var(--mp-line-soft);
  overflow: hidden; position: relative;
}
.mp-analise-bar-fill {
  height: 100%; border-radius: 999px;
  background-color: var(--mp-info);
  background-image: linear-gradient(
    45deg,
    rgba(255,255,255,0.22) 25%, transparent 25%,
    transparent 50%, rgba(255,255,255,0.22) 50%,
    rgba(255,255,255,0.22) 75%, transparent 75%, transparent
  );
  background-size: 36px 36px;
  animation: mpAnaliseStripes 1s linear infinite;
  transition: width 0.6s ease;
}
.mp-analise-foot {
  margin: 12px 0 0;
  font-size: 12px; color: var(--mp-ink-2); line-height: 1.5;
}
.mp-analise-foot .count { font-weight: 700; color: var(--mp-ink); }
.mp-analise-foot .eta { color: var(--mp-ink-3); }

/* KPI in-progress caption (.mp-kpi-analyzing)
   Shown in place of the numeric value and euro sub-block when analysisInProgress=true.
   Calm, non-alarming tone. font-style: normal (contrast with empty-caption italic).
   Mirrors .mp-kpi-empty-caption (components.css:1388) but NOT italic — steady state. */
.mp-kpi-analyzing {
  margin: 0 0 8px;
  font-size: 11px;
  color: var(--mp-ink-3);
  font-style: normal;
}

/* KPI value-slot skeleton (value-sized variant of .mp-kpi-shimmer).
   .mp-kpi-shimmer uses min-height:96px which is too tall for the value line slot.
   This variant sizes to the KPI numeric figure line height (~44px). */
.mp-kpi-value-skeleton {
  background: linear-gradient(
    90deg,
    var(--mp-line-soft) 25%,
    var(--mp-line) 50%,
    var(--mp-line-soft) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border: none;
  border-radius: 8px;
  min-height: 44px;
  width: 80px;
  display: block;
  margin: 4px 0 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STORY 4.13 · mp-vitorias-* · Dashboard Vitorias Card (Component 2)
   PERMANENT surface — lives forever (DRY_RUN + ACTIVE). Not onboarding-only.
   CSS ownership: components.css ONLY per feedback_css_file_ownership.
   All values resolve to tokens.css variables — no hardcoded hex.
   .mp-table / .mp-cell-* are REUSED from above (do NOT redefine).
   ═══════════════════════════════════════════════════════════════════════════ */

/* Pulsing dot animation for "A chegar" pill (sim variant, data-mode="sim") */
@keyframes mpVitPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.35; transform: scale(0.8); }
}

.mp-vitorias {
  background: var(--mp-surface);
  border: 1px solid var(--mp-line-soft);
  border-radius: var(--mp-radius-lg);
  overflow: hidden;
}

.mp-vitorias-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--mp-line-soft);
}

.mp-vitorias-head-left {
  display: flex;
  align-items: center;
  gap: 11px;
}

.mp-vitorias-badge {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--mp-win-soft);
  border: 1px solid var(--mp-win-border);
  color: var(--mp-win);
  display: grid;
  place-items: center;
}

.mp-vitorias-badge .material-symbols-outlined { font-size: 18px; }

.mp-vitorias-title {
  margin: 0;
  font-family: var(--mp-font-display);
  font-size: 14px;
  font-weight: 800;
  color: var(--mp-primary);
  letter-spacing: -0.01em;
}

.mp-vitorias-sub {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--mp-ink-3);
  font-weight: 500;
}

.mp-vitorias-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--mp-win-soft);
  border: 1px solid var(--mp-win-border);
  color: var(--mp-win);
}

.mp-vitorias-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mp-win);
  animation: mpVitPulse 1.1s ease-in-out infinite;
}

/* CTA footer: footer-right placement (header-right already hosts the pill — AC#4 choice) */
.mp-vitorias-footer {
  display: flex;
  justify-content: flex-end;
  padding: 10px 16px;
  border-top: 1px solid var(--mp-line-soft);
}

.mp-vitorias-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--mp-primary);
  text-decoration: none;
}

.mp-vitorias-cta:hover {
  color: var(--mp-info);
}

.mp-vitorias-cta .material-symbols-outlined {
  font-size: 16px;
}

/* ── Story 9.4.1: SKU state-first panel ──────────────────────────────────────
 * New selectors: .mp-sku-state-panel (base), .mp-sku-state-panel--floor-bound,
 *   .mp-sku-state-panel--no-competitor, .mp-sku-state-panel--active
 *
 * CSS file ownership: components.css ONLY — NOT tokens.css, NOT layout.css.
 * Per feedback_css_file_ownership rule. Grep before adding:
 *   grep -r "mp-sku-state-panel" public/css/ (confirmed zero matches before add).
 *
 * Renders ABOVE the event table (filter bar + mp-table-card) in the exact-match
 * branch of search-by-sku.eta. Consistent with .mp-search-header padding/border
 * pattern (design authority: the existing search-result header style).
 */

/* Base panel — card appearance consistent with .mp-search-header */
.mp-sku-state-panel {
  padding: 14px 18px;
  background: var(--mp-surface);
  border: 1px solid var(--mp-line, #e2e6ed);
  border-radius: var(--mp-radius, 12px);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mp-sku-state-panel-text {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--mp-ink, #1a2233);
  line-height: 1.5;
}

.mp-sku-state-panel-meta {
  margin: 0;
  font-size: 12px;
  color: var(--mp-ink-3, #6b7a99);
}

/* Floor-bound variant — orange/warning tint (competitor cheaper than floor) */
.mp-sku-state-panel--floor-bound {
  background: var(--mp-warn-soft, #fff8ec);
  border-color: var(--mp-warn-border, #f0b84d);
}

.mp-sku-state-panel--floor-bound .mp-sku-state-panel-text {
  color: var(--mp-ink, #1a2233);
}

/* No-competitor variant — neutral, no competitors found */
.mp-sku-state-panel--no-competitor {
  background: var(--mp-surface, #ffffff);
  border-color: var(--mp-line, #e2e6ed);
}

/* Active variant — green tint (tier 1/2a/2b, engine actively monitoring) */
.mp-sku-state-panel--active {
  background: var(--mp-win-soft, #edfaf3);
  border-color: var(--mp-win-border, #5cc490);
}

.mp-sku-state-panel--active .mp-sku-state-panel-text {
  color: var(--mp-ink, #1a2233);
}

/* ── Story 8.7: Anomaly review modal extensions ───────────────────────────
 * CSS file ownership: components.css ONLY per [[feedback_css_file_ownership]].
 * NO new rules in tokens.css (tokens only) or layout.css (layout primitives).
 * Design reference: price-anomaly-modal-pure.html (project root) — authoritative.
 * Class names preserved exactly from design ref (inner visual treatment).
 * Outer wrapper uses .mp-modal-backdrop (shipped infra). The design ref's standalone
 * backdrop class is NOT used here.
 * .mp-btn-primary and .mp-btn-secondary are already declared - NOT redeclared here.
 * AC#6 §2: selectors below must appear in components.css. */

/* Wider modal card variant for the anomaly modal (540px vs 460px go-live modal) */
.mp-modal--wide {
  max-width: 540px;
}

/* Anomaly eyebrow: flex row with icon badge + uppercase label (design ref pattern) */
.mp-modal-eyebrow--anomaly {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  /* Override base .mp-modal-eyebrow margin-bottom */
  margin-top: 0;
}

.mp-modal-eyebrow--anomaly .badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--mp-warn-soft);
  color: var(--mp-warn);
  flex-shrink: 0;
}

.mp-modal-eyebrow--anomaly .badge .material-symbols-outlined {
  font-size: 16px;
}

.mp-modal-eyebrow--anomaly .txt {
  margin: 0;
  font-family: var(--mp-font-display, 'Manrope', system-ui, sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mp-warn);
}

/* Deviation percentage span in modal title — monospace, loss-red */
.mp-modal-title .pct {
  color: var(--mp-loss);
  font-family: var(--mp-font-mono, 'JetBrains Mono', ui-monospace, monospace);
  font-feature-settings: 'tnum';
}

/* Product meta line: monospace, muted, 11px */
.mp-modal-meta {
  margin: 0 0 22px;
  font-family: var(--mp-font-mono, 'JetBrains Mono', ui-monospace, monospace);
  font-feature-settings: 'tnum';
  font-size: 11px;
  color: var(--mp-ink-3);
}

/* Before / after price block — 3-column grid (prev · arrow · now) */
.mp-price-block {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 20px 22px;
  margin-bottom: 20px;
  background: var(--mp-bg);
  border: 1px solid var(--mp-line-soft);
  border-radius: var(--mp-radius, 12px);
}

/* Column label — 10px uppercase caps, ink-3 by default, warn for "now" */
.mp-price-col-label {
  margin: 0 0 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mp-ink-3);
}

.mp-price-col-label.now {
  color: var(--mp-warn);
}

/* Previous price — struck through, muted */
.mp-price-before {
  margin: 0;
  font-family: var(--mp-font-display, 'Manrope', system-ui, sans-serif);
  font-feature-settings: 'tnum';
  font-size: 24px;
  font-weight: 700;
  color: var(--mp-ink-3);
  letter-spacing: -0.01em;
  text-decoration: line-through;
  text-decoration-color: color-mix(in oklab, var(--mp-ink-3) 55%, transparent);
}

/* Current price row: value + deviation chip side by side */
.mp-price-now {
  display: flex;
  align-items: baseline;
  gap: 9px;
  flex-wrap: wrap;
}

/* Price value — Manrope 26px/800, loss-red */
.mp-price-now .val {
  margin: 0;
  font-family: var(--mp-font-display, 'Manrope', system-ui, sans-serif);
  font-feature-settings: 'tnum';
  font-size: 26px;
  font-weight: 800;
  color: var(--mp-loss);
  letter-spacing: -0.01em;
}

/* Deviation chip — amber pill next to the price */
.mp-price-now .chip {
  padding: 3px 8px;
  font-family: var(--mp-font-display, 'Manrope', system-ui, sans-serif);
  font-feature-settings: 'tnum';
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: var(--mp-warn-soft);
  color: var(--mp-warn);
  border-radius: 4px;
}

/* Arrow column — centred icon */
.mp-price-arrow {
  display: grid;
  place-items: center;
  color: var(--mp-ink-3);
}

.mp-price-arrow .material-symbols-outlined {
  font-size: 20px;
}

/* Explanation paragraph */
.mp-modal-explain {
  margin: 0;
  font-size: 14px;
  color: var(--mp-ink-2);
  line-height: 1.6;
}

.mp-modal-explain strong {
  color: var(--mp-ink);
  font-weight: 700;
}

/* Inline error/success slot inside the modal body (below explanation) */
.mp-anomaly-modal-error {
  margin: 14px 0 0;
  padding: 10px 14px;
  background: var(--mp-loss-soft, #fdf1f0);
  border: 1px solid var(--mp-loss-border, #f0c0bc);
  border-left: 3px solid var(--mp-loss, #c4453a);
  border-radius: var(--mp-radius-sm, 8px);
  font-size: 13px;
  color: var(--mp-ink-2);
  line-height: 1.5;
}

/* Specificity guard — hidden attribute must win over display */
.mp-anomaly-modal-error[hidden] {
  display: none;
}

/* Trigger button in Atenção feed — opens the anomaly review modal */
.mp-anomaly-trigger {
  padding: 8px 16px;
  background: var(--mp-warn-soft, #fbf0dd);
  color: var(--mp-warn, #c47a1c);
  border: 1px solid var(--mp-warn-border, #ecc995);
  border-radius: var(--mp-radius-sm, 8px);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--mp-font-body, 'Inter', system-ui, sans-serif);
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s;
}

.mp-anomaly-trigger:hover {
  background: var(--mp-warn-border, #ecc995);
  border-color: var(--mp-warn, #c47a1c);
}

.mp-anomaly-trigger:focus-visible {
  outline: 2px solid var(--mp-primary, #1a2233);
  outline-offset: 2px;
}

