/* Tracking pages: contracts, season seats, cancellations, cards, tags, terms, missing charges and POS alerts.
   Split out of dashboard.css (first) and apple-ui-app.css (after), rules unchanged and each group in its original order.
   Loaded right after apple-ui-app.css. */

/* From dashboard.css */
#paneCreditCards .contracts-summary-item{
  background: var(--status-pill-bg, var(--surface));
  border-color: var(--status-pill-border, var(--border-strong));
}
#paneContracts .contracts-summary-item{
  background: var(--status-pill-bg, var(--surface));
  border-color: var(--status-pill-border, var(--border-strong));
}
#paneSeasonSeats .contracts-summary-item{
  background: var(--status-pill-bg, var(--surface));
  border-color: var(--status-pill-border, var(--border-strong));
}
/* Keep canceled-events insights compact */

#paneCanceledEvents .contracts-table-wrap{
  max-height: 120vh;
  overflow: auto;
}
.contracts-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contracts-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.contracts-form-grid label,
.contracts-notes-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: var(--type-body,13px);
  color: var(--text-labels, var(--text-forms, var(--text)));
}
.contracts-form-grid input,
.contracts-form-grid select,
.contracts-notes-label textarea {
  border-radius: 10px;
  padding: 10px 12px;
  font-size: var(--type-body,14px);
  font-family: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--input-text);
}
.contracts-form-grid input:focus,
.contracts-form-grid select:focus,
.contracts-notes-label textarea:focus {
  outline: none;
  border-color: color-mix(in oklab, var(--input-border-focus) 100%, transparent);
  box-shadow: 0 0 0 3px var(--input-shadow);
}
.contracts-form-grid input::placeholder,
.contracts-form-grid select::placeholder,
.contracts-notes-label textarea::placeholder {
  color: var(--input-placeholder);
}
.contracts-notes-label textarea {
  resize: vertical;
  min-height: 96px;
}
.contracts-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
#cardsTable th:last-child,
#cardsTable td:last-child {
  min-width: 220px;
}
#cancelEventsTable th,
#cancelEventsTable td {
  padding: 10px 14px;
}
#cancelEventsTable th + th,
#cancelEventsTable td + td {
  padding-left: 28px;
}
#cancelEventsTable .contracts-actions {
  gap: 4px;
}
#cancelEventsTable tbody tr{
  background: transparent;
}
#cancelEventsTable tbody td{
  background: transparent;
}
.cancel-upload{
  border:1px dashed var(--drop-border);
  border-top:2px solid var(--input-accent);
  border-radius:16px;
  padding:24px;
  text-align:center;
  background:var(--drop-bg);
  cursor:pointer;
  transition:border-color 0.2s ease, background 0.2s ease;
}
.cancel-upload:focus-within,
.cancel-upload.drag-hover{
  border-color:var(--drop-border-hover);
  border-top-color:var(--input-accent);
  background:var(--drop-bg-hover);
}
.cancel-upload p{
  margin:6px 0;
}
.cancel-upload.is-disabled{
  opacity:0.5;
  cursor:not-allowed;
  pointer-events:none;
}
#dashMpTagBody tr:nth-child(even){
  background: var(--stripe-1);
}
#paneMpTags #dashMpTagCard{
  padding:18px 18px 20px;
  background:linear-gradient(180deg,
    color-mix(in oklab, var(--card) 92%, white) 0%,
    color-mix(in oklab, var(--card) 85%, black) 100%);
  border:1px solid color-mix(in oklab, var(--border) 75%, transparent);
  box-shadow:0 24px 50px rgba(3,7,18,0.45), inset 0 1px 0 rgba(255,255,255,0.04);
  border-radius:16px;
}
#paneMpTags .dashboard-metric{
  background: var(--status-pill-bg, var(--card));
  border:1px solid var(--status-pill-border, var(--border));
  border-radius:12px;
  padding:12px 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
#paneMpTags #dashMpTagBody tr:hover{
  background: var(--surface-hover);
}
#paneMpTags #dashMpTagBody tr:nth-child(odd){
  background: var(--table-stripe-odd);
}
#paneMpTags #dashMpTagBody tr:nth-child(even){
  background: var(--table-stripe-even);
}
#paneMpTags #dashMpTagBody td{
  background: transparent;
  border:1px solid var(--table-border);
}
#paneMpTags #dashMpTagBody .btn-outline,
#paneMpTags #dashMpTagBody .btn{
  padding:6px 12px;
}
#paneMissing .dashboard-metric{
  background: var(--status-pill-bg, var(--card));
  border:1px solid var(--status-pill-border, var(--border));
  border-radius:12px;
  padding:12px 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
