/* ==========================================================================
   Screenroom design system
   ========================================================================== */
:root {
  --bg: #08080b;
  --bg-2: #0c0c11;
  --sidebar: rgba(14, 14, 20, 0.82);
  --elev: rgba(22, 22, 30, 0.72);
  --elev-solid: #15151d;
  --elev-2: rgba(255, 255, 255, 0.035);
  --elev-3: rgba(255, 255, 255, 0.06);
  --stroke: rgba(255, 255, 255, 0.075);
  --stroke-2: rgba(255, 255, 255, 0.13);
  --text: #ededf2;
  --text-2: #c4c4d0;
  --muted: #8a8a9a;
  --accent: #7c6cff;
  --accent-2: #a78bfa;
  --accent-3: #22d3ee;
  --accent-hover: #6b5af5;
  --accent-soft: rgba(124, 108, 255, 0.14);
  --accent-ring: rgba(124, 108, 255, 0.35);
  --grad: linear-gradient(135deg, #7c6cff 0%, #a78bfa 50%, #22d3ee 100%);
  --grad-btn: linear-gradient(180deg, #8b7dff 0%, #6b5af5 100%);
  --discord: #5865f2;
  --danger: #f43f5e;
  --ok: #34d399;
  --warn: #fbbf24;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, 0.75);
  --font: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Geist", "Inter", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sidebar-w: 248px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent-ring);
  color: #fff;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

h1,
h2,
h3 {
  font-family: var(--display);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

h2 {
  font-size: 1rem;
  font-weight: 600;
}

h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

p {
  line-height: 1.55;
}

a {
  color: var(--accent-2);
}

.lede,
.muted {
  color: var(--muted);
  line-height: 1.55;
}

.lede {
  color: var(--text-2);
}

.tiny {
  font-size: 0.75rem;
  display: block;
}

code,
kbd {
  font-family: var(--mono);
  font-size: 0.82em;
  background: var(--elev-3);
  border: 1px solid var(--stroke);
  padding: 0.08em 0.4em;
  border-radius: 6px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  appearance: none;
  border: 1px solid var(--stroke-2);
  background: var(--elev-3);
  color: var(--text);
  border-radius: 10px;
  padding: 0.55rem 0.95rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 550;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  transition:
    background 0.18s var(--ease),
    border-color 0.18s var(--ease),
    transform 0.18s var(--ease),
    box-shadow 0.18s var(--ease),
    color 0.18s var(--ease);
}

.btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible,
.side-nav button:focus-visible,
.tv-cat:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn.primary {
  background: var(--grad-btn);
  border-color: rgba(167, 139, 250, 0.55);
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 8px 24px -8px rgba(124, 108, 255, 0.65);
}

.btn.primary:hover {
  background: linear-gradient(180deg, #9a8dff 0%, #7464f7 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 12px 30px -8px rgba(124, 108, 255, 0.8);
}

.btn.discord {
  background: linear-gradient(180deg, #6a76ff 0%, #4f5bec 100%);
  border-color: rgba(140, 150, 255, 0.55);
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 8px 24px -8px rgba(88, 101, 242, 0.7);
}

.btn.discord:hover {
  background: linear-gradient(180deg, #7682ff 0%, #5865f2 100%);
}

.btn.danger {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.32);
  color: #fda4af;
}

.btn.danger:hover {
  background: rgba(244, 63, 94, 0.18);
  border-color: rgba(244, 63, 94, 0.5);
}

.btn.ghost {
  background: transparent;
  border-color: var(--stroke);
  color: var(--text-2);
}

.btn.ghost:hover {
  background: var(--elev-3);
  color: var(--text);
}

.btn.block,
.token-wiz-pane .btn.block {
  display: flex;
  width: 100%;
  justify-content: center;
  text-align: center;
}

.btn.sm {
  padding: 0.32rem 0.65rem;
  font-size: 0.8rem;
  border-radius: 8px;
}

.check-list .btn.sm {
  margin-left: auto;
}

.btn.lg {
  padding: 0.8rem 1.35rem;
  font-size: 0.98rem;
  border-radius: 12px;
}

.error {
  color: #fda4af;
  margin-top: 0.75rem;
}

.banner {
  margin: 0 28px 4px;
  padding: 10px 14px;
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.28);
  border-radius: var(--radius-sm);
}

.banner-info {
  padding: 10px 14px;
  background: var(--accent-soft);
  border: 1px solid rgba(124, 108, 255, 0.25);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  color: var(--text-2);
}

/* ==========================================================================
   Brand
   ========================================================================== */
.brand-mark {
  width: 52px;
  height: 52px;
  margin: 0 auto;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--grad);
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 8px 22px -6px rgba(124, 108, 255, 0.7);
}

.brand-mark svg {
  width: 46%;
  height: 46%;
  margin-left: 8%;
}

.brand-mark.sm {
  width: 32px;
  height: 32px;
  margin: 0;
  border-radius: 9px;
}

/* ==========================================================================
   Forms
   ========================================================================== */
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  flex: 1;
  min-width: 140px;
}

label.check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  flex: 0 0 auto;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--stroke-2);
  border-radius: 10px;
  color: var(--text);
  padding: 0.6rem 0.75rem;
  width: 100%;
  font-size: 0.9rem;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s;
}

input::placeholder,
textarea::placeholder {
  color: #5d5d6d;
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(124, 108, 255, 0.7);
  box-shadow: 0 0 0 3px var(--accent-ring);
  background: rgba(0, 0, 0, 0.5);
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  padding: 0;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #8a8a9a 50%),
    linear-gradient(135deg, #8a8a9a 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 52%,
    calc(100% - 11px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

select option {
  background: #15151d;
}

textarea {
  resize: vertical;
}

/* ==========================================================================
   Layout primitives
   ========================================================================== */
.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
}

.row.between {
  justify-content: space-between;
  align-items: center;
}

.row.between > div {
  flex: 1 1 320px;
  min-width: 0;
}

.row.between > div p {
  margin: 0.2rem 0 0;
}

.stack > p,
.stack > h2 {
  margin-top: 0;
  margin-bottom: 0;
}

.module p:empty {
  display: none;
}

.row.wrap {
  flex-wrap: wrap;
  gap: 0.4rem;
}

form.row {
  align-items: center;
}

form.row > input {
  flex: 1 1 220px;
  width: auto;
}

form.row > select {
  flex: 0 1 180px;
  width: auto;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.module {
  position: relative;
  background: var(--elev);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.module > h2:first-child,
.module .row.between h2 {
  margin-bottom: 0.35rem;
}

.module > h2 + .muted {
  margin-top: 0;
}

/* ==========================================================================
   Login card (legacy)
   ========================================================================== */
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(420px, 100%);
  background: var(--elev);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 32px 28px;
  text-align: center;
}

.invite-box {
  margin: 1.75rem auto 0;
  max-width: 420px;
  text-align: left;
  background: var(--elev);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
}

.invite-box summary {
  cursor: pointer;
  color: var(--text-2);
  font-weight: 600;
}

.invite-box[open] summary {
  margin-bottom: 0.75rem;
}

.bootstrap {
  margin-top: 1.25rem;
  text-align: left;
  border-top: 1px solid var(--stroke);
  padding-top: 1rem;
}

/* ==========================================================================
   App shell
   ========================================================================== */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(124, 108, 255, 0.1), transparent 60%),
    radial-gradient(700px 420px at 10% 110%, rgba(34, 211, 238, 0.05), transparent 60%),
    var(--bg);
}

.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--stroke);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  padding: 18px 12px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 4px 8px 20px;
}

