/* Partner home — earnings summary, attention list, recent releases. */
.global-nav-item.partner-home-nav { display: flex !important; }

.ph-page, .ph-scope {
  --ph-ink: var(--ink, #090A0D);
  --ph-muted: var(--text-secondary, #69717D);
  --ph-line: var(--border, #DDE1E7);
  --ph-orange: var(--brand-orange, #F96302);
  --ph-radius: 14px;
  display: grid;
  gap: 16px;
  min-width: 0;
}
.ph-scope { display: block; }
.ph-page > * { min-width: 0; }
.ph-header { margin-bottom: 4px; }
.ph-header h1:focus { outline: none; }

.ph-card {
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--ph-line);
  border-radius: var(--ph-radius);
  background: var(--surface, #fff);
}
.ph-card h2 { margin: 0; font-size: 15px; font-weight: 650; }
.ph-card-head small { display: block; margin-top: 2px; color: var(--ph-muted); font-size: 12px; font-weight: 500; }
.ph-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ph-card-head .text-button { color: var(--ph-orange); font-size: 13px; font-weight: 600; white-space: nowrap; }
.ph-kicker { margin: 0; color: var(--ph-muted); font-size: 12px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.ph-muted { margin: 0; color: var(--ph-muted); font-size: 13px; }

/* Money row */
.ph-finance { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; }
.ph-balance {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 20px 22px;
  border-radius: var(--ph-radius);
  color: #fff;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(249, 99, 2, .38), transparent 55%),
    linear-gradient(160deg, #191C22, #090A0D);
}
.ph-balance .ph-kicker { color: rgba(255, 255, 255, .66); }
.ph-balance-amount {
  display: block;
  margin: 10px 0 4px;
  font-size: clamp(30px, 4.2vw, 40px);
  font-weight: 680;
  letter-spacing: -.03em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.ph-balance-note { color: rgba(255, 255, 255, .62); font-size: 13px; }
.ph-balance-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 18px; }
.ph-balance-actions .button { flex: 0 1 auto; }
.ph-balance-actions .button[disabled] { opacity: .5; cursor: not-allowed; }
.ph-button-ghost { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: #fff; }
.ph-button-ghost:hover { background: rgba(255, 255, 255, .16); }
.ph-balance-reason { margin: 10px 0 0; color: rgba(255, 255, 255, .72); font-size: 13px; line-height: 1.4; }

.ph-earnings { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto 1fr; column-gap: 16px; align-items: start; }
.ph-earnings .ph-kicker, .ph-earnings-amount, .ph-earnings .ph-delta { grid-column: 1; }
.ph-earnings-amount { display: block; margin: 8px 0 6px; font-size: 26px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ph-delta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; color: var(--ph-muted); font-size: 13px; }
.ph-delta svg { width: 16px; height: 16px; }
.ph-delta b { font-weight: 650; font-variant-numeric: tabular-nums; }
.ph-delta.is-up b, .ph-delta.is-up svg { color: var(--success, #18845B); }
.ph-delta.is-down b, .ph-delta.is-down svg { color: var(--danger, #C33D43); }

.ph-chart { grid-column: 2; grid-row: 1 / span 3; align-self: stretch; width: min(320px, 38vw); display: flex; flex-direction: column; min-height: 112px; }
.ph-bars { flex: 1; display: flex; align-items: flex-end; justify-content: space-evenly; gap: 6px; min-height: 84px; padding-bottom: 6px; border-bottom: 1px solid var(--ph-line); }
.ph-bar { flex: 1 1 0; min-width: 6px; max-width: 34px; height: var(--h); border-radius: 5px 5px 2px 2px; background: color-mix(in srgb, var(--ph-orange) 26%, var(--surface-3, #E7EAEE)); }
.ph-bar.is-current { background: var(--ph-orange); }
.ph-chart-ticks { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; color: var(--ph-muted); font-size: 11px; white-space: nowrap; }

/* Two-column content rows */
.ph-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.ph-rank { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ph-rank-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-rows: auto auto; column-gap: 10px; row-gap: 6px; align-items: center; }
.ph-rank-name { min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 550; }
.ph-rank-name > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-rank-row b { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ph-rank-row small { grid-column: 3; grid-row: 1; min-width: 42px; color: var(--ph-muted); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.ph-rank-track { grid-column: 1 / -1; grid-row: 2; height: 6px; border-radius: 99px; background: var(--surface-3, #E7EAEE); overflow: hidden; }
.ph-rank-track span { display: block; height: 100%; border-radius: inherit; background: var(--ph-orange); }

.ph-tracks, .ph-recent-list, .ph-attention-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ph-track { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 6px 0; }
.ph-track b { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ph-cover { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--surface-3, #E7EAEE); }
.ph-cover.is-empty { display: grid; place-items: center; color: var(--ph-muted); }
.ph-cover.is-empty svg { width: 20px; height: 20px; }
.ph-track-copy, .ph-release-copy, .ph-attention-copy { min-width: 0; display: grid; gap: 2px; }
.ph-track-copy strong, .ph-release-copy strong, .ph-attention-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.ph-attention-copy strong { white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
.ph-track-copy small, .ph-release-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ph-muted); font-size: 12px; }

/* Attention */
.ph-count { min-width: 24px; height: 24px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 99px; background: var(--brand-orange-soft, #FFF1E8); color: var(--brand-orange-pressed, #CC4C00); font-size: 12px; font-weight: 700; }
.ph-attention-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--ph-line); }
.ph-attention-item:first-child { border-top: 0; padding-top: 2px; }
.ph-attention-copy small { color: var(--ph-muted); font-size: 12px; line-height: 1.35; }
.ph-attention-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; background: var(--info-soft, #E4EEFC); color: var(--info, #356EC2); }
.ph-attention-icon svg { width: 20px; height: 20px; }
.ph-attention-icon.is-warning { background: var(--warning-soft, #FBEFCF); color: var(--warning, #B46B00); }
.ph-attention-icon.is-danger { background: var(--danger-soft, #FAE5E5); color: var(--danger, #C33D43); }
.ph-attention-cover.cover-thumb, .ph-release-cover.cover-thumb { width: 44px; height: 44px; border-radius: 8px; }
.ph-attention-item .button { white-space: nowrap; }

/* Product Workspace (ui-v2) home: account items at the top of its Action Center. */
.ph-workspace-attention { padding: 0 4px; }

/* Recent releases */
.ph-release { box-sizing: border-box; width: calc(100% + 16px); display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px; margin: 0 -8px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ph-release:hover { background: var(--surface-secondary, #F8F9FB); }
.ph-release:focus-visible { outline: 2px solid var(--ph-orange); outline-offset: 0; }
.ph-release-status { min-width: 0; }
.ph-release-status .status-chip { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Quiet and empty states */
.ph-quiet { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 6px 0; }
.ph-quiet > svg { width: 22px; height: 22px; flex: none; color: var(--success, #18845B); }
.ph-quiet > div { flex: 1 1 180px; display: grid; gap: 2px; }
.ph-quiet small { color: var(--ph-muted); font-size: 13px; }
.ph-recent .ph-quiet > svg { color: var(--ph-muted); }

.ph-finance-empty { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 18px; align-items: start; padding: 22px; background: linear-gradient(180deg, var(--brand-orange-soft, #FFF1E8), var(--surface, #fff) 90px); }
.ph-empty-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 14px; background: var(--surface, #fff); color: var(--ph-orange); box-shadow: 0 1px 0 var(--ph-line); }
.ph-empty-icon svg { width: 26px; height: 26px; }
.ph-empty-copy h2 { margin: 0 0 6px; font-size: 18px; }
.ph-empty-copy p { margin: 0; max-width: 640px; color: var(--ph-muted); font-size: 14px; line-height: 1.5; }
.ph-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; counter-reset: ph-step; }
.ph-steps li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--ph-line); border-radius: 99px; background: var(--surface, #fff); font-size: 13px; }
.ph-steps svg { width: 16px; height: 16px; color: var(--ph-orange); }
.ph-finance-failed { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ph-finance-failed > svg { width: 22px; height: 22px; color: var(--ph-muted); }
.ph-finance-failed > div { flex: 1 1 220px; }
.ph-finance-failed p { margin: 2px 0 0; color: var(--ph-muted); font-size: 13px; }

.ph-skeleton { min-height: 168px; background: linear-gradient(90deg, var(--surface-secondary, #F8F9FB), var(--surface-3, #E7EAEE), var(--surface-secondary, #F8F9FB)); background-size: 200% 100%; }
.ph-balance.ph-skeleton { background: linear-gradient(160deg, #2a2e36, #14161B); }
@media (prefers-reduced-motion: no-preference) {
  .ph-skeleton { animation: ph-shimmer 1.4s ease-in-out infinite; }
}
@keyframes ph-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

@media (max-width: 1080px) {
  .ph-finance { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .ph-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .ph-page { gap: 12px; }
  .ph-card { padding: 14px; }
  .ph-balance { padding: 18px 16px; }
  .ph-balance-actions .button { flex: 1 1 100%; justify-content: center; }
  .ph-earnings { grid-template-columns: minmax(0, 1fr); }
  .ph-chart { grid-column: 1; grid-row: auto; width: 100%; margin-top: 14px; min-height: 96px; }
  .ph-finance-empty { grid-template-columns: minmax(0, 1fr); padding: 18px 16px; }
  .ph-finance-empty > .button { justify-self: start; }
  .ph-attention-item { grid-template-columns: 40px minmax(0, 1fr); }
  .ph-attention-item > .button { grid-column: 2; justify-self: start; }
  .ph-attention-icon, .ph-attention-cover.cover-thumb { width: 40px; height: 40px; }
  .ph-release { grid-template-columns: 40px minmax(0, 1fr); }
  .ph-release-cover.cover-thumb { width: 40px; height: 40px; }
  .ph-release-status { grid-column: 2; }
}
