:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --base: #06080f;
  --panel: rgba(11, 15, 26, 0.78);
  --panel-strong: rgba(14, 20, 34, 0.9);
  --edge: rgba(56, 189, 248, 0.2);
  --edge-soft: rgba(148, 163, 184, 0.14);
  --ink: #eaf0fb;
  --ink-dim: #a3aec5;
  --ink-faint: #74809a;
  --accent: #38bdf8;
  --accent-2: #22d3ee;
  --good: #41f081;
  --warn: #ffbf3f;
  --bad: #ff776b;
  background: var(--base);
  color: var(--ink);
}


* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 52% 42%, rgba(56, 189, 248, 0.12), transparent 30%),
    radial-gradient(circle at 80% 14%, rgba(34, 211, 238, 0.12), transparent 26%),
    linear-gradient(118deg, rgba(6, 8, 15, 0.96), rgba(8, 12, 22, 0.98) 52%, rgba(3, 6, 12, 0.99)),
    var(--base);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -4%;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(rgba(2, 5, 12, .16), rgba(2, 5, 12, .42)), url("/assets/sky-night-stars-v1.jpg") center / cover no-repeat;
  opacity: .72;
  filter: brightness(1.08) contrast(1.08);
  animation: sky-night-drift 72s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("/assets/sky-night-stars-v1.jpg") 18% 32% / 760px 760px repeat;
  opacity: .11;
  mix-blend-mode: screen;
  filter: brightness(1.75) contrast(1.15);
  animation: sky-night-twinkle 8s ease-in-out infinite alternate, sky-night-pan 95s linear infinite;
}

@keyframes sky-night-drift {
  from { transform: scale(1.02) translate3d(-.5%, -.4%, 0); }
  to { transform: scale(1.075) translate3d(1.2%, .8%, 0); }
}

@keyframes sky-night-twinkle {
  from { opacity: .065; }
  to { opacity: .17; }
}

@keyframes sky-night-pan {
  from { background-position: 18% 32%; }
  to { background-position: calc(18% + 110px) calc(32% - 70px); }
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1380px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px;
}

.app-shell.is-locked {
  display: none;
}

.auth-screen {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.auth-screen[hidden] {
  display: none;
}

.auth-card {
  width: min(440px, 100%);
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(14, 20, 34, 0.9), rgba(6, 8, 15, 0.96));
  box-shadow: inset 0 1px rgba(234, 240, 251, 0.06), 0 24px 60px rgba(0, 0, 0, 0.42), 0 0 42px rgba(56, 189, 248, 0.12);
  backdrop-filter: blur(16px);
  text-align: center;
}

.auth-brand-logo {
  width: 112px;
  height: 112px;
  margin: 0 auto 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 0 34px rgba(56, 189, 248, 0.12), 0 18px 40px rgba(0, 0, 0, 0.34);
}

.auth-card h1 {
  font-size: 2.4rem;
}

.auth-card p:not(.eyebrow) {
  color: var(--ink-dim);
  line-height: 1.45;
}

.auth-message {
  min-height: 20px;
  color: var(--warn);
  font-size: 0.86rem;
}

.top-actions {
  display: flex;
  gap: 8px;
}

.topbar,
.section-head,
.button-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.button-row.wrap {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar {
  position: relative;
  padding: 14px 0 16px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.13);
}

.topbar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  width: min(360px, 45vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.55);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: #000;
  color: #dff8ff;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.09), 0 0 24px rgba(56, 189, 248, 0.13);
  font-family: ui-monospace, "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.brand-mark::before {
  content: none;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.2rem;
}

.icon-button,
.primary,
.secondary {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  min-height: 42px;
}

.icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  background: rgba(14, 20, 34, 0.86);
  color: var(--ink);
  border: 1px solid var(--edge);
  font-size: 1.35rem;
}

.lucide-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

#notificationBtn.is-enabled {
  border-color: rgba(65, 240, 129, 0.62);
  background: rgba(65, 240, 129, 0.14);
  color: var(--good);
  box-shadow: 0 0 18px rgba(65, 240, 129, 0.14);
}

#notificationBtn.has-alert {
  border-color: rgba(251, 113, 133, 0.72);
  color: #fda4af;
  box-shadow: 0 0 20px rgba(251, 113, 133, 0.2);
}

#notificationBtn.has-alert::after {
  content: attr(data-count);
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid #050913;
  border-radius: 999px;
  background: #fb7185;
  color: #160309;
  font-size: 0.65rem;
  font-weight: 950;
  line-height: 1;
}

.primary,
.secondary {
  padding: 0 14px;
  font-weight: 750;
}

.primary {
  background: var(--accent);
  color: #031018;
  box-shadow: 0 10px 24px rgba(56, 189, 248, 0.22);
}

.secondary {
  background: rgba(14, 20, 34, 0.74);
  color: var(--ink);
  border: 1px solid var(--edge);
}

.small {
  min-height: 38px;
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--edge-soft);
  border-radius: 8px;
  background: rgba(11, 15, 26, 0.64);
  color: var(--ink-dim);
  backdrop-filter: blur(14px);
  font-size: 0.9rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  margin: 16px 0;
}

.mobile-menu-toggle {
  display: none;
}

.tab {
  min-height: 38px;
  border: 1px solid var(--edge-soft);
  border-radius: 8px;
  background: rgba(11, 15, 26, 0.76);
  color: var(--ink-dim);
  font-weight: 700;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.tab.is-active {
  background: var(--accent);
  color: #031018;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(56, 189, 248, 0.18);
}

.view {
  display: none;
}

.view.is-active {
  display: block;
  animation: view-in 170ms ease-out both;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.992);
    filter: blur(2px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after {
    animation: none;
  }

  .view.is-active,
  .chat-share-menu {
    animation: none;
  }

  .tab {
    transition: none;
  }
}

.panel,
.stat-card {
  border: 1px solid var(--edge-soft);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(14, 20, 34, 0.84), rgba(6, 8, 15, 0.9));
  box-shadow: inset 0 1px rgba(234, 240, 251, 0.05), 0 18px 44px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.server-hero {
  display: grid;
  grid-template-columns: minmax(190px, 0.58fr) minmax(390px, 1.66fr) minmax(300px, 0.92fr);
  gap: 14px;
  align-items: center;
  min-height: 610px;
  padding: 12px 0 6px;
}

.server-copy {
  align-self: start;
  padding-top: 18px;
}

.map-label {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.server-copy h2 {
  max-width: 320px;
  margin: 8px 0 10px;
  font-size: clamp(2.6rem, 4.4vw, 4.8rem);
  line-height: 0.92;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  text-shadow: 0 0 32px rgba(56, 189, 248, 0.16);
}

.server-copy p:not(.map-label) {
  max-width: 300px;
  color: var(--ink-dim);
  line-height: 1.42;
}

.globe-wrap {
  position: relative;
  min-height: 530px;
}

.globe-wrap::before,
.globe-wrap::after {
  content: "";
  display: none;
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(56, 189, 248, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.globe-wrap::after {
  inset: 4%;
  border-color: rgba(56, 189, 248, 0.08);
  transform: rotate(-14deg) scaleX(1.12);
}

.globe-wrap {
  isolation: isolate;
}

.globe-wrap::before {
  transform: rotate(18deg) scaleX(1.18);
}

#serverGlobe {
  display: block;
  width: 100%;
  height: min(58vw, 590px);
  min-height: 430px;
  cursor: grab;
  filter: drop-shadow(0 34px 44px rgba(0, 0, 0, 0.48)) drop-shadow(0 0 38px rgba(56, 189, 248, 0.12));
  touch-action: none;
}

#serverGlobe:active {
  cursor: grabbing;
}

.globe-controls {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 3;
  display: flex;
  gap: 8px;
}

.globe-control {
  width: 38px;
  height: 38px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: rgba(11, 15, 26, 0.76);
  color: var(--accent);
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 900;
  box-shadow: inset 0 1px rgba(234, 240, 251, 0.05), 0 10px 24px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(14px);
}

.server-side {
  display: grid;
  gap: 10px;
  align-self: start;
  padding-top: 10px;
}

.server-panel {
  border: 1px solid var(--edge-soft);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(14, 20, 34, 0.84), rgba(6, 8, 15, 0.94));
  box-shadow: inset 0 1px rgba(234, 240, 251, 0.05), 0 24px 48px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(14px);
  padding: 11px;
}

.server-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.server-panel-head span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.server-panel-head small {
  color: var(--ink-faint);
  font-size: 0.72rem;
}

.server-panel h3 {
  margin: 2px 0 10px;
  font-size: 1.1rem;
  font-family: ui-monospace, "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  letter-spacing: -0.02em;
}

.summary-good {
  color: var(--good);
}

.summary-warn {
  color: var(--warn);
}

.summary-neutral {
  color: var(--ink-dim);
}

.service-list {
  display: grid;
  gap: 8px;
}

.server-panel .service-list {
  gap: 6px;
}

.server-panel .service-row {
  min-height: 46px;
  padding: 8px;
}

.server-panel .service-main strong {
  font-size: 0.8rem;
}

.server-panel .service-main small {
  font-size: 0.68rem;
}

.server-panel .service-pill {
  font-size: 0.66rem;
}

.latency-list {
  max-height: 270px;
  overflow: auto;
  padding-right: 4px;
}

#serverStatusList {
  max-height: 310px;
  overflow: auto;
  padding-right: 4px;
}

.latency-game {
  display: grid;
  gap: 6px;
}

.latency-game + .latency-game,
.service-game + .service-game {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--edge-soft);
}

.service-game {
  display: grid;
  gap: 6px;
}

.service-game.is-unavailable {
  opacity: 0.86;
}

.service-provider-state {
  margin: -2px 0 1px 17px;
  color: var(--ink-faint);
  font-size: 0.68rem;
}

.service-source {
  color: var(--ink-faint);
  font-size: 0.7rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: none;
}

.service-source:hover {
  color: var(--accent);
}

.latency-game-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.latency-game-head span {
  color: var(--ink-faint);
  font-size: 0.72rem;
}

.service-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(19, 26, 43, 0.74);
  border-left: 3px solid rgba(56, 189, 248, 0.66);
}

.service-main {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
}

.service-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.75);
}

.service-main strong,
.service-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-main strong {
  font-size: 0.88rem;
  font-family: ui-monospace, "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
}

.service-main small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 0.74rem;
}

.service-pill {
  padding: 4px 7px;
  border-radius: 8px;
  background: rgba(65, 240, 129, 0.12);
  color: var(--good);
  font-size: 0.72rem;
  font-weight: 900;
}

.metric-neutral {
  border-left-color: rgba(148, 163, 184, 0.48);
}

.metric-neutral .service-dot {
  background: var(--ink-faint);
  box-shadow: 0 0 12px rgba(148, 163, 184, 0.35);
}

.metric-neutral .service-pill {
  background: rgba(148, 163, 184, 0.12);
  color: var(--ink-dim);
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

.latency-ok {
  background: rgba(183, 244, 90, 0.12);
  color: #b7f45a;
}

.latency-warn {
  background: rgba(255, 191, 63, 0.14);
  color: #ffbf3f;
}

.latency-bad {
  background: rgba(255, 119, 107, 0.14);
  color: #ff776b;
}

.account-row {
  grid-template-columns: minmax(0, 1fr);
}

.game-home-section {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--edge-soft);
  border-radius: 8px;
  background: rgba(6, 8, 15, 0.54);
}

.game-home-section h3 {
  margin: 2px 0 0;
  font-size: 0.92rem;
}

.mini-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini {
  min-height: 30px;
  padding: 0 9px;
  font-size: 0.74rem;
}

.danger-mini {
  border-color: rgba(255, 119, 107, 0.42);
  color: #ffb6ad;
}

.panel {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.security-panel {
  margin-top: 14px;
  border-color: rgba(65, 240, 129, 0.22);
}

label {
  display: grid;
  gap: 7px;
}

label span {
  color: var(--ink-dim);
  font-size: 0.88rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--edge-soft);
  border-radius: 8px;
  background: rgba(6, 8, 15, 0.78);
  color: var(--ink);
}

input,
select {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 128px;
  padding: 12px;
  resize: vertical;
  line-height: 1.45;
}

.result-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.home-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.stat-card {
  padding: 14px;
}

.stat-card h3,
.game-profile h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.62fr) minmax(0, 1.58fr);
  gap: 14px;
  align-items: start;
}

.game-profile {
  position: sticky;
  top: 12px;
}

.game-profile h2 {
  font-size: clamp(2.1rem, 4vw, 4.3rem);
  line-height: 0.94;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.game-profile p:not(.map-label) {
  margin-bottom: 16px;
  color: var(--ink-dim);
  line-height: 1.52;
}

.game-main {
  min-width: 0;
}

.game-head {
  min-height: 72px;
  padding: 14px;
  border: 1px solid var(--edge-soft);
  border-radius: 8px;
  background: rgba(11, 15, 26, 0.58);
  backdrop-filter: blur(14px);
}

.game-head h2 {
  margin-top: 2px;
  font-size: 1.4rem;
}

.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card::before,
.game-profile::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(56, 189, 248, 0.12), transparent 28%),
    linear-gradient(rgba(56, 189, 248, 0.045) 1px, transparent 1px);
  background-size: auto, 100% 18px;
  opacity: 0.72;
}

.stat-card > *,
.game-profile > * {
  position: relative;
}

.stat-card.hero-card {
  min-height: 154px;
  border-color: rgba(56, 189, 248, 0.34);
}

.stat-card.hero-card h3 {
  color: var(--accent);
  font-family: ui-monospace, "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-card.loading-card p,
.stat-card.error-card p,
.ai-answer {
  color: var(--ink-dim);
  line-height: 1.55;
}

.stat-card.error-card {
  border-color: rgba(255, 119, 107, 0.4);
}

.updates-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.social-layout {
  grid-template-columns: minmax(260px, 0.5fr) minmax(0, 1.7fr);
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.social-grid.compact {
  margin-top: 12px;
}

.social-panel .social-grid.compact {
  grid-template-columns: minmax(230px, 0.45fr) minmax(0, 1.55fr);
  align-items: start;
}

.social-panel .social-grid.whatsapp-layout {
  grid-template-columns: minmax(240px, 0.42fr) minmax(0, 1.58fr);
  grid-auto-flow: row;
  gap: 10px;
}

.social-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.social-tab {
  min-height: 40px;
  border: 1px solid var(--edge-soft);
  border-radius: 8px;
  background: rgba(11, 15, 26, 0.76);
  color: var(--ink-dim);
  font-weight: 900;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.social-tab.is-active {
  border-color: rgba(65, 240, 129, 0.5);
  background: linear-gradient(90deg, rgba(65, 240, 129, 0.9), rgba(34, 211, 238, 0.72));
  color: #031018;
  box-shadow: 0 0 24px rgba(65, 240, 129, 0.16);
  transform: translateY(-1px);
}

.social-panels {
  margin-top: 12px;
}

.social-tool-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.social-tool-card[hidden] {
  display: none !important;
}

#social:not(.chat-focus) .whatsapp-layout {
  grid-template-columns: minmax(0, 1fr);
}

#social:not(.chat-focus) .whatsapp-layout .social-chat-main,
#social:not(.chat-focus) .whatsapp-layout .social-share-card {
  display: none;
}

#social:not(.chat-focus) .whatsapp-layout .social-thread-card {
  max-height: 520px;
}

#social.chat-focus .social-tabs,
#social.chat-focus .social-column-head,
#social.chat-focus .social-tool-buttons,
#social.chat-focus .social-panel.is-active .social-card:not(.social-chat-main) {
  display: none;
}

#social.chat-focus .social-panels {
  margin-top: 0;
}

#social.chat-focus .social-panel.is-active .whatsapp-layout {
  display: block;
  margin-top: 0;
}

.social-panel {
  display: none;
}

.social-panel.is-active {
  display: block;
  animation: view-in 150ms ease-out both;
}

.social-column {
  display: grid;
  align-content: start;
  gap: 12px;
}