.sidebar-brand strong {
  display: block;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.sidebar-brand .tiny {
  font-size: 0.72rem;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  overflow: auto;
  margin: 0 -4px;
  padding: 0 4px;
}

.nav-label {
  margin: 14px 10px 6px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #5f5f70;
}

.nav-label:first-child {
  margin-top: 0;
}

.side-nav button {
  appearance: none;
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 0.52rem 0.7rem;
  border-radius: 9px;
  font: inherit;
  font-size: 0.89rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s;
}

.side-nav button svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: 0.85;
}

.side-nav button:hover {
  background: var(--elev-3);
  color: var(--text);
}

.side-nav button.active {
  background: linear-gradient(90deg, rgba(124, 108, 255, 0.18), rgba(124, 108, 255, 0.05));
  border-color: rgba(124, 108, 255, 0.22);
  color: #fff;
}

.side-nav button.active svg {
  color: var(--accent-2);
  opacity: 1;
}

.side-nav button.active::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 22%;
  bottom: 22%;
  width: 3px;
  border-radius: 3px;
  background: var(--grad);
}

.sidebar-foot {
  border-top: 1px solid var(--stroke);
  padding-top: 12px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-chip {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 4px 6px;
  flex: 1;
  min-width: 0;
}

.user-chip > div {
  min-width: 0;
}

.user-chip strong {
  display: block;
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-chip .tiny {
  text-transform: capitalize;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--elev-3);
  box-shadow: 0 0 0 2px rgba(124, 108, 255, 0.35);
}

#logout-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  flex: 0 0 auto;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 28px;
  border-bottom: 1px solid var(--stroke);
  background: rgba(8, 8, 11, 0.7);
  backdrop-filter: blur(16px) saturate(1.4);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar h1 {
  margin: 0;
  font-size: 1.35rem;
}

.topbar p {
  margin: 2px 0 0;
  font-size: 0.86rem;
}

.status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--elev-2);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 0.36rem 0.75rem;
  font-size: 0.79rem;
  max-width: 320px;
}

