/* =============================================================================
 * IQI AG Income Calculator — STYLES
 * All classes are prefixed `agc-` so this can drop into the Warriors PWA
 * without clashing with host styles.
 * Brand: navy #0A2540 · gold #C9A24B · coral #FF6B5B · cream #FBF7EF
 * ========================================================================== */

.agc-app, .agc-app * { box-sizing: border-box; }

:root {
  --agc-navy: #0A2540;
  --agc-navy-2: #0E3052;
  --agc-gold: #C9A24B;
  --agc-gold-soft: #E4C97E;
  --agc-coral: #FF6B5B;
  --agc-cream: #FBF7EF;
  --agc-ink: #16202E;
  --agc-muted: #6B7787;
  --agc-line: #E7E1D3;
  --agc-radius: 16px;
  --agc-shadow: 0 4px 14px rgba(10, 37, 64, 0.07);
  --agc-shadow-lg: 0 14px 34px rgba(10, 37, 64, 0.13);
  --agc-gold-grad: linear-gradient(135deg, #E4C97E, #C9A24B);
  --agc-font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --agc-display: "Sora", "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
}

.agc-body {
  margin: 0;
  background:
    radial-gradient(1100px 460px at 50% -160px, #FFFDF8 0%, rgba(251,247,239,0) 70%),
    var(--agc-cream);
  color: var(--agc-ink);
  font-family: var(--agc-font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.agc-app {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 16px 56px;
}

/* ---- Header ---- */
.agc-header {
  position: relative; overflow: hidden;
  display: flex; flex-wrap: wrap; gap: 14px;
  align-items: center; justify-content: space-between;
  background:
    radial-gradient(120% 140% at 88% -20%, #15406b 0%, rgba(21,64,107,0) 55%),
    linear-gradient(135deg, var(--agc-navy), var(--agc-navy-2));
  color: #fff;
  margin: 16px -16px 0;
  padding: 20px 22px;
  border-radius: 0 0 22px 22px;
  border-bottom: 3px solid transparent;
  border-image: var(--agc-gold-grad) 1;
  box-shadow: var(--agc-shadow-lg);
}
.agc-header-glow {
  position: absolute; inset: auto -40px -90px auto; width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(201,162,75,.30), rgba(201,162,75,0) 70%);
  pointer-events: none;
}
.agc-header-brand { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.agc-crest {
  width: 54px; height: 54px; object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,.45));
}
.agc-title {
  margin: 0; font-family: var(--agc-display);
  font-size: 22px; font-weight: 800; letter-spacing: .2px; line-height: 1.1;
}
.agc-title-gold {
  background: var(--agc-gold-grad); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent;
}
.agc-subtitle { margin: 4px 0 0; font-size: 12px; color: #AEBED2; }

.agc-sst { display: flex; align-items: center; position: relative; z-index: 1; }
.agc-sst-badge {
  font-size: 12px; font-weight: 600; color: #fff;
  background: rgba(201,162,75,.18); border: 1px solid rgba(201,162,75,.55);
  padding: 8px 13px; border-radius: 999px; white-space: nowrap;
  backdrop-filter: blur(4px);
}
.agc-sst-badge strong { color: var(--agc-gold-soft); }

/* ---- Global SST tickbox bar (applies to both tabs) ---- */
.agc-sstbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  margin: 0 0 14px; padding: 12px 14px; border-radius: var(--agc-radius);
  background: rgba(201,162,75,.12); border: 1px solid rgba(201,162,75,.45);
}
.agc-sst-tick { font-weight: 700; }
.agc-sst-note { font-size: 12.5px; color: var(--agc-muted); }

.agc-header-mascot {
  position: absolute; right: 12px; bottom: -8px; width: 84px; height: auto;
  opacity: .92; pointer-events: none; z-index: 0;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.35));
  display: none; /* shown on wider screens (see media query) */
}

/* ---- Tabs ---- */
.agc-tabs {
  display: flex; gap: 6px; margin: 18px 0 16px; padding: 6px;
  background: #fff; border-radius: 999px; box-shadow: var(--agc-shadow);
  border: 1px solid var(--agc-line);
}
.agc-tab {
  flex: 1; padding: 13px; border: none; cursor: pointer;
  background: transparent; color: var(--agc-muted);
  font-weight: 800; font-size: 13.5px; letter-spacing: 1px;
  border-radius: 999px; transition: color .2s, background .2s, box-shadow .2s;
}
.agc-tab:hover { color: var(--agc-navy); }
.agc-tab--active {
  background: var(--agc-navy); color: #fff;
  box-shadow: 0 4px 12px rgba(10,37,64,.25);
}
.agc-tab--active:hover { color: #fff; }

/* ---- Panels / cards ---- */
.agc-panel { display: none; }
.agc-panel--active { display: block; animation: agc-fade .28s ease both; }
@keyframes agc-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.agc-card {
  position: relative; background: #fff; border-radius: var(--agc-radius);
  box-shadow: var(--agc-shadow); padding: 20px; margin-bottom: 14px;
  border: 1px solid var(--agc-line);
  transition: box-shadow .22s ease, transform .22s ease;
}
.agc-card:hover { box-shadow: var(--agc-shadow-lg); }
.agc-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.agc-card-title {
  margin: 0 0 14px; font-family: var(--agc-display);
  font-size: 16px; color: var(--agc-navy); font-weight: 700;
  display: flex; align-items: center; gap: 9px;
}
.agc-card-title::before {
  content: ''; width: 4px; height: 17px; border-radius: 3px;
  background: var(--agc-gold-grad);
}
.agc-card-head .agc-card-title { margin-bottom: 0; }
.agc-subhead {
  margin: 16px 0 8px; font-size: 11.5px; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--agc-gold); font-weight: 700;
}
.agc-hint { margin: 0 0 12px; font-size: 12.5px; color: var(--agc-muted); }

/* ---- Forms ---- */
.agc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.agc-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.agc-field-label { font-size: 12.5px; font-weight: 600; color: var(--agc-ink); }
.agc-field-label small { color: var(--agc-muted); font-weight: 400; }

.agc-input, .agc-select {
  width: 100%; padding: 12px 13px; font-size: 16px; /* 16px avoids iOS zoom */
  border: 1.5px solid var(--agc-line); border-radius: 11px;
  background: #fff; color: var(--agc-ink); min-height: 46px;
  font-family: inherit; transition: border-color .18s, box-shadow .18s;
}
.agc-input:hover, .agc-select:hover { border-color: #d7cdb2; }
.agc-input:focus, .agc-select:focus {
  outline: none; border-color: var(--agc-gold);
  box-shadow: 0 0 0 3.5px rgba(201,162,75,.22);
}
.agc-input--err { border-color: var(--agc-coral); box-shadow: 0 0 0 3px rgba(255,107,91,.18); }

.agc-rate-note {
  margin: 6px 0 0; padding: 11px 13px; border-radius: 11px;
  background: linear-gradient(0deg, #fff, #fff) padding-box,
              var(--agc-cream);
  border: 1px dashed var(--agc-gold);
  font-size: 13px; font-weight: 600; color: var(--agc-navy);
}

/* ---- Icons ---- */
.agc-ic { width: 17px; height: 17px; flex: none; vertical-align: -3px; }
.agc-ic-sm { width: 13px; height: 13px; flex: none; vertical-align: -2px; opacity: .85; }

/* ---- Buttons ---- */
.agc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: none; cursor: pointer; font-weight: 700; font-size: 13px;
  font-family: inherit; padding: 10px 16px; border-radius: 11px; min-height: 44px;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, filter .2s ease;
}
.agc-btn--gold { background: var(--agc-gold-grad); color: var(--agc-navy); box-shadow: 0 4px 12px rgba(201,162,75,.32); }
.agc-btn--gold:hover { filter: brightness(1.04); box-shadow: 0 6px 16px rgba(201,162,75,.42); }
.agc-btn--ghost { background: #fff; color: var(--agc-navy); border: 1.5px solid var(--agc-gold); }
.agc-btn--ghost:hover { background: var(--agc-cream); }
.agc-btn--coral { background: var(--agc-coral); color: #fff; }
.agc-btn:active { transform: translateY(1px) scale(.99); }
.agc-btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; filter: none; }

/* ---- Upline chain ---- */
.agc-upline-list { display: flex; flex-direction: column; gap: 10px; }
.agc-upline {
  display: grid; grid-template-columns: 26px 1fr 1fr 40px;
  gap: 8px; align-items: end;
  padding: 10px; border-radius: 12px; background: var(--agc-cream);
  border: 1px solid var(--agc-line);
}
.agc-upline-badge {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--agc-navy); color: var(--agc-gold-soft);
  font-size: 12px; font-weight: 800; align-self: center;
}
.agc-upline .agc-field { margin-bottom: 0; }
.agc-upline-remove {
  align-self: center; background: transparent; border: none; cursor: pointer;
  color: var(--agc-coral); font-size: 22px; line-height: 1; padding: 0;
}

/* ---- Interactive override chain ---- */
.agc-chain { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.agc-connector { text-align: center; color: var(--agc-gold); font-size: 14px; line-height: 1; margin: 2px 0; }
.agc-node {
  border-radius: 14px; padding: 12px 14px; border: 1.5px solid var(--agc-line);
  background: #fff;
}
.agc-node--ren {
  background: linear-gradient(135deg, var(--agc-navy), var(--agc-navy-2));
  color: #fff; border: none;
}
.agc-node-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.agc-node-tag { font-size: 12px; font-weight: 800; letter-spacing: .6px; }
.agc-node--ren .agc-node-tag { color: var(--agc-gold-soft); }
.agc-node-rate { font-size: 12px; font-weight: 700; color: var(--agc-muted); }
.agc-node--ren .agc-node-rate { color: #B9C6D6; }
.agc-node-pay { display: flex; align-items: baseline; justify-content: space-between; margin-top: 6px; }
.agc-node-pay-label { font-size: 11.5px; color: #B9C6D6; text-transform: uppercase; letter-spacing: .5px; }
.agc-node-pay-val { font-size: 22px; font-weight: 900; color: #fff; }

.agc-layer { border-left: 4px solid var(--agc-gold); }
.agc-layer--off { opacity: .55; border-left-color: var(--agc-line); background: var(--agc-cream); }
.agc-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.agc-check input { width: 20px; height: 20px; accent-color: var(--agc-gold); }
.agc-layer-body { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.agc-layer--off .agc-layer-body { opacity: .6; }
.agc-layer-pay { display: flex; gap: 8px; flex-wrap: wrap; }
.agc-pay-chip {
  flex: 1; min-width: 90px; background: var(--agc-cream); border: 1px solid var(--agc-line);
  border-radius: 10px; padding: 8px 10px; text-align: center;
}
.agc-pay-chip span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--agc-muted); }
.agc-pay-chip b { font-size: 14px; color: var(--agc-navy); }
.agc-pay-chip--total { background: rgba(201,162,75,.18); border-color: var(--agc-gold); }
.agc-pay-chip--total b { color: var(--agc-navy); }

/* ---- Rank ladder ---- */
.agc-ladder { display: flex; flex-direction: column-reverse; gap: 6px; }
.agc-rung {
  display: grid; grid-template-columns: 28px 1fr auto auto; gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: 10px; background: var(--agc-cream);
  border: 1px solid var(--agc-line); border-left: 4px solid var(--agc-gold);
}
.agc-rung-no {
  width: 24px; height: 24px; border-radius: 50%; background: var(--agc-navy);
  color: var(--agc-gold-soft); font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.agc-rung-name { font-weight: 800; color: var(--agc-navy); font-size: 13.5px; letter-spacing: .3px; }
.agc-rung-acc { font-size: 12px; color: var(--agc-muted); }
.agc-rung-rate {
  font-weight: 900; color: var(--agc-navy); background: var(--agc-gold);
  padding: 3px 10px; border-radius: 999px; font-size: 13px;
}

/* ---- Hero ---- */
.agc-hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(130% 120% at 85% -30%, #15406b 0%, rgba(21,64,107,0) 55%),
    linear-gradient(135deg, var(--agc-navy), var(--agc-navy-2));
  color: #fff; text-align: center; border: none;
  display: flex; flex-direction: column; gap: 7px; padding: 26px 22px;
  box-shadow: var(--agc-shadow-lg);
}
.agc-hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--agc-gold-grad);
}
.agc-hero-label { font-size: 11.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--agc-gold-soft); font-weight: 700; }
.agc-hero-value {
  font-family: var(--agc-display); font-size: 40px; font-weight: 800;
  color: #fff; letter-spacing: .5px; line-height: 1.05;
  font-variant-numeric: tabular-nums; text-shadow: 0 2px 18px rgba(201,162,75,.28);
}
.agc-hero-sub { font-size: 13px; color: #B9C6D6; }

/* ---- Tables ---- */
.agc-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.agc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 460px; }
.agc-table th, .agc-table td { padding: 10px 8px; text-align: right; border-bottom: 1px solid var(--agc-line); white-space: nowrap; }
.agc-table th:first-child, .agc-table td:first-child { text-align: left; }
.agc-table thead th {
  background: var(--agc-navy); color: #fff; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .5px; font-weight: 700;
}
.agc-th-group { text-align: center !important; background: var(--agc-gold) !important; color: var(--agc-navy) !important; }
.agc-th-group--alt { background: var(--agc-coral) !important; color: #fff !important; }
.agc-table tbody tr.agc-row-me { background: rgba(201,162,75,.16); font-weight: 700; }
.agc-table tbody tr.agc-row-empty { opacity: .45; }
.agc-table tbody tr.agc-row-total td { border-top: 2px solid var(--agc-navy); font-weight: 800; }
.agc-table--ref td:first-child, .agc-table--ref th:first-child { text-align: left; }
.agc-table tr.agc-band-hit { background: rgba(255,107,91,.14); font-weight: 800; }

/* ---- Notices ---- */
.agc-cap-notice {
  margin: 0 0 12px; padding: 12px 14px; border-radius: 10px;
  background: rgba(255,107,91,.12); border-left: 4px solid var(--agc-coral);
  color: #8a2b22; font-size: 13px; font-weight: 600;
}
.agc-legend {
  margin: 10px 0 0; font-size: 12px; color: var(--agc-muted); line-height: 1.5;
}
.agc-legend strong { color: var(--agc-navy); }
.agc-incentive-flag { margin-top: 12px; font-size: 13.5px; }

/* Read-only inputs (Primary deal fields when viewing as REN) */
.agc-input:disabled, .agc-select:disabled {
  background: #F1EEE6; color: var(--agc-muted); cursor: not-allowed; border-style: dashed;
}
.agc-readonly-note {
  margin: 0 0 10px; font-size: 12.5px; font-weight: 600; color: var(--agc-gold);
}
.agc-incentive-flag .agc-chip {
  display: inline-block; padding: 8px 12px; border-radius: 999px;
  background: var(--agc-gold); color: var(--agc-navy); font-weight: 800;
}

/* ---- Primary roles / gate ---- */
.agc-role-row { display: flex; gap: 8px; flex-wrap: wrap; }
.agc-role {
  flex: 1 1 60px; padding: 12px 10px; cursor: pointer; font-weight: 800; font-size: 13px;
  border-radius: 10px; border: 1.5px solid var(--agc-line);
  background: #fff; color: var(--agc-muted); white-space: nowrap;
}
.agc-role--active { background: var(--agc-navy); color: #fff; border-color: var(--agc-gold); }
.agc-gate { margin-top: 12px; }
.agc-gate-row { display: flex; gap: 8px; }
.agc-gate-row .agc-input { flex: 1; }
.agc-gate-msg { margin-top: 8px; font-size: 13px; font-weight: 700; }
.agc-gate-msg--ok { color: #1f7a4d; }
.agc-gate-msg--err { color: var(--agc-coral); }
.agc-locked { display: none !important; }

/* ---- Projects list ---- */
.agc-btn-row { display: flex; gap: 8px; }
.agc-save-status { display: block; margin-top: 8px; font-size: 13px; font-weight: 700; }
.agc-save-ok { color: #1f7a4d; }
.agc-save-err { color: var(--agc-coral); }
.agc-projects { display: flex; flex-direction: column; gap: 12px; }
.agc-project {
  padding: 12px; border-radius: 12px; background: var(--agc-cream);
  border: 1px solid var(--agc-line); border-left: 4px solid var(--agc-gold);
}
.agc-project-top { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.agc-project-top .agc-proj-name { flex: 1; font-weight: 700; }
.agc-project-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.agc-project-fields .agc-field { margin-bottom: 0; }
.agc-project .agc-ticks { margin-top: 10px; }
.agc-proj-remove {
  background: transparent; border: none; cursor: pointer; color: var(--agc-coral);
  font-size: 24px; line-height: 1; padding: 0 4px;
}
.agc-proj-remove:disabled { color: var(--agc-line); cursor: not-allowed; }
.agc-struct-tag { color: var(--agc-muted); font-weight: 600; font-size: 11px; }
.agc-project { cursor: pointer; transition: box-shadow .12s, border-color .12s; }
.agc-project--sel {
  border-color: var(--agc-gold); box-shadow: 0 0 0 2px rgba(201,162,75,.35);
  background: #fff;
}
#agc-primary-table tbody tr { cursor: pointer; }
#agc-primary-table tbody tr.agc-row-sel td { background: rgba(201,162,75,.16); }
#agc-primary-table tbody tr.agc-row-sel td.agc-col-me { background: rgba(201,162,75,.30); }

/* comparison table highlight for the logged-in role */
.agc-table th.agc-col-me { background: var(--agc-gold) !important; color: var(--agc-navy) !important; }
.agc-table td.agc-col-me { background: rgba(201,162,75,.14); font-weight: 800; }
.agc-table td.agc-cell-best { background: rgba(201,162,75,.34); }

/* ---- Primary tick-boxes + target ---- */
.agc-ticks { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.agc-tick {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 10px 14px; border-radius: 10px; border: 1.5px solid var(--agc-line);
  background: var(--agc-cream); font-size: 13.5px; font-weight: 700; color: var(--agc-navy);
}
.agc-tick input { width: 20px; height: 20px; accent-color: var(--agc-gold); }
.agc-tick input:disabled { cursor: not-allowed; }
.agc-target-result { margin-top: 10px; font-size: 14px; color: var(--agc-ink); }
.agc-target-big {
  display: inline-block; background: var(--agc-gold); color: var(--agc-navy);
  font-weight: 900; font-size: 18px; padding: 4px 12px; border-radius: 999px; margin-right: 6px;
}
.agc-target-bad { color: var(--agc-coral); font-weight: 700; }

/* ---- Scenarios ---- */
.agc-scenario-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.agc-scenario {
  padding: 12px; border-radius: 12px; background: var(--agc-cream);
  border: 1px solid var(--agc-line);
}

/* ---- Footer ---- */
.agc-footer {
  text-align: center; color: var(--agc-muted); font-size: 11.5px; margin-top: 14px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.agc-footer img { width: 22px; height: 22px; object-fit: contain; opacity: .8; }

/* ---- Card mascot accent ---- */
.agc-card--mascot { overflow: hidden; }
.agc-card-mascot {
  position: absolute; right: -10px; top: -6px; width: 92px; height: auto;
  opacity: .16; pointer-events: none; transform: rotate(4deg);
}

/* ---- Money figures: tabular alignment ---- */
.agc-table td, .agc-table th { font-variant-numeric: tabular-nums; }

/* ---- Accessibility: visible focus ring ---- */
.agc-app a:focus-visible,
.agc-app button:focus-visible,
.agc-app input:focus-visible,
.agc-app select:focus-visible {
  outline: 3px solid rgba(201,162,75,.55); outline-offset: 2px; border-radius: 8px;
}

/* ---- Responsive ---- */
@media (min-width: 600px) {
  .agc-header { padding-right: 120px; }
  .agc-header-mascot { display: block; }
}
@media (max-width: 560px) {
  .agc-grid, .agc-scenario-grid { grid-template-columns: 1fr; }
  .agc-title { font-size: 19px; }
  .agc-hero-value { font-size: 32px; }
  .agc-sst { width: 100%; }
  .agc-header { padding: 18px; }
}

/* ---- Respect reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .agc-panel--active { animation: none; }
  .agc-app *, .agc-app *::before, .agc-app *::after {
    transition-duration: .01ms !important; animation-duration: .01ms !important;
  }
}

/* ---- Print ---- */
@media print {
  .agc-body { background: #fff; }
  .agc-tabs, .agc-btn, .agc-sst, .agc-role-row, .agc-gate,
  .agc-header-mascot, .agc-card-mascot, .agc-header-glow { display: none !important; }
  .agc-card:hover { box-shadow: none; }
  .agc-card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .agc-header { background: var(--agc-navy) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .agc-hero { background: var(--agc-navy) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .agc-table thead th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* =============================================================================
 * DARK THEME — when embedded inside the IQI AG Warriors app.
 * Remaps the agc- tokens to the app's charcoal/red/gold palette and overrides
 * the few hard-coded light surfaces. Scoped to .agc-app so nothing leaks out.
 * ========================================================================== */
.agc-app {
  --agc-navy: #202a36;        /* deep panel (hero/rungs) */
  --agc-navy-2: #161d27;
  --agc-gold: #C8A064;
  --agc-gold-soft: #E4C97E;
  --agc-coral: #FF6B5B;
  --agc-cream: #1c1c1c;       /* was light bg -> dark */
  --agc-ink: #F2F2F2;         /* body text -> light */
  --agc-muted: #AEB4BD;
  --agc-line: #333;
  color: var(--agc-ink);
  max-width: none; padding: 0;
}
.agc-role-banner {
  margin: 0 0 12px; padding: 9px 12px; border-radius: 10px;
  background: rgba(200,160,100,.12); border: 1px solid rgba(200,160,100,.4);
  color: var(--agc-gold-soft); font-size: .8rem; font-weight: 600;
}
.agc-app .agc-card { background: #232323; border-color: #333; color: var(--agc-ink); }
.agc-app .agc-card:hover { box-shadow: 0 10px 26px rgba(0,0,0,.45); }
.agc-app .agc-card-title { color: var(--agc-ink); }
.agc-app .agc-input, .agc-app .agc-select {
  background: #1a1a1a; color: var(--agc-ink); border-color: #3a3a3a;
}
.agc-app .agc-input::placeholder { color: #777; }
.agc-app .agc-input:hover, .agc-app .agc-select:hover { border-color: #555; }
.agc-app .agc-input:disabled, .agc-app .agc-select:disabled { background: #202020; color: #8a8a8a; border-style: dashed; }
.agc-app .agc-tabs { background: #1a1a1a; border-color: #333; }
.agc-app .agc-tab { color: var(--agc-muted); }
.agc-app .agc-tab:hover { color: #fff; }
.agc-app .agc-tab--active { background: linear-gradient(180deg, #C8102E, #8C0000); color: #fff; box-shadow: none; }
.agc-app .agc-btn--ghost { background: transparent; color: var(--agc-ink); border-color: #444; }
.agc-app .agc-btn--ghost:hover { background: #2a2a2a; }
.agc-app .agc-table thead th { background: #111; color: #fff; }
.agc-app .agc-table td, .agc-app .agc-table th { border-color: #333; }
.agc-app .agc-table tbody tr.agc-row-me { background: rgba(200,160,100,.16); }
.agc-app .agc-table tbody tr.agc-row-sel td { background: rgba(200,160,100,.16); }
.agc-app .agc-table tbody tr.agc-row-sel td.agc-col-me { background: rgba(200,160,100,.30); }
.agc-app .agc-rate-note { background: #1c1c1c; color: var(--agc-gold-soft); border-color: #5c4a22; }
.agc-app .agc-legend { color: var(--agc-muted); }
.agc-app .agc-legend strong { color: var(--agc-ink); }
.agc-app .agc-node { background: #1c1c1c; border-color: #333; }
.agc-app .agc-pay-chip { background: #151515; border-color: #333; }
.agc-app .agc-pay-chip b { color: var(--agc-ink); }
.agc-app .agc-rung { background: #1c1c1c; border-color: #333; }
.agc-app .agc-rung-name { color: var(--agc-ink); }
.agc-app .agc-project { background: #1c1c1c; border-color: #333; }
.agc-app .agc-project--sel { background: #232323; }
.agc-app .agc-tick { background: #151515; border-color: #333; color: var(--agc-ink); }
.agc-app .agc-struct-tag { color: var(--agc-muted); }
.agc-app .agc-readonly-note { color: var(--agc-gold-soft); }
.agc-app .agc-card-mascot { opacity: .12; }


/* ---- m8 Career Path: Income Calculator launch card ---- */
.m8-income-card {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  border: 1px solid var(--color-gold);
  background: linear-gradient(180deg, #242424, #1b1b1b);
  color: #F2F2F2; cursor: pointer; margin-bottom: var(--gap);
}
.m8-income-ico { font-size: 1.55rem; line-height: 1; }
.m8-income-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.m8-income-txt .muted { font-size: .78rem; }
.m8-income-arrow { color: var(--color-gold); font-size: 1.3rem; font-weight: 800; }

/* ---- Motivational quote (rank-aware) ---- */
.agc-motiv {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0 0 14px; padding: 12px 14px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(200,16,46,.16), rgba(200,160,100,.12));
  border: 1px solid rgba(200,160,100,.45);
  color: #F2F2F2; font-size: .9rem; font-weight: 600; line-height: 1.45;
}
.agc-motiv-ic { font-size: 1.2rem; line-height: 1.2; flex: none; }

/* ---- Primary RGR: VP editor + public bonus card ---- */
.agc-rgr-edit { margin-top: 10px; border-top: 1px dashed #3a3a3a; padding-top: 8px; }
.agc-rgr-edit > summary { cursor: pointer; color: var(--agc-gold-soft); font-weight: 700; font-size: .85rem; list-style: none; }
.agc-rgr-edit > summary::-webkit-details-marker { display: none; }
.agc-rgr-enable { margin: 8px 0; }
.agc-rgr-card {
  border-radius: 12px; padding: 12px 14px; margin-bottom: 10px;
  background: linear-gradient(135deg, rgba(200,160,100,.16), rgba(200,16,46,.10));
  border: 1px solid rgba(200,160,100,.5); color: #F2F2F2;
}
.agc-rgr-card:last-child { margin-bottom: 0; }
.agc-rgr-head { display: flex; align-items: center; gap: 8px; font-size: .95rem; }
.agc-rgr-head b { flex: 1; }
.agc-rgr-status { font-size: .72rem; font-weight: 700; white-space: nowrap; }
.agc-rgr-amt { font-family: var(--agc-display); font-size: 1.25rem; font-weight: 800; color: var(--agc-gold-soft); margin: 4px 0; }
.agc-rgr-amt small { font-size: .7rem; color: var(--agc-muted); font-weight: 600; }
.agc-rgr-desc { font-size: .8rem; color: #E9E9E9; }
.agc-rgr-valid { font-size: .78rem; color: var(--agc-muted); margin-top: 4px; }
.agc-rgr-tnc { font-size: .76rem; color: var(--agc-muted); margin-top: 6px; font-style: italic; white-space: pre-wrap; }
.agc-rgr-expired { opacity: .6; }

/* ---- Compact project rows (one line each; Edit expands) ---- */
.agc-app .agc-project { padding: 0; overflow: hidden; }
.agc-proj-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; }
.agc-proj-radio { width: 18px; height: 18px; flex: none; accent-color: var(--agc-gold); cursor: pointer; }
.agc-proj-rowname { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agc-proj-rowmeta { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--agc-muted); white-space: nowrap; }
.agc-proj-rowprice { font-variant-numeric: tabular-nums; }
.agc-proj-rowren { color: var(--agc-gold-soft); font-weight: 600; }
.agc-proj-rowgift:not(:empty) { font-size: 1rem; }
.agc-proj-edit {
  flex: none; background: transparent; border: 1px solid #444; color: var(--agc-ink);
  border-radius: 9px; padding: 6px 8px; cursor: pointer; line-height: 0;
}
.agc-proj-edit:hover { border-color: var(--agc-gold); }
.agc-proj-edit:disabled { display: none; }       /* non-editors: no Edit button */
.agc-project.is-editing { border-left-color: var(--agc-gold); }
.agc-proj-editpanel { padding: 2px 14px 14px; border-top: 1px solid #333; }
@media (max-width: 480px) {
  .agc-proj-rowmeta { font-size: .74rem; gap: 7px; }
  .agc-proj-rowren { display: none; }   /* keep the line tidy on small phones */
}

/* ---- RGR column in the comparison + new-recruitment toggle ---- */
.agc-app .agc-table td.agc-col-rgr { color: var(--agc-gold-soft); font-weight: 700; }
.agc-newrecruit { margin: 4px 0 10px; }
