:root {
  --bg: #10151c;
  --bg-2: #161d26;
  --panel: rgba(22, 30, 40, 0.62);
  --panel-2: rgba(28, 38, 50, 0.72);
  --ink: #e8eef5;
  --muted: #8a96a8;
  --line: rgba(125, 180, 220, 0.1);
  --line-2: rgba(125, 180, 220, 0.18);
  --signal: #1f9fd9;
  --signal-2: #38bdf8;
  --signal-ink: #041018;
  --coral: #ff5c3a;
  --ok: #5ddea5;
  --warn: #f0b429;
  --font: 'Cairo', system-ui, sans-serif;
  --display: 'Syne', 'Cairo', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --r: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  --glass: rgba(18, 26, 36, 0.55);
  --glass-strong: rgba(14, 20, 28, 0.72);
  --glow: 0 10px 40px rgba(31, 159, 217, 0.1);
  --glow-strong: 0 0 0 1px rgba(56, 189, 248, 0.12), 0 12px 48px rgba(31, 159, 217, 0.18);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
}

body {
  background: #0c1118;
  isolation: isolate;
}

/* Background photo — very light blur */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-color: #0c1118;
  background-image: var(--site-bg, none);
  background-size: 62% auto;
  background-position: right center;
  background-repeat: no-repeat;
  filter: blur(3.5px);
}

/* Dark wash so UI stays readable */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(31, 159, 217, 0.12), transparent 55%),
    radial-gradient(700px 420px at -8% 85%, rgba(20, 80, 120, 0.14), transparent 50%),
    linear-gradient(180deg, rgba(12, 17, 24, 0.68) 0%, rgba(16, 21, 28, 0.74) 50%, rgba(20, 28, 38, 0.8) 100%);
}

#app { position: relative; z-index: 1; }
.hidden { display: none !important; }
.sub { color: var(--muted); margin: 0; }
.eyebrow {
  margin: 0 0 0.45rem;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal);
}
code {
  font-family: var(--mono);
  font-size: 0.82em;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 0.08rem 0.35rem;
  color: var(--signal);
}

.lang-switch {
  display: inline-flex;
  gap: 0.15rem;
  padding: 0.15rem;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: rgba(0,0,0,0.25);
}
.lang-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 700 0.75rem/1 var(--display);
  padding: 0.42rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s var(--ease);
}
.lang-btn.active {
  background: var(--signal);
  color: var(--signal-ink);
}
.auth-lang { margin: 0 0 1rem auto; width: fit-content; }
body.lang-en { --font: 'Syne', 'Cairo', sans-serif; }

html[dir="ltr"] .auth-stage,
html[dir="ltr"] .shell,
html[dir="ltr"] .topbar,
html[dir="ltr"] .server-hero,
html[dir="ltr"] .composer,
html[dir="ltr"] .inline,
html[dir="ltr"] .row-actions { direction: ltr; }