.chip strong {
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip .k {
  color: var(--muted);
}

.chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4a4a58;
  flex-shrink: 0;
}

.chip[data-state="online"] .dot,
.chip[data-state="on"] .dot {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
}

.chip[data-state="connecting"] .dot,
.chip[data-state="busy"] .dot {
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.18);
}

.chip[data-state="error"] .dot {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.18);
}

.pages {
  padding: 24px 28px 56px;
  width: 100%;
  max-width: 1440px;
}

.page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fade 0.35s var(--ease);
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   Lists, badges, cards
   ========================================================================== */
.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.list h3 {
  margin: 14px 0 0;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.list-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 11px 14px;
  background: var(--elev-2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}

.list-item:hover {
  border-color: var(--stroke-2);
  background: rgba(255, 255, 255, 0.05);
}

.list-item p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.list-item .actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.transport {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--stroke);
}

.vol-label {
  flex: 0;
  min-width: 70px;
}

.vol-label input {
  width: 64px;
}

.exclude-box {
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.exclude-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.exclude-grid label {
  flex-direction: row;
  align-items: center;
  min-width: auto;
}

.plan-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.plan-card {
  background: var(--elev-2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.plan-card:hover {
  border-color: rgba(124, 108, 255, 0.4);
  transform: translateY(-2px);
}

.plan-card strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.plan-card p {
  margin: 0.35rem 0 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(124, 108, 255, 0.25);
  color: #c4b5fd;
  vertical-align: middle;
}

.badge.ok {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.28);
  color: #6ee7b7;
}

.badge.warn {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.28);
  color: #fcd34d;
}

.badge.danger {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.3);
  color: #fda4af;
}

/* ==========================================================================
   Players & media grids
   ========================================================================== */
.tv-player {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  background:
    radial-gradient(600px 200px at 0% 0%, rgba(124, 108, 255, 0.16), transparent 70%),
    var(--elev);
  border-color: rgba(124, 108, 255, 0.2);
}

.tv-now-copy {
  min-width: 220px;
  flex: 1;
}

.tv-now-copy h2 {
  margin: 0;
  font-size: 1.15rem;
}

.tv-now-copy .row {
  align-items: center;
}

.tv-now-copy p {
  margin: 0.3rem 0 0;
}

.tv-transport {
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.55);
  animation: live-pulse 1.6s ease-out infinite;
}

@keyframes live-pulse {
  70% {
    box-shadow: 0 0 0 8px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.tv-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 16px;
  align-items: start;
}

.tv-side {
  max-height: 72vh;
  overflow: auto;
  position: sticky;
  top: 96px;
  padding: 14px;
}

.tv-filters {
  flex-wrap: wrap;
  margin-bottom: 10px;
  gap: 6px;
}

.tv-filter {
  padding: 0.34rem 0.7rem;
  font-size: 0.8rem;
  border-radius: 999px;
}

.tv-filter.active,
.tv-cat.active {
  border-color: rgba(124, 108, 255, 0.4);
  background: var(--accent-soft);
  color: #fff;
}

#tv-cat-filter,
#movie-cat-filter,
#series-cat-filter {
  width: 100%;
  margin-bottom: 10px;
}

.tv-cats {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tv-cat {
  text-align: left;
  background: transparent;
  color: var(--text-2);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  transition: background 0.15s var(--ease), color 0.15s;
}

.tv-cat:hover {
  background: var(--elev-3);
  color: var(--text);
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}

.channel-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: var(--elev-2);
  transition:
    border-color 0.18s var(--ease),
    background 0.18s var(--ease),
    transform 0.18s var(--ease);
}

.channel-card:hover {
  border-color: var(--stroke-2);
  background: rgba(255, 255, 255, 0.055);
  transform: translateY(-1px);
}

.channel-card.on {
  border-color: rgba(124, 108, 255, 0.6);
  background: linear-gradient(135deg, rgba(124, 108, 255, 0.14), rgba(34, 211, 238, 0.04));
  box-shadow: 0 0 0 1px rgba(124, 108, 255, 0.35) inset;
}

.channel-logo {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: linear-gradient(145deg, #1d1d28, #121219);
  border: 1px solid var(--stroke);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--display);
  font-weight: 700;
}

.channel-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.channel-body {
  min-width: 0;
}

.channel-body strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-body p {
  margin: 2px 0 8px;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-body .row {
  gap: 6px;
}

.channel-body .btn {
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
  border-radius: 8px;
}

/* ==========================================================================
   Overview / account / modal
   ========================================================================== */
.check-list {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  padding: 0.8rem 0.9rem;
  background: var(--elev-2);
  border-radius: 12px;
  border: 1px solid var(--stroke);
  font-weight: 500;
}

.check-list li.ok {
  border-color: rgba(52, 211, 153, 0.25);
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.07), transparent 70%);
}

.check-mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  color: #052e1f;
  background: var(--ok);
  flex-shrink: 0;
}

