/**
 * TeleLive — Apple DS page overlays (profile, rules, about, tele, clips, chat chrome, admin)
 * Loaded after theme-apple.css. Skips lite theme. Zero DB impact.
 */

/* ── Chat settings modal (needed in popout too) ── */
.chat-settings-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 12, 0.42);
  z-index: 1001;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

/* Chat header buttons — circular chips like iOS toolbar */
html:not([data-theme="lite"]) .chat-hdr-btn,
html:not([data-theme="lite"]) .chat-hdr-btn.chat-hdr-btn-warn {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 999px !important;
  border: 1px solid var(--ios-glass-border, rgba(255,255,255,.12)) !important;
  background: var(--ios-fill-tertiary, rgba(120,120,128,.24)) !important;
  color: var(--ios-label-primary, #fff) !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
html:not([data-theme="lite"]) .chat-hdr-btn:hover {
  background: var(--ios-fill-secondary, rgba(120,120,128,.32)) !important;
}

/* Header actions pinned to the visual RIGHT (end of LTR row) */
html:not([data-theme="lite"]) body.page-stream .chat-header-top {
  direction: ltr !important;
  justify-content: flex-start !important;
  width: 100%;
}
html:not([data-theme="lite"]) body.page-stream .chat-header-top h3 {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin-inline-end: auto !important;
}
html:not([data-theme="lite"]) body.page-stream .chat-hdr-actions-slot--desktop,
html:not([data-theme="lite"]) body.page-stream .chat-header-top .chat-header-actions,
html:not([data-theme="lite"]) body.page-stream .chat-header-actions-grid {
  margin-left: auto !important;
  margin-right: 0 !important;
  margin-inline-start: auto !important;
  margin-inline-end: 0 !important;
  justify-content: flex-end !important;
  flex: 0 0 auto !important;
}

/* Viewer count: ONLY in popout — hide on main /live */
html:not([data-theme="lite"]) body.page-stream .chat-hdr-viewer-count,
html:not([data-theme="lite"]) body.page-stream .chat-hdr-viewer-count--popout,
body.page-stream .chat-popout-cluster .chat-hdr-viewer-count {
  display: none !important;
}
html:not([data-theme="lite"]) .popout-chat-wrap .chat-hdr-viewer-count,
.popout-chat-wrap .chat-hdr-viewer-count {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ios-fill-tertiary, rgba(120,120,128,.24));
  border: 1px solid var(--ios-glass-border, rgba(255,255,255,.1));
  font-size: .78rem;
  font-weight: 700;
  color: var(--ios-label-primary, #fff);
  white-space: nowrap;
  max-height: 34px;
}
.popout-chat-wrap .chat-hdr-viewer-count i {
  color: var(--ios-blue, #0091ff);
}

/* /live mobile: never show bottom nav (chat drawer conflict) */
html:not([data-theme="lite"]) body.page-stream .mob-bottom-nav,
body.page-stream .mob-bottom-nav {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
html:not([data-theme="lite"]) .popout-chat-wrap .chat-header {
  background: var(--ios-glass-bg-medium, rgba(0,0,0,.6));
  border-bottom: 1px solid var(--ios-glass-border, rgba(255,255,255,.12));
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}

/* Mini profile (cup) */
html:not([data-theme="lite"]) .chat-user-popup {
  border-radius: 20px !important;
  border: 1px solid var(--ios-glass-border, rgba(255,255,255,.14)) !important;
  background: var(--ios-glass-bg-large, rgba(0,0,0,.82)) !important;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: 0 20px 48px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.1);
}
html:not([data-theme="lite"]) .cup-btn {
  border-radius: 12px !important;
  border: 1px solid var(--ios-glass-border, rgba(255,255,255,.1));
  background: var(--ios-fill-tertiary, rgba(120,120,128,.2));
  min-height: 36px;
}
html:not([data-theme="lite"]) .cup-btn-danger {
  background: color-mix(in srgb, var(--ios-red, #ff4245) 18%, transparent) !important;
  border-color: color-mix(in srgb, var(--ios-red, #ff4245) 40%, transparent) !important;
  color: var(--ios-red, #ff4245) !important;
}

/* Users-in-chat panel — match site glass chrome */
html:not([data-theme="lite"]) .chat-users-panel {
  background: var(--ios-material-regular, rgba(0, 0, 0, 0.72)) !important;
  border-top: 1px solid var(--ios-glass-border, rgba(255,255,255,.12)) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
html:not([data-theme="lite"]) .cup-panel-header {
  border-bottom-color: var(--ios-glass-border, rgba(255,255,255,.1)) !important;
  padding: 12px 14px !important;
  background: var(--ios-fill-quaternary, rgba(120,120,128,.14)) !important;
}
html:not([data-theme="lite"]) .cup-panel-user {
  border-radius: 12px !important;
  padding: 8px 10px !important;
}
html:not([data-theme="lite"]) .cup-panel-user:hover {
  background: var(--ios-fill-tertiary, rgba(120,120,128,.22)) !important;
  border-color: var(--ios-glass-border, rgba(255,255,255,.1)) !important;
}
html:not([data-theme="lite"]) .cup-back-btn {
  border-radius: 999px !important;
  background: var(--ios-fill-quaternary, rgba(120,120,128,.16));
  border: 1px solid var(--ios-glass-border, rgba(255,255,255,.1));
}
html:not([data-theme="lite"]) .cup-watch-stats {
  background: var(--ios-fill-quaternary, rgba(120,120,128,.14)) !important;
  border-color: var(--ios-glass-border, rgba(255,255,255,.12)) !important;
  border-radius: 14px !important;
}
html:not([data-theme="lite"]) .cup-group-count {
  background: var(--ios-fill-tertiary, rgba(120,120,128,.22)) !important;
  border-color: var(--ios-glass-border, rgba(255,255,255,.1)) !important;
}
html:not([data-theme="lite"]) .cup-panel-av {
  border-color: var(--ios-glass-border, rgba(255,255,255,.14)) !important;
}
html:not([data-theme="lite"]) .chat-user-popup .cup-btn,
html:not([data-theme="lite"]) .cup-profile-link {
  border-radius: 12px !important;
}

/* Tele dropdown + modal — keep; spark BUTTON stays unstyled (legacy) */
html:not([data-theme="lite"]) .tele-dropdown,
html:not([data-theme="lite"]) .tele-modal-box {
  border-radius: 20px !important;
  border: 1px solid var(--ios-glass-border, rgba(255,255,255,.14)) !important;
  background: var(--ios-glass-bg-large, rgba(0,0,0,.82)) !important;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
}
html:not([data-theme="lite"]) .tele-pkg {
  border-radius: 14px !important;
  border: 1px solid var(--ios-glass-border, rgba(255,255,255,.1));
  background: var(--ios-fill-quaternary, rgba(120,120,128,.16));
}
html:not([data-theme="lite"]) .tele-pkg:hover {
  border-color: color-mix(in srgb, var(--ios-blue, #0091ff) 45%, transparent);
}
/* Spark panel only (NOT the button — leave .chat-spark-btn alone) */
html:not([data-theme="lite"]) .chat-spark-panel {
  border-radius: 18px !important;
  border: 1px solid var(--ios-glass-border, rgba(255,255,255,.12));
  background: var(--ios-glass-bg-large, rgba(0,0,0,.78)) !important;
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
}

/* Emoji picker */
html:not([data-theme="lite"]) .chat-emoji-picker,
html:not([data-theme="lite"]) .emoji-picker,
html:not([data-theme="lite"]) .emoji-picker-v2 {
  border-radius: 18px !important;
  border: 1px solid var(--ios-glass-border, rgba(255,255,255,.14)) !important;
  background: var(--ios-glass-bg-large, rgba(0,0,0,.82)) !important;
  backdrop-filter: blur(28px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
  box-shadow: 0 16px 40px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08) !important;
  overflow: hidden;
}
html:not([data-theme="lite"]) .emoji-tabs {
  background: var(--ios-fill-quaternary, rgba(120,120,128,.16)) !important;
  border-bottom-color: var(--ios-glass-border, rgba(255,255,255,.1)) !important;
  border-radius: 18px 18px 0 0 !important;
}
html:not([data-theme="lite"]) .emoji-tab {
  border-radius: 10px !important;
}
html:not([data-theme="lite"]) .emoji-tab.active {
  background: color-mix(in srgb, var(--ios-blue, #0091ff) 22%, transparent) !important;
  color: var(--ios-blue, #0091ff) !important;
}
html:not([data-theme="lite"]) .emoji-picker__body {
  background: transparent !important;
}

/* Site admin gold messages — Apple glass gold */
html:not([data-theme="lite"]) .chat-message.tl-chat-admin-gold {
  background: linear-gradient(
    105deg,
    rgba(255, 214, 10, 0.22) 0%,
    rgba(255, 159, 10, 0.12) 45%,
    rgba(0, 0, 0, 0.18) 100%
  ) !important;
  border: 1px solid rgba(255, 214, 10, 0.35) !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 20px rgba(255, 159, 10, 0.12), inset 0 1px 0 rgba(255,255,255,.08) !important;
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}
html:not([data-theme="lite"]) .chat-message.tl-chat-admin-gold.chat-msg-whisper,
html:not([data-theme="lite"]) .chat-message.tl-chat-admin-gold.tl-chat-msg-plus-bg,
html:not([data-theme="lite"]) .chat-message.tl-chat-admin-gold.tl-chat-msg-ultra,
html:not([data-theme="lite"]) .chat-message.tl-chat-admin-gold.tl-chat-msg-bg-rgb,
html:not([data-theme="lite"]) .chat-message.tl-chat-admin-gold[class*="tl-chat-msg-bg-rgb"] {
  background: linear-gradient(
    105deg,
    rgba(255, 214, 10, 0.22) 0%,
    rgba(255, 159, 10, 0.12) 45%,
    rgba(0, 0, 0, 0.18) 100%
  ) !important;
  border: 1px solid rgba(255, 214, 10, 0.35) !important;
  border-inline-start: 3px solid #ffd60a !important;
}
html:not([data-theme="lite"]) .pinned-msg-bar.tl-pinned-admin-gold,
html:not([data-theme="lite"]) #pinnedMsgBar.tl-pinned-admin-gold {
  background: color-mix(in srgb, #ffd60a 14%, transparent) !important;
  border-bottom-color: rgba(255, 214, 10, 0.28) !important;
}

/* Profile tabs — segmented control style */
html:not([data-theme="lite"]) .tl-tabs-row {
  gap: 4px;
  padding: 8px 12px !important;
  background: transparent !important;
  border-bottom: none !important;
}
html:not([data-theme="lite"]) .tl-tab {
  border-radius: 999px !important;
  border: 1px solid transparent !important;
  border-bottom: 1px solid transparent !important;
  padding: 8px 16px !important;
  background: var(--ios-fill-quaternary, rgba(120,120,128,.14)) !important;
  color: var(--ios-label-secondary, rgba(235,235,245,.7)) !important;
}
html:not([data-theme="lite"]) .tl-tab:hover {
  background: var(--ios-fill-tertiary, rgba(120,120,128,.22)) !important;
  color: var(--ios-label-primary, #fff) !important;
}
html:not([data-theme="lite"]) .tl-tab.active {
  background: color-mix(in srgb, var(--ios-blue, #0091ff) 22%, transparent) !important;
  border-color: color-mix(in srgb, var(--ios-blue, #0091ff) 40%, transparent) !important;
  color: var(--ios-blue, #0091ff) !important;
  border-bottom-color: color-mix(in srgb, var(--ios-blue, #0091ff) 40%, transparent) !important;
}
html:not([data-theme="lite"]) .tl-bio-card,
html:not([data-theme="lite"]) .tl-channel-bar {
  border-radius: 16px !important;
}

/* Rules / about / membership / clips / subscriptions */
html:not([data-theme="lite"]) .tl-rules-toc,
html:not([data-theme="lite"]) .tl-rules-section,
html:not([data-theme="lite"]) .tl-rules-hero,
html:not([data-theme="lite"]) .tl-about-card,
html:not([data-theme="lite"]) .tl-about-hero,
html:not([data-theme="lite"]) .tl-mem-card,
html:not([data-theme="lite"]) .tl-mem-tier,
html:not([data-theme="lite"]) .clip-card,
html:not([data-theme="lite"]) .tl-clip-card,
html:not([data-theme="lite"]) .tl-subs-card,
html:not([data-theme="lite"]) .subscription-card {
  border-radius: 16px !important;
  border-color: var(--ios-glass-border, rgba(255,255,255,.12)) !important;
}
html:not([data-theme="lite"]) .tl-rules-item,
html:not([data-theme="lite"]) .tl-mem-card,
html:not([data-theme="lite"]) .tl-subs-card,
html:not([data-theme="lite"]) .tl-about-card {
  background: var(--ios-fill-quaternary, rgba(120,120,128,.12));
  border: 1px solid var(--ios-glass-border, rgba(255,255,255,.1));
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html:not([data-theme="lite"]) .tl-rules-toc,
  html:not([data-theme="lite"]) .tl-rules-section,
  html:not([data-theme="lite"]) .tl-mem-card,
  html:not([data-theme="lite"]) .tl-subs-card,
  html:not([data-theme="lite"]) .tl-about-card {
    background: var(--ios-glass-bg-medium, rgba(0,0,0,.55));
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
  }
}
html:not([data-theme="lite"]) .tl-rules-badge {
  border-radius: 999px !important;
  border: 1px solid var(--ios-glass-border, rgba(255,255,255,.12));
  background: var(--ios-fill-tertiary, rgba(120,120,128,.22));
}

/* Chat settings modal — app-like sheet */
.chat-settings-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 12, 0.45);
  z-index: 1001;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
html:not([data-theme="lite"]) .chat-settings-modal__card.tl-cs-card,
html:not([data-theme="lite"]) .tl-cs-card {
  border-radius: 22px !important;
  border: 1px solid var(--ios-glass-border, rgba(255,255,255,.14)) !important;
  width: min(400px, 94vw) !important;
  max-height: min(86vh, 720px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  background: var(--ios-glass-bg-large, rgba(0,0,0,.88)) !important;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  color: #fff;
}
.tl-cs-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 16px 10px;
  flex-shrink: 0;
}
.tl-cs-card__head .chat-settings-modal__title {
  margin: 0 !important;
  font-size: 1.05rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tl-cs-card__head .chat-settings-modal__title i {
  color: var(--ios-blue, #0091ff);
}
.tl-cs-card__head .chat-settings-modal__close {
  position: static !important;
  top: auto !important;
  right: auto !important;
  flex-shrink: 0;
}
.tl-cs-card__body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 16px 18px;
  flex: 1 1 auto;
  min-height: 0;
  overscroll-behavior: contain;
}

.tl-cs-sheet {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tl-cs-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tl-cs-row--toggle {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tl-cs-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tl-cs-label {
  font-size: .9rem;
  font-weight: 600;
  color: rgba(255,255,255,.92);
}
.tl-cs-font-val {
  font-size: .9rem;
  font-weight: 700;
  color: rgba(255,255,255,.75);
  min-width: 1.5rem;
  text-align: end;
}
.tl-cs-hint {
  margin: 4px 0 0;
  font-size: .72rem;
  color: rgba(235,235,245,.55);
  line-height: 1.35;
  max-width: 240px;
}
.tl-cs-toggle-copy {
  min-width: 0;
  flex: 1;
}

/* Slider */
.tl-cs-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(120,120,128,.35);
  outline: none;
}
.tl-cs-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
  cursor: pointer;
}
.tl-cs-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
  cursor: pointer;
}
.tl-cs-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
}
html:not([data-theme="lite"]) .tl-cs-slider {
  background: linear-gradient(90deg, #0091ff 0%, #0091ff var(--tl-cs-pct, 25%), rgba(120,120,128,.35) var(--tl-cs-pct, 25%));
}

/* Color swatches — horizontal scroll (mobile + desktop) */
.tl-cs-swatches {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding: 4px 2px 8px;
  margin: 0 -2px;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.tl-cs-swatches::-webkit-scrollbar { display: none; }
.tl-cs-swatch {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--sw, #fff);
  cursor: pointer;
  scroll-snap-align: start;
  padding: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.tl-cs-swatch--auto {
  background: rgba(120,120,128,.28);
  color: #64d2ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
}
.tl-cs-swatch.is-active {
  border-color: #0091ff;
  box-shadow: 0 0 0 2px rgba(0,145,255,.35), inset 0 0 0 1px rgba(255,255,255,.12);
}

/* iOS switches */
.tl-cs-switch {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  width: 51px;
  height: 31px;
  cursor: pointer;
}
.tl-cs-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.tl-cs-switch__track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(120,120,128,.36);
  transition: background .2s;
}
.tl-cs-switch__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
  transition: transform .2s;
}
.tl-cs-switch input:checked + .tl-cs-switch__track {
  background: #30d158;
}
.tl-cs-switch input:checked + .tl-cs-switch__track::after {
  transform: translateX(20px);
}

/* Preview */
.tl-cs-preview {
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  padding: 12px 14px;
}
.tl-cs-preview__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.tl-cs-preview__name {
  font-weight: 700;
  color: #0091ff;
  font-size: .9rem;
}
.tl-cs-preview__mods {
  display: inline-flex;
  gap: 10px;
  color: rgba(235,235,245,.45);
  font-size: .78rem;
}
.tl-cs-preview__msg {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255,255,255,.9);
}
.tl-cs-preview__time {
  display: block;
  margin-top: 6px;
  font-size: .72rem;
  color: rgba(235,235,245,.45);
}

html:not([data-theme="lite"]) .mod-action-btn {
  border-radius: 12px !important;
  border: 1px solid var(--ios-glass-border, rgba(255,255,255,.12)) !important;
  background: var(--ios-fill-tertiary, rgba(120,120,128,.22)) !important;
  color: var(--ios-label-primary, #fff) !important;
  min-height: 36px;
  padding: 8px 12px !important;
  font-weight: 600;
}
html:not([data-theme="lite"]) .mod-action-btn.mod-ban-btn {
  background: color-mix(in srgb, var(--ios-red, #ff4245) 16%, transparent) !important;
  border-color: color-mix(in srgb, var(--ios-red, #ff4245) 40%, transparent) !important;
  color: var(--ios-red, #ff4245) !important;
}

/* Chat appearance CSS vars (set by JS) */
.chat-panel,
.popout-chat-wrap .chat-panel {
  --tl-chat-font: 14px;
  --tl-chat-bg: transparent;
  --tl-chat-name: inherit;
}
.chat-panel .chat-messages,
.popout-chat-wrap .chat-messages {
  font-size: var(--tl-chat-font, 14px) !important;
  background: var(--tl-chat-bg);
}
.chat-panel .chat-msg-text,
.chat-panel .chat-message .chat-msg-text,
.popout-chat-wrap .chat-msg-text {
  font-size: var(--tl-chat-font, 14px) !important;
  line-height: 1.4;
}
body.tl-hide-mod-btns #modViewPanel,
body.tl-hide-mod-btns #adminModeToggleBtn,
body.tl-hide-mod-btns #streamerWarnOpenBtn,
body.tl-hide-mod-btns .cup-timeout-btns,
body.tl-hide-mod-btns .cup-btn-danger {
  display: none !important;
}
/* Mod View stays available even when “hide mod buttons” is on */
body.tl-hide-mod-btns #modViewToggleBtn {
  display: inline-flex !important;
}

/* ═══════════════════════════════════════════════════════════
   Admin panel — all tabs (remap gold → Apple blue + glass)
   ═══════════════════════════════════════════════════════════ */
html:not([data-theme="lite"]) body.page-admin .admin-wrap {
  --owner-gold: #0091ff;
  --owner-gold-2: #64d2ff;
  --owner-glow: 0 0 0 1px rgba(0,145,255,.14), 0 8px 28px rgba(0,145,255,.06);
  --brand: #0091ff;
}
html:not([data-theme="lite"]) body.page-admin .admin-header {
  border-radius: 18px !important;
  border: 1px solid var(--ios-glass-border, rgba(255,255,255,.12)) !important;
  background:
    radial-gradient(120% 200% at 0% 0%, rgba(0,145,255,.1), transparent 55%),
    var(--ios-fill-quaternary, rgba(120,120,128,.1)) !important;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--owner-glow) !important;
}
html:not([data-theme="lite"]) body.page-admin .admin-header::after {
  background: linear-gradient(90deg, transparent, #0091ff, transparent) !important;
}
html:not([data-theme="lite"]) body.page-admin .admin-header h1 i,
html:not([data-theme="lite"]) body.page-admin .admin-owner-tag {
  color: #0091ff !important;
  text-shadow: none !important;
}
html:not([data-theme="lite"]) body.page-admin .admin-owner-tag {
  background: color-mix(in srgb, #0091ff 22%, transparent) !important;
  color: #64d2ff !important;
  border-radius: 999px !important;
}

html:not([data-theme="lite"]) body.page-admin .admin-tabs {
  gap: 6px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  border: none !important;
  background: transparent !important;
  grid-template-columns: none !important;
}
html:not([data-theme="lite"]) body.page-admin .admin-tab {
  border-radius: 999px !important;
  border: 1px solid var(--ios-glass-border, rgba(255,255,255,.1)) !important;
  border-bottom: 1px solid var(--ios-glass-border, rgba(255,255,255,.1)) !important;
  background: var(--ios-fill-quaternary, rgba(120,120,128,.14)) !important;
  padding: 8px 14px !important;
  color: var(--ios-label-secondary, rgba(235,235,245,.7)) !important;
}
html:not([data-theme="lite"]) body.page-admin .admin-tab:hover {
  color: #fff !important;
  background: var(--ios-fill-tertiary, rgba(120,120,128,.22)) !important;
}
html:not([data-theme="lite"]) body.page-admin .admin-tab.active {
  background: color-mix(in srgb, #0091ff 22%, transparent) !important;
  border-color: color-mix(in srgb, #0091ff 40%, transparent) !important;
  color: #0091ff !important;
  border-bottom-color: color-mix(in srgb, #0091ff 40%, transparent) !important;
}

/* Every tab panel surface */
html:not([data-theme="lite"]) body.page-admin .admin-tab-content.active,
html:not([data-theme="lite"]) body.page-admin .admin-tab-content {
  border-radius: 18px !important;
  border: 1px solid var(--ios-glass-border, rgba(255,255,255,.1)) !important;
  background: var(--ios-fill-quaternary, rgba(120,120,128,.08)) !important;
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  padding: 16px !important;
}
html:not([data-theme="lite"]) body.page-admin .admin-tab-content > h2 i,
html:not([data-theme="lite"]) body.page-admin .admin-tab-content > h3 i {
  color: #0091ff !important;
}

/* Sub-tabs inside panels */
html:not([data-theme="lite"]) body.page-admin .admin-stab {
  border-radius: 999px !important;
  border: 1px solid var(--ios-glass-border, rgba(255,255,255,.1)) !important;
  background: var(--ios-fill-quaternary, rgba(120,120,128,.14)) !important;
}
html:not([data-theme="lite"]) body.page-admin .admin-stab.active {
  color: #0091ff !important;
  background: color-mix(in srgb, #0091ff 20%, transparent) !important;
  border-color: color-mix(in srgb, #0091ff 40%, transparent) !important;
}

/* Cards / stats / tables / forms inside ALL tabs */
html:not([data-theme="lite"]) body.page-admin .admin-stat-card,
html:not([data-theme="lite"]) body.page-admin .owner-svc-card,
html:not([data-theme="lite"]) body.page-admin .owner-host-card,
html:not([data-theme="lite"]) body.page-admin .admin-table-wrap,
html:not([data-theme="lite"]) body.page-admin .op-card,
html:not([data-theme="lite"]) body.page-admin .owner-svc-balances,
html:not([data-theme="lite"]) body.page-admin .owner-host-resources,
html:not([data-theme="lite"]) body.page-admin .owner-presence,
html:not([data-theme="lite"]) body.page-admin .admin-tab-content .dash-card,
html:not([data-theme="lite"]) body.page-admin .admin-tab-content [class*="card"],
html:not([data-theme="lite"]) body.page-admin .admin-tab-content .ss-sec,
html:not([data-theme="lite"]) body.page-admin .admin-tab-content .ss-block,
html:not([data-theme="lite"]) body.page-admin .admin-tab-content .tl-ads-card,
html:not([data-theme="lite"]) body.page-admin .admin-tab-content .support-thread,
html:not([data-theme="lite"]) body.page-admin .admin-tab-content .emoji-pack-card {
  border-radius: 14px !important;
  border-color: var(--ios-glass-border, rgba(255,255,255,.1)) !important;
}

html:not([data-theme="lite"]) body.page-admin .admin-table {
  border-radius: 14px !important;
  overflow: hidden;
  background: rgba(0,0,0,.25) !important;
}
html:not([data-theme="lite"]) body.page-admin .admin-table th {
  background: var(--ios-fill-quaternary, rgba(120,120,128,.16)) !important;
  color: var(--ios-label-secondary, rgba(235,235,245,.7)) !important;
  border-bottom-color: var(--ios-glass-border, rgba(255,255,255,.08)) !important;
}
html:not([data-theme="lite"]) body.page-admin .admin-table th.tl-th-sort.is-active {
  color: #0091ff !important;
}
html:not([data-theme="lite"]) body.page-admin .admin-table tr:hover td {
  background: var(--ios-fill-quaternary, rgba(120,120,128,.1)) !important;
}

html:not([data-theme="lite"]) body.page-admin .admin-search input,
html:not([data-theme="lite"]) body.page-admin .admin-tab-content input[type="text"],
html:not([data-theme="lite"]) body.page-admin .admin-tab-content input[type="number"],
html:not([data-theme="lite"]) body.page-admin .admin-tab-content input[type="email"],
html:not([data-theme="lite"]) body.page-admin .admin-tab-content input[type="password"],
html:not([data-theme="lite"]) body.page-admin .admin-tab-content input[type="url"],
html:not([data-theme="lite"]) body.page-admin .admin-tab-content input[type="search"],
html:not([data-theme="lite"]) body.page-admin .admin-tab-content select,
html:not([data-theme="lite"]) body.page-admin .admin-tab-content textarea {
  border-radius: 12px !important;
  border: 1px solid var(--ios-glass-border, rgba(255,255,255,.12)) !important;
  background: rgba(0,0,0,.28) !important;
  color: #fff !important;
}
html:not([data-theme="lite"]) body.page-admin .admin-search input:focus,
html:not([data-theme="lite"]) body.page-admin .admin-tab-content input:focus,
html:not([data-theme="lite"]) body.page-admin .admin-tab-content select:focus,
html:not([data-theme="lite"]) body.page-admin .admin-tab-content textarea:focus {
  border-color: #0091ff !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(0,145,255,.18) !important;
}

html:not([data-theme="lite"]) body.page-admin .admin-page-btn,
html:not([data-theme="lite"]) body.page-admin .btn-xs,
html:not([data-theme="lite"]) body.page-admin .admin-tab-content .btn,
html:not([data-theme="lite"]) body.page-admin .admin-tab-content button.btn {
  border-radius: 10px !important;
}
html:not([data-theme="lite"]) body.page-admin .admin-page-btn {
  border: 1px solid var(--ios-glass-border, rgba(255,255,255,.1)) !important;
  background: var(--ios-fill-quaternary, rgba(120,120,128,.14)) !important;
}
html:not([data-theme="lite"]) body.page-admin .admin-page-btn.active,
html:not([data-theme="lite"]) body.page-admin .admin-page-btn:hover {
  border-color: color-mix(in srgb, #0091ff 40%, transparent) !important;
  color: #0091ff !important;
}

html:not([data-theme="lite"]) body.page-admin .badge-status,
html:not([data-theme="lite"]) body.page-admin .badge-mod,
html:not([data-theme="lite"]) body.page-admin .badge-ok,
html:not([data-theme="lite"]) body.page-admin .badge-live,
html:not([data-theme="lite"]) body.page-admin .badge-ban {
  border-radius: 999px !important;
}

/* Settings / ads / support common blocks */
html:not([data-theme="lite"]) body.page-admin .admin-tab-content .ss-sec,
html:not([data-theme="lite"]) body.page-admin .admin-tab-content .ss-block,
html:not([data-theme="lite"]) body.page-admin .admin-tab-content .form-group,
html:not([data-theme="lite"]) body.page-admin .admin-tab-content .setting-row {
  border-radius: 12px;
}
html:not([data-theme="lite"]) body.page-admin .admin-tab-content a {
  color: #64d2ff;
}