/* ===== buttons / inputs ===== */
.btn {
  border: 1px solid var(--line-2);
  background: rgba(30, 40, 52, 0.72);
  color: var(--ink);
  border-radius: 12px;
  padding: 0.72rem 1.05rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.25s var(--ease);
}
.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 159, 217, 0.45);
  background: rgba(36, 48, 62, 0.85);
  box-shadow: 0 8px 24px rgba(31, 159, 217, 0.12);
}
.btn.primary, .btn.solid {
  background: linear-gradient(135deg, #2ab0e8, #1a8fc7);
  border-color: transparent;
  color: var(--signal-ink);
  box-shadow: 0 8px 28px rgba(31, 159, 217, 0.28);
}
.btn.primary:hover, .btn.solid:hover {
  filter: brightness(1.06);
  border-color: transparent;
  box-shadow: 0 10px 32px rgba(56, 189, 248, 0.35);
}
.btn.danger {
  background: rgba(255, 92, 58, 0.12);
  border-color: rgba(255, 92, 58, 0.35);
  color: #ffb4a4;
}
.btn.text { border: 0; background: transparent; color: var(--muted); }
.btn.link { border: 0; background: transparent; color: var(--signal); text-decoration: underline; padding: 0; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.shine::after { display: none; }

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line-2);
  background: rgba(8, 12, 18, 0.55);
  color: var(--ink);
  border-radius: 12px;
  padding: 0.78rem 0.9rem;
  font: inherit;
  outline: none;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
input::placeholder, textarea::placeholder { color: #6f6a60; }
input:focus, textarea:focus, select:focus {
  border-color: rgba(31, 159, 217, 0.55);
  box-shadow: 0 0 0 3px rgba(31, 159, 217, 0.14), 0 0 24px rgba(31, 159, 217, 0.12);
}

.glass, .surface, .server-card, .server-row, .stat, .action-card, .log-item, .modal-card, .auth-card, .composer, .sessions-hub {
  background: var(--glass);
  border: 1px solid rgba(148, 200, 230, 0.14);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ===== AUTH ===== */
.aurora { display: none; }
.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}
.auth-stage {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.25rem;
  align-items: stretch;
}
.auth-brand {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  min-height: 640px;
  padding: 2.4rem;
  border: 1px solid var(--line-2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  background:
    linear-gradient(160deg, rgba(16, 21, 28, 0.72), rgba(12, 17, 24, 0.82) 55%, rgba(20, 28, 38, 0.78)),
    radial-gradient(700px 380px at 85% 15%, rgba(31, 159, 217, 0.18), transparent 55%);
  backdrop-filter: blur(8px);
  animation: pageIn 0.7s var(--ease) both;
}
.auth-brand::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(31, 159, 217, 0.1), transparent 42%),
    linear-gradient(to top, rgba(8, 12, 18, 0.35), transparent 40%);
  pointer-events: none;
}
.auth-hero {
  position: relative;
  z-index: 1;
  max-width: 28rem;
}
.auth-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 1px solid var(--line-2);
  animation: riseIn 0.6s var(--ease) both;
}
.auth-logo-fallback {
  animation: riseIn 0.6s var(--ease) both;
}
.auth-title {
  position: relative;
  margin: 0.25rem 0 0.7rem;
  font-family: var(--display);
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--ink);
  animation: riseIn 0.75s var(--ease) 0.08s both;
}
.auth-title-main {
  display: inline;
}
.auth-title-accent {
  display: inline-block;
  color: var(--signal);
  margin-inline-start: 0.28em;
  animation: accentPulse 2.8s ease-in-out 0.8s infinite;
}
.auth-title-rule {
  width: 0;
  height: 3px;
  border-radius: 99px;
  margin: 0 0 1.1rem;
  background: linear-gradient(90deg, var(--signal), rgba(56, 189, 248, 0.15));
  animation: ruleGrow 0.9s var(--ease) 0.35s forwards;
}
.auth-lead {
  position: relative;
  margin: 0;
  max-width: 26rem;
  color: #c5d0dc;
  font-size: 1.08rem;
  line-height: 1.65;
  animation: riseIn 0.8s var(--ease) 0.22s both;
}
.brand-glow { display: none; }
.auth-brand > p {
  position: relative;
  margin: 0;
  max-width: 24rem;
  color: #c5d0dc;
  font-size: 1.02rem;
}
.brand-metrics {
  position: relative;
  z-index: 1;
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}
.brand-metrics div {
  padding: 0.8rem;
  border-radius: 12px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--line-2);
  transform: translateY(8px);
  opacity: 0;
  animation: riseIn 0.55s var(--ease) forwards;
}
.brand-metrics div:nth-child(1) { animation-delay: 0.2s; }
.brand-metrics div:nth-child(2) { animation-delay: 0.32s; }
.brand-metrics div:nth-child(3) { animation-delay: 0.44s; }
.brand-metrics b {
  display: block;
  font-family: var(--display);
  font-size: 0.82rem;
  color: var(--signal);
  margin-bottom: 0.2rem;
}
.brand-metrics span { color: var(--muted); font-size: 0.78rem; }