.check-list li.todo .check-mark {
  color: var(--warn);
  background: transparent;
  border: 1.5px dashed rgba(251, 191, 36, 0.6);
}

.settings-modules {
  gap: 1rem;
}

.settings-modules > .btn.primary {
  align-self: flex-start;
}

.danger-zone {
  border-color: rgba(244, 63, 94, 0.28);
  background:
    linear-gradient(135deg, rgba(244, 63, 94, 0.06), transparent 60%),
    var(--elev);
}

.modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 460px;
  width: calc(100% - 2rem);
  color: var(--text);
}

.modal[open] {
  animation: modal-in 0.28s var(--ease);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal::backdrop {
  background: rgba(3, 3, 6, 0.7);
  backdrop-filter: blur(6px);
}

.modal-card {
  background: var(--elev-solid);
  border: 1px solid var(--stroke-2);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.modal-card h2 {
  font-size: 1.15rem;
  margin: 0;
}

/* Page intros */
.page-intro {
  padding: 1.15rem 1.3rem;
  background:
    radial-gradient(500px 160px at 100% 0%, rgba(124, 108, 255, 0.12), transparent 70%),
    var(--elev);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
}

.page-intro h2 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.page-intro p {
  margin: 0 0 0.65rem;
  color: var(--muted);
  max-width: 80ch;
}

.page-intro p:last-child {
  margin-bottom: 0;
}

.page-intro strong {
  color: var(--text-2);
}

.how-list {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  color: var(--text-2);
  line-height: 1.65;
}

.how-list.plain {
  list-style: disc;
}

.how-list li::marker {
  color: var(--accent-2);
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--stroke);
  vertical-align: middle;
}

.data-table th {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: rgba(255, 255, 255, 0.025);
}

.data-table tbody tr {
  transition: background 0.15s;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table .empty-row td {
  text-align: center;
  padding: 1.6rem;
}

.data-table .actions {
  white-space: nowrap;
  text-align: right;
}

.data-table .actions .btn + .btn {
  margin-left: 6px;
}

#token-table td:first-child {
  white-space: normal;
}

/* AG Grid */
.activity-grid {
  width: 100%;
  height: min(62vh, 640px);
  min-height: 320px;
  border-radius: 12px;
  overflow: hidden;
  --ag-background-color: #0e0e14;
  --ag-header-background-color: #13131b;
  --ag-odd-row-background-color: #101017;
  --ag-border-color: rgba(255, 255, 255, 0.07);
  --ag-foreground-color: #ededf2;
  --ag-secondary-foreground-color: #8a8a9a;
  --ag-row-hover-color: rgba(124, 108, 255, 0.1);
  --ag-selected-row-background-color: rgba(124, 108, 255, 0.16);
  --ag-font-family: var(--font);
  --ag-font-size: 13px;
  --ag-wrapper-border-radius: 12px;
}

/* Onboarding tour */
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(3, 3, 6, 0.66);
  backdrop-filter: blur(2px);
  display: grid;
  place-items: end center;
  padding: 1.5rem;
  pointer-events: auto;
}

.tour-card {
  width: min(460px, 100%);
  background: var(--elev-solid);
  border: 1px solid var(--stroke-2);
  border-radius: 18px;
  padding: 1.35rem 1.45rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-lg);
  animation: fade-up 0.4s var(--ease) both;
}

.tour-step {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.tour-card h2 {
  font-size: 1.15rem;
}

.tour-actions {
  margin-top: 1rem;
  justify-content: flex-end;
}

.tour-highlight {
  position: relative;
  z-index: 90;
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 12px;
  box-shadow: 0 0 0 8px rgba(124, 108, 255, 0.18);
}

/* Members */
.member-row {
  flex-wrap: wrap;
}

.member-head {
  flex: 1;
  min-width: 200px;
}

.member-head p {
  margin: 0;
}

.member-head .tiny {
  margin-top: 4px;
}

.member-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.member-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 0.4rem;
}

.member-oauth {
  width: 100%;
  margin-top: 0.35rem;
}

.member-oauth summary {
  cursor: pointer;
  color: var(--accent-2);
  font-size: 0.84rem;
  font-weight: 500;
}

.member-oauth-body {
  margin-top: 0.55rem;
  padding: 0.75rem 0.85rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  line-height: 1.5;
}

.member-oauth-body p {
  margin: 0 0 0.3rem;
}

/* Token wizard */
.token-wizard .modal-card {
  max-width: 540px;
  width: calc(100vw - 2rem);
}

.token-wizard {
  max-width: 540px;
}

.token-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.token-steps li {
  counter-increment: step;
  position: relative;
  padding: 0.65rem 0.8rem 0.65rem 2.6rem;
  background: var(--elev-2);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  line-height: 1.5;
  color: var(--text-2);
  font-size: 0.9rem;
}