#paneMissing .dashboard-missing-webhook-tablist,
#paneMpTags .dashboard-missing-webhook-tablist,
#paneCreditCards .dashboard-missing-webhook-tablist{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px;
  border-radius:999px;
  border:1px solid var(--border-strong);
  background:var(--surface-subtle);
  width:max-content;
}
#paneMissing .dashboard-missing-webhook-tab,
#paneMpTags .dashboard-missing-webhook-tab,
#paneCreditCards .dashboard-missing-webhook-tab{
  border:1px solid color-mix(in oklab, var(--tab-accent, var(--accent)) 25%, transparent);
  border-radius:999px;
  padding:6px 14px;
  background: color-mix(in oklab, var(--tab-accent, var(--accent)) 16%, transparent);
  color: color-mix(in oklab, var(--tab-accent, var(--accent)) 60%, var(--text));
  font-size:var(--type-body);
  letter-spacing:0.14em;
  text-transform:uppercase;
  cursor:pointer;
  transition:background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
#paneMissing .dashboard-missing-webhook-tab[data-tab="discord"],
#paneMpTags .dashboard-missing-webhook-tab[data-tab="discord"],
#paneCreditCards .dashboard-missing-webhook-tab[data-tab="discord"]{
  --tab-accent: #5865f2;
}
#paneMissing .dashboard-missing-webhook-tab[data-tab="slack"],
#paneMpTags .dashboard-missing-webhook-tab[data-tab="slack"],
#paneCreditCards .dashboard-missing-webhook-tab[data-tab="slack"]{
  --tab-accent: #36c5f0;
}
#paneMissing .dashboard-missing-webhook-tab.is-active,
#paneMpTags .dashboard-missing-webhook-tab.is-active,
#paneCreditCards .dashboard-missing-webhook-tab.is-active{
  background: color-mix(in oklab, var(--tab-accent, var(--accent)) 32%, var(--card));
  color: color-mix(in oklab, var(--tab-accent, var(--accent)) 75%, var(--text));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--tab-accent, var(--accent)) 45%, transparent);
}
#paneMissing .dashboard-missing-webhook-tab:focus-visible,
#paneMpTags .dashboard-missing-webhook-tab:focus-visible,
#paneCreditCards .dashboard-missing-webhook-tab:focus-visible{
  outline:2px solid var(--ui-blue,#1671ec);
  outline-offset:2px;
}
#paneMissing .dashboard-missing-webhook-panel,
#paneMpTags .dashboard-missing-webhook-panel,
#paneCreditCards .dashboard-missing-webhook-panel{
  display:block;
}
#paneMissing .dashboard-missing-webhook-panel[hidden],
#paneMpTags .dashboard-missing-webhook-panel[hidden],
#paneCreditCards .dashboard-missing-webhook-panel[hidden]{
  display:none;
}
#paneMissing .dashboard-missing-webhook,
#paneMpTags .dashboard-missing-webhook,
#paneCreditCards .dashboard-missing-webhook{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);
  gap:16px;
  padding:14px 16px;
  border-radius:12px;
  border:1px solid var(--border);
  background: var(--surface-subtle);
}
#paneMissing .dashboard-missing-webhook + .dashboard-missing-webhook,
#paneMpTags .dashboard-missing-webhook + .dashboard-missing-webhook,
#paneCreditCards .dashboard-missing-webhook + .dashboard-missing-webhook{
  margin-top:12px;
}
#paneMissing .dashboard-missing-webhook-banner,
#paneMpTags .dashboard-missing-webhook-banner,
#paneCreditCards .dashboard-missing-webhook-banner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid var(--border);
  background:var(--surface);
  font-size:var(--type-body);
  color:var(--muted);
}
#paneMissing .dashboard-missing-webhook-banner .muted,
#paneMpTags .dashboard-missing-webhook-banner .muted,
#paneCreditCards .dashboard-missing-webhook-banner .muted{
  margin:0;
  color:inherit;
}
#paneMissing .dashboard-missing-webhook-banner[data-banner-state="connected"],
#paneMpTags .dashboard-missing-webhook-banner[data-banner-state="connected"],
#paneCreditCards .dashboard-missing-webhook-banner[data-banner-state="connected"]{
  border-color:rgba(52,211,153,0.45);
  background:rgba(52,211,153,0.12);
  color:var(--ok);
}
#paneMissing .dashboard-missing-webhook-banner[data-banner-state="warn"],
#paneMpTags .dashboard-missing-webhook-banner[data-banner-state="warn"],
#paneCreditCards .dashboard-missing-webhook-banner[data-banner-state="warn"]{
  border-color:rgba(251,191,36,0.45);
  background:rgba(251,191,36,0.12);
  color:var(--warn);
}
#paneMissing .dashboard-missing-webhook-banner[data-banner-state="idle"],
#paneMpTags .dashboard-missing-webhook-banner[data-banner-state="idle"],
#paneCreditCards .dashboard-missing-webhook-banner[data-banner-state="idle"]{
  background:rgba(120,140,170,0.12);
}
#paneMpTags #dashMpTagDiscordStatus,
#paneMpTags #dashMpTagSlackStatus,
#paneCreditCards #cardsDiscordStatus,
#paneCreditCards #cardsSlackStatus{
  margin:0;
  font-size:var(--type-caption);
}