.social-column-head {
  padding: 12px;
  border: 1px solid var(--edge-soft);
  border-radius: 8px;
  background: rgba(11, 15, 26, 0.58);
}

.social-column-head h3 {
  margin: 2px 0 0;
  font-size: 1.2rem;
}

.social-share-card {
  grid-column: 1 / -1;
}

.whatsapp-layout .social-share-card {
  grid-column: 1;
}

.social-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 168px;
}

.whatsapp-layout .social-card {
  gap: 9px;
  min-height: 0;
  padding: 11px;
}

.whatsapp-layout > .social-card:not(.social-chat-main) {
  grid-column: 1;
}

.whatsapp-layout .social-card h3 {
  margin-bottom: 2px;
}

.social-thread-card {
  position: sticky;
  top: 12px;
}

.whatsapp-layout .social-thread-card {
  position: static;
  max-height: 260px;
  overflow: auto;
}

.thread-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  padding: 9px;
  border: 1px solid var(--edge-soft);
  border-radius: 8px;
  background: rgba(19, 26, 43, 0.74);
  color: var(--ink);
  text-align: left;
}

.unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  min-height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--good);
  color: #031018;
  font-size: 0.67rem;
  font-weight: 900;
  line-height: 1;
}

.notification-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 100;
  display: grid;
  gap: 8px;
  width: min(340px, calc(100vw - 24px));
  pointer-events: none;
}

.in-app-notification {
  padding: 12px 14px;
  border: 1px solid rgba(65, 240, 129, 0.4);
  border-left: 3px solid var(--good);
  border-radius: 8px;
  background: rgba(4, 28, 31, 0.96);
  color: #eafff8;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.in-app-notification.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.thread-row.is-active {
  border-color: rgba(65, 240, 129, 0.46);
  background: rgba(5, 72, 72, 0.58);
}

.thread-row strong,
.thread-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-row small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 0.72rem;
}

.chat-card {
  min-height: 330px;
}

.social-chat-main {
  grid-column: 1 / -1;
  min-height: 560px;
}

.whatsapp-layout .social-chat-main {
  grid-column: 2;
  grid-row: 1 / span 4;
  min-height: 0;
  height: min(68vh, 680px);
  align-content: stretch;
  overflow: visible;
}

#social.chat-focus .whatsapp-layout .social-chat-main {
  height: calc(100vh - 190px);
  min-height: 560px;
}

.chat-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-card-head h3 {
  margin: 0;
}

.chat-back {
  display: none;
}

#social.chat-focus .chat-back {
  display: inline-flex;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.stack-form,
.chat-form {
  display: grid;
  gap: 8px;
}

.chat-form {
  position: relative;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.social-chat-main .chat-form input {
  min-height: 48px;
}

.chat-plus {
  width: 48px;
  min-width: 48px;
  padding: 0;
  font-size: 1.25rem;
}

.chat-share-menu {
  position: absolute;
  left: 0;
  bottom: 58px;
  z-index: 30;
  width: min(320px, 86vw);
  max-height: min(380px, 52vh);
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(65, 240, 129, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(7, 56, 54, 0.96), rgba(6, 12, 24, 0.98)),
    var(--panel);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.38), 0 0 24px rgba(34, 211, 238, 0.12);
  animation: menu-pop 120ms ease-out;
}

@keyframes menu-pop {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-share-menu strong,
.chat-share-menu small {
  display: block;
}

.chat-share-menu strong {
  margin-bottom: 7px;
}

.chat-share-menu small {
  color: var(--ink-faint);
  line-height: 1.35;
}

.chat-share-menu .share-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 7px;
  padding: 8px;
  border: 1px solid var(--edge-soft);
  border-radius: 8px;
  background: rgba(11, 15, 26, 0.72);
  color: var(--ink);
  text-align: left;
}

.chat-share-menu .share-option:hover {
  border-color: rgba(65, 240, 129, 0.42);
  background: rgba(5, 72, 72, 0.72);
}

.share-option span:last-child {
  color: var(--good);
  font-weight: 900;
}

.social-chat-main .chat-form button {
  min-width: 96px;
}

.social-chat-main .chat-form .chat-plus {
  min-width: 48px;
}

.chat-log {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 390px;
  max-height: 520px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--edge-soft);
  border-radius: 8px;
  background: rgba(6, 8, 15, 0.62);
}

.whatsapp-layout .chat-log {
  min-height: 0;
  max-height: none;
  height: calc(min(68vh, 680px) - 118px);
}

#social.chat-focus .whatsapp-layout .chat-log {
  height: calc(100vh - 315px);
  min-height: 430px;
}

.chat-message {
  justify-self: start;
  max-width: min(82%, 520px);
  padding: 9px 10px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  background: rgba(19, 26, 43, 0.84);
}

.chat-message.is-mine {
  justify-self: end;
  border-color: rgba(65, 240, 129, 0.28);
  background: rgba(5, 72, 72, 0.64);
}

.chat-message.is-stats {
  border-color: rgba(65, 240, 129, 0.42);
  background:
    linear-gradient(90deg, rgba(65, 240, 129, 0.14), transparent 45%),
    rgba(5, 72, 72, 0.72);
  max-width: min(92%, 680px);
}

.chat-message.is-update {
  width: min(520px, 94%);
  max-width: 94%;
  padding: 8px;
  border-color: rgba(56, 189, 248, 0.38);
  background: rgba(3, 12, 24, 0.96);
}

.chat-update-card {
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-left: 3px solid #38bdf8;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(8, 77, 112, 0.72), rgba(4, 18, 35, 0.96));
}

.chat-update-card header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-update-card header div,
.chat-update-card header span,
.chat-update-card header strong,
.chat-update-card header small {
  display: block;
  min-width: 0;
}

.chat-update-card header div > span {
  color: #67d4ff;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.chat-update-card header strong {
  color: #effaff;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.chat-update-card p,
.chat-update-card footer {
  margin: 0;
  overflow-wrap: anywhere;
}

.chat-update-card p {
  color: rgba(239, 250, 255, 0.86);
  font-size: 0.82rem;
}

.chat-update-card footer {
  color: rgba(175, 225, 244, 0.72);
  font-size: 0.68rem;
}

.chat-update-icon {
  display: inline-flex !important;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(56, 189, 248, 0.52);
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.14);
  color: #effaff;
  font-weight: 900;
}

.chat-message.is-stats p {
  font-family: ui-monospace, "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
}

.chat-delete {
  margin-top: 6px;
  border: 1px solid rgba(255, 119, 107, 0.34);
  border-radius: 8px;
  background: rgba(84, 24, 30, 0.22);
  color: #ffb6ad;
  font-size: 0.68rem;
  font-weight: 900;
}

.chat-message strong,
.chat-message small {
  display: block;
  color: var(--accent);
  font-size: 0.72rem;
}

.chat-message p {
  margin: 4px 0;
  color: var(--ink);
  line-height: 1.4;
}

.chat-report {
  margin-left: 6px;
  border: 0;
  background: transparent;
  color: var(--ink-faint);
  font-size: 0.68rem;
  font-weight: 800;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.admin-summary .green-metric {
  min-height: 74px;
  padding: 12px;
  border: 1px solid rgba(65, 240, 129, 0.22);
  border-left: 3px solid var(--good);
  border-radius: 8px;
}

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

.admin-wide {
  grid-column: 1 / -1;
}

.admin-card .service-list {
  max-height: 440px;
  overflow: auto;
}

@media (max-width: 760px) {
  .admin-summary,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-wide {
    grid-column: auto;
  }
}

.chat-message.is-stats {
  width: min(520px, 94%);
  max-width: 94%;
  padding: 8px;
  border-color: rgba(65, 240, 129, 0.38);
  background: rgba(3, 16, 19, 0.96);
}

.chat-stats-card {
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid rgba(65, 240, 129, 0.3);
  border-left: 3px solid var(--good);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(3, 92, 74, 0.7), rgba(4, 22, 27, 0.96));
  box-shadow: inset 0 1px rgba(142, 230, 210, 0.12), 0 12px 28px rgba(0, 0, 0, 0.24);
}

.chat-stats-card header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-stats-card header div {
  min-width: 0;
}

.chat-stats-card header span,
.chat-stats-card header strong,
.chat-stats-card header small {
  display: block;
}

.chat-stats-card header > div > span {
  color: var(--good);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.chat-stats-card header > div > strong {
  color: #eafff8;
  font-size: 0.92rem;
}

.chat-game-logo {
  display: inline-flex;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(65, 240, 129, 0.5);
  border-radius: 8px;
  background: rgba(65, 240, 129, 0.13);
  color: #eafff8;
  font-weight: 900;
}

.chat-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.chat-stats-grid > div {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(142, 230, 210, 0.12);
  border-radius: 6px;
  background: rgba(0, 56, 51, 0.34);
}

.chat-stats-grid span,
.chat-stats-grid strong {
  display: block;
  overflow-wrap: anywhere;
}

.chat-stats-grid span {
  color: rgba(234, 255, 248, 0.62);
  font-size: 0.65rem;
}

.chat-stats-grid strong {
  margin-top: 2px;
  color: #eafff8;
  font-size: 0.82rem;
}

.empty-chat {
  margin: 0;
  color: var(--ink-faint);
}

.dashboard-card {
  display: grid;
  gap: 14px;
}

.green-dashboard {
  border-color: rgba(65, 240, 129, 0.42);
  background:
    linear-gradient(90deg, rgba(65, 240, 129, 0.11), transparent 30%),
    linear-gradient(180deg, rgba(5, 72, 72, 0.62), rgba(4, 12, 18, 0.94));
  box-shadow:
    inset 0 1px rgba(142, 230, 210, 0.12),
    inset 3px 0 rgba(65, 240, 129, 0.78),
    0 18px 44px rgba(0, 0, 0, 0.3),
    0 0 28px rgba(65, 240, 129, 0.08);
}

.green-dashboard::before {
  background:
    linear-gradient(90deg, rgba(65, 240, 129, 0.22), transparent 30%),
    linear-gradient(rgba(65, 240, 129, 0.065) 1px, transparent 1px);
  background-size: auto, 100% 18px;
  opacity: 0.9;
}

.dashboard-card-head p:not(.map-label) {
  margin: 4px 0 0;
  color: var(--ink-dim);
}

.dashboard-card-head h3 {
  margin-bottom: 0;
  font-size: 1.4rem;
}

.dashboard-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.stats-share-button {
  flex: 0 0 auto;
  border-color: rgba(65, 240, 129, 0.44);
  color: var(--good);
}

.share-dialog {
  width: min(460px, calc(100vw - 24px));
  padding: 0;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  background: #070d17;
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.62);
}

.share-dialog::backdrop {
  background: rgba(1, 5, 10, 0.78);
  backdrop-filter: blur(6px);
}

.share-dialog-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.share-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.share-dialog-head h2 {
  margin: 2px 0 0;
  font-size: 1.2rem;
}

.control-reject-dialog {
  border-color: rgba(251, 113, 133, 0.42);
}

.control-reject-card {
  gap: 16px;
}

.control-reject-target {
  padding: 11px 12px;
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.06);
  color: #ccefff;
  font-size: 0.78rem;
  font-weight: 800;
}

.control-reject-field {
  display: grid;
  gap: 8px;
}

.control-reject-field > span {
  color: #edf7ff;
  font-size: 0.75rem;
  font-weight: 850;
}

.control-reject-field textarea {
  min-height: 112px;
  resize: vertical;
}

.control-reject-field small {
  color: var(--ink-faint);
  font-size: 0.65rem;
  line-height: 1.45;
}

.control-reject-actions > * {
  flex: 1;
}

.legal-dialog {
  width: min(880px, calc(100vw - 28px));
  max-height: min(88vh, 920px);
  border-color: rgba(56, 189, 248, 0.38);
  border-radius: 14px;
  overflow: hidden;
}

.legal-dialog-card {
  max-height: min(88vh, 920px);
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.legal-dialog-head,
.legal-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: rgba(7, 13, 23, 0.98);
}

.legal-dialog-head {
  border-bottom: 1px solid rgba(56, 189, 248, 0.18);
}

.legal-dialog-head h2 {
  margin-top: 3px;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
}

.legal-dialog-head p:last-child {
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 0.7rem;
}

.legal-dialog-head .icon-button {
  flex: 0 0 auto;
  font-size: 1.25rem;
}

.legal-document {
  padding: 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(56, 189, 248, 0.55) rgba(5, 10, 18, 0.6);
}

.legal-document[hidden] {
  display: none;
}

.legal-summary {
  padding: 14px 16px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 9px;
  background: rgba(56, 189, 248, 0.055);
  color: #d8f4ff;
  font-size: 0.84rem;
  line-height: 1.65;
}

.legal-document section {
  padding: 18px 2px;
  border-bottom: 1px solid rgba(126, 166, 207, 0.11);
}

.legal-document section:last-child {
  border-bottom: 0;
}

.legal-document h3 {
  margin-bottom: 8px;
  color: #f1f7ff;
  font-size: 0.91rem;
}

.legal-document p,
.legal-document li {
  color: #a9b8ce;
  font-size: 0.78rem;
  line-height: 1.7;
}

.legal-document ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
}

.legal-document code {
  padding: 2px 5px;
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 5px;
  background: rgba(56, 189, 248, 0.07);
  color: #8fe5ff;
  font-size: 0.72rem;
}

.legal-document a {
  color: #75ddff;
  font-weight: 800;
  text-underline-offset: 3px;
}

.legal-document a:hover,
.legal-document a:focus-visible {
  color: #a8ecff;
}

.legal-dialog-footer {
  border-top: 1px solid rgba(56, 189, 248, 0.18);
}

.legal-dialog-footer span {
  color: var(--ink-faint);
  font-size: 0.68rem;
}

.danger-action {
  background: #fb7185;
  color: #180309;
}

@media (max-width: 520px) {
  .control-reject-dialog {
    width: calc(100vw - 18px);
  }

  .control-reject-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .control-reject-actions > * {
    width: 100%;
  }
}

.green-dashboard .dashboard-card-head h3 {
  color: #eafff8;
  text-shadow: 0 0 18px rgba(65, 240, 129, 0.32);
}

.green-dashboard .map-label {
  color: var(--good);
}

.dashboard-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-metric {
  min-height: 86px;
}

.green-metric {
  border-left-color: rgba(65, 240, 129, 0.92);
  border-top: 1px solid rgba(142, 230, 210, 0.12);
  background:
    linear-gradient(90deg, rgba(65, 240, 129, 0.16), rgba(0, 91, 69, 0.24)),
    rgba(5, 72, 72, 0.42);
}

.green-metric strong {
  color: #8ee6d2;
  text-shadow: 0 0 14px rgba(65, 240, 129, 0.22);
}

.green-metric span {
  color: rgba(234, 255, 248, 0.72);
}

.update-card {
  display: grid;
  gap: 12px;
  min-height: 210px;
  padding: 14px;
  border: 1px solid var(--edge-soft);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(14, 20, 34, 0.84), rgba(6, 8, 15, 0.94));
  box-shadow: inset 0 1px rgba(234, 240, 251, 0.05), 0 18px 44px rgba(0, 0, 0, 0.28);
}

.update-card h3 {
  margin: 0;
  font-size: 1rem;
}

.update-card p {
  color: var(--ink-dim);
  line-height: 1.45;
}

.update-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-faint);
  font-size: 0.78rem;
}

.update-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ai-composer {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--edge-soft);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(14, 20, 34, 0.78), rgba(6, 8, 15, 0.86));
}

.ai-web-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 2px 9px;
  padding: 10px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  background: rgba(4, 22, 31, 0.7);
  cursor: pointer;
}

.ai-web-toggle input {
  grid-row: 1 / span 2;
  width: 19px;
  height: 19px;
  accent-color: var(--good);
}

.ai-web-toggle span {
  color: var(--ink);
  font-weight: 900;
}

.ai-web-toggle small {
  color: var(--ink-faint);
}

.ai-sources {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--edge-soft);
}