.token-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0.75rem;
  top: 0.68rem;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad);
}

.token-steps a {
  color: var(--accent-2);
}

.token-paste-label textarea {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.45;
  min-height: 6rem;
  padding: 0.75rem;
}

/* ==========================================================================
   Landing
   ========================================================================== */
.landing {
  position: relative;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--bg);
}

.landing-glow {
  pointer-events: none;
  position: absolute;
  inset: 0 0 auto;
  height: 1100px;
  background:
    radial-gradient(ellipse 55% 40% at 50% 0%, rgba(124, 108, 255, 0.28), transparent 70%),
    radial-gradient(ellipse 35% 30% at 85% 25%, rgba(34, 211, 238, 0.1), transparent 70%),
    radial-gradient(ellipse 35% 30% at 10% 35%, rgba(167, 139, 250, 0.1), transparent 70%);
  z-index: 0;
}

.landing-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 10%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 10%, #000 30%, transparent 75%);
}

.landing > *:not(.landing-glow) {
  position: relative;
  z-index: 1;
}

.landing-nav {
  position: sticky !important;
  top: 14px;
  z-index: 30 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1120px;
  margin: 14px auto 0;
  padding: 0.55rem 0.6rem 0.55rem 1rem;
  border: 1px solid var(--stroke-2);
  border-radius: 999px;
  background: rgba(14, 14, 20, 0.65);
  backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: 0 10px 40px -16px rgba(0, 0, 0, 0.8);
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 650;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.landing-links {
  display: flex;
  gap: 0.2rem;
}

.landing-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}

.landing-links a:hover {
  color: var(--text);
  background: var(--elev-3);
}

.landing-nav-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.landing-nav .btn {
  border-radius: 999px;
}

.landing-hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(4rem, 11vh, 7rem) 1.5rem 2rem;
  text-align: center;
}

.hero-copy {
  max-width: 760px;
  margin: 0 auto;
  animation: fade-up 0.8s var(--ease) both;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem 0.85rem 0.3rem 0.35rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--stroke-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-2);
  font-size: 0.82rem;
  font-weight: 500;
  backdrop-filter: blur(8px);
}

.hero-badge b {
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
}

.landing-title {
  font-size: clamp(2.7rem, 7.2vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.02;
  margin: 0 0 1.25rem;
  color: #fff;
  background: linear-gradient(180deg, #ffffff 30%, #b9b9c9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.accent-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-lede {
  color: var(--text-2);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.6;
  margin: 0 auto 2rem;
  max-width: 36rem;
}

.landing-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
}

.landing-cta .btn {
  border-radius: 999px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.4rem;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.85rem;
}

.hero-trust li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-trust svg {
  width: 15px;
  height: 15px;
  color: var(--ok);
}

.landing-hint {
  margin-top: 1rem;
  font-size: 0.85rem;
}

.landing-bootstrap {
  max-width: 340px;
  margin: 1.5rem auto 0;
  text-align: left;
}

/* Hero mockup */
.hero-visual {
  position: relative;
  max-width: 1040px;
  margin: 4rem auto 0;
  perspective: 1600px;
  animation: fade-up 1s var(--ease) 0.15s both;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 10% 8% -6%;
  background: var(--grad);
  filter: blur(80px);
  opacity: 0.28;
  border-radius: 40px;
  z-index: -1;
}

.mock-window {
  border-radius: 18px;
  border: 1px solid var(--stroke-2);
  background: linear-gradient(180deg, rgba(24, 24, 33, 0.95), rgba(12, 12, 17, 0.98));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    var(--shadow-lg);
  overflow: hidden;
  transform: rotateX(8deg);
  transform-origin: center top;
  text-align: left;
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.02);
}

.mock-bar > span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #2b2b36;
}

.mock-bar > span:nth-child(1) {
  background: #ff5f57;
}

.mock-bar > span:nth-child(2) {
  background: #febc2e;
}

.mock-bar > span:nth-child(3) {
  background: #28c840;
}

.mock-bar p {
  margin: 0 auto;
  padding: 0.2rem 1.2rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  transform: translateX(-24px);
}

.mock-body {
  display: grid;
  grid-template-columns: 190px 1fr;
  min-height: 380px;
}

.mock-side {
  border-right: 1px solid var(--stroke);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mock-side i {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  font-style: normal;
  font-size: 0.78rem;
  color: var(--muted);
}

.mock-side i::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
}

.mock-side i.on {
  background: rgba(124, 108, 255, 0.16);
  border: 1px solid rgba(124, 108, 255, 0.25);
  color: #fff;
}

.mock-side i.on::before {
  background: var(--grad);
}