@media (max-width: 900px) {
#paneMissing .dashboard-missing-webhook,
  #paneMpTags .dashboard-missing-webhook,
  #paneCreditCards .dashboard-missing-webhook{
    grid-template-columns:1fr;
  }
}

#contractsTable .link-btn{
  border:none;
  background:none;
  color:inherit;
  cursor:pointer;
  padding:0;
  font-weight:600;
}
#contractsTable .contracts-toggle-row{
  margin-top:6px;
}
#contractsTable .contracts-detail-row td{
  background: var(--table-bg);
  border-top:1px solid var(--table-border);
}
#contractsTable .contracts-toggle-row .link-btn{
  font-size:var(--type-body,12px);
  padding:4px 10px;
  border-radius:999px;
  border:1px solid var(--border-strong);
  background:transparent;
  color:inherit;
}
#contractsTable .contracts-detail-heading{
  font-weight:700;
  margin-bottom:8px;
  color:var(--text);
}
#contractsTable .contracts-detail-table{
  width:100%;
  border-collapse:collapse;
  font-size:var(--type-caption,12px);
  background: var(--table-bg);
}
#contractsTable .contracts-detail-table th,
#contractsTable .contracts-detail-table td{
  padding:6px;
  border:1px solid var(--table-border);
  color: var(--table-text);
}
#contractsTable .contracts-detail-table th{

  text-transform:uppercase;
  letter-spacing:0.04em;
  color: var(--table-header-text);
  border-bottom: 1px solid var(--table-border);
}
#contractsTable .contracts-detail-table tbody tr:nth-child(even){
  background:var(--table-stripe-even);
}
#contractsTable .contracts-detail-table tbody tr:nth-child(odd){
  background:var(--table-stripe-odd);
}
#contractsTable .contracts-detail-table tbody tr:hover{
  background: var(--surface-hover);
}

/* From apple-ui-app.css */
#appShell.ui-workspace #paneTerms > :where(.workspace-card-source, .workspace-card-editor) {
  grid-column: 1 / -1;
}
/* Utilities and tracking workspaces ------------------------------------- */

#appShell.ui-workspace :where(#paneSeasonSeats, #paneCanceledEvents, #paneCreditCards, #paneContracts) .contracts-summary-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
#appShell.ui-workspace :where(#paneSeasonSeats, #paneCanceledEvents, #paneCreditCards, #paneContracts) .contracts-summary-item {
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid var(--ui-line);
  border-radius: 14px;
  background: var(--ui-surface-muted);
}
#appShell.ui-workspace :where(#paneSeasonSeats, #paneCanceledEvents, #paneCreditCards, #paneContracts) .contracts-summary-item .label {
  color: var(--ui-ink-tertiary);
  font-size: var(--type-caption);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
#appShell.ui-workspace :where(#paneSeasonSeats, #paneCanceledEvents, #paneCreditCards, #paneContracts) .contracts-summary-item .value {
  margin-top: 7px;
  color: var(--ui-ink);
  font-family: var(--ui-font-display);
  font-size: var(--type-section);
  font-weight: 710;
  letter-spacing: -0.03em;
}
#appShell.ui-workspace .workspace-page .contracts-form {
  padding: 2px;
}
#appShell.ui-workspace .workspace-page .contracts-form-grid {
  gap: 12px;
}
#appShell.ui-workspace :where(#paneCreditCards, #paneMissing, #paneMpTags) .dashboard-missing-webhook {
  margin-top: 10px;
  padding: 15px;
  border: 1px solid var(--ui-line);
  border-radius: 14px;
  background: var(--ui-surface);
}

@media (max-width: 1120px) {
#appShell.ui-workspace :where(#paneSeasonSeats, #paneCanceledEvents, #paneCreditCards, #paneContracts) .contracts-summary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#appShell.ui-workspace #paneCanceledEvents .workspace-card-notice,
#appShell.ui-workspace #paneCanceledEvents .workspace-card-notice .cancel-upload {
  width: 100%;
}
/* Marketplace Tags previously retained a legacy dark-gradient card. Keep the
   existing queue plumbing while presenting it like the rest of the workspace. */