.ai-sources strong {
  color: var(--good);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.ai-sources a {
  color: var(--accent);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.ai-answer {
  color: var(--ink);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.ai-answer strong {
  color: #f3fbff;
  font-weight: 900;
}

.ai-answer em {
  color: #d9f8ef;
}

.ai-answer a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ai-heading {
  display: inline-block;
  margin-top: 8px;
  color: var(--good);
}

.ai-actions-menu {
  position: relative;
}

.ai-plus-button {
  width: 40px;
  padding: 0;
  font-size: 1.3rem;
}

.ai-tool-menu {
  position: absolute;
  right: 0;
  bottom: 48px;
  z-index: 35;
  display: grid;
  gap: 6px;
  width: min(300px, calc(100vw - 40px));
  padding: 10px;
  border: 1px solid rgba(65, 240, 129, 0.3);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(7, 56, 54, 0.98), rgba(6, 12, 24, 0.99));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.46);
  animation: menu-pop 120ms ease-out;
}

.ai-tool-menu[hidden] {
  display: none;
}

.ai-tool-menu button {
  width: 100%;
  text-align: left;
}

.home-card {
  display: grid;
  gap: 12px;
}

.home-card p {
  color: #b9c4cd;
  font-size: 0.92rem;
}

.home-state {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #262d35;
  color: #aab7c2;
  font-size: 0.72rem;
  font-weight: 800;
}

.home-state.is-linked {
  background: rgba(79, 182, 200, 0.18);
  color: #8ee6d2;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.metric {
  min-height: 66px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(19, 26, 43, 0.74);
  border-left: 3px solid rgba(56, 189, 248, 0.42);
}

.metric span {
  display: block;
  color: var(--ink-faint);
  font-size: 0.78rem;
}

.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 1.15rem;
}

.metric small {
  display: block;
  margin-top: 6px;
  color: var(--ink-dim);
  font-size: 0.78rem;
  line-height: 1.3;
}

.metric-good {
  border-color: rgba(65, 240, 129, 0.34);
  background: rgba(0, 91, 69, 0.22);
}

.metric-good strong {
  color: #8ee6d2;
}

.metric-ok {
  border-color: rgba(183, 244, 90, 0.34);
  background: rgba(71, 92, 31, 0.22);
}

.metric-ok strong {
  color: #b7f45a;
}

.metric-warn {
  border: 1px solid rgba(255, 191, 63, 0.36);
  background: rgba(86, 58, 13, 0.28);
}

.metric-warn strong {
  color: #ffd27d;
}

.metric-bad {
  border: 1px solid rgba(255, 119, 107, 0.4);
  background: rgba(84, 24, 30, 0.32);
}

.metric-bad strong {
  color: #ffb6ad;
}

.error {
  color: #ffb6ad;
}

@media (max-width: 430px) {
  .app-shell {
    padding: 12px 12px 74px;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    margin: -12px -12px 0;
    padding: 12px;
    background: linear-gradient(180deg, rgba(6, 8, 15, 0.98), rgba(6, 8, 15, 0.78));
    backdrop-filter: blur(16px);
  }

  .status-strip {
    margin-top: 8px;
    min-height: 34px;
    font-size: 0.78rem;
  }

  h1 {
    font-size: 1.65rem;
  }

  .tabs {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(70px + env(safe-area-inset-bottom));
    z-index: 50;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    margin: 0;
    padding: 7px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 12px;
    background: rgba(6, 10, 19, 0.94);
    box-shadow: 0 -16px 42px rgba(0, 0, 0, 0.38), 0 0 26px rgba(34, 211, 238, 0.12);
    backdrop-filter: blur(18px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity 140ms ease, transform 140ms ease;
  }

  .app-shell.mobile-menu-open .tabs {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .tab {
    min-height: 44px;
    padding: 0 5px;
    border-radius: 8px;
    font-size: 0.68rem;
    line-height: 1.05;
  }

  .mobile-menu-toggle {
    position: fixed;
    left: 50%;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 51;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(180px, calc(100vw - 28px));
    min-height: 48px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.96), rgba(34, 211, 238, 0.88));
    color: #031018;
    box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.36), 0 0 26px rgba(34, 211, 238, 0.18);
    font-weight: 900;
    transform: translateX(-50%);
  }

  .app-shell.mobile-menu-open .mobile-menu-toggle {
    background: rgba(11, 15, 26, 0.96);
    color: var(--ink);
  }

  .social-tabs {
    position: sticky;
    top: 72px;
    z-index: 18;
    grid-template-columns: 1fr;
    padding: 6px;
    border: 1px solid var(--edge-soft);
    border-radius: 12px;
    background: rgba(6, 10, 19, 0.9);
    backdrop-filter: blur(16px);
  }

  .social-tab {
    min-height: 38px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .button-row.wrap {
    justify-content: flex-start;
  }
}

@media (max-width: 980px) {
  .tabs {
    grid-template-columns: repeat(4, 1fr);
  }

  .game-layout,
  .updates-board,
  .social-grid,
  .social-panel .social-grid.compact,
  .social-panel .social-grid.whatsapp-layout {
    grid-template-columns: 1fr;
  }

  .social-share-card {
    grid-column: auto;
  }

  .whatsapp-layout .social-chat-main,
  .whatsapp-layout .social-share-card {
    grid-column: auto;
    grid-row: auto;
  }

  .whatsapp-layout .social-chat-main {
    height: auto;
  }

  .whatsapp-layout .chat-log {
    height: 420px;
  }

  #social.chat-focus .whatsapp-layout .social-chat-main {
    height: calc(100vh - 150px);
    min-height: 520px;
  }

  #social.chat-focus .whatsapp-layout .chat-log {
    height: calc(100vh - 275px);
    min-height: 360px;
  }

  .dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-profile {
    position: static;
  }

  .server-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .server-copy {
    padding-top: 4px;
  }

  .server-copy h2 {
    max-width: 100%;
    font-size: 3rem;
  }

  .server-copy p:not(.map-label) {
    max-width: 100%;
  }

  .globe-wrap {
    min-height: 360px;
  }

  #serverGlobe {
    height: 420px;
    min-height: 320px;
  }

  .server-side {
    padding-top: 0;
  }
}

@media (max-width: 430px) {
  .tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #social.chat-focus {
    margin: -4px -6px 0;
  }

  #social.chat-focus .social-panels {
    margin-top: 0;
  }

  #social.chat-focus .whatsapp-layout .social-chat-main {
    min-height: calc(100svh - 168px);
    height: calc(100svh - 168px);
    padding: 10px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  #social.chat-focus .chat-card-head {
    min-height: 44px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--edge-soft);
  }

  #social.chat-focus .chat-back {
    min-width: 0;
    min-height: 38px;
    padding: 0 10px;
    white-space: nowrap;
  }

  #social.chat-focus .whatsapp-layout .chat-log {
    height: calc(100svh - 306px);
    min-height: 0;
    padding-bottom: 12px;
  }

  #social.chat-focus .chat-form {
    position: sticky;
    bottom: 10px;
    z-index: 12;
    margin: 0 -2px;
    padding: 8px;
    border: 1px solid var(--edge-soft);
    border-radius: 12px;
    background: rgba(6, 10, 19, 0.96);
    backdrop-filter: blur(16px);
  }

  #social.chat-focus .chat-form input {
    min-width: 0;
  }

  #social.chat-focus .chat-share-menu {
    left: 8px;
    bottom: 66px;
    width: min(330px, calc(100vw - 42px));
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }
}

/* Sky Ai Inc control-center layout */
body {
  background:
    radial-gradient(circle at 66% 18%, rgba(0, 194, 255, 0.08), transparent 28%),
    linear-gradient(118deg, #05070d, #080c14 58%, #05070d);
}

.app-shell {
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0 28px;
  min-height: 100vh;
  margin: 0;
  padding: 0 30px 34px 0;
}

.tabs {
  grid-column: 1;
  grid-row: 1 / -1;
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-self: start;
  width: 100%;
  height: 100vh;
  margin: 0;
  padding: 18px 14px;
  overflow-y: auto;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(6, 9, 16, 0.96);
  box-shadow: 20px 0 50px rgba(0, 0, 0, 0.24);
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 128px;
  margin-bottom: 18px;
  padding: 7px 8px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  text-align: center;
}

.sidebar-brand .brand-mark {
  width: 64px;
  height: 64px;
  flex-basis: 64px;
  border-radius: 12px;
}

.sidebar-brand strong,
.sidebar-brand small {
  display: block;
}

.sidebar-brand strong {
  color: #f4f8ff;
  font-size: 0.9rem;
}

.sidebar-brand small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 0.68rem;
}

.nav-section {
  margin: 16px 10px 6px;
  color: #56627a;
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tab {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #7f8aa1;
  font-size: 0.8rem;
  text-align: left;
}

.tab:hover {
  border-color: rgba(56, 189, 248, 0.12);
  background: rgba(56, 189, 248, 0.055);
  color: #dce9f7;
}

.tab.is-active {
  border-color: rgba(0, 194, 255, 0.2);
  background: linear-gradient(90deg, rgba(0, 194, 255, 0.15), rgba(0, 194, 255, 0.035));
  color: #dff8ff;
  transform: none;
  box-shadow: inset 2px 0 #00c2ff, 0 10px 30px rgba(0, 0, 0, 0.12);
}

.nav-icon {
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 6px;
  color: #68758e;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 900;
}

.tab.is-active .nav-icon {
  border-color: rgba(0, 194, 255, 0.32);
  color: #24cdfd;
  box-shadow: 0 0 16px rgba(0, 194, 255, 0.12);
}

.whatsapp-nav-icon {
  color: #25d366;
}

.sidebar-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 13px 10px;
  border: 1px solid rgba(65, 240, 129, 0.13);
  border-radius: 9px;
  background: rgba(65, 240, 129, 0.04);
}

.sidebar-note .dot {
  flex: 0 0 8px;
  background: var(--good);
  box-shadow: 0 0 12px rgba(65, 240, 129, 0.55);
}

.sidebar-note strong,
.sidebar-note small {
  display: block;
}

.sidebar-note strong {
  color: #c9fadb;
  font-size: 0.72rem;
}

.sidebar-note small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 0.62rem;
}

.topbar {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: 84px;
  padding: 18px 0 14px;
}

.page-heading h1 {
  margin-top: 2px;
  font-size: clamp(1.55rem, 2.4vw, 2.2rem);
  letter-spacing: -0.03em;
}

.status-strip {
  grid-column: 2;
  grid-row: 2;
  min-height: 42px;
  margin-bottom: 22px;
  padding: 0 15px;
  border-radius: 9px;
}

.view {
  grid-column: 2;
  grid-row: 3;
  min-width: 0;
  padding-bottom: 20px;
}

.mobile-menu-toggle {
  display: none;
}

.panel,
.stat-card,
.server-panel {
  border-radius: 12px;
}

.server-hero {
  grid-template-areas:
    "copy copy"
    "globe side";
  grid-template-columns: minmax(460px, 1.45fr) minmax(350px, 0.75fr);
  gap: 24px;
  align-items: start;
  min-height: auto;
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(10, 15, 27, 0.88), rgba(5, 8, 15, 0.8));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035), 0 30px 70px rgba(0, 0, 0, 0.24);
}

.server-copy {
  grid-area: copy;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 24px;
  align-items: end;
  padding: 0 0 22px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.11);
}

.server-copy .map-label,
.server-copy h2,
.server-copy > p:not(.map-label) {
  grid-column: 1;
}

.server-copy .button-row {
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: center;
}

.server-copy h2 {
  max-width: none;
  font-size: clamp(2.4rem, 4.4vw, 4.6rem);
}

.server-copy > p:not(.map-label) {
  max-width: 720px;
}

.globe-wrap {
  grid-area: globe;
  min-height: 650px;
  border: 1px solid rgba(0, 194, 255, 0.12);
  border-radius: 12px;
  background: radial-gradient(circle at center, rgba(0, 194, 255, 0.09), transparent 62%);
}

.server-side {
  grid-area: side;
  gap: 16px;
  padding: 0;
}

.server-panel {
  padding: 16px;
}

#serverStatusList {
  max-height: 380px;
}

.latency-list {
  max-height: 330px;
}

.game-layout {
  grid-template-columns: minmax(290px, 0.5fr) minmax(0, 1.5fr);
  gap: 24px;
}

.game-profile,
.game-head,
.stat-card,
.security-panel,
#accountForm {
  padding: 20px;
}

.game-main .result-grid,
.home-grid {
  gap: 16px;
  margin-top: 20px;
}

#accounts.view.is-active {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

#accountForm {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

#accountForm h2,
#accountForm > button {
  grid-column: 1 / -1;
}

#accountForm > button {
  justify-self: start;
  min-width: 180px;
}

input,
select,
textarea {
  min-height: 48px;
  border-radius: 9px;
}

.integration-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding: 8px 4px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.integration-heading h2 {
  margin: 8px 0;
  font-size: clamp(2rem, 4vw, 3.7rem);
  letter-spacing: -0.045em;
}

.integration-heading > div > p:not(.map-label) {
  max-width: 720px;
  color: var(--ink-dim);
  line-height: 1.65;
}

.integration-badge,
.connection-state {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
  color: var(--ink-dim);
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.integration-badge.is-connected,
.connection-state.is-connected {
  border-color: rgba(37, 211, 102, 0.34);
  background: rgba(37, 211, 102, 0.1);
  color: #72f4a3;
}

.connection-state.is-offline {
  border-color: rgba(251, 113, 133, 0.42);
  background: rgba(251, 113, 133, 0.12);
  color: #ff9cad;
  box-shadow: 0 0 16px rgba(251, 113, 133, 0.09);
}

.integration-badge.is-pending,
.connection-state.is-pending {
  border-color: rgba(255, 191, 63, 0.35);
  background: rgba(255, 191, 63, 0.1);
  color: #ffd27d;
}

.integration-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.integration-rail {
  position: sticky;
  top: 20px;
  padding: 24px;
}

.integration-rail h3 {
  margin: 7px 0 24px;
  font-size: 1.4rem;
}

.integration-steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.integration-steps li {
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 13px;
  min-height: 94px;
  padding: 2px 0 20px;
  color: #6f7b91;
}

.integration-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 38px;
  bottom: 0;
  left: 17px;
  width: 1px;
  background: rgba(148, 163, 184, 0.16);
}

.integration-steps li > span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 50%;
  background: #090e18;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 900;
}

.integration-steps strong,
.integration-steps small {
  display: block;
}

.integration-steps strong {
  margin-top: 4px;
  color: #aab6ca;
  font-size: 0.88rem;
}

.integration-steps small {
  margin-top: 5px;
  line-height: 1.45;
}

.integration-steps li.is-current > span,
.integration-steps li.is-done > span {
  border-color: rgba(0, 194, 255, 0.42);
  color: #dff8ff;
  box-shadow: 0 0 20px rgba(0, 194, 255, 0.13);
}

.integration-steps li.is-current strong,
.integration-steps li.is-done strong {
  color: #eef7ff;
}

.integration-steps li.is-done > span {
  border-color: rgba(37, 211, 102, 0.38);
  background: rgba(37, 211, 102, 0.1);
  color: #72f4a3;
}

.privacy-note {
  padding: 16px;
  border: 1px solid rgba(0, 194, 255, 0.12);
  border-radius: 10px;
  background: rgba(0, 194, 255, 0.035);
}