.logo {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--signal);
  color: var(--signal-ink);
  font-family: var(--display);
  font-weight: 800;
  margin-bottom: 1rem;
}
.logo.sm { width: 38px; height: 38px; border-radius: 10px; font-size: 0.8rem; margin: 0; }
.pulse-ring::before { display: none; }

.auth-card {
  border-radius: 22px;
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: pageIn 0.7s var(--ease) 0.08s both;
}
.mail-banner {
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.86rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line-2);
  color: var(--muted);
}
.mail-banner.ok { border-color: rgba(93,222,165,0.35); color: var(--ok); }
.mail-banner.warn { border-color: rgba(240,180,41,0.35); color: var(--warn); }

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
  padding: 0.28rem;
  background: #101218;
  border-radius: 12px;
  margin-bottom: 1.1rem;
  border: 1px solid var(--line-2);
}
.seg-btn {
  border: 0;
  background: transparent;
  border-radius: 9px;
  padding: 0.72rem;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: 0.2s var(--ease);
}
.seg-btn.active {
  background: var(--signal);
  color: var(--signal-ink);
}

.auth-form label, .stack label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.auth-form em { color: var(--coral); font-style: normal; font-size: 0.75rem; }
.auth-form h2 { margin: 0 0 0.8rem; font-family: var(--display); }
.hint { color: var(--muted); font-size: 0.88rem; line-height: 1.6; }
.error { color: #ff8f78; min-height: 1.2rem; }
.otp-form { display: flex; gap: 0.5rem; }
.otp-form input { text-align: center; letter-spacing: 0.35em; font-size: 1.25rem; font-weight: 700; }
.auth-links { display: flex; gap: 1rem; margin-top: 0.8rem; }
.preview-box {
  margin: 0.8rem 0;
  padding: 0.8rem;
  border-radius: 12px;
  background: rgba(31, 159, 217,0.08);
  border: 1px solid rgba(31, 159, 217,0.25);
  color: #e8f7a8;
  font-size: 0.88rem;
}
.preview-box a { color: var(--ink); }

/* ===== APP SHELL ===== */
.app { min-height: 100vh; }
.shell {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 100vh;
  transition: grid-template-columns 0.45s var(--ease);
}
.shell.sessions-only {
  grid-template-columns: 1fr;
}
.shell.sessions-only .side {
  display: none;
}
.shell:not(.sessions-only) .side {
  animation: sideIn 0.45s var(--ease) both;
}
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.1rem 0.85rem;
  border-inline-end: 1px solid rgba(148, 200, 230, 0.12);
  background: rgba(12, 18, 26, 0.62);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.03);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  z-index: 30;
}
.side-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.35rem 0.4rem;
}
.profile-hit {
  cursor: pointer;
  border-radius: 14px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.profile-hit:hover,
.profile-hit:focus-visible {
  background: rgba(31, 159, 217, 0.12);
  box-shadow: inset 0 0 0 1px rgba(31, 159, 217, 0.25);
  outline: none;
}
.sessions-user.profile-hit {
  padding: 0.35rem 0.55rem;
  border-radius: 14px;
}
.login-extra {
  margin: -0.35rem 0 0.85rem;
  justify-content: flex-start;
}
.profile-card {
  width: min(440px, 94vw);
  max-height: min(88vh, 720px);
  overflow: auto;
}
.profile-body {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 0 1.1rem 1.2rem;
}
.profile-body h4 {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
}
.profile-body .auth-form {
  margin: 0;
  padding: 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 200, 230, 0.14);
  background: rgba(8, 12, 18, 0.35);
}
#forgot-panel h2 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}
.side-brand strong {
  display: block;
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.side-brand span { color: var(--muted); font-size: 0.78rem; }
.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(31, 159, 217,0.35);
}
.discord-link {
  margin: 0 0.35rem;
  font-size: 0.78rem;
  padding: 0.55rem 0.7rem;
  background: #5865f2;
  border-color: transparent;
  color: #fff;
}
.discord-link:hover { filter: brightness(1.08); border-color: transparent; }
.discord-link.linked {
  background: rgba(31, 159, 217,0.12);
  color: var(--signal);
  border: 1px solid rgba(31, 159, 217,0.3);
}
.auth-or {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.95rem 0 0.85rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.auth-or::before,
.auth-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-2);
}
.btn.discord-login {
  width: 100%;
  background: #5865f2;
  border-color: transparent;
  color: #fff;
  font-weight: 800;
}
.btn.discord-login:hover {
  filter: brightness(1.08);
  border-color: transparent;
}
.discord-login-hint {
  margin: 0.55rem 0 0;
  text-align: center;
  font-size: 0.78rem;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.35rem;
  border-bottom: 1px solid rgba(148, 200, 230, 0.12);
  background: rgba(12, 18, 26, 0.55);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), inset 0 -1px 0 rgba(31, 159, 217, 0.08);
}
.sessions-chrome {
  display: none;
  align-items: center;
  gap: 0.85rem;
}
.shell.sessions-only .sessions-chrome {
  display: flex;
  animation: riseIn 0.4s var(--ease) both;
}
.sessions-user {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.65rem 0.35rem 0.35rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(148, 200, 230, 0.12);
}
.sessions-user strong {
  display: block;
  font-size: 0.88rem;
  line-height: 1.2;
}
.sessions-user .sub {
  font-size: 0.72rem;
}
.sessions-avatar-fallback {
  width: 38px;
  height: 38px;
  margin: 0;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.site-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line-2);
  background: #0c1118;
}
.site-logo-fallback {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--signal);
  color: var(--signal-ink);
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.85rem;
}
.site-brand strong {
  display: block;
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.player-identity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.player-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  background: #1a1d24;
  border: 1px solid var(--line-2);
  flex-shrink: 0;
}
.player-avatar.fallback {
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  color: var(--signal);
  font-size: 0.85rem;
}
.discord-id {
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: var(--muted);
  font-family: var(--mono);
}
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  flex: 1;
}
.nav-item {
  position: relative;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  text-align: start;
  padding: 0.78rem 0.9rem;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: 0.22s var(--ease);
  overflow: hidden;
}
.nav-item::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 18%;
  bottom: 18%;
  width: 3px;
  border-radius: 4px;
  background: var(--signal);
  transform: scaleY(0);
  transition: transform 0.25s var(--ease);
}
.nav-item:hover:not(:disabled) {
  color: var(--ink);
  background: rgba(255,255,255,0.05);
  border-color: rgba(148, 200, 230, 0.12);
}
.nav-item.active {
  color: var(--ink);
  background: rgba(31, 159, 217, 0.14);
  border-color: rgba(56, 189, 248, 0.22);
  box-shadow: 0 0 24px rgba(31, 159, 217, 0.1);
}
.nav-item.active::before { transform: scaleY(1); }
.nav-item:disabled { opacity: 0.32; cursor: not-allowed; }
.side-foot {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--line);
}

