/* Plyvo stylesheet layer 2. Load in the order declared in views/layout/head.php. */
.eyebrow {
  margin: 0 0 5px;
}

h1,
h2,
p { margin-top: 0; }

h1 {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  font-weight: 830;
  letter-spacing: -.045em;
  line-height: 1.08;
}

h2 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -.018em;
}

.page-description {
  margin: 0;
  color: var(--text-muted);
  font-size: .9rem;
}

.context-pill,
.header-club-switcher {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  max-width: 320px;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, .76);
  box-shadow: var(--shadow-sm);
  font-size: .78rem;
  font-weight: 700;
}

.context-pulse { width: 7px; height: 7px; margin-top: 0; }

.header-club-switcher {
  min-width: 210px;
  min-height: 42px;
  padding: 5px 12px 5px 9px;
  border: 0;
  border-radius: 11px 0 0 11px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.header-club-switcher:hover { background: var(--surface-subtle); }

.club-switcher-copy {
  display: grid;
  min-width: 0;
  flex: 1;
}

.club-switcher-copy small {
  color: var(--text-muted);
  font-size: .6rem;
  font-weight: 750;
  letter-spacing: .06em;
  line-height: 1;
  text-transform: uppercase;
}

.header-club-switcher select {
  width: 100%;
  min-height: 24px;
  padding: 0 28px 0 0;
  overflow: hidden;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: .8rem;
  font-weight: 800;
  text-overflow: ellipsis;
}

.header-club-switcher select:focus-visible {
  outline-offset: 3px;
}

.member-landing-empty { max-width: 680px; padding: 28px; }
.member-landing-empty h2 { margin: 5px 0 8px; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  display: flex;
  min-width: 0;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow-sm);
}

.metric-card > span:not(.metric-icon) { display: flex; min-width: 0; flex-direction: column; }
.metric-card small { overflow: hidden; color: var(--text-muted); font-size: .72rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.metric-card strong { color: var(--ink); font-size: 1.22rem; line-height: 1.2; }
.metric-card-action { min-height: 32px; margin-left: auto; padding: 5px 9px; font-size: .68rem; }

.metric-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  font-size: .9rem;
  font-weight: 850;
}