.privacy-note strong {
  color: var(--accent);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.privacy-note p {
  margin-top: 7px;
  color: var(--ink-faint);
  font-size: 0.75rem;
  line-height: 1.55;
}

.integration-main {
  display: grid;
  gap: 20px;
}

.whatsapp-connect-card {
  padding: 26px;
  border-color: rgba(37, 211, 102, 0.18);
  background:
    radial-gradient(circle at 94% 0%, rgba(37, 211, 102, 0.09), transparent 32%),
    linear-gradient(150deg, rgba(12, 18, 29, 0.96), rgba(6, 10, 17, 0.96));
}

.whatsapp-card-head {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.whatsapp-symbol {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(37, 211, 102, 0.42);
  border-radius: 14px;
  background: rgba(37, 211, 102, 0.11);
  color: #72f4a3;
  box-shadow: 0 0 30px rgba(37, 211, 102, 0.1);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 900;
}

.whatsapp-card-head h3 {
  margin: 3px 0 5px;
  font-size: 1.35rem;
}

.whatsapp-card-head p:not(.eyebrow) {
  color: var(--ink-dim);
  line-height: 1.5;
}

.link-code-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 24px 0 20px;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 11px;
  background: rgba(2, 6, 12, 0.64);
}

.link-code-panel span,
.link-code-panel strong,
.link-code-panel small {
  display: block;
}

.link-code-panel span {
  color: var(--ink-faint);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.link-code-panel strong {
  margin: 8px 0 5px;
  color: #eafff2;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  letter-spacing: 0.16em;
}

.link-code-panel small {
  color: var(--ink-faint);
  line-height: 1.45;
}

.integration-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  font-weight: 750;
  text-decoration: none;
}

.button-link.is-disabled {
  pointer-events: none;
  opacity: 0.48;
}

.whatsapp-primary {
  background: #25d366;
  color: #03150a;
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.15);
}

.integration-message {
  min-height: 22px;
  margin-top: 14px;
  color: var(--ink-dim);
  font-size: 0.8rem;
}

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

.integration-info-card {
  min-height: 190px;
  padding: 20px;
}

.integration-info-card .info-number {
  display: block;
  margin-bottom: 28px;
  color: rgba(56, 189, 248, 0.68);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 900;
}

.integration-info-card p {
  color: var(--ink-dim);
  font-size: 0.82rem;
  line-height: 1.6;
}

.integration-info-card code {
  color: #8be2ff;
}

@media (max-width: 1220px) {
  .app-shell {
    grid-template-columns: 218px minmax(0, 1fr);
    gap: 0 20px;
    padding-right: 20px;
  }

  .server-hero {
    grid-template-areas: "copy" "globe" "side";
    grid-template-columns: 1fr;
  }

  .server-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .server-side .server-panel:last-child {
    grid-column: 1 / -1;
  }

  .globe-wrap {
    min-height: 560px;
  }

  .integration-info-grid {
    grid-template-columns: 1fr;
  }

  .integration-info-card {
    min-height: auto;
  }

  .integration-info-card .info-number {
    margin-bottom: 14px;
  }
}

@media (max-width: 900px) {
  .app-shell {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 0;
    padding: 0 16px 84px;
  }

  .topbar,
  .status-strip,
  .view {
    grid-column: 1;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 25;
    margin: 0 -16px;
    padding: 14px 16px;
    background: rgba(5, 8, 14, 0.93);
    backdrop-filter: blur(18px);
  }

  .status-strip {
    margin-top: 10px;
    margin-bottom: 18px;
  }

  .tabs {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 80;
    width: min(318px, 86vw);
    height: 100svh;
    padding: 16px 14px calc(90px + env(safe-area-inset-bottom));
    border-radius: 0;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .app-shell.mobile-menu-open .tabs {
    transform: translateX(0);
  }

  .mobile-menu-toggle {
    position: fixed;
    left: 50%;
    bottom: calc(14px + env(safe-area-inset-bottom));
    z-index: 90;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(220px, calc(100vw - 32px));
    min-height: 50px;
    border: 1px solid rgba(0, 194, 255, 0.32);
    border-radius: 999px;
    background: #00bde9;
    color: #031018;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42), 0 0 26px rgba(0, 194, 255, 0.18);
    font-weight: 900;
    transform: translateX(-50%);
  }

  .app-shell.mobile-menu-open .mobile-menu-toggle {
    background: #0c1320;
    color: var(--ink);
  }

  .server-copy {
    display: block;
  }

  .server-copy .button-row {
    margin-top: 18px;
  }

  .server-side,
  #accounts.view.is-active,
  #accountForm,
  .game-layout,
  .integration-layout {
    grid-template-columns: 1fr;
  }

  .server-side .server-panel:last-child,
  #accountForm,
  #accountForm h2,
  #accountForm > button {
    grid-column: auto;
  }

  .game-profile,
  .integration-rail {
    position: static;
  }

  .integration-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .app-shell {
    padding-right: 12px;
    padding-left: 12px;
  }

  .topbar {
    margin-right: -12px;
    margin-left: -12px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .page-heading h1 {
    font-size: 1.45rem;
  }

  .server-hero {
    gap: 18px;
    padding: 18px;
  }

  .server-copy h2 {
    font-size: 2.6rem;
  }

  .globe-wrap {
    min-height: 390px;
  }

  .whatsapp-connect-card,
  .integration-rail {
    padding: 18px;
  }

  .whatsapp-card-head {
    grid-template-columns: 44px 1fr;
  }

  .whatsapp-symbol {
    width: 44px;
    height: 44px;
  }

  .connection-state {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .link-code-panel {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .integration-actions > * {
    width: 100%;
  }
}

/* Sky Ai Inc clarity pass: stronger hierarchy and more breathing room */
.view.is-active {
  width: 100%;
}

.workspace-section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.workspace-section-head h2,
.workspace-section-head h3 {
  margin: 2px 0 0;
}

.section-index {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.09);
  color: #8be2ff;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.section-description {
  color: var(--ink-dim);
  font-size: 0.86rem;
  line-height: 1.6;
}

.game-layout {
  grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
  gap: 26px;
}

.game-profile {
  padding: 26px;
}

.game-profile h2 {
  max-width: 12ch;
  margin: 10px 0 14px;
  font-size: clamp(2rem, 3.2vw, 3.5rem);
  line-height: 1;
}

.game-profile p:not(.map-label) {
  margin-bottom: 22px;
  line-height: 1.65;
}

.game-head {
  min-height: 94px;
  padding: 22px 24px;
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(56, 189, 248, 0.045), transparent 44%),
    rgba(11, 15, 26, 0.7);
}

.game-head h2 {
  font-size: clamp(1.3rem, 2vw, 1.65rem);
}

.game-tool-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--edge-soft);
  border-radius: 12px;
  background: rgba(8, 12, 22, 0.72);
}

.game-tool-search label {
  display: grid;
  gap: 7px;
  color: var(--ink-dim);
  font-size: 0.78rem;
  font-weight: 700;
}

.game-tool-search button {
  min-height: 44px;
}

.fortnite-media-card {
  display: grid;
  gap: 14px;
}

.fortnite-media-card img {
  width: min(100%, 760px);
  max-height: 430px;
  object-fit: contain;
  border: 1px solid var(--edge-soft);
  border-radius: 10px;
  background: rgba(3, 6, 12, 0.78);
}

.fortnite-media-link {
  width: fit-content;
}

.game-main .result-grid,
.home-grid {
  gap: 18px;
  margin-top: 22px;
}

.service-list {
  gap: 10px;
}

.service-row {
  min-height: 56px;
  padding: 12px 14px;
  border-radius: 10px;
}

.service-main {
  gap: 11px;
}

.service-main strong {
  font-size: 0.84rem;
}

.service-main small {
  margin-top: 3px;
  line-height: 1.35;
}

.updates-board {
  gap: 18px;
  margin-top: 22px;
}

.update-card {
  min-height: 240px;
  padding: 22px;
  border-radius: 12px;
}

.social-layout {
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
}

.social-tabs {
  gap: 6px;
  margin: 16px 0 20px;
  padding: 5px;
  border: 1px solid var(--edge-soft);
  border-radius: 12px;
  background: rgba(5, 9, 16, 0.6);
}

.social-tab {
  min-height: 46px;
  border-radius: 8px;
}

.social-panel .social-grid.compact {
  gap: 16px;
}

.social-card {
  padding: 20px;
}

/* Sky AI workspace */
.ai-page {
  display: grid;
  gap: 24px;
}

.ai-overview {
  grid-template-columns: minmax(280px, 0.8fr) minmax(520px, 1.2fr);
  align-items: center;
  gap: 34px;
  padding: 30px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 16%, rgba(56, 189, 248, 0.12), transparent 34%),
    linear-gradient(140deg, rgba(13, 20, 34, 0.95), rgba(6, 10, 18, 0.96));
}

.ai-overview-copy h2 {
  margin: 8px 0 12px;
  font-size: clamp(2.4rem, 4vw, 4.1rem);
  letter-spacing: -0.05em;
}

.ai-overview-copy > p:not(.map-label) {
  max-width: 640px;
  color: var(--ink-dim);
  line-height: 1.65;
}

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

.ai-signal {
  min-height: 126px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 11px;
  background: rgba(3, 8, 15, 0.58);
}

.ai-signal span,
.ai-signal strong,
.ai-signal small {
  display: block;
}

.ai-signal span {
  color: var(--ink-faint);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-signal strong {
  margin: 14px 0 5px;
  color: #f1f8ff;
  font-size: 1rem;
}

.ai-signal small {
  color: var(--ink-dim);
  font-size: 0.74rem;
  line-height: 1.4;
}

.ai-signal.is-online {
  border-color: rgba(65, 240, 129, 0.26);
  background: rgba(23, 124, 82, 0.09);
}

.ai-signal.is-online strong {
  color: #78f4a5;
}

.ai-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.ai-quick-panel {
  position: sticky;
  top: 20px;
  gap: 20px;
  padding: 24px;
}

.ai-prompt-list {
  display: grid;
  gap: 10px;
}

.ai-prompt-list > button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 70px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  background: rgba(5, 10, 18, 0.66);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.ai-prompt-list > button:hover,
.ai-prompt-list > button:focus-visible {
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(10, 39, 57, 0.68);
  transform: translateX(3px);
  outline: none;
}

.ai-prompt-list strong,
.ai-prompt-list small {
  display: block;
}

.ai-prompt-list strong {
  font-size: 0.84rem;
}

.ai-prompt-list small {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 0.7rem;
  line-height: 1.35;
}

.prompt-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 9px;
  background: rgba(56, 189, 248, 0.08);
  color: #8be2ff;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.66rem;
  font-weight: 900;
}

.ai-privacy-note {
  padding: 16px;
  border: 1px solid rgba(65, 240, 129, 0.16);
  border-radius: 10px;
  background: rgba(65, 240, 129, 0.035);
}

.ai-privacy-note strong {
  color: #8ff7b2;
  font-size: 0.76rem;
}

.ai-privacy-note p {
  margin-top: 6px;
  color: var(--ink-faint);
  font-size: 0.72rem;
  line-height: 1.5;
}

.ai-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ai-legal-links button {
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid rgba(65, 240, 129, 0.22);
  border-radius: 7px;
  background: rgba(65, 240, 129, 0.05);
  color: #b8f9ce;
  font-size: 0.68rem;
  font-weight: 800;
}

.ai-legal-links button:hover,
.ai-legal-links button:focus-visible {
  border-color: rgba(56, 189, 248, 0.48);
  color: #a9ebff;
}

.ai-legal-center {
  display: grid;
  gap: 16px;
  padding: 22px;
}

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

.ai-legal-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  padding: 15px;
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.055), rgba(124, 92, 255, 0.025));
  color: var(--ink);
  text-align: left;
}

.ai-legal-card:hover,
.ai-legal-card:focus-visible {
  border-color: rgba(56, 189, 248, 0.52);
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.1), rgba(124, 92, 255, 0.055));
  transform: translateY(-1px);
}

.ai-legal-card strong,
.ai-legal-card small {
  display: block;
}

.ai-legal-card strong {
  font-size: 0.84rem;
}

.ai-legal-card small {
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 0.7rem;
  line-height: 1.4;
}

.ai-legal-card > span:last-child {
  color: #74dfff;
  font-size: 1.2rem;
}

.ai-main-panel {
  display: grid;
  gap: 18px;
}

.ai-composer-head {
  margin: 0;
}

.workspace-status,
.admin-access-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(65, 240, 129, 0.22);
  border-radius: 999px;
  background: rgba(65, 240, 129, 0.06);
  color: #9cf8bb;
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.workspace-status .dot,
.admin-access-badge .dot {
  background: var(--good);
  box-shadow: 0 0 10px rgba(65, 240, 129, 0.45);
}

.ai-composer {
  gap: 20px;
  margin: 0;
  padding: 24px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.06), transparent 34%),
    linear-gradient(180deg, rgba(14, 20, 34, 0.84), rgba(6, 8, 15, 0.9));
}

.ai-prompt-field > span {
  color: #dcecff;
  font-size: 0.78rem;
  font-weight: 850;
}

.ai-prompt-field textarea {
  min-height: 172px;
  padding: 18px;
  border-color: rgba(56, 189, 248, 0.2);
  background: rgba(2, 6, 12, 0.72);
  font-size: 0.95rem;
  line-height: 1.6;
}

.ai-prompt-field textarea:focus {
  border-color: rgba(56, 189, 248, 0.58);
  outline: 2px solid rgba(56, 189, 248, 0.1);
  outline-offset: 2px;
}

.ai-composer-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.72fr);
  gap: 12px;
}

.ai-web-toggle {
  min-height: 72px;
  padding: 14px;
  border-radius: 10px;
}

.ai-compose-hint {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 72px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  background: rgba(5, 10, 18, 0.58);
}

.ai-compose-hint span {
  padding: 3px 6px;
  border-radius: 5px;
  background: rgba(255, 191, 63, 0.1);
  color: #ffd27d;
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ai-compose-hint p {
  color: var(--ink-faint);
  font-size: 0.72rem;
  line-height: 1.45;
}

.ai-compose-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ai-visible-tools {
  justify-content: flex-start;
}

.ai-submit-button {
  min-width: 170px;
  min-height: 46px;
}

.ai-conversation {
  display: grid;
  gap: 4px;
  padding: 22px;
  border: 1px solid var(--edge-soft);
  border-radius: 12px;
  background: rgba(7, 11, 19, 0.7);
}

.ai-conversation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.ai-conversation-head > small {
  color: var(--ink-faint);
  font-size: 0.72rem;
}

.ai-conversation .result-grid {
  gap: 14px;
  margin-top: 18px;
}

.ai-turn {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 11px;
}

.ai-turn-user {
  margin-left: min(90px, 8vw);
  border-color: rgba(56, 189, 248, 0.28);
  background: linear-gradient(145deg, rgba(11, 40, 59, 0.86), rgba(7, 13, 23, 0.94));
}

.ai-turn-assistant {
  margin-right: min(54px, 5vw);
}

.ai-empty-state {
  min-height: auto !important;
  margin-right: 0;
}

.ai-turn-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-turn-head h3 {
  margin: 2px 0 0;
  font-size: 0.96rem;
}

.ai-turn-head div > span {
  color: var(--ink-faint);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ai-turn-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.09);
  color: #9ee8ff;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.65rem;
  font-weight: 900;
}

.ai-turn-user .ai-turn-avatar {
  border-color: rgba(65, 240, 129, 0.28);
  background: rgba(65, 240, 129, 0.08);
  color: #8ff7b2;
}

/* Admin command center */
.admin-page {
  display: grid;
  gap: 26px;
}

.admin-command-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  padding: 30px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 12%, rgba(56, 189, 248, 0.1), transparent 32%),
    linear-gradient(140deg, rgba(13, 20, 34, 0.95), rgba(6, 10, 18, 0.96));
}

.admin-command-copy h2 {
  margin: 8px 0 10px;
  font-size: clamp(2rem, 3.6vw, 3.5rem);
  letter-spacing: -0.045em;
}

.admin-command-copy > p:not(.map-label) {
  max-width: 680px;
  color: var(--ink-dim);
  line-height: 1.65;
}

.admin-command-actions {
  display: grid;
  justify-items: end;
  gap: 16px;
}

.admin-overview-section {
  display: grid;
  gap: 16px;
}

.admin-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.admin-metric {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 13px;
  min-height: 132px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 12px;
  background: linear-gradient(155deg, rgba(13, 20, 34, 0.88), rgba(5, 9, 16, 0.94));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
}