.shell-main { min-width: 0; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.35rem;
  border-bottom: 1px solid rgba(148, 200, 230, 0.1);
  background: rgba(12, 18, 26, 0.4);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.topbar-left strong {
  font-family: var(--display);
  font-size: 1.05rem;
}
.topbar-left span { color: var(--muted); font-size: 0.84rem; }
.topbar-right { display: flex; align-items: center; gap: 0.65rem; }

.status {
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 800;
  border: 1px solid var(--line-2);
  color: var(--muted);
  font-family: var(--display);
}
.status.on {
  color: var(--ok);
  border-color: rgba(93,222,165,0.35);
  background: rgba(93,222,165,0.08);
}
.status.off {
  color: #ff8f78;
  border-color: rgba(255,92,58,0.35);
  background: rgba(255,92,58,0.08);
}

.server-hero {
  margin: 1rem 1.35rem 0;
  border-radius: 20px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 1rem;
  align-items: center;
  animation: pageIn 0.45s var(--ease) both;
  background: var(--glass);
  border: 1px solid rgba(148, 200, 230, 0.14);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: var(--glow);
}
.server-hero-media {
  position: relative;
  min-height: 132px;
  background:
    radial-gradient(circle at 30% 30%, rgba(31, 159, 217,0.18), transparent 55%),
    linear-gradient(135deg, #1a1d24, #101218);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.server-hero-media.has-icon {
  background-color: #101218;
  background-size: cover;
  background-position: center;
}
.server-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 35% 30%, rgba(31, 159, 217,0.22), transparent 50%),
    linear-gradient(145deg, #22262f, #12141a);
}
.server-fallback span {
  font-family: var(--display);
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--signal);
  letter-spacing: -0.04em;
  z-index: 1;
}
.scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.04) 0 1px,
    transparent 2px 6px
  );
  animation: scan 5s linear infinite;
  opacity: 0.25;
}
.server-hero-info { padding: 0.9rem 0; }
.server-hero-info h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.7rem;
  letter-spacing: -0.02em;
}
.server-hero .btn { margin-inline: 1rem; }

