/* ==========================================================================
   Partners app — page styles layered on the RiverSync DS app layer.
   Only patterns the DS kit doesn't already ship: the channel-chain diagram,
   masked off-channel values, the subtype banner and a few deal/funnel bits.
   Everything else uses rs-* tokens/classes from riversync-ui.css.
   ========================================================================== */

/* ---- subtype identity banner (top of every partner page body) ---------- */
.pt-subbar{display:flex; align-items:center; gap:14px; padding:13px 18px; border:1px solid var(--border);
  border-radius:var(--r-lg); background:var(--surface); box-shadow:var(--shadow-sm); margin-bottom:20px;}
.pt-subbar__badge{display:inline-flex; align-items:center; gap:9px; flex:none;}
.pt-subbar__ic{width:34px; height:34px; border-radius:8px; display:flex; align-items:center; justify-content:center; flex:none;}
.pt-subbar__ic .rs-ic{width:18px; height:18px;}
.pt-subbar__ic--reseller{background:var(--accent-soft); color:var(--accent);}
.pt-subbar__ic--distributor{background:#EFE9F6; color:#7363A3;}
[data-theme="dark"] .pt-subbar__ic--distributor{background:#251D38; color:#B3A4DC;}
.pt-subbar__txt{display:flex; flex-direction:column; gap:1px; min-width:0;}
.pt-subbar__txt b{font-size:14px; font-weight:600; color:var(--fg);}
.pt-subbar__txt span{font-size:12px; color:var(--fg2);}
.pt-subbar__spacer{flex:1 1 auto;}
.pt-subtype-tag{font-size:10.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  padding:3px 9px; border-radius:var(--r-pill); border:1px solid;}
.pt-subtype-tag--reseller{color:var(--accent); background:var(--accent-soft); border-color:transparent;}
.pt-subtype-tag--distributor{color:#7363A3; background:#EFE9F6; border-color:transparent;}
[data-theme="dark"] .pt-subtype-tag--distributor{color:#B3A4DC; background:#251D38;}

/* ---- channel chain — RiverSync → Distributor → Reseller → Customer ------ */
.pt-chain{display:flex; align-items:stretch; gap:0; flex-wrap:nowrap; overflow-x:auto;}
.pt-chain__node{flex:1 1 0; min-width:118px; display:flex; flex-direction:column; align-items:center; gap:8px;
  padding:16px 12px; text-align:center; position:relative;}
.pt-chain__ic{width:44px; height:44px; border-radius:10px; display:flex; align-items:center; justify-content:center;
  background:var(--surface-2); color:var(--fg2); border:1px solid var(--border);}
.pt-chain__ic .rs-ic{width:22px; height:22px;}
.pt-chain__lbl{font-size:13px; font-weight:600; color:var(--fg); line-height:1.25;}
.pt-chain__meta{font-size:11px; color:var(--fg3); line-height:1.3;}
.pt-chain__node.is-you .pt-chain__ic{background:var(--accent); color:#fff; border-color:var(--accent);}
.pt-chain__node.is-you.is-distributor .pt-chain__ic{background:#7363A3; border-color:#7363A3;}
.pt-chain__node.is-you .pt-chain__lbl{color:var(--accent);}
.pt-chain__node.is-you.is-distributor .pt-chain__lbl{color:#7363A3;}
[data-theme="dark"] .pt-chain__node.is-you.is-distributor .pt-chain__lbl{color:#B3A4DC;}
.pt-chain__youtag{position:absolute; top:6px; font-size:9px; font-weight:700; letter-spacing:.1em; text-transform:uppercase;
  color:var(--accent); background:var(--accent-soft); padding:1px 7px; border-radius:var(--r-pill);}
.pt-chain__node.is-distributor .pt-chain__youtag{color:#7363A3; background:#EFE9F6;}
.pt-chain__arrow{align-self:center; flex:none; color:var(--fg3); display:flex; align-items:center; padding:0 2px; margin-top:14px;}
.pt-chain__arrow .rs-ic{width:18px; height:18px;}
.pt-chain__arrow.is-alt{color:var(--accent);}
/* direct path note */
.pt-chain__direct{margin-top:8px; display:flex; align-items:center; gap:9px; font-size:12px; color:var(--fg2);
  padding:10px 14px; border-top:1px dashed var(--border-strong);}
.pt-chain__direct .rs-ic{width:15px; height:15px; color:var(--accent); flex:none;}

/* ---- masked off-channel value (distributor funnel, PRT-12) -------------- */
.pt-masked{display:inline-flex; align-items:center; gap:5px; font-variant-numeric:tabular-nums;
  color:var(--fg3); font-size:12.5px;}
.pt-masked .rs-ic{width:13px; height:13px; opacity:.7;}
.pt-masked__bar{display:inline-block; width:46px; height:9px; border-radius:3px;
  background:repeating-linear-gradient(45deg,var(--surface-3) 0 4px,var(--surface-2) 4px 8px);}

/* ---- channel-source cell (which way a deal flows) ---------------------- */
.pt-source{display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:550; color:var(--fg2); white-space:nowrap;}
.pt-source .rs-ic{width:13px; height:13px; color:var(--fg3);}
.pt-source--direct{color:var(--accent);}
.pt-source--direct .rs-ic{color:var(--accent);}

/* ---- stage pill (deal funnel stages) ----------------------------------- */
.pt-stage{display:inline-flex; align-items:center; gap:6px; font-size:11.5px; font-weight:600; white-space:nowrap;}
.pt-stage__dot{width:7px; height:7px; border-radius:50%; flex:none;}

/* ---- two-up / grid helpers --------------------------------------------- */
.pt-grid-2{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; align-items:start;}
.pt-grid-3{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px;}
.pt-grid-4{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px;}
@media (max-width:1100px){ .pt-grid-4{grid-template-columns:repeat(2,minmax(0,1fr));} .pt-grid-3{grid-template-columns:repeat(2,minmax(0,1fr));} }
@media (max-width:760px){ .pt-grid-2,.pt-grid-3,.pt-grid-4{grid-template-columns:1fr;} }

/* ---- org cell (logo tile + name) reused across tables ------------------ */
.pt-org{display:flex; align-items:center; gap:11px; min-width:180px;}
.pt-org__meta{display:flex; flex-direction:column; gap:2px; min-width:0;}
.pt-org__meta b{font-size:13px; font-weight:600; color:var(--fg);}
.pt-org__meta span{font-size:11.5px; color:var(--fg3);}

/* ---- quick-link cards on the overview ---------------------------------- */
.pt-quick{display:flex; align-items:flex-start; gap:13px; padding:16px; border:1px solid var(--border);
  border-radius:var(--r-lg); background:var(--surface); box-shadow:var(--shadow-sm); text-decoration:none;
  color:inherit; transition:border-color .12s, background .12s;}
.pt-quick:hover{border-color:var(--border-strong); background:var(--surface-2);}
.pt-quick__ic{width:38px; height:38px; border-radius:9px; background:var(--accent-soft); color:var(--accent);
  display:flex; align-items:center; justify-content:center; flex:none;}
.pt-quick__ic .rs-ic{width:19px; height:19px;}
.pt-quick__b{font-size:13.5px; font-weight:600; color:var(--fg); margin-bottom:3px;}
.pt-quick__p{font-size:12px; color:var(--fg2); line-height:1.4;}
.pt-quick__n{margin-left:auto; font-size:18px; font-weight:600; color:var(--fg); font-variant-numeric:tabular-nums; flex:none;}

/* ---- tier ladder (program levels) -------------------------------------- */
.tier-ladder{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px;}
.tier-step{position:relative; padding:18px 16px 16px; border:1px solid var(--border); border-radius:var(--r-lg);
  background:var(--surface); box-shadow:var(--shadow-sm); display:flex; flex-direction:column; gap:9px;}
.tier-step.is-current{border-color:var(--accent); box-shadow:0 0 0 1px var(--accent), var(--shadow-sm);}
.tier-step.is-locked{opacity:.62;}
.tier-step__tag{position:absolute; top:-9px; left:16px; font-size:9px; font-weight:700; letter-spacing:.08em;
  text-transform:uppercase; color:#fff; background:var(--accent); padding:2px 9px; border-radius:var(--r-pill);}
.tier-step__d{font-size:11.5px; color:var(--fg2); line-height:1.45;}
.tier-step__head{display:flex; align-items:center; justify-content:space-between; gap:8px;}
.tier-step__lock{color:var(--fg3);}
.tier-step__lock .rs-ic{width:14px; height:14px;}

/* ---- scorecard (qualification pillars) --------------------------------- */
.score-pillar{margin-bottom:18px;}
.score-pillar:last-child{margin-bottom:0;}
.score-pillar__h{display:flex; align-items:center; gap:8px; margin-bottom:10px;}
.score-pillar__h b{font-size:11px; font-weight:700; letter-spacing:.07em; text-transform:uppercase; color:var(--fg2);}
.score-pillar__h .rs-ic{width:15px; height:15px; color:var(--accent);}
.score-row{display:grid; grid-template-columns:1fr auto; gap:4px 12px; padding:11px 0; border-top:1px solid var(--border); align-items:center;}
.score-row:first-of-type{border-top:0;}
.score-row__b{font-size:12.5px; color:var(--fg); font-weight:520;}
.score-row__v{font-size:12px; font-weight:600; font-variant-numeric:tabular-nums; color:var(--fg2); white-space:nowrap;}
.score-row__v.met{color:var(--success);}
.score-row__track{grid-column:1 / -1; height:5px; border-radius:3px; background:var(--surface-3); overflow:hidden;}
.score-row__fill{height:100%; border-radius:3px; background:var(--accent); transition:width .9s var(--ease);}
.score-row__fill.met{background:var(--success);}

/* ---- journey roadmap (vertical) ---------------------------------------- */
.road{position:relative; padding-left:30px;}
.road::before{content:""; position:absolute; left:11px; top:8px; bottom:8px; width:2px; background:var(--border-strong);}
.road__step{position:relative; padding:0 0 22px;}
.road__step:last-child{padding-bottom:0;}
.road__dot{position:absolute; left:-30px; top:0; width:24px; height:24px; border-radius:50%; display:flex;
  align-items:center; justify-content:center; background:var(--surface); border:2px solid var(--border-strong); color:var(--fg3);}
.road__dot .rs-ic{width:13px; height:13px;}
.road__step.is-done .road__dot{background:var(--success); border-color:var(--success); color:#fff;}
.road__step.is-current .road__dot{background:var(--accent); border-color:var(--accent); color:#fff;}
.road__t{font-size:13.5px; font-weight:600; color:var(--fg); margin-bottom:3px;}
.road__step.is-upcoming .road__t{color:var(--fg2);}
.road__p{font-size:12px; color:var(--fg2); line-height:1.5;}
.road__gap{margin-top:9px; display:flex; flex-direction:column; gap:6px;}
.road__gapitem{display:flex; align-items:center; gap:8px; font-size:12px; color:var(--fg2);
  padding:7px 11px; border:1px solid var(--warning-border); border-radius:var(--r-md); background:var(--warning-soft);}
.road__gapitem .rs-ic{width:13px; height:13px; color:var(--warning); flex:none;}
.road__gapitem b{color:var(--fg); font-variant-numeric:tabular-nums;}

/* ---- capability comparison matrix -------------------------------------- */
.cap-table{width:100%; border-collapse:collapse; font-size:12.5px;}
.cap-table th, .cap-table td{padding:11px 12px; text-align:left; border-bottom:1px solid var(--border); vertical-align:middle;}
.cap-table thead th{font-size:10px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--fg2);
  border-bottom:1px solid var(--border-strong);}
.cap-table th.cap-col, .cap-table td.cap-col{text-align:center; width:130px; color:var(--fg2);}
.cap-table .cap-col--current{background:var(--accent-soft);}
.cap-table thead .cap-col--current{color:var(--accent);}
.cap-table td.cap-feature{font-weight:520; color:var(--fg);}
.cap-table td.cap-col b{color:var(--fg); font-weight:600;}
.cap-yes{color:var(--success);}
.cap-no{color:var(--fg3);}
.cap-colhead{display:inline-flex; align-items:center; gap:6px; justify-content:center;}
.cap-colhead .rs-ic{width:14px; height:14px;}

/* ---- preview-as control + eligibility banner --------------------------- */
.tier-preview{display:inline-flex; align-items:center; gap:0; border:1px solid var(--border-strong); border-radius:var(--r-md); overflow:hidden;}
.tier-preview button{font:inherit; font-size:12px; font-weight:550; padding:7px 13px; border:0; background:var(--surface);
  color:var(--fg2); cursor:pointer; border-left:1px solid var(--border);}
.tier-preview button:first-child{border-left:0;}
.tier-preview button.is-on{background:var(--accent); color:#fff;}
.elig{display:flex; align-items:center; gap:11px; padding:14px 16px; border-radius:var(--r-lg); margin-bottom:18px;}
.elig--ready{background:var(--success-soft); border:1px solid var(--success-border);}
.elig--progress{background:var(--accent-soft); border:1px solid transparent;}
.elig--top{background:var(--surface-2); border:1px solid var(--border);}
.elig__ic{width:30px; height:30px; border-radius:8px; display:flex; align-items:center; justify-content:center; flex:none; color:#fff;}
.elig--ready .elig__ic{background:var(--success);}
.elig--progress .elig__ic{background:var(--accent);}
.elig--top .elig__ic{background:var(--fg3);}
.elig b{font-size:13.5px; color:var(--fg);}
.elig p{font-size:12px; color:var(--fg2); margin:1px 0 0; line-height:1.4;}

/* ---- note row ----------------------------------------------------------- */
.pt-note{font-size:12px; color:var(--fg3); line-height:1.5;}
.rs-tablewrap{overflow:visible;}
/* data-heavy tables: scroll horizontally rather than overflow the page on
   narrower viewports (Deals keeps its row-action menus escaping at desktop width) */
@media (max-width:1000px){ .rs-tablewrap{overflow-x:auto; overflow-y:visible;} }