#appShell.ui-workspace #paneMpTags #dashMpTagCard {
  border: 1px solid var(--ui-line);
  border-radius: 18px;
  background: var(--ui-surface-solid);
  box-shadow: var(--ui-shadow-sm);
  transform: none;
}
#appShell.ui-workspace #paneMpTags #dashMpTagCard:hover {
  border-color: var(--ui-line);
  box-shadow: var(--ui-shadow-sm);
  transform: none;
}
#appShell.ui-workspace #paneMpTags .dashboard-metric {
  border: 1px solid var(--ui-line);
  border-radius: 14px;
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-sm);
}

/* UI #271: phones open tracking pages on the records. The summary numbers sit in one compact row (number, then label; the longer caption
   is left out). Wider screens don't change. The header's More menu now shows at every width (Option 11, below). */
@media(max-width:760px){
  #appShell.ui-workspace.ui-workspace :is(#paneContracts .contract-metrics,#paneSeasonSeats .season-metrics,#paneCanceledEvents .cancel-metrics,#paneCreditCards .cards-metrics,#paneMissing .missing-metrics,#paneTerms .term-metrics,#paneMpTags .tags-metrics) {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;min-height:0;margin-block:0 16px;padding:0}
  #appShell.ui-workspace.ui-workspace :is(#paneContracts .contract-metrics,#paneSeasonSeats .season-metrics,#paneCanceledEvents .cancel-metrics,#paneCreditCards .cards-metrics,#paneMissing .missing-metrics,#paneTerms .term-metrics,#paneMpTags .tags-metrics) > * {display:flex;flex-direction:column;justify-content:flex-start;gap:2px;min-width:0;min-height:0;padding:8px 6px;text-align:left}
  #appShell.ui-workspace.ui-workspace :is(#paneContracts .contract-metrics,#paneSeasonSeats .season-metrics,#paneCanceledEvents .cancel-metrics,#paneCreditCards .cards-metrics,#paneMissing .missing-metrics,#paneTerms .term-metrics,#paneMpTags .tags-metrics) > * > strong {order:-1;margin:0;font-size:var(--type-emphasis);line-height:1.25;white-space:nowrap;overflow-wrap:normal}
  #appShell.ui-workspace.ui-workspace :is(#paneContracts .contract-metrics,#paneSeasonSeats .season-metrics,#paneCanceledEvents .cancel-metrics,#paneCreditCards .cards-metrics,#paneMissing .missing-metrics,#paneTerms .term-metrics,#paneMpTags .tags-metrics) > * > :not(strong) {font-size:var(--type-caption);line-height:1.3;overflow-wrap:anywhere}
  #appShell.ui-workspace.ui-workspace :is(#paneContracts .contract-metrics,#paneSeasonSeats .season-metrics,#paneCanceledEvents .cancel-metrics,#paneCreditCards .cards-metrics,#paneMissing .missing-metrics,#paneTerms .term-metrics,#paneMpTags .tags-metrics) > * :is(small,svg,[aria-hidden="true"]) {display:none}
  /* UI #162 with #271: an amount stays whole. If one doesn't fit its quarter, dashboard-shared.js sets data-two-col, then data-one-col. */
  #appShell.ui-workspace.ui-workspace :is(#paneContracts .contract-metrics[data-two-col],#paneSeasonSeats .season-metrics[data-two-col],#paneCanceledEvents .cancel-metrics[data-two-col],#paneCreditCards .cards-metrics[data-two-col],#paneMissing .missing-metrics[data-two-col],#paneTerms .term-metrics[data-two-col],#paneMpTags .tags-metrics[data-two-col]) {grid-template-columns:repeat(2,minmax(0,1fr))}
  #appShell.ui-workspace.ui-workspace :is(#paneContracts .contract-metrics[data-one-col],#paneSeasonSeats .season-metrics[data-one-col],#paneCanceledEvents .cancel-metrics[data-one-col],#paneCreditCards .cards-metrics[data-one-col],#paneMissing .missing-metrics[data-one-col],#paneTerms .term-metrics[data-one-col],#paneMpTags .tags-metrics[data-one-col]) {grid-template-columns:minmax(0,1fr)}
}

/* Option 11 (owner, Nov 11): every tracking page is one flat surface. White to the edges (the page colour in dark mode), with no grey
   gutter and no card border, radius or shadow; hairlines and spacing separate the parts. A thin bar on top: "Tracking / Page" on the
   left, More ▾ and the main button on the right. Then the numbers, the view tabs and filters, and the list. Banners are full-width strips.
   Only presentation: ids, roles, wording and handlers stay. Tokens only; the shared header and tab rules use !important, so their
   colours are changed through their own variables instead. */