.admin-metric-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.08);
  color: #8be2ff;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.66rem;
  font-weight: 900;
}

.admin-metric-copy span,
.admin-metric-copy strong,
.admin-metric-copy small {
  display: block;
}

.admin-metric-copy span {
  color: var(--ink-dim);
  font-size: 0.72rem;
  font-weight: 800;
}

.admin-metric-copy strong {
  margin: 7px 0 4px;
  color: #f2f8ff;
  font-size: 1.65rem;
  line-height: 1;
  overflow-wrap: anywhere;
}

.admin-metric-copy small {
  color: var(--ink-faint);
  font-size: 0.67rem;
  line-height: 1.35;
}

.admin-metric-green,
.admin-metric-warn {
  border-color: rgba(65, 240, 129, 0.2);
}

.admin-metric-green .admin-metric-icon {
  border-color: rgba(65, 240, 129, 0.28);
  background: rgba(65, 240, 129, 0.08);
  color: #8ff7b2;
}

.admin-metric-warn {
  border-color: rgba(255, 191, 63, 0.28);
}

.admin-metric-warn .admin-metric-icon {
  border-color: rgba(255, 191, 63, 0.34);
  background: rgba(255, 191, 63, 0.08);
  color: #ffd27d;
}

.admin-metric-violet .admin-metric-icon {
  border-color: rgba(167, 139, 250, 0.3);
  background: rgba(167, 139, 250, 0.08);
  color: #c9b8ff;
}

.admin-metric-slate .admin-metric-icon {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(148, 163, 184, 0.07);
  color: #bdc7d7;
}

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

.admin-card {
  min-height: 300px;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.admin-card-users,
.admin-card-messages {
  grid-column: span 7;
}

.admin-card-groups,
.admin-card-reports {
  grid-column: span 5;
}

.admin-card-reports {
  border-color: rgba(255, 191, 63, 0.18);
}

.admin-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(8, 14, 24, 0.72);
}

.admin-card-head h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.admin-card-head p {
  color: var(--ink-faint);
  font-size: 0.72rem;
  line-height: 1.4;
}

.admin-card-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.07);
  color: #8be2ff;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.66rem;
  font-weight: 900;
}

.admin-card-reports .admin-card-icon {
  border-color: rgba(255, 191, 63, 0.32);
  background: rgba(255, 191, 63, 0.08);
  color: #ffd27d;
}

.admin-card .service-list {
  max-height: 430px;
  padding: 16px;
  overflow: auto;
}

.admin-card .service-row {
  min-height: 64px;
  padding: 13px 14px;
}

@media (max-width: 1280px) {
  .ai-overview {
    grid-template-columns: 1fr;
  }

  .admin-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .ai-workspace {
    grid-template-columns: 1fr;
  }

  .ai-quick-panel {
    position: static;
  }

  .ai-prompt-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-content-grid {
    grid-template-columns: 1fr;
  }

  .admin-card-users,
  .admin-card-messages,
  .admin-card-groups,
  .admin-card-reports {
    grid-column: auto;
  }
}

@media (max-width: 900px) {
  .game-layout,
  .social-layout {
    grid-template-columns: 1fr;
  }

  .game-profile {
    position: static;
  }

  .admin-command-card {
    grid-template-columns: 1fr;
  }

  .admin-command-actions {
    justify-items: start;
  }

  .admin-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-signal-grid,
  .ai-composer-options,
  .ai-legal-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .game-head,
  .ai-conversation-head,
  .ai-compose-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .ai-overview,
  .ai-quick-panel,
  .ai-composer,
  .ai-conversation,
  .ai-legal-center,
  .admin-command-card {
    padding: 18px;
  }

  .legal-dialog {
    width: calc(100vw - 14px);
    max-height: calc(100dvh - 14px);
    border-radius: 10px;
  }

  .legal-dialog-card {
    max-height: calc(100dvh - 14px);
  }

  .legal-dialog-head,
  .legal-dialog-footer {
    padding: 14px 15px;
  }

  .legal-document {
    padding: 15px;
  }

  .legal-dialog-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .legal-dialog-footer button {
    width: 100%;
  }

  .ai-prompt-list,
  .admin-summary {
    grid-template-columns: 1fr;
  }

  .ai-visible-tools,
  .ai-submit-button,
  .admin-command-actions,
  .admin-command-actions .button-row,
  .admin-command-actions button {
    width: 100%;
  }

  .ai-visible-tools > *,
  .ai-submit-button {
    flex: 1 1 100%;
  }

  .ai-actions-menu,
  .ai-plus-button {
    width: 100%;
  }

  .ai-tool-menu {
    right: auto;
    left: 0;
  }

  .ai-turn-user,
  .ai-turn-assistant {
    margin-right: 0;
    margin-left: 0;
  }
}

/* Unified Sky Ai Inc app */
body::before {
  animation-duration: 28s;
  filter: brightness(1.22) contrast(1.14);
}

body::after {
  opacity: .2;
  animation: sky-night-twinkle 3.8s ease-in-out infinite alternate, sky-night-pan 34s linear infinite;
}

::view-transition-old(root) {
  animation: sky-view-out 180ms cubic-bezier(.4, 0, 1, 1) both;
}

