/* RSA Bonus (HR) view — js/views/rsa_bonus.js.
   Frozen monthly compensation snapshot. Reuses the portal design tokens
   (navy, ashley-orange, table-border, font stack) and mirrors the
   fulfillment view's banner / tiles / table treatment. COMPENSATION DATA:
   the nav item + dataset are gated to admin/executive/hr in view-policy.js
   and api data.js — change the two together. */

.rb-empty {
  padding: 40px; text-align: center; color: var(--text-caption, #6b7280);
  font-family: var(--font-stack); font-size: 14px;
}

/* ── Month selector bar (seg-group pills from segmented-pills.css) ── */
.rb-banner {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  background: #fff; border: 1px solid var(--table-border, #d9dfe8);
  border-left: 4px solid var(--navy, #1b2a4a);
  border-radius: var(--radius, 8px);
  padding: 10px 14px; margin: 4px 0 16px;
  font-family: var(--font-stack); font-size: 13px; color: var(--text-body, #1f2937);
}
.rb-banner-label { font-weight: 700; color: var(--navy, #1b2a4a); }
.rb-banner .seg-btn { font-size: 12px; padding: 5px 12px; }
/* Snapshot standing from the payload label (FINAL vs PRELIMINARY). */
.rb-banner-standing { color: var(--text-caption, #6b7280); font-size: 12px; }

/* Loud tie-failure banner (cards vs source workbook TOTAL row). */
.rb-drift {
  background: #fdecea; border: 1px solid #b3261e; color: #b3261e;
  border-radius: var(--radius, 8px); padding: 10px 14px; margin: 0 0 16px;
  font-family: var(--font-stack); font-size: 13px; font-weight: 700;
}

/* ── Summary cards ── */
.rb-cards {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 14px; margin: 0 0 16px;
}
.rb-card {
  background: #fff; border: 1px solid var(--table-border, #d9dfe8);
  border-top: 3px solid var(--ashley-orange, #e87722);
  border-radius: var(--radius, 8px); padding: 12px 16px;
  box-shadow: var(--shadow, 0 1px 2px rgba(0,0,0,.05));
}
.rb-card-v {
  font-size: 24px; font-weight: 800; color: var(--navy, #1b2a4a);
  font-family: var(--font-stack); line-height: 1.1; white-space: nowrap;
}
.rb-card-l {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-caption, #6b7280); margin-top: 4px; font-weight: 600;
}
.rb-card-s { font-size: 11px; color: var(--text-caption, #6b7280); margin-top: 2px; }

/* ── Controls (search + the CSV export button) ── */
.rb-controls {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--table-border, #d9dfe8);
  border-radius: var(--radius, 8px); padding: 10px 14px; margin: 0 0 12px;
}
.rb-search {
  padding: 6px 10px; font-size: 12px; font-family: var(--font-stack);
  border: 1px solid var(--table-border, #d9dfe8); border-radius: 6px;
  background: #fff; color: var(--navy, #1b2a4a); font-weight: 600;
  min-width: 300px; flex: 1;
}

/* ── Filtered count line ── */
.rb-count {
  font-size: 12.5px; color: var(--text-caption, #6b7280);
  font-family: var(--font-stack); margin: 10px 2px 8px;
}
.rb-count strong { color: var(--navy, #1b2a4a); }

/* ── Tables ── */
.rb-table-wrap {
  background: #fff; border: 1px solid var(--table-border, #d9dfe8);
  border-radius: 8px; overflow-x: auto;
}
.rb-table { border-collapse: collapse; width: 100%; font-size: 13px; font-family: var(--font-stack); }
.rb-table th {
  background: var(--navy, #1b2a4a); color: #fff; text-align: left;
  padding: 7px 10px; position: sticky; top: 0; z-index: 1; cursor: pointer;
  white-space: nowrap; user-select: none; font-weight: 600;
}
.rb-table td {
  padding: 6px 10px; border-bottom: 1px solid #eef1f6; white-space: nowrap;
  color: var(--text-body, #1f2937);
}
.rb-table tbody tr:hover td { background: #f6f8fc; }
.rb-table td.rb-num, .rb-table th.rb-num { text-align: right; }
.rb-none { padding: 30px; text-align: center; color: #6b7280; }
.rb-wrap { white-space: normal; min-width: 180px; vertical-align: top; }
.rb-wide { min-width: 320px; }
.rb-term td { color: #9ca3af; }               /* terminated associates */
.rb-up { color: var(--success-green, #1a7f37); font-weight: 700; }
.rb-down { color: #b3261e; font-weight: 700; }

/* TOTAL row: same computed sums as the cards (the visible tie). */
.rb-table tr.rb-total td {
  background: var(--navy, #1b2a4a); color: #fff; font-weight: 800;
  border-bottom: none; position: relative;
}
.rb-table tr.rb-total:hover td { background: var(--navy, #1b2a4a); }

/* Non-payable house/system section, separated like the workbook. */
.rb-table tr.rb-house-hdr td {
  background: #e8ecf3; color: #4b5563; font-weight: 700; font-size: 12px;
  border-top: 3px double var(--table-border, #d9dfe8);
}
.rb-table tr.rb-house td { color: #6b7280; background: #fafbfd; }
.rb-table tr.rb-company td {
  background: #f1f3f5; color: var(--navy, #1b2a4a); font-weight: 700;
  white-space: normal;
}

/* ── Collapsible sections (Changes Applied / Delta vs Reviewed) ── */
.rb-section { margin-top: 18px; }
.rb-section-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  background: #fff; border: 1px solid var(--table-border, #d9dfe8);
  border-left: 4px solid var(--ashley-orange, #e87722);
  border-radius: var(--radius, 8px); padding: 10px 14px;
  font-family: var(--font-stack); font-size: 13px; font-weight: 700;
  color: var(--navy, #1b2a4a); cursor: pointer;
}
.rb-chev { color: var(--ashley-orange, #e87722); }
.rb-section-n {
  display: inline-block; min-width: 20px; text-align: center;
  background: var(--navy, #1b2a4a); color: #fff; border-radius: 9px;
  padding: 0 6px; font-size: 11px; font-weight: 700;
}
.rb-section-body { margin-top: 10px; }
.rb-section-intro, .rb-section-foot {
  font-size: 12px; color: var(--text-caption, #6b7280);
  font-family: var(--font-stack); margin: 0 2px 8px; line-height: 1.5;
}
.rb-section-foot { margin-top: 8px; }
.rb-changes-table td { font-size: 12.5px; }

/* ── Footnote (methodology) ── */
.rb-foot {
  color: var(--text-caption, #6b7280); font-size: 12px;
  font-family: var(--font-stack); margin-top: 14px; line-height: 1.5;
}

@media (max-width: 1100px) {
  .rb-cards { grid-template-columns: repeat(2, 1fr); }
}
