/* Protection (Extend) view -- "May Recap + June Focus".
   Reuses the shared .kpi-row / .kpi-card family (kpi-card.css) for the five
   company KPI tiles; everything below is protection-specific: the June Focus
   callout panel, the sortable store table, and the definitions footer. */

.prot-wrap { padding: 4px 0 32px; }

/* ── Intro / stub banner ─────────────────────────────────────────── */
.prot-banner {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px;
  margin: 0 0 14px; padding: 10px 14px;
  background: #fafbfc; border: 1px solid #E5E7EB; border-radius: 8px;
}
.prot-banner-text { font-size: var(--fs-body); color: var(--navy); font-weight: 600; }
.prot-banner-meta { font-size: 12px; color: #6b7280; }
.prot-banner-meta strong { color: var(--navy); }
.prot-stub-chip {
  display: inline-block; padding: 1px 7px; border-radius: 3px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.6px;
  color: #92400e; background: #fef3c7; border: 1px solid #fcd34d;
  text-transform: uppercase;
}

/* ── Section headings ────────────────────────────────────────────── */
.prot-section-head {
  display: flex; align-items: baseline; gap: 10px;
  margin: 22px 0 10px;
}
.prot-section-head h3 {
  margin: 0; font-size: 15px; font-weight: 700; color: var(--navy);
  letter-spacing: 0.2px;
}
.prot-section-head .prot-section-sub { font-size: 12px; color: #6b7280; }

/* ── KPI delta helpers (tiles reuse .kpi-card) ───────────────────── */
.kpi-trend.flat { color: rgba(255,255,255,0.72); }

/* Company KPI row: 5 wider Protection cards. Override the shared .kpi-row
   3-col grid with an auto-fit track so all five always fit -- one row on wide
   screens, wrapping to a 2nd row on narrower laptops (~1280px) instead of
   clipping the 5th card (PROTECTION ATTACHMENT) off the right edge. Each card
   holds a floor of 220px, then stretches to fill. */
.kpi-row.prot-kpi-row {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* ── June Focus panel ────────────────────────────────────────────── */
.prot-focus {
  border: 1px solid #fcd34d; border-radius: 10px; overflow: hidden;
  box-shadow: var(--shadow);
}
.prot-focus-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: linear-gradient(90deg, #fff7ed, #fffbeb);
  border-bottom: 1px solid #fcd34d;
}
.prot-focus-head .prot-focus-badge {
  font-size: 11px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase;
  color: #b45309; background: #fde68a; border-radius: 4px; padding: 2px 8px;
}
.prot-focus-head .prot-focus-title { font-size: 14px; font-weight: 700; color: var(--navy); }
.prot-focus table { width: 100%; border-collapse: collapse; }
.prot-focus th, .prot-focus td {
  padding: 9px 14px; text-align: right; font-size: var(--fs-body);
  border-bottom: 1px solid #f1e9d6; font-variant-numeric: tabular-nums;
}
.prot-focus th {
  font-size: 11px; font-weight: 700; letter-spacing: 0.4px; color: #92400e;
  text-transform: uppercase; background: #fffdf7;
}
.prot-focus th:first-child, .prot-focus td:first-child { text-align: left; }
.prot-focus tbody tr:last-child td { border-bottom: none; }
.prot-focus td.prot-store { font-weight: 700; color: var(--navy); }

/* ── Store table ─────────────────────────────────────────────────── */
.prot-table-wrap {
  border: 1px solid #E5E7EB; border-radius: 10px; overflow: hidden;
  box-shadow: var(--shadow);
}
table.prot-table { width: 100%; border-collapse: collapse; }
table.prot-table th, table.prot-table td {
  padding: 8px 12px; text-align: right; font-size: var(--fs-body);
  border-bottom: 1px solid #eef1f4; font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
table.prot-table thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--navy); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase;
  cursor: pointer; user-select: none;
}
table.prot-table thead th:hover { background: var(--navy-hover); }
table.prot-table th:first-child, table.prot-table td:first-child { text-align: left; }
table.prot-table th.prot-col-store, table.prot-table td.prot-store { text-align: left; }
table.prot-table tbody tr:hover { background: #f6fafc; }
table.prot-table td.prot-store { font-weight: 600; color: var(--navy); }
table.prot-table .prot-sort-arrow { font-size: 9px; margin-left: 3px; opacity: 0.9; }

/* Focus-store rows: warm left-stripe + tint so the five pop in the full list. */
table.prot-table tbody tr.prot-row-focus { background: #fffdf5; }
table.prot-table tbody tr.prot-row-focus:hover { background: #fff8e6; }
table.prot-table tbody tr.prot-row-focus td:first-child {
  box-shadow: inset 3px 0 0 var(--ashley-orange);
}
.prot-focus-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ashley-orange); margin-left: 6px; vertical-align: middle;
}

/* Delta colouring for YoY / vs-LY cells. */
.prot-pos { color: var(--success-green); font-weight: 600; }
.prot-neg { color: var(--danger-red); font-weight: 600; }
.prot-flat { color: #6b7280; }

/* Priority pills. */
.prot-pri {
  display: inline-block; min-width: 44px; text-align: center;
  padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.3px;
}
.prot-pri-High { color: #991b1b; background: #fee2e2; border: 1px solid #fca5a5; }
.prot-pri-Med  { color: #92400e; background: #fef3c7; border: 1px solid #fcd34d; }
.prot-pri-Low  { color: #166534; background: #dcfce7; border: 1px solid #86efac; }

/* ── Reconciliation to the Net Sales KPI ─────────────────────────── */
.prot-recon {
  margin: 14px 0 0; padding: 12px 16px;
  background: #f8fafc; border: 1px solid #E5E7EB; border-radius: 8px;
}
.prot-recon-head {
  font-size: var(--text-eyebrow); font-weight: 700; letter-spacing: 0.6px;
  text-transform: uppercase; color: var(--navy); margin-bottom: 8px;
}
.prot-recon-table { border-collapse: collapse; min-width: 360px; }
.prot-recon-table th, .prot-recon-table td {
  padding: 5px 16px 5px 0; text-align: right; font-size: 12.5px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.prot-recon-table th {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.4px; color: #6b7280;
  text-transform: uppercase; border-bottom: 1px solid #e5e7eb;
}
.prot-recon-table td:first-child, .prot-recon-table th:first-child {
  text-align: left; color: var(--navy);
}
.prot-recon-table tr.prot-recon-total td {
  border-top: 2px solid var(--navy); font-weight: 700; color: var(--navy);
}
.prot-recon-note { margin: 8px 0 0; font-size: 11px; color: #6b7280; max-width: 720px; }
/* Empty opportunity panel (no store below the company attachment this window). */
.prot-focus-empty { padding: 14px 16px; font-size: 13px; color: #6b7280; }

/* ── Definitions footer ──────────────────────────────────────────── */
.prot-defs {
  margin: 26px 0 0; padding: 14px 16px;
  background: #fafbfc; border: 1px solid #E5E7EB; border-radius: 8px;
}
.prot-defs h4 {
  margin: 0 0 8px; font-size: var(--text-eyebrow); font-weight: 700;
  letter-spacing: 0.8px; text-transform: uppercase; color: var(--navy);
}
.prot-defs dl {
  margin: 0; display: grid; grid-template-columns: max-content 1fr;
  gap: 4px 14px; font-size: 12px;
}
.prot-defs dt { font-weight: 700; color: var(--navy); }
.prot-defs dd { margin: 0; color: #4b5563; }
.prot-defs-source {
  margin: 10px 0 0; font-size: 11px; color: #6b7280; font-style: italic;
}

.prot-empty { padding: 40px 16px; text-align: center; color: #6b7280; font-size: 14px; }