.content { padding: 1.25rem 1.35rem 2rem; }
.shell.sessions-only .topbar { display: none; }
.shell.sessions-only .content {
  max-width: 920px;
  margin-inline: auto;
  width: 100%;
  padding: 1.35rem 1.35rem 2.5rem;
}

/* Sessions hub */
.sessions-hub {
  border-radius: 24px;
  padding: 1.35rem 1.35rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  animation: pageIn 0.5s var(--ease) both;
}
.sessions-hub-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}
.sessions-hub-head h2 {
  margin: 0.15rem 0 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.2vw, 2.35rem);
  letter-spacing: -0.03em;
  text-shadow: 0 0 40px rgba(31, 159, 217, 0.22);
}
.sessions-hub-head p:not(.eyebrow) {
  margin: 0.4rem 0 0;
  color: var(--muted);
  max-width: 34rem;
}
.sessions-hub-count {
  min-width: 88px;
  padding: 0.75rem 0.95rem;
  border-radius: 16px;
  text-align: center;
  background: rgba(31, 159, 217, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.22);
  box-shadow: 0 0 28px rgba(31, 159, 217, 0.12);
}
.sessions-hub-count b {
  display: block;
  font-family: var(--display);
  font-size: 1.7rem;
  line-height: 1;
  color: var(--signal-2);
}
.sessions-hub-count span {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
}
.sessions-add {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
  padding: 0.55rem;
  border-radius: 16px;
  background: rgba(8, 12, 18, 0.45);
  border: 1px solid rgba(148, 200, 230, 0.12);
}
.sessions-add input {
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.sessions-add input:focus {
  box-shadow: none;
  border: 0;
}
.sessions-rows {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.server-row {
  display: grid;
  grid-template-columns: 148px 1fr;
  border-radius: 18px;
  overflow: hidden;
  min-height: 148px;
  transition: transform 0.28s var(--ease), border-color 0.25s var(--ease), box-shadow 0.28s var(--ease);
  animation: riseIn 0.5s var(--ease) both;
}
.server-row:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: var(--glow-strong);
}
.server-row.empty-row {
  grid-template-columns: 1fr;
  min-height: 110px;
  place-items: center;
  text-align: center;
}
.server-row-media {
  position: relative;
  min-height: 148px;
  background:
    radial-gradient(circle at 30% 30%, rgba(31, 159, 217, 0.22), transparent 55%),
    linear-gradient(145deg, #1c2430, #101820);
  background-size: cover;
  background-position: center;
}
.server-row-media.has-icon { background-color: #101820; }
.server-row-media .server-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.server-row-body {
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  justify-content: center;
  min-width: 0;
}
.server-row-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}
.server-row-top h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.server-row-token {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.server-row-token span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal);
}
.server-row .row-actions {
  margin-top: 0.15rem;
}

.page { animation: pageIn 0.42s var(--ease) both; }
.page.is-leaving {
  animation: pageOut 0.18s ease forwards;
}
.page-intro { margin-bottom: 1.15rem; }
.page-intro h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
  text-shadow: 0 0 40px rgba(31, 159, 217, 0.2);
}
.page-intro p { margin: 0.35rem 0 0; color: var(--muted); }

