:root {
  color-scheme: dark;
  --bg: #080d14;
  --surface: #101722;
  --surface-2: #172231;
  --line: rgba(255, 255, 255, 0.12);
  --text: #eef5ff;
  --muted: #a7b5c8;
  --cyan: #43d9ff;
  --green: #8ef06d;
  --orange: #ffb85b;
  --red: #ff6f8b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  background: var(--cyan);
  color: #00131b;
  border-radius: 0.5rem;
  font-weight: 800;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(8, 13, 20, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(1180px, calc(100% - 32px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #d6f7ff;
  color: #071019;
  font-weight: 900;
}

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

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-weight: 650;
}

.nav-links a {
  padding: 0.55rem 0.65rem;
  border-radius: 0.45rem;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 78px 0;
}

.hero {
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.9fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(2.6rem, 6vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.9rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.15;
}

.hero-lead {
  max-width: 690px;
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.24rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 850;
  cursor: pointer;
}

.button.primary {
  background: var(--cyan);
  color: #041119;
}

.button.secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.button.tertiary {
  color: var(--text);
  background: transparent;
  border-color: transparent;
}

.disabled-button {
  pointer-events: none;
  opacity: 0.65;
}

.button:hover {
  transform: translateY(-1px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 2rem 0 0;
}

.hero-stats div {
  padding: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.hero-stats dt {
  font-size: 1.25rem;
  font-weight: 900;
}

.hero-stats dd {
  margin: 0.1rem 0 0;
  color: var(--muted);
}

.product-frame {
  min-width: 0;
}

.dashboard-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0d141e;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.dashboard-topbar {
  display: flex;
  gap: 0.45rem;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  background: #121b28;
}

.dashboard-topbar span {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--red);
}

.dashboard-topbar span:nth-child(2) {
  background: var(--orange);
}

.dashboard-topbar span:nth-child(3) {
  background: var(--green);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 74px 1fr;
  min-height: 470px;
}

.server-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0;
  border-right: 1px solid var(--line);
  background: #0a1018;
}

.server {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 900;
}

.server.active {
  background: var(--cyan);
  color: #06131b;
}

.dashboard-main {
  padding: 1.2rem;
}

.dash-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dash-heading span {
  color: var(--muted);
}

.dash-heading strong {
  color: var(--green);
}

.module-list {
  display: grid;
  gap: 0.7rem;
}

.module-row {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 0.7rem;
  min-height: 54px;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.module-row strong {
  color: var(--muted);
  font-size: 0.82rem;
}

.status {
  width: 11px;
  height: 11px;
  border-radius: 999px;
}

.status.on {
  background: var(--green);
}

.status.warn {
  background: var(--orange);
}

.status.off {
  background: var(--muted);
}

.chat-preview {
  margin-top: 1rem;
  padding: 1rem;
  border-left: 4px solid var(--cyan);
  background: #0a1018;
  border-radius: 8px;
}

.chat-preview p {
  margin: 0.3rem 0;
  color: var(--muted);
}

.intro-band,
.split-section,
.quote-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 2rem;
  align-items: start;
}

.intro-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.intro-band p:last-child,
.split-section > div > p,
.quote-copy p {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.section-heading {
  max-width: 850px;
  margin-bottom: 2rem;
}

.bot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.bot-card,
.price-card,
.system-card,
.quote-form,
.faq-list details {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
}

.system-preview {
  border-bottom: 1px solid var(--line);
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.system-card {
  display: block;
  min-height: 220px;
  padding: 1.25rem;
}

.system-card:hover {
  border-color: rgba(67, 217, 255, 0.55);
  background: #102032;
}

.system-card span {
  color: var(--cyan);
  font-weight: 950;
}

.system-card h3 {
  margin-top: 1rem;
}

.system-card p {
  color: var(--muted);
}

.bot-card {
  padding: 1.25rem;
}

.bot-tag {
  display: inline-flex;
  margin-bottom: 0.9rem;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.bot-card p,
.bot-card li,
.price-card p,
.price-card span,
.steps span,
.faq-list p,
.form-note {
  color: var(--muted);
}

.bot-card ul {
  display: grid;
  gap: 0.45rem;
  margin: 1rem 0 0;
  padding-left: 1.1rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.price-card {
  padding: 1.3rem;
}

.price-card.featured {
  border-color: rgba(67, 217, 255, 0.65);
  background: #0f2130;
}

.price {
  margin: 1rem 0 0.4rem;
  color: var(--green);
  font-size: 1.6rem;
  font-weight: 950;
}

.process {
  border-top: 1px solid var(--line);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  min-height: 190px;
  padding: 1.25rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  counter-increment: step;
}

.steps li::before {
  content: "0" counter(step);
  display: block;
  margin-bottom: 1.4rem;
  color: var(--cyan);
  font-weight: 950;
}

.steps strong,
.steps span {
  display: block;
}

.steps strong {
  margin-bottom: 0.55rem;
  font-size: 1.15rem;
}

.faq-list {
  display: grid;
  gap: 0.8rem;
}

.faq-list details {
  padding: 1rem 1.2rem;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 850;
}

.faq-list p {
  margin: 0.9rem 0 0;
}

.quote-section {
  align-items: stretch;
  border-top: 1px solid var(--line);
}

.quote-form {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
}

label {
  display: grid;
  gap: 0.45rem;
  color: var(--text);
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a1018;
  color: var(--text);
  font: inherit;
  padding: 0.9rem 1rem;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(67, 217, 255, 0.45);
  outline-offset: 2px;
}

.form-note {
  margin: 0;
  font-size: 0.9rem;
}

.footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 46px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
}

.footer div {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer a {
  color: var(--text);
}

.app-body {
  min-height: 100vh;
  background: #080d14;
}

.auth-shell {
  width: min(520px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  align-content: center;
  gap: 1.2rem;
  padding: 48px 0;
}

.auth-brand {
  justify-content: center;
}

.auth-card {
  display: grid;
  gap: 1rem;
  padding: 1.4rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-card h1,
.app-title h1 {
  margin: 0;
  font-size: clamp(2.1rem, 7vw, 3.5rem);
  line-height: 1;
}

.auth-card p,
.app-title p {
  margin: 0;
  color: var(--muted);
}

.oauth-box {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid rgba(255, 184, 91, 0.45);
  background: rgba(255, 184, 91, 0.08);
  border-radius: 8px;
}

.oauth-box strong {
  color: var(--orange);
}

.oauth-box span,
.text-link {
  color: var(--muted);
}

.text-link {
  text-align: center;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 13, 20, 0.92);
  backdrop-filter: blur(18px);
}

.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  color: var(--muted);
  font-weight: 750;
}

.app-nav a:hover {
  color: var(--text);
}

.app-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - 72px);
}

.app-sidebar {
  padding: 24px;
  border-right: 1px solid var(--line);
  background: #0a1018;
}

.app-sidebar a {
  display: block;
  padding: 0.8rem 0.9rem;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
}

.app-sidebar a.active,
.app-sidebar a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.app-content,
.admin-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 72px;
}

.app-title {
  max-width: 820px;
  margin-bottom: 1.3rem;
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.server-card,
.profile-card,
.config-panel,
.admin-table {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
}

.server-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.profile-card img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
}

.server-card h2,
.profile-card h2,
.config-panel h2,
.table-heading h2 {
  margin: 0;
  font-size: 1.3rem;
}

.server-card p,
.profile-card p,
.config-panel p,
.table-heading span {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.server-avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: var(--cyan);
  color: #06131b;
  font-weight: 950;
}

.muted-server .server-avatar {
  background: var(--surface-2);
  color: var(--text);
}

.config-panel {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1.2rem;
  margin-top: 1rem;
}

.stack-panel {
  align-items: flex-start;
}

.server-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.module-switches,
.checklist {
  display: grid;
  gap: 0.65rem;
}

.module-switches label,
.checklist label,
.inline-toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
}

.module-switches input,
.checklist input,
.inline-toggle input {
  width: auto;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.3rem 0;
}

.admin-metrics article {
  padding: 1.1rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
}

.admin-metrics span,
.admin-metrics strong {
  display: block;
}

.admin-metrics span {
  color: var(--muted);
}

.admin-metrics strong {
  margin-top: 0.4rem;
  font-size: 1.45rem;
}

.admin-table {
  overflow: hidden;
  margin-top: 1rem;
}

.table-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
}

.table-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.2fr;
  gap: 1rem;
  padding: 0.9rem 1rem;
  color: var(--muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.table-row:last-child {
  border-bottom: 0;
}

.header-row {
  color: var(--text);
  font-weight: 850;
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
}

.status-pill.setup {
  background: rgba(255, 184, 91, 0.14);
  color: var(--orange);
}

.checklist {
  padding: 1rem;
}

@media (max-width: 980px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.9rem 0;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .hero,
  .intro-band,
  .split-section,
  .quote-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 52px;
  }

  .bot-grid,
  .pricing-grid,
  .system-grid,
  .dashboard-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .app-layout {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    display: flex;
    overflow-x: auto;
    gap: 0.5rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .app-sidebar a {
    white-space: nowrap;
  }

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

@media (max-width: 640px) {
  .section {
    width: min(100% - 24px, 1180px);
    padding: 52px 0;
  }

  h1 {
    font-size: 2.55rem;
  }

  h2 {
    font-size: 2rem;
  }

  .hero-stats,
  .bot-grid,
  .pricing-grid,
  .system-grid,
  .dashboard-cards,
  .steps {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 54px 1fr;
  }

  .server {
    width: 36px;
    height: 36px;
  }

  .module-row {
    grid-template-columns: 12px 1fr;
  }

  .module-row strong {
    grid-column: 2;
  }

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

  .app-header,
  .config-panel,
  .table-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .server-card {
    grid-template-columns: 52px 1fr;
  }

  .server-card .button,
  .server-actions {
    grid-column: 1 / -1;
  }

  .server-actions {
    justify-content: stretch;
  }

  .server-actions .button {
    width: 100%;
  }

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

  .table-row {
    grid-template-columns: 1fr;
  }
}