#appShell.ui-workspace {--tracking-flat:var(--ui-grey-surface)}
#appShell.ui-workspace[data-ui-theme="dark"] {--tracking-flat:var(--ui-grey-100)}
#appShell.ui-workspace.ui-workspace[data-pane]:is([data-pane="paneMissing"],[data-pane="paneContracts"],[data-pane="paneSeasonSeats"],[data-pane="paneCanceledEvents"],[data-pane="paneMarketplaceCancellations"],[data-pane="paneCreditCards"],[data-pane="paneMpTags"],[data-pane="paneTerms"]):not(#_) .main-shell {background:var(--tracking-flat)}
#appShell.ui-workspace.ui-workspace[data-pane]:is([data-pane="paneMissing"],[data-pane="paneContracts"],[data-pane="paneSeasonSeats"],[data-pane="paneCanceledEvents"],[data-pane="paneMarketplaceCancellations"],[data-pane="paneCreditCards"],[data-pane="paneMpTags"],[data-pane="paneTerms"]):not(#_) .workspace-content {--tracking-gutter:32px;padding-top:0;padding-inline:var(--tracking-gutter)}
@media(max-width:760px){
  #appShell.ui-workspace.ui-workspace[data-pane]:is([data-pane="paneMissing"],[data-pane="paneContracts"],[data-pane="paneSeasonSeats"],[data-pane="paneCanceledEvents"],[data-pane="paneMarketplaceCancellations"],[data-pane="paneCreditCards"],[data-pane="paneMpTags"],[data-pane="paneTerms"]):not(#_) .workspace-content {--tracking-gutter:16px}
}
/* Cards, fields and tables that paint the surface colour sit flat on the page; menus and dialogs keep a raised surface. */
#appShell.ui-workspace :is(#paneMissing,#paneContracts,#paneSeasonSeats,#paneCanceledEvents,#paneMarketplaceCancellations,#paneCreditCards,#paneMpTags,#paneTerms) {--tracking-line:var(--ui-line);--ui-surface:var(--tracking-flat);--ui-surface-solid:var(--tracking-flat)}
#appShell.ui-workspace :is(#paneMissing,#paneContracts,#paneSeasonSeats,#paneCanceledEvents,#paneMarketplaceCancellations,#paneCreditCards,#paneMpTags,#paneTerms) :is(dialog,.recon-export-menu,.tracking-more-menu) {--ui-surface:var(--ui-grey-surface);--ui-surface-solid:var(--ui-grey-surface)}

/* Thin bar: page name and actions on one row, a full-width hairline under it (drawn by ::after out to the page edges without
   widening the layout; the shared border is made clear). */
#appShell.ui-workspace :is(#paneMissing,#paneContracts,#paneSeasonSeats,#paneCanceledEvents,#paneMarketplaceCancellations,#paneCreditCards,#paneMpTags,#paneTerms) > .tr-page-head:not([hidden]) {--ui-line:transparent;position:relative;align-items:center;margin:12px 0 0}
#appShell.ui-workspace :is(#paneMissing,#paneContracts,#paneSeasonSeats,#paneCanceledEvents,#paneMarketplaceCancellations,#paneCreditCards,#paneMpTags,#paneTerms) > .tr-page-head > * {--ui-line:var(--tracking-line)}
#appShell.ui-workspace :is(#paneMissing,#paneContracts,#paneSeasonSeats,#paneCanceledEvents,#paneMarketplaceCancellations,#paneCreditCards,#paneMpTags,#paneTerms) > .tr-page-head::after {content:"";position:absolute;left:0;right:0;bottom:-1px;height:1px;border-image:linear-gradient(var(--tracking-line),var(--tracking-line)) fill 0 / 0 / 0 var(--tracking-gutter,32px);pointer-events:none}
#appShell.ui-workspace :is(#paneMissing,#paneContracts,#paneSeasonSeats,#paneCanceledEvents,#paneMarketplaceCancellations,#paneCreditCards,#paneMpTags,#paneTerms) .tr-page-head-copy {display:flex;align-items:baseline;flex-wrap:wrap;gap:0 8px}
#appShell.ui-workspace :is(#paneMissing,#paneContracts,#paneSeasonSeats,#paneCanceledEvents,#paneMarketplaceCancellations,#paneCreditCards,#paneMpTags,#paneTerms) .tr-page-head-copy h1 {--type-page:var(--type-emphasis);line-height:1.4}
#appShell.ui-workspace.ui-workspace :is(#paneMissing,#paneContracts,#paneSeasonSeats,#paneCanceledEvents,#paneMarketplaceCancellations,#paneCreditCards,#paneMpTags,#paneTerms) .tr-page-head :is(.contract-page-actions,.season-page-actions,.cancel-page-actions,.cards-actions,.missing-page-actions,.term-page-actions,.tags-page-actions) {display:flex;flex-wrap:nowrap;align-items:center;gap:8px;margin:0}
#appShell.ui-workspace.ui-workspace :is(#paneMissing,#paneContracts,#paneSeasonSeats,#paneCanceledEvents,#paneMarketplaceCancellations,#paneCreditCards,#paneMpTags,#paneTerms) .tr-page-head :is(.tracking-more-button,[class*="-primary"],.cancel-page-actions > .recon-export > .recon-export-btn) {display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:32px;height:32px;padding:0 12px;font-size:var(--type-body);line-height:1;white-space:nowrap}