.mock-main {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mock-now {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(124, 108, 255, 0.25);
  background:
    radial-gradient(400px 140px at 0% 0%, rgba(124, 108, 255, 0.22), transparent 70%),
    rgba(255, 255, 255, 0.03);
}

.mock-poster {
  width: 64px;
  height: 88px;
  border-radius: 10px;
  flex-shrink: 0;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.35), transparent 40%),
    linear-gradient(160deg, #f472b6, #7c3aed 55%, #1e1b4b);
  box-shadow: 0 10px 24px -8px rgba(124, 58, 237, 0.7);
}

.mock-now-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mock-now-copy strong {
  font-size: 1rem;
  color: #fff;
}

.mock-now-copy small {
  color: var(--muted);
  font-size: 0.78rem;
}

.mock-live {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 5px;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: rgba(244, 63, 94, 0.14);
  color: #fda4af;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.mock-live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--danger);
  animation: live-pulse 1.6s ease-out infinite;
}

.mock-progress {
  margin-top: 8px;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.mock-progress b {
  display: block;
  height: 100%;
  width: 42%;
  border-radius: inherit;
  background: var(--grad);
  animation: progress 12s linear infinite;
}

@keyframes progress {
  from {
    width: 18%;
  }
  to {
    width: 86%;
  }
}

.mock-controls {
  display: flex;
  gap: 6px;
}

.mock-controls span {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--stroke);
}

.mock-controls span.main {
  background: var(--grad-btn);
  border-color: rgba(167, 139, 250, 0.5);
}

.mock-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.mock-tile {
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  position: relative;
  overflow: hidden;
}

.mock-tile::after {
  content: "";
  position: absolute;
  inset: auto 8px 8px;
  height: 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.35);
  width: 60%;
}

