/* Page-specific surfaces share the shell's palette and spacing. Keep status
   colors, uploaded profile covers and the registration composition intact. */

/* Public pages and informational headers */
body.helis-shell :is(.ab-wrap, .tm-wrap, .club-wrap) { max-width: none; }
body.helis-shell :is(.ab-hero, .tm-hero, .club-hero, .sec-hero, .hero-sm) {
  background: #242039; border: 1px solid #3b3157; border-radius: var(--radius);
  box-shadow: none; min-height: 0; margin-bottom: 24px;
}
body.helis-shell :is(.ab-hero-body, .tm-hero-body) { padding: 30px 32px; max-width: 740px; }
body.helis-shell :is(.club-hero, .sec-hero) { padding: 28px 32px; }
body.helis-shell :is(.ab-title, .tm-title, .club-title, .sec-title, .unlock-title) {
  font-size: clamp(24px, 2.6vw, 34px); font-weight: 600; letter-spacing: -.04em; text-shadow: none;
}
body.helis-shell :is(.ab-kicker, .tm-kicker, .club-kicker, .profile-kicker, .sec-kicker, .unlock-kicker) {
  font-size: 10px; letter-spacing: .14em; font-weight: 500; color: var(--accent-2);
}
body.helis-shell :is(.ab-lead, .tm-lead, .club-lead, .sec-lead) { font-size: 14px; line-height: 1.7; color: #b9b2cb; }
body.helis-shell .ab-section-head { text-align: left; margin: 28px 0 18px; }
body.helis-shell .ab-section-head h2 { font-size: 20px; }
body.helis-shell .ab-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
body.helis-shell .ab-highlights { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }

/* Cards used outside the core family dashboard */
body.helis-shell :is(.ab-hl, .ab-card, .ab-cta, .tm-pod, .tm-row,
  .club-me, .club-tier, .club-row, .gw-card, .gw-history-row, .cg-card,
  .sec-card, .sec-info, .sec-danger, .rd-card, .unlock-card,
  .me-loyalty-card, .me-referral-stat, .me-gw-item, .me-promo, .admin-access,
  .afk-item, .ac-item, .chk, .bl-item, .prob-item, .rule-item, .mt-card, .an-trend) {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: none;
}
body.helis-shell :is(.ab-card, .tm-pod, .tm-row, .gw-card, .shop-card):hover {
  transform: none; box-shadow: none; border-color: var(--accent);
}
body.helis-shell :is(.ab-card::before, .sec-hero-glow, .unlock-aura, .unlock-ring, .cab-scanlines) { display: none; }
body.helis-shell :is(.gw-prize, .me-prize, .me-reward) { background: rgba(224,168,58,.06); box-shadow: none; border-radius: var(--radius); }
body.helis-shell :is(.club-tier.is-mine, .tm-pod-1) { border-color: var(--yellow); box-shadow: none; }
body.helis-shell :is(.ab-cta, .sec-card, .sec-info, .sec-danger) { padding: 24px; }
body.helis-shell :is(.gw-grid, .cg-grid) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
body.helis-shell .me-promo-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
body.helis-shell :is(.sec-shield, .sec-card-ico, .unlock-lock, .rd-ico, .gw-emo, .me-gw-emo, .cg-emo, .contract-settings-icon) {
  background: var(--grad-accent-soft); border-color: var(--border); box-shadow: none; border-radius: 12px;
}
body.helis-shell .sec-hero.is-on .sec-shield { background: rgba(63,185,80,.1); border-color: rgba(63,185,80,.3); box-shadow: none; }
body.helis-shell .sec-pill .dot { animation: none; box-shadow: none; }

/* Account and public profiles: uploaded covers and personal accents still win. */
body.helis-shell .profile-page { --profile-accent: var(--accent); gap: 24px; }
body.helis-shell .profile-hero { min-height: 260px; border-radius: var(--radius); background: var(--panel); border-color: var(--border); box-shadow: none; }
body.helis-shell .profile-cover { background-image: none; background-color: #242039; }
body.helis-shell .profile-cover::after { display: none; }
body.helis-shell .profile-cover-shade { background: linear-gradient(180deg, transparent, rgba(20,23,33,.95)); }
body.helis-shell .profile-hero-body { min-height: 260px; padding: 84px 28px 28px; gap: 20px; grid-template-columns: auto minmax(0,1fr); }
body.helis-shell .profile-avatar-xl { width: 88px; height: 88px; border-radius: 20px; box-shadow: none; border: 2px solid var(--profile-accent); }
body.helis-shell .profile-name { font-size: clamp(25px, 3vw, 38px); text-shadow: none; line-height: 1.2; }
body.helis-shell .profile-actions { grid-column: 1 / -1; justify-content: flex-start; min-width: 0; }
body.helis-shell .profile-layout { grid-template-columns: minmax(220px,.7fr) minmax(0,2fr); gap: 24px; }
body.helis-shell .profile-mini-row { background: var(--bg-2); border-color: var(--border); }
body.helis-shell .prof-bio { background: var(--bg-2); border-color: var(--border); box-shadow: none; }
body.helis-shell .cyber-admin-bar { background: var(--panel); border-color: var(--border); box-shadow: none; }
body.helis-shell .cab-inner { grid-template-columns: repeat(2,minmax(0,1fr)); }
body.helis-shell :is(.cab-title, .cab-kicker) { text-shadow: none; color: var(--text); letter-spacing: 0; }
body.helis-shell .cab-lvl { background: var(--bg-2); border-color: var(--border); color: var(--muted); }
body.helis-shell .cab-lvl.active { background: var(--grad-accent-soft); border-color: var(--accent); color: var(--accent-2); }
body.helis-shell .cab-submit { background: var(--accent); border-color: var(--accent); box-shadow: none; font-weight: 600; letter-spacing: 0; }

/* Plans, checkout and purchase dialogs */
body.helis-shell .shop-card-title { font-size: 21px; font-weight: 600; letter-spacing: -.025em; }
body.helis-shell .shop-card-popular { box-shadow: none; }
body.helis-shell :is(.shop-funpay-banner, .shop-current-plan, .shop-total-card) { background: var(--panel); box-shadow: none; }
body.helis-shell .shop-current-plan { border-left: 3px solid var(--green); }
body.helis-shell .shop-funpay-ico { background: var(--grad-accent-soft); border-color: var(--border); box-shadow: none; }
body.helis-shell .shop-nav { background: var(--panel-2); color: var(--text); border-color: var(--border); box-shadow: var(--shadow); border-radius: 10px; }
body.helis-shell .shop-nav:hover { background: var(--panel-2); border-color: var(--accent); transform: translateY(-50%); }
body.helis-shell .shop-buy-dialog form { background: var(--panel); box-shadow: none; }
body.helis-shell .shop-preset { background: var(--bg-2); border-color: var(--border); box-shadow: none; border-radius: 10px; }
body.helis-shell .shop-preset.active { background: var(--grad-accent-soft); border-color: var(--accent); box-shadow: none; }
body.helis-shell :is(.shop-order-row, .shop-orders-empty, .pay-step, .pay-status-details span) { background: var(--bg-2); }
body.helis-shell :is(.shop-buy-dialog input[type="text"], .me-referral-link input) { background: var(--bg-2); border-color: var(--border); box-shadow: none; }

/* Family forms, records, settings and analytics */
body.helis-shell :is(.contract-settings-card, .contract-input-unit, .cg-req-box) { background: var(--panel); border-color: var(--border); box-shadow: none; }
body.helis-shell :is(.an-mini-grid div, .an-meeting-grid div, .an-list-row, .contract-metrics div, .contract-person) { background: var(--bg-2); }
body.helis-shell .an-bar-track i { background: var(--accent); }
body.helis-shell :is(.an-trend-grid) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px),1fr)); }
body.helis-shell :is(.ac-form, .afk-form, .bl-form, .prob-form, .rules-form, .contract-setting-field, .rank-form) :is(input, select, textarea, .rs-trigger) { background: var(--bg-2); border-color: var(--border); box-shadow: none; }
body.helis-shell .sec-input { border-radius: 8px; background: var(--bg-2); border-color: var(--border); }
body.helis-shell .sec-input input { background: transparent; border: 0; box-shadow: none; }
body.helis-shell :is(.sec-input, .contract-input-unit):focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
body.helis-shell :is(.ac-form, .afk-form, .bl-form, .prob-form, .rules-form, .contract-setting-field, .rank-form) :is(input, select, textarea):focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
body.helis-shell .btn.danger { background: rgba(248,81,73,.08); color: var(--red); border-color: rgba(248,81,73,.35); }
body.helis-shell .btn.success { background: rgba(63,185,80,.12); color: #85d997; border-color: rgba(63,185,80,.35); }

/* Shared overlays, support, empty states and keyboard interaction */
body.helis-shell dialog { border-color: var(--border); border-radius: var(--radius); background: var(--panel); box-shadow: 0 24px 80px #0006; max-height: calc(100dvh - 32px); }
body.helis-shell dialog::backdrop { background: rgba(5,7,13,.75); backdrop-filter: blur(4px); }
body.helis-shell .rs-panel { background: var(--panel); border-color: var(--border); box-shadow: 0 12px 32px #0005; }
body.helis-shell .rs-item.selected { background: var(--grad-accent-soft); }
body.helis-shell .empty { padding: 30px 20px; color: var(--muted); font-size: 13px; }
body.helis-shell #sw-toggle { background: var(--accent); border: 1px solid var(--accent); border-radius: 10px; box-shadow: var(--shadow); font-weight: 600; }
body.helis-shell #sw-toggle::before { display: none; }
body.helis-shell #sw-panel { background: var(--panel); border-color: var(--border); border-radius: var(--radius); box-shadow: 0 20px 64px #0006; max-height: calc(100dvh - 110px); overflow-y: auto; }
body.helis-shell .sw-head { background: var(--bg-2); border-color: var(--border); }
body.helis-shell :is(.sw-guild-trigger, .sw-guild-menu, .sw-cat) { background: var(--bg-2); border-color: var(--border); }
body.helis-shell .sw-cat.active { background: var(--grad-accent-soft); border-color: var(--accent); }
body.helis-shell .sw-cat { box-shadow: none; }
body.helis-shell .bubble { background: var(--panel-2); box-shadow: none; }
body.helis-shell .bubble.mine { background: var(--grad-accent-soft); }
body.helis-shell :is(.page-head, .section-title) { gap: 16px; flex-wrap: wrap; }
body.helis-shell :is(.page-head, .section-title) > div { min-width: 0; }
body.helis-shell .field { min-width: 0; }
body.helis-shell :is(input, select, textarea) { max-width: 100%; accent-color: var(--accent); }
body.helis-shell :is(button, a, summary):focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

/* Standalone error and blocked-account pages use the same theme. */
body.helis-shell.error-page { background: var(--bg); }
body.helis-shell .error-panel { border: 1px solid var(--border); background: var(--panel); border-radius: var(--radius); box-shadow: none; padding: 40px; }
body.helis-shell .error-panel::after { display: none; }
body.helis-shell .error-mark { color: var(--accent-2); text-shadow: none; }
body.helis-shell .error-panel h1 { font-size: 28px; letter-spacing: -.04em; }
body.helis-shell .error-kicker { color: var(--muted); letter-spacing: .12em; }
body.helis-shell .error-btn { border-radius: 8px; box-shadow: none; font-weight: 550; }
body.helis-shell .error-btn-home { background: var(--accent); border-color: var(--accent); color: white; }
body.helis-shell .error-btn-support { background: var(--panel-2); border-color: var(--border); }
body.helis-shell .banned-panel { border-top: 3px solid var(--red); }

@media (max-width: 1250px) {
  body.helis-shell :is(.contracts-layout, .settings-layout, .channel-settings, .sec-grid) { grid-template-columns: minmax(0,1fr); }
  body.helis-shell .sales-filter { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body.helis-shell .club-tiers { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  body.helis-shell .profile-layout { grid-template-columns: minmax(0,1fr); }
  body.helis-shell .profile-hero-body { padding: 64px 20px 22px; gap: 16px; }
  body.helis-shell .profile-avatar-xl { width: 64px; height: 64px; border-radius: 14px; }
  body.helis-shell .profile-name { font-size: 25px; }
  body.helis-shell .profile-meta { font-size: 11px; }
  body.helis-shell .profile-meta span { padding: 4px 6px; }
  body.helis-shell :is(.ab-hero-body, .tm-hero-body, .club-hero, .sec-hero) { padding: 24px; }
}
@media (max-width: 600px) {
  body.helis-shell > .container { padding: 22px 16px; }
  body.helis-shell :is(.ab-hero-body, .tm-hero-body, .club-hero, .sec-hero, .ab-cta, .sec-card, .sec-info, .sec-danger, .rd-card, .unlock-card, .error-panel) { padding: 22px 18px; }
  body.helis-shell :is(.cab-inner, .sales-filter, .rules-form, .contract-groups, .contract-metrics, .contract-settings-grid, .an-mini-grid, .an-meeting-grid) { grid-template-columns: minmax(0,1fr); }
  body.helis-shell :is(.me-loyalty-card, .me-prize, .me-reward, .me-gw-item, .me-promo, .gw-prize, .club-row, .mt-card, .tm-row) { flex-wrap: wrap; }
  body.helis-shell :is(.me-referral-link, .shop-funpay-banner, .shop-current-plan) { flex-wrap: wrap; }
  body.helis-shell :is(.bl-revoke-form input, .profile-actions, .shop-current-copy, .shop-funpay-copy) { min-width: 0; }
  body.helis-shell .sec-hero { gap: 14px; }
  body.helis-shell .sec-shield { width: 48px; height: 48px; }
  body.helis-shell .error-stage { width: 100%; padding: 16px; }
  body.helis-shell .ap-btn-row { grid-template-columns: 48px minmax(0,1fr) auto; }
  body.helis-shell .ap-btn-row > * { min-width: 0; }
  body.helis-shell #support-widget { right: 16px; bottom: 16px; }
  body.helis-shell #sw-panel { width: min(376px, calc(100vw - 42px)); }
}