::view-transition-new(root) {
  animation: sky-view-in 320ms cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes sky-view-out {
  to { opacity: 0; transform: translateY(-5px) scale(.994); filter: blur(3px); }
}

@keyframes sky-view-in {
  from { opacity: 0; transform: translateY(12px) scale(.992); filter: blur(5px); }
}

.nav-live-dot {
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-radius: 999px;
  background: var(--good);
  box-shadow: 0 0 0 0 rgba(65, 240, 129, .55);
  animation: sky-presence 1.8s ease-out infinite;
}

.tab .unread-badge {
  min-width: 21px;
  margin-left: auto;
  padding: 3px 6px;
  border-radius: 999px;
  background: #21ccf4;
  color: #031018;
  font-size: .64rem;
  line-height: 1.35;
  text-align: center;
}

.game-fn { color: #9cf3ff; }
.game-ap { color: #ff967f; }
.game-r6 { color: #d6e3ff; }

@keyframes sky-presence {
  70% { box-shadow: 0 0 0 8px rgba(65, 240, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(65, 240, 129, 0); }
}

.unified-home {
  display: grid;
  gap: 28px;
  max-width: 1240px;
}

.app-shell { grid-template-rows: auto minmax(0, 1fr); }
.status-strip { display: none; }
.view { grid-row: 2; }
.ai-history-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.ai-history-actions small { color: var(--ink-faint); }

.unified-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  align-items: center;
  min-height: 310px;
  padding: clamp(28px, 5vw, 58px);
  overflow: hidden;
  border-color: rgba(84, 211, 255, .2);
  background:
    radial-gradient(circle at 82% 48%, rgba(56, 189, 248, .2), transparent 24%),
    linear-gradient(132deg, rgba(10, 18, 34, .96), rgba(4, 8, 17, .9));
}

.unified-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: url("/assets/sky-night-stars-v1.jpg") center / 680px auto repeat;
  opacity: .24;
  mix-blend-mode: screen;
  animation: sky-night-pan 22s linear infinite;
}

.unified-hero-copy,
.unified-orbit {
  position: relative;
  z-index: 1;
}

.unified-hero h2 {
  margin: 8px 0 12px;
  color: #f5fbff;
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  line-height: .96;
  letter-spacing: -.065em;
}

.unified-hero-copy > p:not(.eyebrow) {
  max-width: 650px;
  color: #a9bad0;
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  line-height: 1.65;
}

.unified-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.unified-orbit {
  display: grid;
  width: 190px;
  height: 190px;
  place-items: center;
  justify-self: end;
}

.unified-orbit img {
  position: relative;
  z-index: 2;
  width: 104px;
  height: 104px;
  border-radius: 24px;
  box-shadow: 0 0 44px rgba(70, 210, 255, .2), 0 24px 55px rgba(0, 0, 0, .42);
}

.unified-orbit::before,
.unified-orbit::after,
.unified-orbit i {
  content: "";
  position: absolute;
  border: 1px solid rgba(109, 221, 255, .2);
  border-radius: 50%;
}

.unified-orbit::before { inset: 9px; animation: orbit-spin 8s linear infinite; }
.unified-orbit::after { inset: 29px; border-style: dashed; animation: orbit-spin 5s linear infinite reverse; }
.unified-orbit i:nth-of-type(1) { width: 8px; height: 8px; top: 10px; left: 50%; background: #fff; box-shadow: 0 0 14px #8eeaff; }
.unified-orbit i:nth-of-type(2) { width: 5px; height: 5px; right: 17px; bottom: 42px; background: #6ddcff; box-shadow: 0 0 12px #6ddcff; }
.unified-orbit i:nth-of-type(3) { width: 4px; height: 4px; left: 23px; bottom: 54px; background: #fff; box-shadow: 0 0 10px #fff; }

@keyframes orbit-spin { to { transform: rotate(360deg); } }

.unified-section { display: grid; gap: 15px; }
.unified-section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.unified-section-head h2 { margin: 4px 0 0; font-size: clamp(1.35rem, 2.2vw, 1.85rem); }
.live-pill { display: inline-flex; align-items: center; gap: 8px; color: #bdf9cf; font-size: .75rem; font-weight: 800; }
.live-pill .dot { background: var(--good); box-shadow: 0 0 12px rgba(65, 240, 129, .65); animation: sky-presence 1.8s ease-out infinite; }

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

.unified-action {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  min-height: 92px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, .13);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(13, 20, 35, .9), rgba(5, 9, 17, .9));
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 220ms cubic-bezier(.16, 1, .3, 1), border-color 220ms ease, box-shadow 220ms ease;
}

.unified-action:hover { transform: translateY(-4px); border-color: rgba(76, 208, 255, .34); box-shadow: 0 18px 38px rgba(0, 0, 0, .28); }
.unified-action-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 12px; background: rgba(56, 189, 248, .1); color: #8ce7ff; font: 900 .72rem ui-monospace, monospace; }
.unified-action strong, .unified-action small { display: block; }
.unified-action strong { font-size: .94rem; }
.unified-action small { margin-top: 5px; color: var(--ink-faint); font-size: .7rem; line-height: 1.35; }
.unified-action b { color: #5c6b84; font-size: 1.4rem; }
.unified-action.is-chat .unified-action-icon { background: rgba(65, 240, 129, .09); color: #8ff7b2; }
.unified-action.is-ai .unified-action-icon { background: rgba(167, 139, 250, .1); color: #d0c1ff; }
.unified-action.is-updates .unified-action-icon { background: rgba(255, 191, 63, .09); color: #ffd47b; }

.unified-games-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.unified-game { position: relative; display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 15px; align-items: end; min-height: 170px; padding: 22px; overflow: hidden; border: 1px solid rgba(148, 163, 184, .15); border-radius: 15px; background: #0b111d; color: #eef7ff; text-align: left; cursor: pointer; transition: transform 240ms cubic-bezier(.16, 1, .3, 1), border-color 240ms ease; }
.unified-game::before { content: ""; position: absolute; inset: 0; opacity: .8; transition: transform 500ms cubic-bezier(.16, 1, .3, 1); }
.unified-game.is-fortnite::before { background: radial-gradient(circle at 84% 5%, rgba(30, 210, 255, .36), transparent 40%), linear-gradient(145deg, rgba(21, 87, 135, .3), transparent 65%); }
.unified-game.is-apex::before { background: radial-gradient(circle at 84% 5%, rgba(255, 92, 70, .3), transparent 40%), linear-gradient(145deg, rgba(124, 32, 29, .3), transparent 65%); }
.unified-game.is-r6::before { background: radial-gradient(circle at 84% 5%, rgba(158, 183, 221, .24), transparent 40%), linear-gradient(145deg, rgba(39, 53, 77, .4), transparent 65%); }
.unified-game:hover { transform: translateY(-5px); border-color: rgba(124, 220, 255, .38); }
.unified-game:hover::before { transform: scale(1.08); }
.unified-game > * { position: relative; z-index: 1; }
.unified-game > span { display: grid; width: 54px; height: 54px; place-items: center; border: 1px solid rgba(255,255,255,.14); border-radius: 13px; background: rgba(4, 9, 18, .72); font: 900 .82rem ui-monospace, monospace; }
.unified-game small, .unified-game strong { display: block; }
.unified-game small { margin-bottom: 7px; color: #8f9db3; font-size: .68rem; }
.unified-game strong { font-size: 1.14rem; }
.unified-game b { color: #b9c9dd; font-size: .72rem; }

/* Messaging is the main working surface */
#social .social-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 18px; }
#social .game-main { min-height: 650px; border: 1px solid rgba(148, 163, 184, .12); border-radius: 15px; background: rgba(5, 9, 17, .72); box-shadow: 0 24px 55px rgba(0,0,0,.24); }
#social .social-tabs { padding-inline: 18px; }
#social .social-panels { padding: 0 18px 18px; }
#social .chat-card { min-height: 510px; }
#social .chat-log { background: radial-gradient(circle at 50% 100%, rgba(56, 189, 248, .07), transparent 45%), rgba(3, 7, 14, .72); }
#social .chat-form { position: sticky; bottom: 0; padding: 11px; border-top: 1px solid rgba(148, 163, 184, .11); background: rgba(7, 12, 21, .94); backdrop-filter: blur(18px); }

@media (max-width: 1060px) {
  .unified-actions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .unified-games-grid { grid-template-columns: 1fr; }
  .unified-game { min-height: 125px; }
}

@media (max-width: 760px) {
  .unified-home { gap: 22px; }
  .unified-hero { grid-template-columns: 1fr; min-height: 330px; padding: 27px 21px; }
  .unified-orbit { position: absolute; top: 20px; right: -35px; width: 145px; height: 145px; opacity: .72; }
  .unified-orbit img { width: 76px; height: 76px; border-radius: 18px; }
  .unified-hero-copy { padding-top: 112px; }
  .unified-hero h2 { font-size: clamp(2.5rem, 14vw, 4.2rem); }
  .unified-actions-grid { grid-template-columns: 1fr; }
  .unified-action { min-height: 82px; }
  .unified-section-head { align-items: flex-start; }
  #social .social-layout { grid-template-columns: 1fr; }
  #social .game-profile { display: none; }
  #social .game-main { min-height: calc(100dvh - 185px); }
  .ai-history-actions { width: 100%; align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-live-dot, .live-pill .dot, .unified-hero::before, .unified-orbit::before, .unified-orbit::after { animation: none; }
  .unified-action, .unified-game, .unified-game::before { transition: none; }
}

/* Sky Command Center */
.control-center-page {
  display: grid;
  gap: 18px;
  padding-bottom: 36px;
}

.control-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 116px;
  padding: 22px 24px;
  border-color: rgba(56, 189, 248, 0.22);
  background:
    radial-gradient(circle at 88% 15%, rgba(56, 189, 248, 0.12), transparent 31%),
    linear-gradient(135deg, rgba(8, 19, 33, 0.96), rgba(5, 9, 17, 0.95));
}

.control-hero h2 {
  margin: 4px 0 8px;
  font-size: clamp(1.65rem, 2.5vw, 2.2rem);
}

.control-hero p:not(.map-label) {
  max-width: 710px;
  color: var(--ink-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.control-hero-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  flex-direction: column;
  gap: 9px;
}

.control-last-updated {
  color: var(--ink-faint);
  font-size: 0.75rem;
  font-weight: 750;
}

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

.control-metric {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  min-height: 98px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 12px;
  background: rgba(6, 12, 22, 0.86);
}

.control-metric > span,
.control-empty > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.08);
  color: #7ddfff;
  font: 900 0.68rem ui-monospace, "Cascadia Mono", Consolas, monospace;
}

.control-metric small,
.control-metric strong,
.control-metric p {
  display: block;
}

.control-metric small { color: var(--ink-faint); font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.control-metric strong { margin-top: 4px; color: #f4f9ff; font-size: 1.18rem; }
.control-metric p { margin-top: 4px; color: var(--ink-faint); font-size: 0.74rem; }
.control-metric.is-violet > span { border-color: rgba(168, 85, 247, 0.28); background: rgba(168, 85, 247, 0.09); color: #c9a7ff; }
.control-metric.is-green { border-color: rgba(65, 240, 129, 0.22); background: linear-gradient(145deg, rgba(8, 64, 37, 0.2), rgba(8, 17, 30, 0.94)); }
.control-metric.is-green > span { border-color: rgba(65, 240, 129, 0.28); background: rgba(65, 240, 129, 0.08); color: #8ff7b2; }
.control-metric.is-green strong { color: #8ff7b2; }
.control-metric.is-warn > span { border-color: rgba(255, 191, 63, 0.28); background: rgba(255, 191, 63, 0.08); color: #ffd77d; }
.control-metric.is-bad { border-color: rgba(251, 113, 133, 0.24); background: linear-gradient(145deg, rgba(70, 13, 28, 0.2), rgba(8, 17, 30, 0.94)); }
.control-metric.is-bad > span { border-color: rgba(251, 113, 133, 0.42); background: rgba(251, 113, 133, 0.11); color: #ff8da1; box-shadow: 0 0 18px rgba(251, 113, 133, 0.1); }
.control-metric.is-bad strong { color: #ff9cad; }

.control-quick-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.control-quick-nav button {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 2px 10px;
  align-items: center;
  min-height: 68px;
  padding: 11px 13px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 11px;
  background: rgba(6, 12, 22, 0.78);
  color: inherit;
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.control-quick-nav button:hover,
.control-quick-nav button:focus-visible {
  border-color: rgba(56, 189, 248, 0.38);
  background: rgba(8, 31, 47, 0.64);
  transform: translateY(-1px);
}

.control-quick-nav span {
  display: grid;
  grid-row: 1 / 3;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(56, 189, 248, 0.09);
  color: #82e5ff;
  font: 900 0.67rem ui-monospace, "Cascadia Mono", Consolas, monospace;
}

.control-quick-nav strong,
.control-quick-nav small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-quick-nav strong { color: #eef8ff; font-size: 0.82rem; }
.control-quick-nav small { color: var(--ink-faint); font-size: 0.72rem; }

.control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.control-card {
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 290px;
  padding: 24px;
}

.control-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.control-card-head h3 { margin: 4px 0 6px; font-size: 1.12rem; }
.control-card-head p:not(.eyebrow) { color: var(--ink-faint); font-size: 0.72rem; line-height: 1.5; }
.control-chip { padding: 6px 9px; border-radius: 999px; background: rgba(56, 189, 248, 0.09); color: #84e6ff; font-size: 0.64rem; font-weight: 900; white-space: nowrap; }
.control-chip.is-danger { background: rgba(251, 113, 133, 0.1); color: #fda4af; }

.control-form,
.control-field {
  display: grid;
  gap: 8px;
}

.control-field > span { color: var(--ink-muted); font-size: 0.69rem; font-weight: 800; }
.control-field-row { display: grid; grid-template-columns: minmax(150px, 0.55fr) minmax(0, 1fr); gap: 10px; }
.control-form textarea { min-height: 96px; resize: vertical; }

.control-section {
  display: grid;
  gap: 16px;
  padding-top: 4px;
  min-width: 0;
  scroll-margin-top: 18px;
  content-visibility: auto;
  contain-intrinsic-size: 1px 680px;
}

.control-workspace-head { align-items: end; }
.control-filters { display: flex; gap: 6px; margin-left: auto; }
.control-filter { min-height: 34px; padding: 7px 11px; border: 1px solid rgba(148, 163, 184, 0.14); border-radius: 8px; background: rgba(5, 10, 18, 0.65); color: var(--ink-faint); font-size: 0.68rem; font-weight: 800; }
.control-filter.is-active { border-color: rgba(56, 189, 248, 0.36); background: rgba(56, 189, 248, 0.09); color: #a6ecff; }

.control-request-list { display: grid; gap: 10px; }
.control-target-layout { display: grid; grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr); gap: 16px; align-items: start; }
.control-target-directory,
.control-target-detail { min-height: 360px; padding: 16px; }

.control-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 120px;
  padding: 20px;
  border: 1px dashed rgba(148, 163, 184, 0.16);
  border-radius: 11px;
  background: rgba(4, 9, 16, 0.38);
}

.control-empty strong { color: #eaf4ff; font-size: 0.84rem; }
.control-empty p { margin-top: 5px; color: var(--ink-faint); font-size: 0.7rem; line-height: 1.45; }
.control-empty.compact { min-height: 90px; }
.control-danger-card { border-color: rgba(251, 113, 133, 0.18); background: rgba(22, 8, 14, 0.5); }
.control-danger-card > p { color: var(--ink-muted); font-size: 0.76rem; line-height: 1.55; }

.control-request-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 108px;
  padding: 18px;
}

.control-request-card.is-bad { border-color: rgba(251, 113, 133, 0.24); }
.control-request-platform,
.control-target-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.08);
  color: #82e5ff;
  font: 900 0.66rem ui-monospace, "Cascadia Mono", Consolas, monospace;
}

.control-request-platform.is-discord,
.control-target-icon.is-discord { border-color: rgba(168, 85, 247, 0.3); background: rgba(168, 85, 247, 0.09); color: #ceb0ff; }
.control-request-title { display: flex; align-items: center; gap: 10px; }
.control-request-title h3 { font-size: 0.98rem; }
.control-request-copy > p { margin-top: 6px; color: var(--ink-faint); font-size: 0.7rem; }
.control-request-checks { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.control-name-check { display: inline-flex; margin-top: 9px; font-size: 0.66rem; font-weight: 800; }
.control-name-check.is-safe { color: #86f5ad; }
.control-name-check.is-blocked { color: #fda4af; }
.control-consent-check { display: inline-flex; margin-top: 9px; font-size: 0.66rem; font-weight: 800; }
.control-consent-check.is-safe,
.control-detail-consent.is-safe { color: #86f5ad; }
.control-consent-check.is-waiting,
.control-detail-consent.is-waiting { color: #ffd77d; }
.control-detail-consent { margin-top: 7px; font-size: 0.68rem; font-weight: 800; }
.control-request-actions { display: flex; gap: 8px; }
.control-status { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 8px; border-radius: 999px; font-size: 0.62rem; font-weight: 900; white-space: nowrap; }
.control-status.is-good { background: rgba(65, 240, 129, 0.09); color: #8ff7b2; }
.control-status.is-bad { background: rgba(251, 113, 133, 0.1); color: #fda4af; }
.control-status.is-warn { background: rgba(255, 191, 63, 0.09); color: #ffd77d; }
.control-status.is-neutral { background: rgba(148, 163, 184, 0.08); color: var(--ink-faint); }

.control-target-directory { display: grid; align-content: start; gap: 7px; }
.control-target-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 72px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(4, 9, 17, 0.5);
  color: inherit;
  text-align: left;
}
.control-target-row:hover,
.control-target-row.is-active { border-color: rgba(56, 189, 248, 0.28); background: rgba(8, 31, 47, 0.58); }
.control-target-copy strong,
.control-target-copy small { display: block; }
.control-target-copy strong { color: #edf7ff; font-size: 0.8rem; }
.control-target-copy small { margin-top: 5px; color: var(--ink-faint); font-size: 0.64rem; }

.control-target-detail { display: grid; align-content: start; gap: 20px; }
.control-detail-head,
.control-detail-access,
.control-feature-heading,
.control-detail-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.control-detail-head { padding: 8px 8px 18px; border-bottom: 1px solid rgba(148, 163, 184, 0.11); }
.control-detail-head h3 { margin: 5px 0; font-size: 1.2rem; }
.control-detail-head p:not(.eyebrow),
.control-detail-access p,
.control-feature-heading p { color: var(--ink-faint); font-size: 0.69rem; line-height: 1.45; }
.control-detail-access { padding: 0 8px 18px; border-bottom: 1px solid rgba(148, 163, 184, 0.1); }
.control-name-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.68fr) minmax(320px, 1.32fr);
  gap: 12px 18px;
  align-items: end;
  padding: 0 8px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}
.control-name-form p { margin-top: 5px; color: var(--ink-faint); font-size: 0.67rem; line-height: 1.45; }
.control-name-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
.control-name-form .integration-message { grid-column: 1 / -1; margin: 0; }
.control-feature-form { display: grid; gap: 16px; padding: 0 8px 8px; }
.control-moderation-clear {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 18px;
  align-items: center;
  margin: 10px 8px 0;
  padding: 15px;
  border: 1px solid rgba(65, 240, 129, 0.2);
  border-radius: 9px;
  background: rgba(65, 240, 129, 0.055);
}
.control-moderation-clear strong { color: #eafff2; font-size: 0.78rem; }
.control-moderation-clear p:not(.integration-message) { margin-top: 5px; color: var(--ink-faint); font-size: 0.66rem; line-height: 1.5; }
.control-moderation-clear .integration-message { grid-column: 1 / -1; margin: 0; }
.control-moderation-clear button { border-color: rgba(65, 240, 129, 0.35); color: #9affbd; }
.control-feature-heading > span { color: #82e5ff; font-size: 0.68rem; font-weight: 900; }
.control-feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.control-feature-toggle { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; min-height: 72px; align-items: start; padding: 12px; border: 1px solid rgba(148, 163, 184, 0.13); border-radius: 9px; background: rgba(4, 9, 16, 0.48); cursor: pointer; }
.control-feature-toggle:has(input:checked) { border-color: rgba(56, 189, 248, 0.3); background: rgba(8, 32, 48, 0.54); }
.control-feature-toggle input { width: 19px; height: 19px; min-height: 0; margin: 1px 0 0; accent-color: var(--accent); }
.control-feature-toggle strong,
.control-feature-toggle small { display: block; }
.control-feature-toggle strong { color: #edf7ff; font-size: 0.74rem; }
.control-feature-toggle small { margin-top: 5px; color: var(--ink-faint); font-size: 0.62rem; line-height: 1.35; }
.control-detail-footer { min-height: 48px; }
.control-detail-footer .integration-message { margin: 0; }

.control-superadmin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.control-superadmin-grid .control-card { min-height: 0; }
.control-card code { color: #98eaff; font: inherit; font-weight: 850; }
.control-command-card { grid-column: 1 / -1; }
.control-global-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.control-global-feature { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 11px; align-items: center; min-height: 68px; padding: 11px 12px; border: 1px solid rgba(65, 240, 129, 0.22); border-radius: 10px; background: rgba(65, 240, 129, 0.055); color: inherit; text-align: left; }
.control-global-feature:hover { border-color: rgba(56, 189, 248, 0.38); background: rgba(8, 32, 48, 0.58); }
.control-global-feature.is-off { border-color: rgba(251, 113, 133, 0.24); background: rgba(61, 12, 25, 0.24); }
.control-global-feature:disabled { opacity: 0.58; cursor: wait; }
.control-global-feature > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: rgba(56, 189, 248, 0.1); color: #8be6ff; font: 900 0.67rem ui-monospace, "Cascadia Mono", Consolas, monospace; }
.control-global-feature strong,
.control-global-feature small { display: block; }
.control-global-feature strong { color: #edf8ff; font-size: 0.78rem; }
.control-global-feature small { margin-top: 4px; color: var(--ink-faint); font-size: 0.68rem; }
.control-global-feature b { color: #91f7b5; font-size: 0.68rem; }
.control-global-feature.is-off b { color: #fda4af; }
.control-command-toolbar { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.5fr); gap: 10px; }
.control-command-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.control-command-summary button { min-width: 0; min-height: 58px; padding: 9px 10px; border: 1px solid rgba(148, 163, 184, 0.12); border-radius: 8px; background: rgba(4, 9, 16, 0.48); color: inherit; text-align: left; }
.control-command-summary button:hover,
.control-command-summary button.is-active { border-color: rgba(56, 189, 248, 0.34); background: rgba(8, 32, 48, 0.62); }
.control-command-summary button.has-off { border-color: rgba(251, 113, 133, 0.22); }
.control-command-summary strong,
.control-command-summary span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.control-command-summary strong { color: #eaf7ff; font-size: 0.68rem; }
.control-command-summary span { margin-top: 5px; color: var(--ink-faint); font-size: 0.59rem; }
.control-command-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; max-height: 420px; overflow-y: auto; padding-right: 6px; scrollbar-gutter: stable; overscroll-behavior: contain; }
.control-command-row { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 62px; padding: 10px 11px; border: 1px solid rgba(148, 163, 184, 0.12); border-radius: 9px; background: rgba(4, 9, 16, 0.48); }
.control-command-row.is-off { border-color: rgba(251, 113, 133, 0.18); background: rgba(38, 10, 20, 0.24); }
.control-command-indicator { width: 8px; height: 8px; border-radius: 50%; background: #41f081; box-shadow: 0 0 9px rgba(65, 240, 129, 0.42); }
.control-command-row.is-off .control-command-indicator { background: #fb7185; box-shadow: 0 0 9px rgba(251, 113, 133, 0.42); }
.control-command-row strong,
.control-command-row small { display: block; }
.control-command-row strong { color: #edf7ff; font: 850 0.72rem ui-monospace, "Cascadia Mono", Consolas, monospace; }
.control-command-row small { margin-top: 4px; color: var(--ink-faint); font-size: 0.59rem; }
.control-command-toggle { min-width: 64px; min-height: 34px; padding: 5px 11px; border: 1px solid rgba(65, 240, 129, 0.3); border-radius: 999px; background: rgba(65, 240, 129, 0.08); color: #8ff7b2; font-size: 0.64rem; font-weight: 900; }
.control-command-toggle.is-off { border-color: rgba(251, 113, 133, 0.3); background: rgba(251, 113, 133, 0.08); color: #fda4af; }
.control-update-status { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.control-update-status > div { min-height: 80px; padding: 12px; border: 1px solid rgba(148, 163, 184, 0.12); border-radius: 9px; background: rgba(4, 9, 16, 0.46); }
.control-update-status > div.is-good { border-color: rgba(65, 240, 129, 0.2); }
.control-update-status > div.is-bad { border-color: rgba(251, 113, 133, 0.24); }
.control-update-status small,
.control-update-status strong,
.control-update-status span { display: block; }
.control-update-status small { color: var(--ink-faint); font-size: 0.58rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.07em; }
.control-update-status strong { margin-top: 6px; overflow: hidden; color: #eaf7ff; font-size: 0.78rem; text-overflow: ellipsis; white-space: nowrap; }
.control-update-status span { margin-top: 5px; color: var(--ink-faint); font-size: 0.59rem; }
.control-disabled-commands { min-height: 76px; }
.control-disabled-commands > p { margin-bottom: 8px; color: var(--ink-faint); font-size: 0.64rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; }
.control-disabled-commands > div:not(.control-empty) { display: flex; flex-wrap: wrap; gap: 7px; }
.control-disabled-commands button { padding: 7px 9px; border: 1px solid rgba(251, 113, 133, 0.18); border-radius: 7px; background: rgba(251, 113, 133, 0.06); color: #fda4af; font: 800 0.66rem ui-monospace, "Cascadia Mono", Consolas, monospace; }
.control-system-snapshot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.control-system-snapshot > div { min-height: 92px; padding: 13px; border: 1px solid rgba(148, 163, 184, 0.12); border-radius: 9px; background: rgba(4, 9, 16, 0.46); }
.control-system-snapshot small,
.control-system-snapshot strong,
.control-system-snapshot span { display: block; }
.control-system-snapshot small { color: var(--ink-faint); font-size: 0.61rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; }
.control-system-snapshot strong { margin-top: 7px; overflow: hidden; color: #eaf7ff; font-size: 0.82rem; text-overflow: ellipsis; white-space: nowrap; }
.control-system-snapshot span { margin-top: 6px; color: var(--ink-faint); font-size: 0.62rem; }
.control-diagnostics-list,
.control-usage-list,
.control-contact-list { scrollbar-gutter: stable; }
.control-diagnostics-list { display: grid; gap: 6px; }
.control-diagnostics-head { display: flex; justify-content: space-between; color: var(--ink-faint); font-size: 0.62rem; }
.control-diagnostic-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 9px; align-items: center; min-height: 36px; padding: 7px 9px; border-radius: 7px; background: rgba(4, 9, 16, 0.46); }
.control-diagnostic-row > span { width: 7px; height: 7px; border-radius: 50%; background: #41f081; box-shadow: 0 0 9px rgba(65, 240, 129, 0.4); }
.control-diagnostic-row.is-bad > span { background: #fb7185; box-shadow: 0 0 9px rgba(251, 113, 133, 0.4); }
.control-diagnostic-row strong { color: #dcecff; font-size: 0.68rem; }
.control-diagnostic-row small { max-width: 180px; overflow: hidden; color: var(--ink-faint); font-size: 0.61rem; text-overflow: ellipsis; white-space: nowrap; }
.control-usage-list { display: grid; align-content: start; max-height: 350px; overflow-y: auto; }
.control-usage-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 11px; align-items: center; min-height: 58px; padding: 9px 6px; border-bottom: 1px solid rgba(148, 163, 184, 0.09); }
.control-usage-row > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: rgba(56, 189, 248, 0.08); color: #82e5ff; font-size: 0.63rem; font-weight: 900; }
.control-usage-row strong,
.control-usage-row small { display: block; }
.control-usage-row strong { color: #edf7ff; font: 850 0.72rem ui-monospace, "Cascadia Mono", Consolas, monospace; }
.control-usage-row small { margin-top: 4px; color: var(--ink-faint); font-size: 0.61rem; }
.control-usage-row b { color: #b5eeff; font-size: 0.75rem; }
.control-contact-list { display: grid; align-content: start; gap: 7px; max-height: 355px; overflow-y: auto; padding-right: 5px; }
.control-registered-user-list { display: grid; align-content: start; gap: 7px; max-height: 390px; overflow-y: auto; padding-right: 5px; scrollbar-gutter: stable; }
.control-registered-user-row { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 11px; align-items: center; min-height: 76px; padding: 11px; border: 1px solid rgba(148, 163, 184, 0.12); border-radius: 9px; background: rgba(4, 9, 16, 0.46); }
.control-registered-user-row > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: rgba(37, 211, 102, 0.1); color: #8ff7b2; font: 900 0.67rem ui-monospace, "Cascadia Mono", Consolas, monospace; }
.control-registered-user-row strong,
.control-registered-user-row small,
.control-registered-user-row em { display: block; min-width: 0; }
.control-registered-user-row strong { color: #edf7ff; font-size: 0.76rem; }
.control-registered-user-row small { margin-top: 5px; color: #a9c5d3; font: 700 0.65rem/1.45 ui-monospace, "Cascadia Mono", Consolas, monospace; overflow-wrap: anywhere; }
.control-registered-user-row em { margin-top: 5px; color: var(--ink-faint); font-size: 0.62rem; font-style: normal; }
.control-linked-account-list { display: grid; align-content: start; gap: 7px; max-height: 390px; overflow-y: auto; padding-right: 5px; scrollbar-gutter: stable; }
.control-linked-account-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 11px; align-items: center; min-height: 64px; padding: 10px 11px; border: 1px solid rgba(148, 163, 184, 0.12); border-radius: 9px; background: rgba(4, 9, 16, 0.46); }
.control-linked-account-row > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: rgba(168, 85, 247, 0.1); color: #d1b3ff; font: 900 0.67rem ui-monospace, "Cascadia Mono", Consolas, monospace; }
.control-linked-account-row strong,
.control-linked-account-row small { display: block; min-width: 0; }
.control-linked-account-row strong { color: #edf7ff; font-size: 0.76rem; }
.control-linked-account-row small { margin-top: 5px; color: var(--ink-faint); font-size: 0.66rem; line-height: 1.45; overflow-wrap: anywhere; }
.control-contact-row { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 11px; width: 100%; padding: 12px; border: 1px solid rgba(148, 163, 184, 0.12); border-radius: 9px; background: rgba(4, 9, 16, 0.46); color: inherit; text-align: left; }
.control-contact-row:hover { border-color: rgba(56, 189, 248, 0.3); }
.control-contact-row > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: rgba(56, 189, 248, 0.09); color: #82e5ff; font-weight: 900; }
.control-contact-row.is-answered > span { background: rgba(65, 240, 129, 0.09); color: #8ff7b2; }
.control-contact-row strong,
.control-contact-row small,
.control-contact-row p,
.control-contact-row em { display: block; }
.control-contact-row strong { color: #eaf7ff; font-size: 0.7rem; }
.control-contact-row small { margin-top: 4px; color: var(--ink-faint); font-size: 0.6rem; }
.control-contact-row p { margin-top: 8px; color: var(--ink-muted); font-size: 0.68rem; line-height: 1.45; }
.control-contact-row em { margin-top: 7px; color: #8ff7b2; font-size: 0.61rem; font-style: normal; }
.control-log-heading { align-items: end; }
.control-log-filters { display: flex; gap: 6px; margin-left: auto; }
.control-log-card { min-width: 0; padding: 0 20px 16px; }
.control-log-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 54px; border-bottom: 1px solid rgba(148, 163, 184, 0.1); }
.control-log-meta span { color: #b9efff; font-size: 0.7rem; font-weight: 900; }
.control-log-meta small { color: var(--ink-faint); font-size: 0.61rem; }
.control-activity { display: grid; align-content: start; max-height: 520px; overflow-y: auto; padding-right: 8px; scrollbar-gutter: stable; overscroll-behavior: contain; }
.control-activity-row { display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 13px; align-items: start; min-width: 0; padding: 15px 4px; border-bottom: 1px solid rgba(148, 163, 184, 0.08); }
.control-activity-dot { width: 7px; height: 7px; margin-top: 7px; border-radius: 50%; background: #38bdf8; box-shadow: 0 0 10px rgba(56, 189, 248, 0.45); }
.control-activity-row.is-good .control-activity-dot { background: #41f081; }
.control-activity-row.is-warn .control-activity-dot { background: #ffbf3f; }
.control-activity-row.is-bad .control-activity-dot { background: #fb7185; }
.control-activity-copy { min-width: 0; }
.control-activity-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.control-activity-title strong { color: #dcecff; font-size: 0.75rem; line-height: 1.45; }
.control-activity-title time { flex: 0 0 auto; color: var(--ink-faint); font-size: 0.6rem; }
.control-activity-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.control-activity-tags span { padding: 4px 7px; border-radius: 999px; background: rgba(56, 189, 248, 0.07); color: #9edff2; font-size: 0.58rem; font-weight: 850; }
.control-activity-tags span.is-good { background: rgba(65, 240, 129, 0.08); color: #8ff7b2; }
.control-activity-tags span.is-warn { background: rgba(255, 191, 63, 0.08); color: #ffd77d; }
.control-activity-tags span.is-bad { background: rgba(251, 113, 133, 0.09); color: #fda4af; }
.control-activity-copy > p { margin-top: 8px; color: var(--ink-faint); font-size: 0.64rem; line-height: 1.5; }

.integration-message.is-error { color: #fda4af; }

@media (max-width: 1120px) {
  .control-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .control-quick-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .control-grid,
  .control-target-layout,
  .control-superadmin-grid { grid-template-columns: 1fr; }
  .control-target-directory { max-height: 360px; overflow-y: auto; scrollbar-gutter: stable; }
  .control-command-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .control-hero,
  .control-card-head,
  .control-workspace-head,
  .control-log-heading { align-items: flex-start; flex-direction: column; }
  .control-center-page { gap: 18px; padding-bottom: 24px; }
  .control-hero-actions { width: 100%; align-items: stretch; }
  .control-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .control-quick-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .control-quick-nav button { min-height: 64px; padding: 10px; }
  .control-field-row,
  .control-feature-grid,
  .control-name-form,
  .control-system-snapshot,
  .control-command-toolbar,
  .control-command-list,
  .control-update-status { grid-template-columns: 1fr; }
  .control-command-summary { display: flex; width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .control-global-features { grid-template-columns: 1fr; }
  .control-command-summary button { flex: 0 0 140px; }
  .control-command-list { max-height: 390px; padding-right: 3px; }
  .control-command-row { grid-template-columns: 9px minmax(0, 1fr) auto; }
  .control-filters,
  .control-log-filters { width: 100%; margin-left: 0; overflow-x: auto; padding-bottom: 2px; }
  .control-filter { flex: 0 0 auto; min-height: 40px; }
  .control-hero,
  .control-card { min-height: 0; padding: 18px; }
  .control-hero { min-height: 0; padding: 20px; }
  .control-metric { grid-template-columns: 34px minmax(0, 1fr); min-height: 94px; gap: 9px; padding: 12px; }
  .control-metric > span { width: 32px; height: 32px; }
  .control-metric strong { font-size: 0.96rem; }
  .control-metric p { line-height: 1.35; }
  .control-request-card { grid-template-columns: 42px minmax(0, 1fr); }
  .control-request-actions { grid-column: 1 / -1; }
  .control-request-actions > * { flex: 1; }
  .control-detail-head,
  .control-detail-access,
  .control-feature-heading,
  .control-detail-footer { align-items: flex-start; flex-direction: column; }
  .control-target-directory,
  .control-target-detail { min-height: 0; padding: 12px; }
  .control-target-directory { max-height: 310px; }
  .control-name-actions { grid-template-columns: 1fr 1fr; }
  .control-name-actions input { grid-column: 1 / -1; }
  .control-detail-footer,
  .control-detail-footer button { width: 100%; }
  .control-moderation-clear { grid-template-columns: 1fr; margin-inline: 0; }
  .control-moderation-clear button { width: 100%; }
  .control-log-card { padding: 0 14px 12px; }
  .control-log-meta { align-items: flex-start; flex-direction: column; justify-content: center; gap: 4px; padding: 11px 0; }
  .control-activity { max-height: 480px; padding-right: 3px; }
  .control-activity-title { flex-direction: column; gap: 4px; }
  .control-contact-list,
  .control-usage-list,
  .control-registered-user-list,
  .control-linked-account-list { max-height: 310px; }
  .control-linked-account-row { grid-template-columns: 38px minmax(0, 1fr); }
  .control-linked-account-row button { grid-column: 1 / -1; width: 100%; }
  .control-form input,
  .control-form select,
  .control-form textarea,
  .control-name-form input,
  .control-field input,
  .control-field select { min-height: 46px; font-size: 16px; }
  .control-superadmin-grid .button-row > button,
  .control-danger-card > button { flex: 1; width: 100%; }
}

/* WhatsApp group control center */
.whatsapp-mode-tabs {
  display: inline-flex;
  gap: 5px;
  margin-bottom: 22px;
  padding: 5px;
  border: 1px solid var(--edge-soft);
  border-radius: 11px;
  background: rgba(4, 8, 15, 0.72);
}

.whatsapp-mode-tab {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-faint);
  font-weight: 850;
  cursor: pointer;
}

.whatsapp-mode-tab:hover,
.whatsapp-mode-tab:focus-visible {
  color: var(--ink);
  outline: none;
}

.whatsapp-mode-tab.is-active {
  border-color: rgba(56, 189, 248, 0.28);
  background: rgba(56, 189, 248, 0.1);
  color: #dff7ff;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

.whatsapp-group-dashboard {
  display: grid;
  gap: 22px;
}

.group-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.group-summary-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  min-height: 126px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 12px;
  background: linear-gradient(150deg, rgba(13, 20, 34, 0.88), rgba(5, 9, 16, 0.94));
}

.group-summary-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(56, 189, 248, 0.26);
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.08);
  color: #8be2ff;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.66rem;
  font-weight: 900;
}

.group-summary-card > div > span,
.group-summary-card strong,
.group-summary-card small {
  display: block;
}

.group-summary-card > div > span {
  color: var(--ink-dim);
  font-size: 0.72rem;
  font-weight: 800;
}

.group-summary-card strong {
  margin: 8px 0 5px;
  color: #f2f8ff;
  font-size: 1.6rem;
  line-height: 1;
}

.group-summary-card small {
  color: var(--ink-faint);
  font-size: 0.67rem;
  line-height: 1.35;
}

.group-summary-card.is-green {
  border-color: rgba(65, 240, 129, 0.2);
}

.group-summary-card.is-green .group-summary-icon {
  border-color: rgba(65, 240, 129, 0.3);
  background: rgba(65, 240, 129, 0.08);
  color: #8ff7b2;
}

.group-summary-card.is-warn {
  border-color: rgba(255, 191, 63, 0.24);
}

.group-summary-card.is-warn .group-summary-icon {
  border-color: rgba(255, 191, 63, 0.32);
  background: rgba(255, 191, 63, 0.08);
  color: #ffd27d;
}

.group-summary-card.is-violet .group-summary-icon {
  border-color: rgba(167, 139, 250, 0.3);
  background: rgba(167, 139, 250, 0.08);
  color: #c9b8ff;
}

.group-summary-card.is-slate .group-summary-icon {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(148, 163, 184, 0.08);
  color: #c5cfdd;
}

.group-control-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(420px, 1.15fr);
  gap: 20px;
  align-items: stretch;
}

.group-link-card,
.group-directory-card {
  align-content: start;
  gap: 18px;
  min-height: 390px;
  padding: 24px;
}

.group-link-card {
  border-color: rgba(37, 211, 102, 0.18);
  background:
    radial-gradient(circle at 94% 0%, rgba(37, 211, 102, 0.08), transparent 34%),
    linear-gradient(150deg, rgba(12, 18, 29, 0.96), rgba(6, 10, 17, 0.96));
}

.group-card-heading,
.group-settings-head,
.group-settings-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.group-command-box {
  display: grid;
  gap: 7px;
  margin-top: 4px;
  padding: 19px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 11px;
  background: rgba(2, 6, 12, 0.68);
}

.group-command-box > span {
  color: var(--ink-faint);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.group-command-box strong {
  margin-top: 4px;
  color: #eafff2;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  letter-spacing: 0.16em;
}

.group-command-box code {
  width: fit-content;
  max-width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.08);
  color: #8be2ff;
  overflow-wrap: anywhere;
}

.group-command-box small {
  color: var(--ink-faint);
  line-height: 1.4;
}

.group-link-actions {
  justify-content: flex-start;
}

.whatsapp-group-list {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
  padding-right: 3px;
}

.whatsapp-group-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  width: 100%;
  min-height: 74px;
  padding: 12px 13px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  background: rgba(5, 10, 18, 0.62);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.whatsapp-group-row:hover,
.whatsapp-group-row:focus-visible,
.whatsapp-group-row.is-selected {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(8, 34, 49, 0.66);
  outline: none;
}

.group-row-symbol {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 10px;
  color: #8be2ff;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.66rem;
  font-weight: 900;
}

.group-row-copy strong,
.group-row-copy small {
  display: block;
}

.group-row-copy strong {
  font-size: 0.88rem;
}

.group-row-copy small {
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 0.69rem;
  line-height: 1.35;
}

.group-row-state {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
  color: var(--ink-faint);
  font-size: 0.64rem;
  font-weight: 900;
  white-space: nowrap;
}

.group-row-state.is-online {
  background: rgba(65, 240, 129, 0.09);
  color: #8ff7b2;
}

.group-empty-state {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 130px;
  padding: 20px;
  border: 1px dashed rgba(148, 163, 184, 0.18);
  border-radius: 11px;
  background: rgba(5, 9, 16, 0.4);
}

.group-empty-state > span {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  color: var(--ink-faint);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.66rem;
  font-weight: 900;
}

.group-empty-state strong {
  font-size: 0.85rem;
}

.group-empty-state p {
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 0.72rem;
  line-height: 1.45;
}

.group-settings-card {
  padding: 0;
  overflow: hidden;
}

.group-settings-card form {
  display: grid;
}

.group-settings-head {
  min-height: 100px;
  padding: 22px 24px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(8, 14, 24, 0.7);
}

.group-settings-head h3 {
  font-size: 1.2rem;
}

.group-settings-head p:not(.eyebrow) {
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 0.72rem;
}

.group-settings-section {
  display: grid;
  grid-template-columns: minmax(190px, 250px) minmax(0, 1fr);
  gap: 28px;
  padding: 24px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.group-settings-section h4 {
  margin: 0 0 7px;
  font-size: 0.92rem;
}

.group-settings-section > div:first-child > p {
  color: var(--ink-faint);
  font-size: 0.72rem;
  line-height: 1.45;
}

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

.group-toggle {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  min-height: 80px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  background: rgba(5, 10, 18, 0.58);
  cursor: pointer;
}

.group-toggle:has(input:checked) {
  border-color: rgba(56, 189, 248, 0.34);
  background: rgba(8, 35, 51, 0.54);
}

.group-toggle input {
  width: 20px;
  height: 20px;
  min-height: 0;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.group-toggle span,
.group-toggle strong,
.group-toggle small {
  display: block;
}

.group-toggle strong {
  color: #eaf4ff;
  font-size: 0.79rem;
}

.group-toggle small {
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 0.67rem;
  line-height: 1.35;
}

.quiet-hours-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(130px, 0.45fr) minmax(130px, 0.45fr);
  gap: 10px;
}

.quiet-toggle {
  min-height: 80px;
}

.quiet-hours-controls > label:not(.group-toggle) {
  align-content: center;
  min-height: 80px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  background: rgba(5, 10, 18, 0.58);
}

.quiet-hours-controls input[type="time"] {
  min-height: 40px;
}

.group-settings-footer {
  min-height: 86px;
  padding: 18px 24px;
}

.group-settings-footer .integration-message {
  margin: 0;
}

@media (max-width: 1180px) {
  .group-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .group-control-grid {
    grid-template-columns: 1fr;
  }

  .group-link-card,
  .group-directory-card {
    min-height: auto;
  }
}

@media (max-width: 860px) {
  .group-settings-section {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .group-toggle-grid,
  .quiet-hours-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .game-tool-search {
    grid-template-columns: 1fr;
  }

  .game-tool-search button,
  .fortnite-media-link {
    width: 100%;
  }

  .whatsapp-mode-tabs {
    display: grid;
    width: 100%;
  }

  .whatsapp-mode-tab {
    width: 100%;
  }

  .group-summary-grid {
    grid-template-columns: 1fr;
  }

  .group-link-card,
  .group-directory-card,
  .group-settings-head,
  .group-settings-section,
  .group-settings-footer {
    padding: 18px;
  }

  .group-card-heading,
  .group-settings-head,
  .group-settings-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .group-link-actions,
  .group-link-actions > *,
  .group-settings-footer .button-row,
  .group-settings-footer button {
    width: 100%;
  }

  .whatsapp-group-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .group-row-state {
    grid-column: 2;
    justify-self: start;
  }
}

/* Professional workspace refinement */
body::before {
  animation-duration: 20s;
  opacity: .82;
}

body::after {
  opacity: .24;
  animation: sky-night-twinkle 2.2s ease-in-out infinite alternate, sky-night-pan 24s linear infinite;
}

.nav-launch {
  margin-left: auto;
  color: #52627b;
  font-size: .78rem;
  transition: color 180ms ease, transform 180ms ease;
}

.tab:hover .nav-launch {
  color: #8de7ff;
  transform: translate(2px, -2px);
}

/* Berichten: separate navigation, conversation and actions */
#social .social-layout {
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

#social .game-profile {
  min-height: 720px;
  padding: 26px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 8%, rgba(65, 240, 129, .08), transparent 28%),
    linear-gradient(165deg, rgba(12, 20, 34, .96), rgba(4, 8, 16, .96));
}

#social .game-main {
  min-height: 720px;
  padding: 26px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(8, 14, 25, .95), rgba(3, 7, 14, .92));
}

#social .social-tabs {
  gap: 8px;
  margin: 22px 0 28px;
  padding: 6px;
  border-radius: 14px;
}

#social .social-tab {
  min-height: 50px;
  border: 0;
  font-size: .82rem;
}

#social .social-tab.is-active {
  background: linear-gradient(135deg, #55f093, #34cfee);
  box-shadow: 0 10px 28px rgba(42, 223, 182, .18);
}

#social .social-column-head {
  margin-bottom: 18px;
  padding: 0 2px 17px;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
  border-radius: 0;
  background: transparent;
}

#social .social-panels { padding: 0; }
#social .social-panel .social-grid.compact { gap: 20px; }

@media (min-width: 861px) {
  #social:not(.chat-focus) .social-panel .social-grid.whatsapp-layout,
  #social.chat-focus .social-panel .social-grid.whatsapp-layout {
    display: grid;
    grid-template-columns: minmax(220px, .62fr) minmax(430px, 1.65fr) minmax(220px, .68fr);
    gap: 20px;
    align-items: stretch;
    margin-top: 18px;
  }

  #social:not(.chat-focus) .whatsapp-layout .social-chat-main,
  #social:not(.chat-focus) .whatsapp-layout .social-share-card,
  #social.chat-focus .social-tabs,
  #social.chat-focus .social-column-head,
  #social.chat-focus .social-tool-buttons,
  #social.chat-focus .social-panel.is-active .social-card:not(.social-chat-main) {
    display: grid;
  }

  #social.chat-focus .social-panels { margin-top: 12px; }
  #social.chat-focus .social-panel.is-active .whatsapp-layout { margin-top: 18px; }
  #social .whatsapp-layout > .social-thread-card { grid-column: 1; grid-row: 1; }
  #social .whatsapp-layout > .social-chat-main { grid-column: 2; grid-row: 1; }
  #social .whatsapp-layout > .social-share-card { grid-column: 3; grid-row: 1; }
  #social .whatsapp-layout > [data-social-tool] { grid-column: 1 / -1; grid-row: 2; }
  #social .chat-back { display: none !important; }
}

#social .whatsapp-layout .social-card {
  padding: 18px;
  border-radius: 15px;
  border-color: rgba(148, 163, 184, .15);
  background: rgba(8, 14, 25, .86);
}

#social .whatsapp-layout .social-thread-card {
  max-height: 620px;
  min-height: 620px;
  padding: 15px;
  overflow-y: auto;
}

#social .thread-row {
  min-height: 68px;
  margin-bottom: 9px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(15, 23, 38, .76);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

#social .thread-row:hover {
  transform: translateX(3px);
  border-color: rgba(77, 220, 255, .28);
}

#social .thread-row.is-active {
  border-color: rgba(65, 240, 129, .4);
  background: linear-gradient(110deg, rgba(23, 116, 91, .28), rgba(9, 32, 43, .72));
}

#social .whatsapp-layout .social-chat-main {
  height: 620px;
  min-height: 620px;
  padding: 0;
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

#social .chat-card-head {
  min-height: 72px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
  background: rgba(11, 18, 30, .82);
}

#social .chat-card-head h3 { font-size: 1rem; }

#social .chat-log {
  min-height: 0;
  max-height: none;
  padding: 24px 20px;
  background:
    radial-gradient(circle at 50% 110%, rgba(56, 189, 248, .09), transparent 52%),
    rgba(3, 7, 14, .76);
}

#social .chat-form {
  gap: 10px;
  padding: 15px;
  border-top: 1px solid rgba(148, 163, 184, .12);
  background: rgba(9, 15, 25, .97);
}

#social .chat-form input {
  min-height: 48px;
  padding-inline: 15px;
  border-radius: 12px;
  background: rgba(2, 6, 12, .82);
}

#social .chat-form button { min-height: 48px; border-radius: 11px; }
#social .whatsapp-layout .social-share-card { min-height: 620px; align-content: start; }

/* Sky AI: conversation first, composer anchored below */
#ai .ai-page { gap: 22px; }
#ai .ai-overview {
  min-height: 190px;
  padding: 28px 32px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 18%, rgba(130, 92, 255, .16), transparent 31%),
    radial-gradient(circle at 68% 70%, rgba(56, 189, 248, .1), transparent 30%),
    linear-gradient(135deg, rgba(13, 20, 36, .97), rgba(4, 8, 17, .95));
}

#ai .ai-overview-copy h2 { font-size: clamp(2.5rem, 4vw, 4.5rem); }
#ai .ai-signal { min-height: 108px; border-radius: 13px; }

#ai .ai-workspace {
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

#ai .ai-quick-panel {
  top: 18px;
  min-height: 690px;
  padding: 22px;
  border-radius: 17px;
}

#ai .ai-prompt-list { gap: 12px; }
#ai .ai-prompt-list > button { min-height: 76px; padding: 14px; border-radius: 12px; }

#ai .ai-main-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 690px;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(9, 15, 27, .96), rgba(3, 7, 14, .94));
}

#ai .ai-composer-head {
  order: 0;
  min-height: 78px;
  padding: 17px 22px;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
  background: rgba(12, 19, 32, .78);
}

#ai .ai-conversation {
  order: 1;
  min-height: 360px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#ai .ai-conversation-head {
  min-height: 68px;
  padding: 14px 22px;
  background: rgba(4, 8, 16, .52);
}

#ai .ai-conversation .result-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 510px;
  margin: 0;
  padding: 24px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

#ai .ai-turn {
  width: min(78%, 720px);
  padding: 17px 19px;
  border-radius: 16px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .18);
}

#ai .ai-turn-user {
  align-self: flex-end;
  margin: 0;
  border-color: rgba(62, 206, 255, .3);
  border-bottom-right-radius: 5px;
  background: linear-gradient(145deg, rgba(16, 74, 101, .84), rgba(7, 27, 42, .96));
}

#ai .ai-turn-assistant {
  align-self: flex-start;
  margin: 0;
  border-bottom-left-radius: 5px;
  background: linear-gradient(145deg, rgba(25, 23, 48, .92), rgba(9, 12, 23, .96));
}

#ai .ai-empty-state { width: min(88%, 760px); }

#ai .ai-composer {
  order: 2;
  gap: 13px;
  margin-top: auto;
  padding: 18px 22px 22px;
  border-top: 1px solid rgba(148, 163, 184, .12);
  border-radius: 0;
  background: rgba(8, 13, 23, .97);
}

#ai .ai-prompt-field textarea {
  min-height: 108px;
  max-height: 220px;
  border-radius: 14px;
  resize: vertical;
}

#ai .ai-composer-options { grid-template-columns: minmax(260px, .8fr) minmax(260px, 1fr); }
#ai .ai-legal-center { border-radius: 17px; }

@media (max-width: 1180px) {
  #social .social-layout { grid-template-columns: 1fr; }
  #social .game-profile { display: none; }
  #social:not(.chat-focus) .social-panel .social-grid.whatsapp-layout,
  #social.chat-focus .social-panel .social-grid.whatsapp-layout {
    grid-template-columns: minmax(210px, .58fr) minmax(390px, 1.42fr);
  }
  #social .whatsapp-layout > .social-share-card { grid-column: 1 / -1; grid-row: 2; min-height: auto; }
  #ai .ai-workspace { grid-template-columns: 250px minmax(0, 1fr); }
}

@media (max-width: 860px) {
  #social .game-main { min-height: calc(100dvh - 150px); padding: 16px; }
  #social .social-tabs { margin-block: 14px 18px; overflow-x: auto; }
  #social .social-tab { min-width: 155px; }
  #social:not(.chat-focus) .whatsapp-layout .social-chat-main,
  #social:not(.chat-focus) .whatsapp-layout .social-share-card { display: none; }
  #social .whatsapp-layout .social-thread-card { min-height: 430px; max-height: 60dvh; }
  #social.chat-focus .whatsapp-layout .social-chat-main { height: calc(100dvh - 165px); min-height: 520px; }
  #social .chat-log { padding: 18px 14px; }
  #ai .ai-overview { grid-template-columns: 1fr; padding: 24px; }
  #ai .ai-signal-grid { display: none; }
  #ai .ai-workspace { grid-template-columns: 1fr; }
  #ai .ai-quick-panel { position: static; min-height: auto; }
  #ai .ai-main-panel { min-height: calc(100dvh - 150px); }
  #ai .ai-turn, #ai .ai-empty-state { width: 92%; }
  #ai .ai-composer-options { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  #social .game-main, #ai .ai-main-panel { border-radius: 14px; }
  #social .social-tabs { grid-template-columns: repeat(3, minmax(145px, 1fr)); }
  #social .chat-card-head { min-height: 64px; padding-inline: 14px; }
  #social .chat-form { grid-template-columns: auto minmax(0, 1fr) auto; }
  #social .chat-form .chat-share-menu { grid-column: 1 / -1; }
  #ai .ai-overview { min-height: 150px; }
  #ai .ai-overview-copy h2 { font-size: 2.8rem; }
  #ai .ai-conversation-head { align-items: flex-start; }
  #ai .ai-conversation .result-grid { padding: 16px 12px; }
  #ai .ai-turn, #ai .ai-empty-state { width: 96%; padding: 15px; }
  #ai .ai-composer { padding: 14px; }
  #ai .ai-compose-actions { align-items: stretch; flex-direction: column; }
  #ai .ai-submit-button { width: 100%; }
}

/* Veilige telefoonlogin en openbare accountbasis. */
.auth-mode-tabs { display:grid; grid-template-columns:1fr 1fr; gap:8px; width:100%; padding:5px; border:1px solid rgba(169,218,255,.16); border-radius:16px; background:rgba(4,10,20,.62); }
.auth-mode-tabs button { min-height:44px; border:0; border-radius:12px; background:transparent; color:#91a7c0; font-weight:800; }
.auth-mode-tabs button.is-active { background:linear-gradient(135deg,rgba(43,132,184,.34),rgba(91,71,176,.3)); color:#eaf7ff; box-shadow:inset 0 0 0 1px rgba(119,211,255,.25); }
.auth-panel { display:none; width:100%; }
.auth-panel.is-active { display:flex; }
.auth-stack { flex-direction:column; gap:14px; }
.auth-stack label { display:flex; flex-direction:column; gap:8px; }
.auth-stack input { min-height:50px; font-size:16px; }
.auth-consent { display:grid !important; grid-template-columns:auto 1fr; align-items:start; gap:12px !important; padding:14px; border:1px solid rgba(169,218,255,.14); border-radius:15px; background:rgba(7,16,29,.7); color:#bbcee0; font-size:13px; line-height:1.55; }
.auth-consent input { width:21px; min-width:21px; height:21px; min-height:21px; margin-top:1px; }
.auth-code-destination { margin:0; padding:13px 15px; border:1px solid rgba(54,211,139,.23); border-radius:14px; background:rgba(21,92,65,.18); color:#aef2cf; line-height:1.55; }
.auth-privacy-copy { margin:0; color:#71879e; font-size:12px; line-height:1.55; text-align:center; }
.billing-panel { gap:20px; }
.billing-plans { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.billing-plan { display:flex; min-height:230px; flex-direction:column; justify-content:space-between; gap:18px; padding:22px; border:1px solid rgba(169,218,255,.14); border-radius:20px; background:linear-gradient(155deg,rgba(14,29,50,.92),rgba(5,11,22,.96)); }
.billing-plan.is-current { border-color:rgba(60,221,151,.42); box-shadow:0 0 32px rgba(37,196,133,.1); }
.billing-plan small { color:#68d8ff; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.billing-plan h3 { margin:8px 0 4px; font-size:24px; }
.billing-plan > div > strong { color:#effaff; font-size:18px; }
.billing-plan p { color:#91a7c0; line-height:1.55; }
.billing-state { align-self:flex-start; padding:8px 12px; border-radius:999px; background:rgba(35,178,116,.16); color:#87efbc; font-weight:800; }
@media(max-width:560px) {
  .auth-screen { padding:18px 14px; align-items:flex-start; overflow-y:auto; }
  .auth-card { margin-block:max(14px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-bottom)); padding:24px 18px; }
  .auth-brand-logo { width:82px; height:82px; }
  .billing-plans { grid-template-columns:1fr; }
  .billing-plan { min-height:0; }
}