.composer {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 16px;
}
.composer.between { justify-content: space-between; align-items: center; }
.composer input, .composer select { max-width: 420px; }

/* sessions legacy grid kept for other pages */
.server-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.server-card {
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.3s var(--ease), border-color 0.25s var(--ease), box-shadow 0.3s var(--ease);
  animation: riseIn 0.5s var(--ease) both;
}
.server-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  z-index: 1;
}
.server-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: var(--glow-strong);
}
.server-card:hover::before { opacity: 1; }
.server-card-media {
  height: 120px;
  position: relative;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,92,58,0.18), transparent 55%),
    linear-gradient(135deg, #1c2029, #101218);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.server-card-media.has-icon {
  background-color: #101218;
}
.server-card-media::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  background: linear-gradient(to top, var(--panel), transparent);
  pointer-events: none;
}
.server-card-body { padding: 1rem; display: flex; flex-direction: column; gap: 0.7rem; }
.server-card h3 { margin: 0; font-family: var(--display); letter-spacing: -0.02em; }
.server-card .meta { color: var(--muted); font-size: 0.84rem; word-break: break-all; }
.server-card .row-actions,
.player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.player-actions { max-width: 520px; }
.player-actions .btn {
  padding: 0.4rem 0.62rem;
  font-size: 0.74rem;
}

.group-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.35rem;
}
.gtag {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.5rem;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #eaf7a8;
  background: rgba(31, 159, 217, 0.1);
  border: 1px solid rgba(31, 159, 217, 0.22);
}

.rank-box {
  margin: 0.6rem 0 0.9rem;
  padding: 0.85rem;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: #12141a;
}
.rank-box-head {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.rank-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.rank-chip {
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--ink);
  border-radius: 9px;
  padding: 0.4rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s var(--ease);
}
.rank-chip:hover,
.rank-chip.active {
  background: rgba(31, 159, 217, 0.14);
  border-color: rgba(31, 159, 217, 0.45);
  color: #f4ffb0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.stat {
  border-radius: 16px;
  padding: 1rem 1.05rem;
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), box-shadow 0.25s var(--ease);
  animation: riseIn 0.45s var(--ease) both;
}
.stat:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: var(--glow-strong);
}
.stat span { color: var(--muted); font-size: 0.8rem; }
.stat b {
  display: block;
  margin-top: 0.3rem;
  font-size: 1.55rem;
  font-family: var(--display);
  letter-spacing: -0.03em;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}
.surface {
  border-radius: 18px;
  padding: 1.05rem;
  margin-bottom: 0.9rem;
  animation: riseIn 0.4s var(--ease) both;
}
.surface-head h3 {
  margin: 0 0 0.9rem;
  font-family: var(--display);
  letter-spacing: -0.02em;
}
.stack { display: flex; flex-direction: column; gap: 0.55rem; }
.inline { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-bottom: 0.55rem; }
.inline > * { flex: 1; min-width: 90px; }
.quick {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.4rem;
}