.metric-icon-lime { color: var(--energy-ink); background: rgba(183, 243, 74, .6); }
.metric-icon-indigo { color: var(--primary); background: var(--primary-soft); }
.metric-icon-teal { color: #087e72; background: rgba(20, 184, 166, .14); }

.dashboard-metrics .metric-card em { margin-top: 2px; overflow: hidden; color: var(--text-muted); font-size: .66rem; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(330px, .82fr); gap: 16px; margin-top: 16px; }
.dashboard-grid > .card { margin-top: 0; }
.dashboard-incomplete-card { grid-column: 1 / -1; border-color: color-mix(in srgb, #f5b942 45%, var(--border)); }
.dashboard-incomplete-card .dashboard-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-results-card { grid-column: 1 / -1; }
.dashboard-list { display: grid; gap: 8px; margin-top: 16px; }
.dashboard-list-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 13px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-subtle); }
.dashboard-list-item > span:first-child { display: grid; gap: 3px; min-width: 0; }
.dashboard-list-item strong { overflow: hidden; color: var(--ink); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-list-item small { color: var(--text-muted); font-size: .7rem; }
.dashboard-list-item > em { padding: 5px 8px; border-radius: 999px; color: var(--primary-strong); background: var(--primary-soft); font-size: .68rem; font-style: normal; font-weight: 800; white-space: nowrap; }
.dashboard-empty { padding: 22px; border: 1px dashed var(--border-strong); border-radius: 13px; color: var(--text-muted); background: var(--surface-subtle); font-size: .8rem; text-align: center; }
.dashboard-leaderboard-card .table-wrap { margin-top: 14px; }
.dashboard-leaderboard-card th:first-child,
.dashboard-leaderboard-card td:first-child { width: 42px; text-align: center; }
.dashboard-leaderboard-card td:last-child { color: var(--primary-strong); font-weight: 850; }
.metric-icon-amber { color: #9a5b07; background: rgba(245, 158, 11, .15); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.platform-admin-page { display: grid; gap: 16px; }
.platform-admin-page[hidden] { display: none; }

.platform-admin-hero {
  position: relative;
  display: flex;
  min-height: 174px;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px;
  overflow: hidden;
  border: 1px solid #26324a;
  border-radius: 20px;
  color: #dce3ef;
  background:
    radial-gradient(circle at 92% 18%, rgba(183, 243, 74, .17), transparent 17rem),
    radial-gradient(circle at 30% -40%, rgba(99, 102, 241, .38), transparent 28rem),
    #111827;
  box-shadow: 0 20px 50px rgba(17, 24, 39, .16);
}

.platform-admin-hero::after {
  position: absolute;
  right: 9%;
  bottom: -88px;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(255, 255, 255, .025), 0 0 0 72px rgba(255, 255, 255, .018);
  content: '';
}

.platform-admin-hero > * { position: relative; z-index: 1; }
.platform-admin-hero h2 { margin: 8px 0 7px; color: #fff; font-size: clamp(1.55rem, 3vw, 2.25rem); letter-spacing: -.035em; }
.platform-admin-hero p { max-width: 650px; margin: 0; color: #9ca8bb; }
.platform-admin-hero button { border-color: rgba(255, 255, 255, .16); color: #fff; background: rgba(255, 255, 255, .07); }
.platform-admin-hero button:hover { border-color: rgba(183, 243, 74, .55); color: var(--energy); background: rgba(183, 243, 74, .08); }

.platform-admin-kicker { display: inline-flex; gap: 8px; align-items: center; color: var(--energy); font-size: .68rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.platform-admin-kicker > span { width: 7px; height: 7px; border-radius: 50%; background: var(--energy); box-shadow: 0 0 0 4px rgba(183, 243, 74, .12); }

.platform-metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.platform-metric-grid .metric-card { padding: 17px; }
.platform-metric-grid .metric-card strong { font-size: 1.55rem; }
.platform-metric-grid .metric-card em { margin-top: 2px; overflow: hidden; color: var(--text-muted); font-size: .66rem; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }

.platform-overview-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr); gap: 16px; }
.platform-overview-grid > .card { margin: 0; }
.platform-attention-list { display: grid; gap: 8px; margin-top: 17px; }

.platform-attention-item {
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-subtle);
}

.platform-attention-item > strong { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 11px; color: var(--warning); background: rgba(245, 158, 11, .12); font-size: 1rem; }
.platform-attention-item > span { display: grid; gap: 2px; }
.platform-attention-item b { color: var(--ink); font-size: .82rem; }
.platform-attention-item small { color: var(--text-muted); font-size: .7rem; }
.platform-attention-empty { display: grid; gap: 3px; padding: 20px; border: 1px dashed var(--border-strong); border-radius: 13px; color: var(--text-muted); text-align: center; }
.platform-attention-empty strong { color: var(--ink); font-size: .85rem; }
.platform-attention-empty small { font-size: .72rem; }
.platform-attention-empty.is-success { border-color: rgba(20, 184, 166, .32); background: rgba(20, 184, 166, .06); }

.platform-club-bars { display: grid; gap: 13px; margin-top: 20px; }
.platform-club-bar { display: grid; gap: 7px; }
.platform-club-bar > div:first-child { display: flex; gap: 14px; align-items: baseline; justify-content: space-between; }
.platform-club-bar strong { overflow: hidden; color: var(--ink); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.platform-club-bar div > span { flex: 0 0 auto; color: var(--text-muted); font-size: .68rem; }
.platform-bar-track { height: 7px; overflow: hidden; border-radius: 999px; background: var(--surface-subtle); }
.platform-bar-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #7c73ff); }

.platform-registry-card { margin-top: 0; }
.platform-filters { display: flex; gap: 8px; align-items: center; }
.platform-search { position: relative; display: flex; align-items: center; }
.platform-search > span { position: absolute; left: 12px; z-index: 1; color: var(--text-muted); font-size: 1rem; pointer-events: none; }
.platform-search input { width: min(270px, 30vw); padding-left: 34px; }
.platform-club-table td:first-child { min-width: 185px; }
.platform-club-table td:first-child strong,
.platform-club-table td:first-child small { display: block; }
.platform-club-table td:first-child strong { color: var(--ink); font-size: .82rem; }
.platform-club-table td:first-child small { max-width: 190px; margin-top: 2px; overflow: hidden; color: var(--text-muted); font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.platform-club-table td:not(:first-child):not(:last-child) { white-space: nowrap; }
.platform-status { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 999px; font-size: .66rem; font-weight: 800; white-space: nowrap; }
.platform-status::before { width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; content: ''; }
.platform-status.is-ready { color: #087e72; background: rgba(20, 184, 166, .11); }
.platform-status.needs-attention { color: var(--warning); background: rgba(245, 158, 11, .12); }
.platform-open-club { min-height: 34px; padding: 6px 9px; font-size: .7rem; white-space: nowrap; }
.platform-registry-card > .empty { margin: 20px 0 4px; text-align: center; }

.platform-management-page { max-width: 1180px; }
.platform-directory-card { margin-top: 0; }
.platform-directory-card .table-wrap { margin-top: 18px; }
.platform-club-directory-tabs { display: flex; gap: 6px; width: fit-content; max-width: 100%; margin-top: 18px; padding: 5px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-subtle); }
.platform-club-directory-tabs button { min-height: 40px; padding: 9px 16px; border-color: transparent; background: transparent; color: var(--text-muted); }
.platform-club-directory-tabs button.is-active { border-color: var(--border); background: var(--surface); color: var(--ink); box-shadow: 0 8px 22px rgba(25,31,56,.08); }
.platform-club-directory-tabs .nav-count { display: inline-grid; min-width: 20px; margin-left: 5px; place-items: center; }
.platform-signup-heading { margin-top: 18px; }
.platform-signup-table td:first-child strong,.platform-signup-table td:first-child small,.platform-signup-table td:nth-child(2) strong,.platform-signup-table td:nth-child(2) small { display: block; }
.platform-signup-table td:first-child small,.platform-signup-table td:nth-child(2) small { margin-top: 2px; color: var(--text-muted); font-size: .66rem; }
.platform-signup-table td:last-child { width: 58px; text-align: right; }
.platform-signup-dialog { width: min(720px, calc(100% - 24px)); }
.platform-signup-details { margin-top: 18px; }
.platform-signup-details > div:last-child { grid-column: 1 / -1; }
.platform-directory-card td:first-child strong,
.platform-directory-card td:first-child small { display: block; }
.platform-directory-card td:first-child strong { color: var(--ink); font-size: .82rem; }
.platform-directory-card td:first-child small { margin-top: 2px; color: var(--text-muted); font-size: .65rem; }
.platform-directory-card td:last-child { min-width: 190px; text-align: right; white-space: nowrap; }
.platform-row-action { min-height: 34px; margin-left: 6px; padding: 6px 9px; font-size: .7rem; }
.platform-row-action.is-danger { border-color: var(--danger-border); color: var(--danger); }
.platform-row-action.is-danger:hover { border-color: var(--danger); background: rgba(196, 50, 61, .08); }
.platform-directory-card tr,.platform-club-teams-card tr { position: relative; z-index: 0; }
.platform-directory-card tr:has(.platform-action-menu[open]),.platform-club-teams-card tr:has(.platform-action-menu[open]) { position: relative; z-index: 30; }
.platform-directory-card td:has(.platform-action-menu[open]),.platform-club-teams-card td:has(.platform-action-menu[open]) { position: relative; z-index: 21; }
.platform-club-name-link { display: inline; min-height: 0; padding: 0; border: 0; border-radius: 0; color: var(--ink); background: transparent; box-shadow: none; font: inherit; font-weight: 750; line-height: inherit; text-align: left; }
.platform-club-name-link:hover,.platform-club-name-link:focus-visible { color: var(--accent); background: transparent; text-decoration: underline; text-underline-offset: 3px; box-shadow: none; }
.platform-directory-card td:last-child,.platform-club-teams-card td:last-child { text-align: right; }
.platform-club-teams-card tr:last-child .platform-action-menu .roster-action-popover { top: auto; bottom: calc(100% + 6px); }
.platform-club-teams-card .platform-action-menu[open],.platform-club-teams-card .platform-action-menu[open] .roster-action-popover { z-index: 40; }

.archived-clubs-section {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-subtle);
}

.archived-clubs-section summary {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 13px 15px;
  color: var(--ink);
  cursor: pointer;
  font-size: .8rem;
  font-weight: 800;
  list-style: none;
}

.archived-clubs-section summary::-webkit-details-marker { display: none; }
.archived-clubs-section summary:hover { background: var(--primary-soft); }
.archived-clubs-section summary small { padding: 2px 7px; border-radius: 999px; color: var(--warning); background: rgba(245, 158, 11, .12); font-size: .66rem; }
.archived-clubs-chevron { margin-left: auto; color: var(--text-muted); transition: transform .16s; }
.archived-clubs-section[open] .archived-clubs-chevron { transform: rotate(180deg); }
.platform-directory-card .archived-clubs-section .table-wrap { margin-top: 0; border-width: 1px 0 0; border-radius: 0; }
.archived-clubs-section tr.is-archived { color: var(--text-muted); background: var(--surface); }

.platform-club-detail-page { display: grid; gap: 14px; }
.platform-club-detail-page[hidden] { display: none; }
.platform-club-detail-toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.platform-club-profile-card .club-profile-form { margin-top: 18px; }
.platform-club-profile-card .section-heading .hint { margin: 5px 0 0; }
.platform-club-teams-card { margin-top: 0; }
.platform-club-team-table td:first-child { min-width: 210px; }
.platform-club-team-table td:first-child strong,
.platform-club-team-table td:first-child small { display: block; }
.platform-club-team-table td:first-child small { margin-top: 3px; color: var(--text-muted); font-size: .62rem; }
.platform-club-team-table td:first-child input { width: min(320px, 100%); }
.platform-club-team-table td:last-child { min-width: 170px; text-align: right; white-space: nowrap; }
.platform-club-audit-card { margin-top: 0; }
.platform-club-audit-list { display: grid; gap: 10px; margin-top: 18px; }
.platform-club-audit-item { padding: 14px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-subtle); }
.platform-club-audit-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.platform-club-audit-heading > div { display: grid; gap: 3px; }
.platform-club-audit-heading strong { color: var(--ink); font-size: .82rem; }
.platform-club-audit-heading small,.platform-club-audit-heading time { color: var(--text-muted); font-size: .68rem; }
.platform-club-audit-changes { display: grid; gap: 6px; margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--border); }
.platform-club-audit-changes > div { display: grid; grid-template-columns: minmax(125px, .35fr) minmax(0, 1fr); gap: 10px; font-size: .72rem; }
.platform-club-audit-changes strong { color: var(--text); }
.platform-club-audit-changes span { overflow-wrap: anywhere; color: var(--text-muted); }

.platform-member-heading .status-badge { flex: 0 0 auto; }
.platform-member-filters { display: flex; gap: 8px; align-items: center; margin-top: 17px; flex-wrap: wrap; }
.platform-member-filters .platform-search { flex: 1 1 250px; }
.platform-member-filters .platform-search input { width: 100%; }
.platform-member-filters select { min-width: 155px; }
.platform-member-legend { margin: 14px 0 10px; padding-top: 13px; border-top: 1px solid var(--border); }
.platform-member-table td:first-child { min-width: 190px; }
.platform-member-table td:nth-child(2) { min-width: 150px; }
.platform-member-table td:last-child { min-width: 60px; text-align: right; white-space: nowrap; }
.platform-member-table td:first-child strong,
.platform-member-table td:first-child small,
.platform-member-table td:nth-child(2) strong,
.platform-member-table td:nth-child(2) small { display: block; }
.platform-member-table td:first-child small,
.platform-member-table td:nth-child(2) small { margin-top: 2px; color: var(--text-muted); font-size: .65rem; }
.platform-member-table .member-role-markers { margin-left: 0; }
.platform-profile-label { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.platform-member-last-login { min-width: 125px; white-space: nowrap; }
.platform-role-list { display: inline-flex; gap: 5px; align-items: center; min-width: 86px; }
.platform-member-table tr.is-archived { color: var(--text-muted); background: var(--surface-subtle); }
.platform-member-table tr.is-frozen { background: color-mix(in srgb, #58b9ff 7%, var(--surface)); }
.platform-member-directory > .empty { margin: 18px 0 2px; text-align: center; }
.platform-member-frozen-badge { display: inline-flex; gap: 4px; align-items: center; margin-left: 7px; padding: 3px 7px; border-radius: 999px; color: #2583c5; background: color-mix(in srgb, #58b9ff 14%, var(--surface)); font-size: .62rem; font-weight: 800; vertical-align: middle; }
.platform-member-table tr { position: relative; z-index: 0; }
.platform-member-table tr:has(.roster-action-menu[open]) { z-index: 20; }
.platform-member-table td:has(.roster-action-menu[open]) { position: relative; z-index: 21; }
.platform-member-table tr:nth-last-child(-n + 2) .roster-action-popover { top: auto; bottom: calc(100% + 6px); }
.platform-member-detail-page { display: grid; gap: 14px; }
.platform-member-detail-page[hidden] { display: none; }
.platform-member-detail-toolbar { display: flex; justify-content: space-between; gap: 10px; }
.platform-member-detail-actions { display: flex; gap: 8px; }
.platform-messages-tab { position: relative; }
.platform-messages-tab .nav-count { margin-left: auto; }
.platform-message-center-card { padding: 20px; }
.platform-message-center-heading { align-items: flex-start; }
.platform-message-center-actions { display: flex; align-items: center; gap: 10px; }
.platform-message-center-filters { display: grid; grid-template-columns: minmax(260px,1fr) 220px 180px; gap: 10px; margin: 16px 0; }
.platform-message-center-filters select { width: 100%; height: 44px; }
.platform-message-center-layout { display: grid; grid-template-columns: minmax(280px,360px) minmax(0,1fr); min-height: 600px; overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-subtle); }
.platform-message-case-list { max-height: 680px; overflow: auto; border-right: 1px solid var(--border); background: var(--surface); }
.platform-message-case { display: block; width: 100%; padding: 16px; text-align: left; color: inherit; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; }
.platform-message-case:hover,.platform-message-case.is-selected { background: var(--surface-subtle); }
.platform-message-case.is-selected { box-shadow: inset 3px 0 0 var(--primary); }
.platform-message-case-top,.platform-message-case-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.platform-message-case-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.platform-message-case p { margin: 8px 0 6px; overflow: hidden; color: var(--text-muted); text-overflow: ellipsis; white-space: nowrap; }
.platform-message-case-preview { display: block; margin-bottom: 7px; overflow: hidden; color: var(--text-muted); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.platform-message-case-meta { color: var(--text-muted); font-size: .78rem; }
.platform-message-case .nav-count { position: static; min-width: 22px; height: 22px; }
.platform-message-workspace { min-width: 0; padding: 20px; background: var(--surface-subtle); }
.platform-message-placeholder { display: grid; min-height: 520px; place-content: center; gap: 6px; color: var(--text-muted); text-align: center; }
.platform-message-placeholder strong { color: var(--ink); font-size: 1.05rem; }
.platform-message-thread-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.platform-message-thread-heading h3 { margin: 3px 0; }
.platform-message-subject { margin: 7px 0 3px; color: var(--ink); }
.platform-message-assignee { display: grid; grid-template-columns: auto minmax(180px,280px); align-items: center; justify-content: end; gap: 10px; margin: 14px 0; color: var(--text-muted); font-size: .82rem; font-weight: 700; }
.platform-message-assignee select { width: 100%; }
.platform-message-thread-history { height: 350px; max-height: 45vh; margin-bottom: 14px; background: var(--surface); }
.platform-message-reply-form { gap: 10px; }
.platform-message-reply-form textarea { min-height: 90px; }
.platform-message-reply-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.platform-message-reply-actions button { min-width: 92px; }
@media (max-width: 900px) {
  .platform-message-center-filters { grid-template-columns: 1fr; }
  .platform-message-center-layout { grid-template-columns: 1fr; }
  .platform-message-case-list { max-height: 280px; border-right: 0; border-bottom: 1px solid var(--border); }
  .platform-message-placeholder { min-height: 280px; }
  .platform-message-assignee { grid-template-columns: 1fr; justify-content: stretch; }
}
.platform-member-detail-card { margin-top: 0; }
.platform-club-product-grid { display: grid; grid-template-columns: .8fr 1.2fr .9fr; gap: 14px; margin-top: 18px; }
.platform-club-detail-tabs { display: flex; width: fit-content; max-width: 100%; gap: 4px; margin-top: 16px; padding: 4px; overflow-x: auto; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow-sm); }
.platform-club-detail-tabs button { flex: 0 0 auto; border-color: transparent; background: transparent; }
.platform-club-detail-tabs button.is-active { border-color: color-mix(in srgb,var(--primary) 20%,var(--border)); color: var(--primary-strong); background: var(--primary-soft); }
.platform-club-product-summary,.platform-club-sports-form { min-width: 0; margin: 0; padding: 15px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-subtle); }
.platform-club-product-summary strong,.platform-club-product-summary small { display: block; }
.platform-club-product-summary strong { margin: 7px 0 3px; color: var(--ink); }
.platform-club-product-summary small { margin-bottom: 13px; color: var(--text-muted); }
.platform-club-sports-form { display: grid; align-content: start; gap: 10px; }
.platform-club-sports-form fieldset { margin: 0; padding: 0; border: 0; }
.platform-club-sports-form legend { margin-bottom: 10px; color: var(--ink); font-size: .82rem; font-weight: 750; }
.platform-club-sports-form .commerce-checks { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.club-sport-choice { padding: 9px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.club-sport-choice > span { display: flex; align-items: flex-start; gap: 8px; }
.club-sport-choice strong,.club-sport-choice small { display: block; }
.club-sport-choice strong { color: var(--ink); font-size: .78rem; }
.club-sport-choice small { margin-top: 2px; color: var(--text-muted); font-size: .64rem; line-height: 1.25; }
.club-sport-choice.is-unavailable { opacity: .68; }
.platform-club-override-summary { display: grid; gap: 7px; margin-top: 8px; color: var(--text-muted); font-size: .76rem; }
.platform-club-override-summary span { padding: 7px 9px; border-radius: 9px; background: var(--surface); }
@media (max-width: 1000px) { .platform-club-product-grid { grid-template-columns: 1fr; } }
.platform-member-detail-card .section-heading { align-items: flex-start; }
.platform-member-detail-card .status-badge.is-frozen { color: #2583c5; background: color-mix(in srgb, #58b9ff 14%, var(--surface)); }
.platform-member-detail-card h2 { margin-bottom: 4px; }
.platform-member-detail-card .hint { margin-bottom: 0; }
.platform-member-detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 20px; }
.platform-member-detail-section { padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-subtle); }
.platform-member-detail-section.is-wide { grid-column: 1 / -1; }
.platform-member-detail-section h3 { margin: 0 0 12px; color: var(--ink); font-size: .86rem; }
.platform-member-detail-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 18px; margin: 0; }
.platform-member-detail-list div { min-width: 0; }
.platform-member-detail-list dt { color: var(--text-muted); font-size: .65rem; font-weight: 750; text-transform: uppercase; letter-spacing: .035em; }
.platform-member-detail-list dd { margin: 3px 0 0; color: var(--ink); font-size: .78rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.platform-member-message-dialog { width: min(680px,calc(100% - 24px)); }
.platform-member-message-dialog .access-dialog-panel { max-height: min(760px,calc(100vh - 32px)); }
.platform-member-message-dialog textarea { width: 100%; min-height: 115px; resize: vertical; }
.platform-member-message-history { display: grid; max-height: 280px; gap: 8px; margin: 14px 0; padding: 12px; overflow-y: auto; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-subtle); }
.platform-member-message-history:empty { display: none; }
.platform-message-bubble { justify-self: start; max-width: 82%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 4px 13px 13px; background: var(--surface); }
.platform-message-bubble.is-staff { justify-self: end; border-radius: 13px 4px 13px 13px; background: color-mix(in srgb,var(--primary) 10%,var(--surface)); }
.platform-message-bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.platform-message-bubble small { display: block; margin-top: 4px; color: var(--text-muted); font-size: .62rem; }

body.platform-admin-active .workspace-switcher,
body.platform-admin-active .header-club-switcher { display: none; }

.platform-club-detail-actions { display: flex; align-items: center; gap: 10px; }
.impersonation-menu { position: relative; align-self: stretch; }
.impersonation-menu[hidden],.impersonation-menu-panel[hidden] { display: none; }
.impersonation-menu-button { display: flex; height: 100%; min-height: 42px; align-items: center; gap: 8px; padding: 5px 11px; border: 0; border-left: 1px solid var(--border); border-radius: 0; color: var(--ink); background: color-mix(in srgb,var(--warning) 10%,transparent); box-shadow: none; text-align: left; }
.impersonation-menu-button:hover,.impersonation-menu-button[aria-expanded="true"] { border-color: var(--border); background: color-mix(in srgb,var(--warning) 18%,var(--surface)); }
.impersonation-menu-button > span:nth-child(2) { display: grid; gap: 1px; }
.impersonation-menu-button small { color: var(--text-muted); font-size: .58rem; font-weight: 750; letter-spacing: .03em; text-transform: uppercase; }
.impersonation-menu-button strong { color: var(--ink); font-size: .72rem; }
.impersonation-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 0 4px color-mix(in srgb,var(--warning) 15%,transparent); }
.impersonation-menu-panel { position: absolute; z-index: 40; top: calc(100% + 9px); right: 0; display: grid; width: min(310px,calc(100vw - 32px)); gap: 5px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-raised); box-shadow: var(--shadow); }
.impersonation-menu-panel > strong { color: var(--ink); font-size: .82rem; }
.impersonation-menu-panel > small { margin-bottom: 8px; color: var(--text-muted); line-height: 1.45; }
.impersonation-menu-panel > button { width: 100%; justify-content: flex-start; color: var(--ink); background: color-mix(in srgb,var(--warning) 14%,var(--surface)); }
.impersonation-menu-panel > button:hover { background: color-mix(in srgb,var(--warning) 22%,var(--surface)); }

.card {
  min-width: 0;
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, .93);
  box-shadow: var(--shadow);
}

.commerce-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.commerce-hero h2 { margin: 4px 0 6px; }
.commerce-hero .hint { max-width: 760px; margin: 0; }
.commerce-detail-tabs { display: flex; gap: 6px; width: fit-content; max-width: 100%; padding: 5px; border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,.75); overflow-x: auto; }
.commerce-detail-tabs button { min-height: 40px; padding: 9px 16px; border-color: transparent; background: transparent; color: var(--text-muted); white-space: nowrap; }
.commerce-detail-tabs button.is-active { border-color: var(--border); background: var(--surface); color: var(--ink); box-shadow: 0 8px 22px rgba(25,31,56,.08); }
.commerce-panels { display: block; }
.commerce-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.commerce-grid-top { grid-template-columns: minmax(300px,.8fr) minmax(420px,1.2fr); }
.commerce-split { display: grid; grid-template-columns: minmax(260px,.7fr) minmax(480px,1.3fr); gap: 24px; }
.commerce-stack { display: grid; gap: 9px; margin-top: 14px; }
.commerce-sports-card { max-width: 920px; }
.commerce-sport-row { grid-template-columns: minmax(0,1fr) auto minmax(150px,190px); }
.commerce-sport-status { display: grid; gap: 4px; color: var(--text-muted); font-size: .68rem; font-weight: 750; }
.commerce-sport-status select { width: 100%; min-height: 38px; }
.commerce-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-subtle); }
.commerce-row.is-editing { border-color: rgba(90,75,235,.42); background: var(--surface); box-shadow: 0 10px 28px rgba(38,32,112,.08); }
.commerce-row strong,.commerce-row small { display: block; }
.commerce-row small { margin-top: 3px; color: var(--text-muted); overflow-wrap: anywhere; }
.commerce-plan-list { margin-top: 16px; }
.commerce-plan-table { min-width: 760px; }
.commerce-plan-table td { vertical-align: middle; }
.commerce-plan-table td:first-child { min-width: 170px; }
.commerce-plan-table td:first-child strong,.commerce-plan-table td:first-child small { display: block; }
.commerce-plan-table td:first-child strong { color: var(--ink); font-size: .82rem; }
.commerce-plan-table td:first-child small { margin-top: 2px; color: var(--text-muted); font-size: .65rem; }
.commerce-plan-table td:nth-child(2),.commerce-plan-table td:nth-child(3),.commerce-plan-table td:nth-child(4) { white-space: nowrap; }
.commerce-plan-table td:last-child { width: 58px; text-align: right; }
.commerce-plan-dialog { width: min(940px, calc(100% - 24px)); }
.commerce-plan-dialog .access-dialog-panel { max-height: min(92vh, 900px); }
.commerce-plan-dialog .commerce-form { margin-top: 18px; }
.commerce-form { display: grid; gap: 13px; margin-top: 14px; }
.commerce-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.commerce-form label { display: grid; gap: 6px; color: var(--text-muted); font-size: .76rem; font-weight: 700; }
.commerce-form input,.commerce-form select { width: 100%; }
.commerce-form fieldset { display: grid; gap: 10px; margin: 0; padding: 13px; border: 1px solid var(--border); border-radius: 13px; }
.commerce-form legend { padding: 0 6px; color: var(--ink); font-size: .78rem; font-weight: 750; }
.commerce-form .check-row { display: flex; align-items: center; gap: 7px; color: var(--ink); }
.commerce-form .check-row input { width: auto; }
.commerce-checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.commerce-inline-form { grid-template-columns: repeat(2,minmax(0,1fr)); padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.commerce-inline-form button { align-self: end; }
.commerce-subscription-editor { grid-column: 1 / -1; width: 100%; margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--border); }
.commerce-selected-club { display: grid; align-content: center; gap: 4px; min-height: 66px; padding: 10px 12px; border-radius: 12px; background: var(--surface-subtle); }
.commerce-subscription-editor .commerce-selected-club,.subscription-primary-fields,.subscription-paid-start { grid-column: 1 / -1; }
.subscription-primary-fields { width: 100%; }
.subscription-paid-start { display: grid; gap: 6px; padding: 13px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-subtle); }
.commerce-selected-club span,.commerce-selected-club small { color: var(--text-muted); font-size: .72rem; }
.commerce-editor-actions { display: flex; align-items: end; justify-content: flex-end; gap: 8px; }
.platform-club-subscription-form { margin-top: 18px; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-subtle); }
.subscription-trial-fields { display: grid; grid-column: 1 / -1; gap: 12px; padding: 14px; border: 1px solid rgba(90,75,235,.24); border-radius: 14px; background: rgba(90,75,235,.045); }
.subscription-trial-fields > button { justify-self: start; }
.subscription-approval-field { display: flex !important; grid-column: 1 / -1; align-items: center; gap: 9px; padding: 13px; border: 1px solid rgba(30,160,122,.28); border-radius: 13px; background: rgba(30,160,122,.07); color: var(--ink) !important; }
.subscription-approval-field[hidden] { display: none !important; }
.subscription-approval-field input { width: auto; }
.subscription-approval-field span { display: grid; gap: 3px; }
.subscription-approval-field strong { color: var(--ink); }
.subscription-approval-field small { color: var(--text-muted); font-weight: 600; }
.upcoming-payment { display: grid; grid-column: 1 / -1; gap: 5px; padding: 14px; border: 1px solid rgba(90,75,235,.24); border-radius: 14px; background: rgba(90,75,235,.05); }
.upcoming-payment strong { color: var(--ink); font-size: 1rem; }
.upcoming-payment small { color: var(--text-muted); }
.subscription-history { grid-column: 1 / -1; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--border); }
.subscription-history-list { display: grid; gap: 8px; margin-top: 10px; }
.subscription-history-item { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.subscription-history-item:last-child { border-bottom: 0; }
.subscription-history-item time { color: var(--text-muted); font-size: .7rem; }
.subscription-history-item strong,.subscription-history-item small { display: block; }
.subscription-history-item small { margin-top: 3px; color: var(--text-muted); }
.development-action { border-color: var(--danger-border); color: var(--danger); background: rgba(196,50,61,.05); }
.development-action:hover { border-color: var(--danger); background: rgba(196,50,61,.1); }
.commerce-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 18px 0; }
.commerce-metric { display: grid; gap: 5px; min-height: 116px; padding: 16px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface-subtle); }
.commerce-metric span,.commerce-metric small { color: var(--text-muted); }
.commerce-metric span { font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.commerce-metric strong { align-self: end; font-size: clamp(1.55rem,3vw,2.15rem); line-height: 1; }
.commerce-metric small { font-size: .72rem; }
.commerce-revenue-card { margin-bottom: 20px; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-subtle); }
.commerce-revenue-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.commerce-revenue-heading h3 { margin: 4px 0 0; font-size: 1rem; }
.commerce-revenue-heading > small { color: var(--text-muted); }
.commerce-revenue-bars { display: grid; gap: 13px; margin-top: 18px; }
.commerce-revenue-row { display: grid; gap: 7px; }
.commerce-revenue-label { display: flex; justify-content: space-between; gap: 16px; font-size: .78rem; font-weight: 700; }
.commerce-revenue-label span:last-child { color: var(--text-muted); }
.commerce-revenue-track { height: 12px; border-radius: 999px; background: rgba(90,75,235,.12); overflow: hidden; }
.commerce-revenue-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--accent),#8c7bff); }
.commerce-revenue-empty { margin: 0; color: var(--text-muted); }
.billing-roadmap-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 18px; }
.billing-roadmap-grid article { padding: 17px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface-subtle); }
.billing-roadmap-grid h3 { margin: 6px 0 10px; font-size: 1rem; }
.billing-roadmap-grid ul { display: grid; gap: 8px; margin: 0; padding-left: 19px; color: var(--text-muted); font-size: .79rem; line-height: 1.45; }
.billing-roadmap-grid li::marker { color: var(--accent); }
.billing-roadmap-grid strong { color: var(--ink); }
.billing-legal-note { margin: 16px 0 0; padding: 12px 14px; border-left: 3px solid var(--accent); background: rgba(90,75,235,.05); color: var(--text-muted); font-size: .76rem; }
@media (max-width: 1000px) { .commerce-grid,.commerce-grid-top,.commerce-split { grid-template-columns: 1fr; } .commerce-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 620px) { .commerce-fields,.commerce-inline-form,.commerce-metrics,.billing-roadmap-grid { grid-template-columns: 1fr; } .commerce-row { grid-template-columns: 1fr auto; }.commerce-sport-row .commerce-sport-status,.commerce-row button { grid-column: 1 / -1; } .commerce-revenue-heading { display: grid; } }