/* More ▾: the other header actions in one menu. */
#appShell.ui-workspace .tracking-more {position:relative;display:inline-flex}
#appShell.ui-workspace .tracking-more-menu:not([hidden]) {position:absolute;top:calc(100% + 6px);right:0;z-index:40;display:flex;flex-direction:column;align-items:stretch;gap:1px;min-width:240px;padding:6px;border:1px solid var(--ui-line-strong);border-radius:10px;background:var(--ui-surface-solid);box-shadow:var(--ui-shadow-md)}
#appShell.ui-workspace.ui-workspace :is(#paneMissing,#paneContracts,#paneSeasonSeats,#paneCanceledEvents,#paneMarketplaceCancellations,#paneCreditCards,#paneMpTags,#paneTerms) .tracking-more-menu > [role="none"] {display:block;width:100%;margin:0}
#appShell.ui-workspace.ui-workspace :is(#paneMissing,#paneContracts,#paneSeasonSeats,#paneCanceledEvents,#paneMarketplaceCancellations,#paneCreditCards,#paneMpTags,#paneTerms) .tracking-more-menu [role="menuitem"]:not(.recon-export-menu [role="menuitem"]) {display:flex;align-items:center;justify-content:flex-start;gap:8px;width:100%;min-height:36px;height:auto;margin:0;padding:8px 10px;border:0;border-radius:7px;background:none;box-shadow:none;color:var(--ui-ink);font-size:var(--type-body);font-weight:500;line-height:1.3;text-align:left;text-decoration:none;white-space:nowrap}
#appShell.ui-workspace.ui-workspace :is(#paneMissing,#paneContracts,#paneSeasonSeats,#paneCanceledEvents,#paneMarketplaceCancellations,#paneCreditCards,#paneMpTags,#paneTerms) .tracking-more-menu [role="menuitem"]:not(.recon-export-menu [role="menuitem"]):is(:hover,:focus-visible,[aria-expanded="true"]):not(:disabled) {background:var(--ui-surface-muted)}
#appShell.ui-workspace.ui-workspace :is(#paneMissing,#paneContracts,#paneSeasonSeats,#paneCanceledEvents,#paneMarketplaceCancellations,#paneCreditCards,#paneMpTags,#paneTerms) .tracking-more-menu [role="menuitem"]:disabled {color:var(--ui-ink-secondary);cursor:not-allowed}
#appShell.ui-workspace.ui-workspace :is(#paneMissing,#paneContracts,#paneSeasonSeats,#paneCanceledEvents,#paneMarketplaceCancellations,#paneCreditCards,#paneMpTags,#paneTerms) .tracking-more-menu .recon-export-menu:not([hidden]) {position:static;min-width:0;margin:2px 0 4px 10px;padding:0 0 0 8px;border:0;border-left:1px solid var(--ui-line);border-radius:0;box-shadow:none;background:none}

/* Numbers: one row between hairlines, no box. */
#appShell.ui-workspace.ui-workspace :is(#paneMissing .missing-metrics,#paneContracts .contract-metrics,#paneSeasonSeats .season-metrics,:is(#paneCanceledEvents,#paneMarketplaceCancellations) .cancel-metrics,#paneCreditCards .cards-metrics,#paneMpTags .tags-metrics,#paneTerms .term-metrics) {border:0;border-bottom:1px solid var(--ui-line);border-radius:0;background:none;box-shadow:none;margin-top:0}
#appShell.ui-workspace.ui-workspace :is(#paneMissing .missing-metrics,#paneContracts .contract-metrics,#paneSeasonSeats .season-metrics,:is(#paneCanceledEvents,#paneMarketplaceCancellations) .cancel-metrics,#paneCreditCards .cards-metrics,#paneMpTags .tags-metrics,#paneTerms .term-metrics) > * {border:0;border-radius:0;background:none;box-shadow:none}
@media(min-width:761px){
  #appShell.ui-workspace.ui-workspace :is(#paneMissing .missing-metrics,#paneContracts .contract-metrics,#paneSeasonSeats .season-metrics,:is(#paneCanceledEvents,#paneMarketplaceCancellations) .cancel-metrics,#paneCreditCards .cards-metrics,#paneMpTags .tags-metrics,#paneTerms .term-metrics) > * {padding:16px 20px}
  #appShell.ui-workspace.ui-workspace :is(#paneMissing .missing-metrics,#paneContracts .contract-metrics,#paneSeasonSeats .season-metrics,:is(#paneCanceledEvents,#paneMarketplaceCancellations) .cancel-metrics,#paneCreditCards .cards-metrics,#paneMpTags .tags-metrics,#paneTerms .term-metrics) > * + * {border-left:1px solid var(--ui-line)}
  #appShell.ui-workspace.ui-workspace :is(#paneMissing .missing-metrics,#paneContracts .contract-metrics,#paneSeasonSeats .season-metrics,:is(#paneCanceledEvents,#paneMarketplaceCancellations) .cancel-metrics,#paneCreditCards .cards-metrics,#paneMpTags .tags-metrics,#paneTerms .term-metrics) > :first-child {padding-left:0}
}