.mock-tile.t1 {
  background: linear-gradient(160deg, #0ea5e9, #1e3a8a);
}
.mock-tile.t2 {
  background: linear-gradient(160deg, #f59e0b, #7c2d12);
}
.mock-tile.t3 {
  background: linear-gradient(160deg, #10b981, #064e3b);
}
.mock-tile.t4 {
  background: linear-gradient(160deg, #a78bfa, #3b0764);
}
.mock-tile.t5 {
  background: linear-gradient(160deg, #f43f5e, #4c0519);
}
.mock-tile.t6 {
  background: linear-gradient(160deg, #22d3ee, #164e63);
}

/* Sections */
.landing-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 6rem 1.5rem 0;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 2.75rem;
  text-align: center;
}

.section-eyebrow {
  display: inline-block;
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-section h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 0 0 0.85rem;
}

.landing-section-lede {
  color: var(--muted);
  font-size: 1.02rem;
  margin: 0;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  counter-reset: none;
}

.step-card {
  position: relative;
  padding: 1.5rem;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.step-card:hover {
  border-color: rgba(124, 108, 255, 0.35);
  transform: translateY(-3px);
}

.step-card h3 {
  font-size: 1.08rem;
  margin: 1rem 0 0.4rem;
}

.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.step-num {
  display: inline-flex;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent-2);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(124, 108, 255, 0.3);
  background: rgba(124, 108, 255, 0.08);
}

.icon-tile {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(124, 108, 255, 0.25), rgba(34, 211, 238, 0.08));
  border: 1px solid rgba(124, 108, 255, 0.3);
  color: #ddd6fe;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset;
}

.icon-tile svg {
  width: 20px;
  height: 20px;
}

.step-card .icon-tile {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
}

/* Bento features */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.bento-card {
  position: relative;
  overflow: hidden;
  padding: 1.6rem;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.bento-card:hover {
  border-color: rgba(124, 108, 255, 0.35);
  transform: translateY(-3px);
}

.bento-card h3 {
  font-size: 1.1rem;
  margin: 1.1rem 0 0.45rem;
}

.bento-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
  max-width: 46ch;
}

.bento-wide {
  grid-column: span 2;
  background:
    radial-gradient(500px 240px at 100% 100%, rgba(124, 108, 255, 0.2), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
}

.bento-accounts {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.4rem;
  flex-wrap: wrap;
}

.bento-accounts span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem 0.4rem 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--stroke-2);
  background: rgba(0, 0, 0, 0.3);
  font-size: 0.8rem;
  color: var(--text-2);
}

.bento-accounts span::before {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--av, var(--grad));
}

.bento-accounts span.def {
  border-color: rgba(52, 211, 153, 0.4);
}

.bento-accounts span:nth-child(2) {
  --av: linear-gradient(135deg, #f59e0b, #ef4444);
}

.bento-accounts span:nth-child(3) {
  --av: linear-gradient(135deg, #10b981, #0ea5e9);
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.75rem 1.6rem;
  border-radius: 20px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.pricing-card:hover {
  transform: translateY(-4px);
  border-color: var(--stroke-2);
}

.pricing-card.featured {
  border-color: transparent;
  background:
    linear-gradient(180deg, rgba(30, 27, 52, 0.98), rgba(16, 15, 26, 0.98)) padding-box,
    var(--grad) border-box;
  border: 1px solid transparent;
  box-shadow: 0 30px 70px -30px rgba(124, 108, 255, 0.65);
}

.pricing-card h3 {
  font-size: 1.05rem;
  margin: 0;
  color: var(--text-2);
}

.price-seats {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin: 0.5rem 0 0;
  line-height: 1;
}

.price-seats small {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
  margin-left: 0.25rem;
}

.pricing-card > .muted {
  margin: 0.4rem 0 1rem;
}

.plan-perks {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--stroke);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  color: var(--text-2);
  font-size: 0.9rem;
}

.plan-perks li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.plan-perks li::before {
  content: "";
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c4b5fd' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
      center / 11px no-repeat,
    rgba(124, 108, 255, 0.16);
}

.pricing-card .btn {
  margin-top: auto;
  width: 100%;
  border-radius: 12px;
}

.plan-tag {
  position: absolute;
  top: 1.4rem;
  right: 1.4rem;
  margin: 0;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* FAQ */
.faq {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.faq details {
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 0.2s, background 0.2s;
}

.faq details[open] {
  border-color: var(--stroke-2);
  background: rgba(255, 255, 255, 0.04);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 1.25rem;
  font-weight: 550;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--muted);
  transition: transform 0.25s var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  margin: 0;
  padding: 0 1.25rem 1.15rem;
  color: var(--muted);
}

/* Final CTA */
.cta-band {
  max-width: 1120px;
  margin: 6rem auto 0;
  padding: 0 1.5rem;
}

.cta-inner {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
  border-radius: 24px;
  border: 1px solid rgba(124, 108, 255, 0.3);
  background:
    radial-gradient(600px 260px at 50% 0%, rgba(124, 108, 255, 0.35), transparent 70%),
    linear-gradient(180deg, rgba(24, 22, 40, 0.95), rgba(12, 12, 18, 0.95));
}

.cta-inner h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin: 0 0 0.7rem;
}

.cta-inner p {
  color: var(--text-2);
  margin: 0 auto 1.6rem;
  max-width: 34rem;
}

.cta-inner .btn {
  border-radius: 999px;
}

.landing-foot {
  max-width: 1120px;
  margin: 4rem auto 0;
  padding: 2rem 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--stroke);
}

.landing-foot p {
  margin: 0;
  max-width: 560px;
}

.landing-foot .landing-brand {
  margin-bottom: 0.6rem;
}

.foot-links {
  display: flex;
  gap: 1.25rem;
}

.foot-links a {
  color: var(--muted);
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--text);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
/* Mode switch (My space / Admin) */
.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  margin: 0 0 14px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
}

.mode-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.4rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.mode-switch button:hover {
  color: var(--text);
}

.mode-switch button.active {
  background: var(--elev-solid);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 4px 12px -4px rgba(0, 0, 0, 0.6);
}

.mode-switch button[data-mode="admin"].active {
  background: linear-gradient(180deg, rgba(124, 108, 255, 0.35), rgba(124, 108, 255, 0.18));
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-count {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--warn);
  color: #1a1305;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.mode-switch .nav-count {
  margin-left: 0;
}

body[data-mode="admin"] .topbar h1::after {
  content: "Admin";
  margin-left: 0.6rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  vertical-align: middle;
  color: #e9e5ff;
  background: rgba(124, 108, 255, 0.22);
  border: 1px solid rgba(124, 108, 255, 0.35);
}

/* Account status card */
.status-card {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.status-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(600px 200px at 0% 0%, var(--status-glow, rgba(124, 108, 255, 0.16)), transparent 70%);
}

.status-card[data-state="ready"] {
  --status-glow: rgba(52, 211, 153, 0.16);
}

.status-card[data-state="pending_approval"],
.status-card[data-state="needs_token"] {
  --status-glow: rgba(251, 191, 36, 0.14);
}

.status-card[data-state="no_subscription"],
.status-card[data-state="rejected"] {
  --status-glow: rgba(244, 63, 94, 0.14);
}

.status-head {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.status-head h2 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin: 0;
}

.status-head p {
  margin: 0;
  max-width: 52ch;
}

.status-head .row {
  margin-top: 0.4rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  background: var(--elev-3);
  border: 1px solid var(--stroke-2);
  color: var(--text-2);
}

.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.ok {
  color: var(--ok);
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.3);
}

.status-pill.warn {
  color: var(--warn);
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.3);
}

.status-pill.warn::before {
  animation: pulse-dot 1.6s ease-in-out infinite;
}

.status-pill.danger {
  color: var(--danger);
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.3);
}

@keyframes pulse-dot {
  50% {
    opacity: 0.35;
  }
}

.status-steps {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.status-steps li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.status-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 11px;
  top: calc(50% + 13px);
  height: calc(100% - 26px);
  width: 2px;
  background: var(--stroke-2);
}

.status-steps li.step-done::after {
  background: rgba(52, 211, 153, 0.5);
}