/* tables */
.table-wrap {
  overflow: auto;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: #12141a;
}
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td {
  text-align: start;
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: #e7e2d8;
}
th {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.02);
  white-space: nowrap;
}
tr { transition: background 0.18s var(--ease); }
tbody tr:hover td { background: rgba(31, 159, 217, 0.035); }
.tag {
  display: inline-block;
  background: rgba(31, 159, 217, 0.1);
  color: #eaf7a8;
  border: 1px solid rgba(31, 159, 217, 0.25);
  border-radius: 8px;
  padding: 0.15rem 0.45rem;
  font-size: 0.74rem;
  font-weight: 700;
}

/* tools */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.7rem;
}
.action-card {
  position: relative;
  border-radius: 14px;
  padding: 1.05rem 1rem 1rem;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
  opacity: 0;
  transform: translateY(12px);
  animation: riseIn 0.45s var(--ease) forwards;
}
.action-card::after {
  content: '';
  position: absolute;
  inset-inline-end: -20%;
  top: -30%;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(31, 159, 217, 0.08);
  transition: transform 0.35s var(--ease);
}
.action-card:hover {
  transform: translateY(-4px);
  border-color: rgba(31, 159, 217, 0.4);
  background: #1c2029;
}
.action-card:hover::after { transform: scale(1.5); }
.action-card .tool-idx {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
}
.action-card strong {
  position: relative;
  display: block;
  margin-bottom: 0.25rem;
  font-family: var(--display);
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.action-card small {
  position: relative;
  color: var(--muted);
  font-size: 0.78rem;
}

.log-list { display: flex; flex-direction: column; gap: 0.5rem; }
.log-item {
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
  animation: riseIn 0.4s var(--ease) both;
}
.log-item:hover {
  border-color: rgba(31, 159, 217, 0.3);
  transform: translateX(-3px);
}
html[dir="ltr"] .log-item:hover { transform: translateX(3px); }
.log-item time { color: var(--muted); font-size: 0.75rem; font-family: var(--mono); }

/* modal / toast */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 7, 9, 0.72);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 50;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease;
}
.modal-card {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow: auto;
  border-radius: 18px;
  padding: 1.15rem;
  animation: modalIn 0.32s var(--ease);
  box-shadow: var(--shadow);
}
.modal-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.9rem;
}
.modal-card header h3 {
  margin: 0;
  font-family: var(--display);
  letter-spacing: -0.02em;
}
.watch-card { width: min(920px, 96vw); }
.watch-stage {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: #090a0d;
  min-height: 280px;
  display: grid;
  place-items: center;
}
.watch-stage img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
}
.watch-status {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.55rem 0.8rem;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  color: #ddd8ce;
  font-size: 0.82rem;
  pointer-events: none;
}
.x {
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
}
.result {
  display: none !important;
}
.toast-stack {
  position: fixed;
  top: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  width: min(420px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  pointer-events: none;
}
.toast-item {
  display: grid;
  grid-template-columns: 4px 1fr;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(14, 20, 28, 0.88);
  border: 1px solid rgba(148, 200, 230, 0.18);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45), 0 0 28px rgba(31, 159, 217, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: riseIn 0.28s var(--ease);
  pointer-events: none;
}
.toast-item.out {
  animation: pageOut 0.25s ease forwards;
}
.toast-bar { background: var(--signal); }
.toast-item.success .toast-bar { background: var(--ok); }
.toast-item.error .toast-bar { background: var(--coral); }
.toast-item.warn .toast-bar { background: var(--warn); }
.toast-body {
  padding: 0.75rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.toast-title {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--signal);
}
.toast-item.success .toast-title { color: var(--ok); }
.toast-item.error .toast-title { color: #ff9d8d; }
.toast-item.warn .toast-title { color: var(--warn); }
.toast-msg {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
  word-break: break-word;
}
.toast {
  display: none !important;
}

/* Scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(31, 159, 217, 0.45) rgba(12, 17, 24, 0.55);
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: rgba(12, 17, 24, 0.55);
  border-radius: 99px;
}
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.55), rgba(31, 159, 217, 0.35));
  border-radius: 99px;
  border: 2px solid rgba(12, 17, 24, 0.55);
}
*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.75), rgba(31, 159, 217, 0.55));
}
*::-webkit-scrollbar-corner {
  background: transparent;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(14px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes pageOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(8px); }
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes scan {
  from { transform: translateY(-18%); }
  to { transform: translateY(18%); }
}
@keyframes ruleGrow {
  from { width: 0; }
  to { width: min(11rem, 55%); }
}
@keyframes accentPulse {
  0%, 100% { text-shadow: 0 0 0 transparent; filter: brightness(1); }
  50% { text-shadow: 0 0 22px rgba(31, 159, 217, 0.55); filter: brightness(1.08); }
}
@keyframes sideIn {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: none; }
}
html[dir="ltr"] .shell:not(.sessions-only) .side {
  animation-name: sideInLtr;
}
@keyframes sideInLtr {
  from { opacity: 0; transform: translateX(-18px); }
  to { opacity: 1; transform: none; }
}

.site-ad {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 0.25rem 0.55rem calc(0.25rem + env(safe-area-inset-bottom));
  background: rgba(8, 12, 18, 0.94);
  border-top: 1px solid rgba(148, 200, 230, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  max-height: 78px;
  overflow: hidden;
}
.site-ad.hidden { display: none !important; }
.site-ad-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.site-ad-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.site-ad-label {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.site-ad-smartlink {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--signal);
  text-decoration: none;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(31, 159, 217, 0.35);
  background: rgba(31, 159, 217, 0.1);
}
.site-ad-smartlink:hover {
  background: rgba(31, 159, 217, 0.2);
}
.adsterra-banner-wrap {
  height: 48px;
  max-height: 48px;
  overflow: hidden;
  border-radius: 8px;
  position: relative;
}
.adsterra-banner-wrap > div {
  transform: scale(0.42);
  transform-origin: top center;
  width: 238%;
  margin-left: -69%;
  max-height: 48px;
  overflow: hidden;
  pointer-events: auto;
}
.adsterra-banner-wrap img,
.adsterra-banner-wrap iframe,
.adsterra-banner-wrap a {
  max-height: 110px !important;
}
.adsense-slot {
  min-height: 0;
  max-height: 50px;
  width: 100%;
  overflow: hidden;
}
.adsense-slot:empty { display: none; }
.adsense-slot .adsbygoogle {
  min-height: 50px;
  max-height: 50px;
}
body.has-ad {
  padding-bottom: 86px;
}

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .shell.sessions-only .sessions-chrome {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .sessions-user strong { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side {
    position: sticky;
    top: 0;
    height: auto;
    border-inline-end: 0;
    border-bottom: 1px solid var(--line-2);
    padding: 0.75rem;
  }
  .side-nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 0.35rem;
    padding-bottom: 0.15rem;
  }
  .nav-item {
    white-space: nowrap;
    padding: 0.62rem 0.8rem;
  }
  .nav-item::before { display: none; }
  .side-foot { flex-direction: row; align-items: center; border-top: 0; padding-top: 0; }
  .auth-stage { grid-template-columns: 1fr; }
  .auth-brand { min-height: 300px; }
  .brand-metrics { grid-template-columns: 1fr; }
  .server-hero { grid-template-columns: 1fr; }
  .server-hero-media { min-height: 110px; }
  .server-row { grid-template-columns: 1fr; }
  .server-row-media { min-height: 100px; }
  .sessions-add { grid-template-columns: 1fr; }
  .sessions-hub { padding: 1rem; }
  .dash-grid { grid-template-columns: 1fr; }
  .topbar { padding: 0.8rem 1rem; }
  .content { padding: 1rem; }
}