/* View tabs: text with an underline on the selected one, sitting on a hairline. */
#appShell.ui-workspace.ui-workspace.ui-workspace.ui-workspace :is(#paneMissing,#paneContracts,#paneSeasonSeats,#paneCanceledEvents,#paneMarketplaceCancellations,#paneCreditCards,#paneMpTags,#paneTerms) :is(.missing-status-chips,.season-view-options,.cancel-tabs,.cards-tabs,.tags-tabs,.term-tabs,.contract-filters) {--tab-tray:transparent;--tab-line:transparent;--tab-face:transparent;--tab-selected-line:transparent;--tab-muted:var(--ui-ink-secondary);--tab-ink:var(--ui-ink);padding-inline:0;margin-bottom:0}
#appShell.ui-workspace.ui-workspace.ui-workspace :is(#paneMissing,#paneContracts,#paneSeasonSeats,#paneCanceledEvents,#paneMarketplaceCancellations,#paneCreditCards,#paneMpTags,#paneTerms) :is(.missing-status-chips,.season-view-options,.cancel-tabs,.cards-tabs,.tags-tabs,.term-tabs,.contract-filters):not([data-sliding-tabs]) > button:not([hidden]):not(.u-hidden):is([aria-selected="true"],[aria-pressed="true"],.is-active,.active) {box-shadow:inset 0 -2px 0 var(--ui-blue)}
@media(max-width:760px){
  #appShell.ui-workspace.ui-workspace.ui-workspace :is(#paneMissing,#paneContracts,#paneSeasonSeats,#paneCanceledEvents,#paneMarketplaceCancellations,#paneCreditCards,#paneMpTags,#paneTerms) :is(.missing-status-chips,.season-view-options,.cancel-tabs,.cards-tabs,.tags-tabs,.term-tabs,.contract-filters) > button:not([hidden]):not(.u-hidden):is([aria-selected="true"],[aria-pressed="true"],.is-active,.active) {box-shadow:inset 0 -2px 0 var(--ui-blue)} /* Phones have no sliding underline (UI #181). */
}
#appShell.ui-workspace.ui-workspace.ui-workspace :is(#paneMissing,#paneContracts,#paneSeasonSeats,#paneCanceledEvents,#paneMarketplaceCancellations,#paneCreditCards,#paneMpTags,#paneTerms) :is(.missing-status-chips,.season-view-options,.cancel-tabs,.cards-tabs,.tags-tabs,.term-tabs,.contract-filters) > button:not([hidden]):not(.u-hidden) {border-radius:0}
#appShell.ui-workspace.ui-workspace.ui-workspace :is(#paneMissing,#paneContracts,#paneSeasonSeats,#paneCanceledEvents,#paneMarketplaceCancellations,#paneCreditCards,#paneMpTags,#paneTerms) [class*="-viewbar"] > :is(.missing-status-chips,.season-view-options,.cancel-tabs,.cards-tabs,.tags-tabs,.term-tabs) {align-self:flex-end;margin-bottom:-5px}
/* The sliding underline stays on the hairline and moves only sideways; a wrapped row has no slide and uses the inset underline above. */
#appShell.ui-workspace.ui-workspace.ui-workspace :is(#paneMissing,#paneContracts,#paneSeasonSeats,#paneCanceledEvents,#paneMarketplaceCancellations,#paneCreditCards,#paneMpTags,#paneTerms) :is(.missing-status-chips,.season-view-options,.cancel-tabs,.cards-tabs,.tags-tabs,.term-tabs,.contract-filters)[data-sliding-tabs]::before {top:auto;bottom:0;height:2px;transform:translateX(var(--segment-x));border-radius:0;background:var(--ui-blue);box-shadow:none}
#appShell.ui-workspace.ui-workspace :is(#paneMissing .missing-viewbar,#paneSeasonSeats .season-viewbar,#paneCanceledEvents .cancel-viewbar,#paneCreditCards .cards-viewbar,#paneMpTags .tags-viewbar,#paneTerms .term-viewbar) {margin:0;padding:0;border:0;border-bottom:1px solid var(--ui-line);border-radius:0;background:none}