.step-dot {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  border: 2px solid var(--stroke-2);
  background: var(--bg);
}

.step-done {
  color: var(--text);
}

.step-done .step-dot {
  border-color: var(--ok);
  background: var(--ok);
  color: #04130d;
}

.step-current {
  color: #fff;
  font-weight: 600;
}

.step-current .step-dot {
  border-color: var(--warn);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.15);
}

.step-blocked {
  color: var(--danger);
}

.step-blocked .step-dot {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

/* KPI tiles */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.kpi {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: var(--elev);
  box-shadow: var(--shadow);
}

.kpi-label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.kpi-value {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.kpi-value small {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

.kpi-hint {
  font-size: 0.78rem;
  color: var(--muted);
}

.kpi.accent {
  background:
    linear-gradient(180deg, rgba(30, 27, 52, 0.95), rgba(18, 17, 28, 0.95)) padding-box,
    var(--grad) border-box;
  border: 1px solid transparent;
}

.kpi.warn .kpi-value {
  color: var(--warn);
}

/* Segmented control (billing interval) */
.segmented {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
}

.segmented.center {
  margin: 1.25rem auto 0;
}

.segmented button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.segmented button.active {
  background: var(--elev-solid);
  color: #fff;
  box-shadow: 0 4px 14px -6px rgba(0, 0, 0, 0.7);
}

.save-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  color: #04130d;
  background: var(--ok);
}

.section-head .segmented {
  display: flex;
  width: max-content;
}

/* Price display on plan cards */
.price {
  margin: 0.6rem 0 0;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  line-height: 1;
}

.price strong {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.price small {
  color: var(--muted);
  font-size: 0.92rem;
}

.pricing-card .price-note {
  margin: 0.2rem 0 0.4rem;
  min-height: 1.2em;
}

.pricing-grid.compact .pricing-card {
  padding: 1.4rem 1.3rem;
}

.pricing-grid.compact .pricing-card:hover {
  transform: none;
}

/* Subscription cards */
.sub-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sub-card {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.sub-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.sub-card-head strong {
  display: block;
  font-size: 1rem;
}

.sub-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  color: var(--text-2);
  font-size: 0.86rem;
}

.seat-editor {
  padding-top: 0.7rem;
  border-top: 1px solid var(--stroke);
}

/* Approvals */
.approval-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.approval-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(251, 191, 36, 0.22);
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.06), rgba(255, 255, 255, 0.015));
}

.approval-who,
.approval-token {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.approval-who p,
.approval-token p {
  margin: 0.15rem 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.approval-card .actions {
  display: flex;
  gap: 0.4rem;
}

.member-avatar.ph {
  display: inline-block;
  background: var(--elev-3);
}

.list.compact .list-item {
  padding: 0.5rem 0.75rem;
}

/* Pricing editor */
.plan-editor {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.plan-edit {
  margin: 0;
  min-width: 0;
}

.plan-edit .row > label {
  flex: 1 1 120px;
}

.plan-edit [data-calc] {
  margin: 0;
  color: var(--accent-2);
}

@media (max-width: 1080px) {
  .plan-editor {
    grid-template-columns: 1fr;
  }

  .approval-card {
    grid-template-columns: 1fr;
  }

  .status-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1080px) {
  .landing-links {
    display: none;
  }
}

@media (max-width: 960px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--stroke);
  }

  .sidebar-brand {
    padding: 0;
  }

  .sidebar-brand > div {
    display: none;
  }

  .side-nav {
    flex-direction: row;
    overflow-x: auto;
    margin: 0;
    padding: 0;
  }

  .side-nav button {
    flex-shrink: 0;
  }

  .side-nav button.active::before,
  .nav-label {
    display: none;
  }

  .sidebar-foot {
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
  }

  .user-chip > div {
    display: none;
  }

  .topbar {
    position: static;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 18px;
  }

  .status-chips {
    justify-content: flex-start;
  }

  .pages {
    padding: 18px 16px 48px;
  }

  .grid-2,
  .tv-layout {
    grid-template-columns: 1fr;
  }

  .tv-side {
    position: static;
    max-height: none;
  }

  .tv-cats {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .banner {
    margin: 0 16px 4px;
  }
}

@media (max-width: 860px) {
  .steps,
  .bento,
  .pricing-grid,
  .plan-cards {
    grid-template-columns: 1fr;
  }

  .bento-wide {
    grid-column: auto;
  }

  .mock-body {
    grid-template-columns: 1fr;
  }

  .mock-side {
    display: none;
  }

  .mock-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .mock-window {
    transform: none;
  }

  .landing-section {
    padding-top: 4.5rem;
  }
}

@media (max-width: 560px) {
  .landing-nav {
    margin: 10px 10px 0;
    padding-left: 0.8rem;
  }

  .landing-nav-actions .btn.ghost {
    display: none;
  }

  .mock-controls {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}