/* Banners: a full-width strip between hairlines. The strip is painted out to the page edges by border-image, so the layout keeps its width. */
#appShell.ui-workspace.ui-workspace :is(#paneMissing .missing-notice,#paneContracts .contract-notice,#paneSeasonSeats .season-notice,#paneCanceledEvents .cancel-notice,#paneCreditCards .cards-notice,#paneMpTags .tags-notice,#paneTerms .term-notice) {--tracking-strip-line:color-mix(in srgb,var(--ui-amber) 28%,var(--ui-line));margin-inline:0;padding:10px 0;border:0;border-radius:0;box-shadow:none;background:none;border-image:linear-gradient(var(--tracking-strip-line) 0 1px,var(--ui-amber-soft) 1px calc(100% - 1px),var(--tracking-strip-line) calc(100% - 1px)) fill 0 / 0 / 0 var(--tracking-gutter,32px)}
/* Every banner sits directly under the numbers and above the view tabs (or the list), 22px from each, on every page. Most pages
   space their rows 22px apart already; Missing Charges spaces them 23px and the Credit Card Tracker uses margins, so they are matched here. */
#appShell.ui-workspace.ui-workspace :is(#paneMissing .missing-notice,#paneContracts .contract-notice,#paneSeasonSeats .season-notice,#paneCanceledEvents .cancel-notice,#paneCreditCards .cards-notice,#paneMpTags .tags-notice,#paneTerms .term-notice) {margin-block:0;padding-block:10px;font-size:var(--type-caption);line-height:1.65}
/* One size for every banner and its link: a one-line banner is 48px tall at desktop widths; it grows only when the words wrap. */
#appShell.ui-workspace.ui-workspace :is(#paneMissing .missing-notice,#paneContracts .contract-notice,#paneSeasonSeats .season-notice,#paneCanceledEvents .cancel-notice,#paneCreditCards .cards-notice,#paneMpTags .tags-notice,#paneTerms .term-notice) > button {min-height:0;margin:0;padding:3px 0;border:0;font-size:var(--type-body);font-weight:400;line-height:1.65}
#appShell.ui-workspace.ui-workspace #paneMissing .missing-notice {margin-block:-1px}
#appShell.ui-workspace.ui-workspace #paneCreditCards .cards-notice {margin-bottom:22px}
#appShell.ui-workspace.ui-workspace #paneCreditCards .cards-metrics:has(+ .cards-notice:not([hidden])) {margin-bottom:22px}
@media(max-width:760px){
  #appShell.ui-workspace.ui-workspace #paneCreditCards .cards-metrics:has(+ .cards-notice:not([hidden])) {margin-bottom:calc(16px + 22px)} /* Phones: the numbers' own 16px (UI #271) plus the row gap, as on the other pages. */
}

/* The list and every secondary view (Payments, Insights, Fee comparison…): no card around it. */
#appShell.ui-workspace.ui-workspace :is(#paneMissing,#paneContracts,#paneSeasonSeats,#paneCanceledEvents,#paneMarketplaceCancellations,#paneCreditCards,#paneMpTags,#paneTerms) :is(.missing-panel,.contract-panel,.season-panel,.cancel-panel,.cards-panel,.tags-panel,.term-panel) {border:0;border-radius:0;background:none;box-shadow:none;overflow:visible}
#appShell.ui-workspace.ui-workspace :is(#paneMissing,#paneContracts,#paneSeasonSeats,#paneCanceledEvents,#paneMarketplaceCancellations,#paneCreditCards,#paneMpTags,#paneTerms) :is(.missing-panel,.contract-panel,.season-panel,.cancel-panel,.cards-panel,.tags-panel,.term-panel) > :is([class*="-panel-head"],[class*="-section-head"],[class*="-sectionhead"],[class*="-calendar-head"],[class*="-toolbar"],[class*="-filters"],[class*="-panel-foot"],[class*="-tablefoot"],[class*="-bulk"]) {padding-inline:0}
#appShell.ui-workspace.ui-workspace :is(#paneMissing,#paneContracts,#paneSeasonSeats,#paneCanceledEvents,#paneMarketplaceCancellations,#paneCreditCards,#paneMpTags,#paneTerms) [data-tracking-side] :is(.missing-panel,.contract-panel,.season-panel,.cancel-panel,.cards-panel,.tags-panel,.term-panel) {padding-inline:0;border-top:1px solid var(--ui-line)}
#appShell.ui-workspace.ui-workspace #paneMpTags #dashMpTagCard {padding:0;border:0;border-radius:0;background:none;box-shadow:none}
#appShell.ui-workspace #paneMpTags .tags-pointer {padding:0;border:0;background:none;font-size:var(--type-body);white-space:nowrap}
#appShell.ui-workspace :is(#paneMpTags #tagsHint,#paneCreditCards #cardsViewHint,#paneTerms #termsViewHint):empty {display:none}
