

:root {
  color-scheme: dark;
  --bg: #07070a;
  --bg-2: #0d0d12;
  --bg-3: #14141c;
  --line: #1f1f2b;
  --text: #ececf1;
  --muted: #8b8b9a;
  --accent: #7c3aed;
  --accent-2: #22d3ee;
  --accent-soft: rgba(124, 58, 237, 0.18);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  --radius: 14px;
  --radius-lg: 22px;
  --nav-h: 68px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: grid;
  place-items: center;
  opacity: 1;
  transition: opacity 360ms ease;
}
.page-loader::before {
  content: "";
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(40% 40% at 50% 40%, rgba(124, 58, 237, 0.20), transparent 70%),
    radial-gradient(35% 35% at 60% 70%, rgba(34, 211, 238, 0.10), transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}
.page-loader.hide {
  opacity: 0;
  pointer-events: none;
}
.page-loader-inner {
  position: relative;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
}
.page-loader-inner img {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  animation: pl-pulse 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(124, 58, 237, 0.45));
}
.page-loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0%, transparent 35%, var(--accent) 70%, var(--accent-2) 100%);
  -webkit-mask: radial-gradient(circle at center, transparent 60%, #000 62%);
          mask: radial-gradient(circle at center, transparent 60%, #000 62%);
  animation: pl-spin 1.1s linear infinite;
}
.page-loader-ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  -webkit-mask: radial-gradient(circle at center, transparent 60%, #000 62%);
          mask: radial-gradient(circle at center, transparent 60%, #000 62%);
}
.page-loader-text {
  position: absolute;
  bottom: -38px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
@keyframes pl-spin { to { transform: rotate(360deg); } }
@keyframes pl-pulse {
  0%, 100% { transform: scale(1); opacity: 0.92; }
  50% { transform: scale(1.07); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .page-loader-ring, .page-loader-inner img { animation: none; }
}
.no-js .page-loader { display: none; }
html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg-2);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-2); border-left: 1px solid var(--line); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), #6d28d9);
  border-radius: 999px;
  border: 2px solid var(--bg-2);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  background-clip: padding-box;
  border: 2px solid var(--bg-2);
}
::-webkit-scrollbar-corner { background: var(--bg-2); }
::-webkit-scrollbar-button,
::-webkit-scrollbar-button:start,
::-webkit-scrollbar-button:end { display: none; width: 0; height: 0; }

::selection { background: var(--accent); color: #fff; }
::-moz-selection { background: var(--accent); color: #fff; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.menu-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 7, 10, 0.7);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand-mark { width: 28px; height: 28px; object-fit: contain; display: block; }
.brand-text { font-size: 1.05rem; }
.accent { color: var(--accent); }

.nav-links { display: flex; gap: 28px; font-size: 0.94rem; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.nav-cta { white-space: nowrap; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  padding: 0;
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 220ms ease, opacity 180ms ease, top 220ms ease;
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 26px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: rgba(7, 7, 10, 0.96);
  backdrop-filter: blur(20px);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 32px 24px;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 220ms ease, opacity 220ms ease;
}
.mobile-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-menu a {
  font-size: 1.4rem;
  font-weight: 600;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.mobile-menu a.btn { border: none; margin-top: 18px; align-self: flex-start; }

@media (max-width: 860px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.94rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}
.btn-lg { padding: 14px 22px; font-size: 1rem; border-radius: 12px; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6d28d9);
  color: #fff;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: #2c2c3a; background: var(--bg-3); }

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 84px;
  border-bottom: 1px solid var(--line);
}
.hero-bg {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(60% 60% at 30% 30%, rgba(124, 58, 237, 0.25), transparent 70%),
    radial-gradient(50% 50% at 80% 60%, rgba(34, 211, 238, 0.15), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { order: -1; }
}
.eyebrow {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 22px;
  font-weight: 800;
}
.gradient {
  background: linear-gradient(135deg, var(--accent), var(--accent-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.18rem);
  color: #c2c2d0;
  max-width: 580px;
  margin: 0 0 32px;
}
.lede em { font-style: normal; color: var(--text); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.loader-status.ok { color: #22c55e; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.section { padding: 88px 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin: 0 0 48px; }
.section-head h2,
.section h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-weight: 800;
}
.section-head h2 { margin: 0; }
@media (max-width: 720px) { .compat-grid { grid-template-columns: 1fr; } }
.compat-tag.live { background: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.step-num {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 700;
}
.card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color 160ms ease, transform 160ms ease;
}
.card:hover { border-color: #33334a; transform: translateY(-2px); }
.card h3 { margin: 0 0 8px; font-size: 1.1rem; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); font-size: 0.96rem; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.check-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.check-list li {
  position: relative;
  padding-left: 32px;
  color: #d3d3df;
  min-height: 20px;
  display: flex;
  align-items: center;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%237c3aed' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='3.5 8.5 6.8 11.5 12.5 5'/></svg>") center / 12px 12px no-repeat;
  border: 1px solid var(--accent);
}
.status-card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
}
.status-row {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.status-row .dot { justify-self: center; }
.status-row:last-of-type { border-bottom: none; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 3px rgba(255,255,255,0.02); }
.dot.ok { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15); }
.dot.warn { background: #eab308; box-shadow: 0 0 0 4px rgba(234, 179, 8, 0.18); }
.dot.err { background: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.status-foot { margin-top: 14px; font-size: 0.85rem; color: var(--muted); text-align: center; }

.cta {
  border-top: 1px solid var(--line);
  background: radial-gradient(50% 80% at 50% 0%, rgba(124, 58, 237, 0.18), transparent 70%), var(--bg);
  text-align: center;
}
.cta-inner h2 { margin: 0 0 12px; }
.cta-inner > p { color: var(--muted); margin: 0 0 28px; }
.cta .hero-cta { justify-content: center; }

.footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 28px;
  background: var(--bg-2);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; font-size: 0.92rem; color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.footer-inner { display: block; }

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: opacity, transform;
}
[data-reveal].revealed { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .loader-window { transform: none; }
  .pulse { animation: none; }
}

.legal {
  padding: 56px 0 80px;
  max-width: 760px;
  margin: 0 auto;
}
.legal h1 {
  font-size: clamp(2rem, 4.4vw, 3rem);
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0 0 8px;
}
.legal .updated { color: var(--muted); font-size: 0.9rem; margin: 0 0 36px; }
.legal h2 {
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin: 32px 0 12px;
  font-weight: 700;
}
.legal p, .legal li { color: #c2c2d0; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--accent); }
.legal a:hover { text-decoration: underline; }

.compat-link {
  position: relative;
  display: inline-block;
  margin-top: 14px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 160ms ease, border-color 160ms ease;
}
.compat-link:hover { color: var(--text); border-bottom-color: var(--accent); }

.eyebrow.status-live   { border-color: rgba(34, 197, 94, 0.4);  background: rgba(34, 197, 94, 0.08); color: #4ade80; }
.eyebrow.status-next   { border-color: rgba(124, 58, 237, 0.4); background: rgba(124, 58, 237, 0.10); color: #c4b5fd; }
.eyebrow.status-radar  { border-color: var(--line); background: var(--bg-2); color: var(--muted); }
.roadmap-card.live { border-color: rgba(34, 197, 94, 0.3); }
.roadmap-card.live::before { background: radial-gradient(70% 80% at 90% 10%, rgba(34, 197, 94, 0.12), transparent 70%); }
@keyframes roadmap-pulse { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(2.6); opacity: 0; } }

.roadmap-features {
  position: relative;
  margin: 18px 0 0;
  padding: 16px 18px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.roadmap-features-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 10px;
}
.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--accent-soft);
  border: 1px solid rgba(124, 58, 237, 0.4);
  color: #d3c5fa;
}
.feature-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(124, 58, 237, 0.7);
}

@media (prefers-reduced-motion: reduce) {
  .roadmap-pulse span:last-child { animation: none; }
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.page-hero .container { position: relative; max-width: 820px; }
.page-hero h1 {
  font-size: clamp(2.2rem, 5.2vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
  font-weight: 800;
}
.page-hero .lede { margin: 0; }
@media (max-width: 720px) { .product { padding: 24px; } }
@media (max-width: 900px) { .product-head { grid-template-columns: 1fr; gap: 20px; } }
.product-head-tags .eyebrow { margin-bottom: 0; }
.product-meta-row .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.product-meta-row .dot.ok { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18); }
.product-meta-row .dot.dev { background: var(--accent); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.22); }
@media (max-width: 760px) {
  .feature-table-head,
  .feature-table-row { grid-template-columns: minmax(0, 1fr) 120px 120px; }
}
.feature-col-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 0.85rem;
  line-height: 1;
}
.col-players .feature-col-icon {
  background: rgba(124, 58, 237, 0.18);
  border: 1px solid rgba(124, 58, 237, 0.4);
  color: #c4b5fd;
}
.col-bots .feature-col-icon {
  background: rgba(34, 211, 238, 0.15);
  border: 1px solid rgba(34, 211, 238, 0.4);
  color: #67e8f9;
}
.feature-table-name .small { font-weight: 400; font-size: 0.82rem; }

@media (max-width: 640px) {
  .feature-table-head { display: none; }
  .feature-table-row {
    grid-template-columns: 1fr;
    padding: 6px 0 10px;
  }
  .feature-table-name {
    padding: 14px 18px 6px;
    border-bottom: 1px dashed var(--line);
  }
  .feature-table-cell {
    border-left: none;
    padding: 8px 18px;
    background: transparent !important;
  }
  .feature-table-cell::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    min-width: 70px;
  }
  .feature-table-cell.col-players::before { color: #c4b5fd; }
  .feature-table-cell.col-bots::before    { color: #67e8f9; }
}
@media (max-width: 720px) { .product-foot { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .feature-tab .feature-table-head,
  .feature-tab .feature-table-row { grid-template-columns: minmax(0, 180px) minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .feature-tab .feature-table-row { grid-template-columns: 1fr; }
  .feature-tab .feature-table-cell { padding-left: 18px; padding-right: 18px; }
}

:root {
  color-scheme: dark;
  --bg: #07070a;
  --bg-2: #0d0d12;
  --bg-3: #14141c;
  --line: #1f1f2b;
  --text: #ececf1;
  --muted: #8b8b9a;
  --accent: #7c3aed;
  --accent-2: #22d3ee;
  --accent-soft: rgba(124, 58, 237, 0.18);
  --error: #ef4444;
  --radius: 12px;
  --radius-lg: 22px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: grid;
  place-items: center;
  opacity: 1;
  transition: opacity 320ms ease;
}
.page-loader::before {
  content: "";
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(40% 40% at 50% 40%, rgba(124, 58, 237, 0.18), transparent 70%),
    radial-gradient(35% 35% at 60% 70%, rgba(34, 211, 238, 0.10), transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}
.page-loader.hide {
  opacity: 0;
  pointer-events: none;
}
.page-loader-inner {
  position: relative;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
}
.page-loader-inner img {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  animation: pl-pulse 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(124, 58, 237, 0.45));
}
.page-loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0%, transparent 35%, var(--accent) 70%, var(--accent-2) 100%);
  -webkit-mask: radial-gradient(circle at center, transparent 60%, #000 62%);
          mask: radial-gradient(circle at center, transparent 60%, #000 62%);
  animation: pl-spin 1.1s linear infinite;
}
.page-loader-ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  -webkit-mask: radial-gradient(circle at center, transparent 60%, #000 62%);
          mask: radial-gradient(circle at center, transparent 60%, #000 62%);
}
.page-loader-text {
  position: absolute;
  bottom: -38px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
@keyframes pl-spin { to { transform: rotate(360deg); } }
@keyframes pl-pulse {
  0%, 100% { transform: scale(1); opacity: 0.92; }
  50% { transform: scale(1.07); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .page-loader-ring, .page-loader-inner img { animation: none; }
}
html { scrollbar-width: thin; scrollbar-color: var(--accent) var(--bg-2); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 999px; border: 2px solid var(--bg-2); background-clip: padding-box; }
::-webkit-scrollbar-button,
::-webkit-scrollbar-button:start,
::-webkit-scrollbar-button:end { display: none; width: 0; height: 0; }
::-webkit-scrollbar-corner { background: var(--bg-2); }
::selection { background: var(--accent); color: #fff; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.brand-text { font-weight: 700; letter-spacing: -0.01em; }
.accent { color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.94rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}
.btn-lg { padding: 14px 22px; font-size: 1rem; border-radius: 12px; }
.auth-card .btn-lg { width: 100%; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6d28d9);
  color: #fff;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: #2c2c3a; background: var(--bg-3); }
.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}
.btn-danger:hover { transform: translateY(-1px); }

body.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}
.auth-bg {
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60% 60% at 30% 30%, rgba(124, 58, 237, 0.22), transparent 70%),
    radial-gradient(50% 50% at 80% 60%, rgba(34, 211, 238, 0.13), transparent 70%);
  filter: blur(20px);
}

.auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 72px;
  align-items: center;
  width: 100%;
  max-width: 1040px;
}
@media (max-width: 880px) {
  .auth-shell { grid-template-columns: 1fr; gap: 36px; max-width: 440px; justify-items: center; }
  .auth-brand-block { align-items: center; text-align: center; }
}

.auth-brand-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.auth-logo-wrap {
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(34, 211, 238, 0.08));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 50px rgba(124, 58, 237, 0.18);
}
.auth-brand-text {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
}
.auth-brand-text .gradient {
  background: linear-gradient(135deg, var(--accent), var(--accent-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-brand-block .eyebrow {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 32px 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

.auth-card h1 {
  margin: 0 0 22px;
  font-size: 1.7rem;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.auth-card form {
  display: grid;
  gap: 16px;
}
.auth-card label {
  display: grid;
  gap: 6px;
}
.auth-card label > span {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.auth-card input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-3);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
.auth-card input:hover { border-color: #2c2c3a; }
.auth-card input:focus {
  border-color: var(--accent);
  background: var(--bg-2);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}
.auth-card input.invalid {
  border-color: var(--error);
  background: rgba(239, 68, 68, 0.04);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
  animation: shake 320ms ease;
}
.auth-card input.invalid:focus {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.22);
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}
.field-error {
  display: block;
  font-size: 0.78rem;
  color: #fca5a5;
  font-weight: 500;
  margin-top: 2px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 200ms ease, opacity 200ms ease;
}
.field-error.show {
  max-height: 24px;
  opacity: 1;
}
.auth-card .error {
  margin: 0;
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  color: #fca5a5;
  font-size: 0.9rem;
}
.auth-card .btn-lg { margin-top: 4px; }

.auth-foot {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}
.auth-link {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 0;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: color 160ms ease;
}
.auth-link:hover { color: var(--accent); }
.auth-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

.notfound-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  width: 100%;
  max-width: 540px;
  padding: 24px;
}
.notfound-logo {
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(34, 211, 238, 0.08));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 50px rgba(124, 58, 237, 0.18);
}
.notfound-code {
  font-size: clamp(5rem, 16vw, 9rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0;
}
.notfound-code .gradient {
  background: linear-gradient(135deg, var(--accent), var(--accent-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.notfound-msg {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 420px;
  margin: 0;
  line-height: 1.5;
}
.notfound-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
}
.notfound-actions .btn { width: auto; }
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulse-green 1.8s ease-out infinite;
}
@keyframes pulse-green {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
  70%  { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .status-dot, .auth-card input.invalid { animation: none !important; }
}

body.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background:
    linear-gradient(to right, transparent 260px, var(--line) 260px, var(--line) 261px, transparent 261px) no-repeat,
    linear-gradient(to right, var(--bg-2) 0, var(--bg-2) 260px, var(--bg) 260px) no-repeat;
  position: relative;
  overflow-x: hidden;
}
@media (max-width: 880px) {
  body.app { background: var(--bg); }
}
body.app::before {
  content: "";
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(40% 40% at 80% 0%, rgba(124, 58, 237, 0.16), transparent 70%),
    radial-gradient(35% 35% at 100% 60%, rgba(34, 211, 238, 0.08), transparent 70%);
  filter: blur(30px);
}
body.app .content { position: relative; z-index: 1; }

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  z-index: 40;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 22px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 0;
  overflow-y: auto;
}
.sidebar-section {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 8px 10px 3px;
}
.sidebar-section:first-child { padding-top: 2px; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 160ms ease, color 160ms ease;
}
.sidebar-nav a:hover { background: var(--bg-3); color: var(--text); }
.sidebar-nav a.active {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
  position: relative;
}
.sidebar-nav a.active::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
.sidebar-nav a.active svg { color: var(--accent); }
.sidebar-nav a svg { flex-shrink: 0; }
.sidebar-nav a.disabled {
  opacity: 0.55;
  pointer-events: none;
}
.sidebar-nav a .tag {
  margin-left: auto;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--bg-3);
  color: var(--muted);
  font-weight: 700;
}
.sidebar-foot {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 14px;
}
.sidebar-user .avatar {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  flex-shrink: 0;
  border: none;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease;
  font-family: inherit;
}
.sidebar-user .avatar:hover { transform: scale(1.06); box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.35); }
.sidebar-user .avatar:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.45); }
.sidebar-user .avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}
.sidebar-user .avatar-edit {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  opacity: 0;
  transition: opacity 160ms ease;
  z-index: 2;
}
.sidebar-user .avatar:hover .avatar-edit,
.sidebar-user .avatar.busy .avatar-edit { opacity: 1; }
.sidebar-user .avatar-edit svg { width: 14px; height: 14px; }
.sidebar-user .avatar.busy .avatar-edit svg { animation: avatar-spin 0.9s linear infinite; }
@keyframes avatar-spin { to { transform: rotate(360deg); } }
.sidebar-user .who-name { font-weight: 700; font-size: 0.92rem; line-height: 1.2; }
.sidebar-user .who-role { font-size: 0.75rem; color: var(--muted); line-height: 1.2; }
.btn-block { width: 100%; }

.sidebar-toggle {
  display: none;
  position: fixed;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  z-index: 60;
  padding: 0;
}
.sidebar-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 220ms ease, opacity 180ms ease, top 220ms ease;
}
.sidebar-toggle span:nth-child(1) { top: 14px; }
.sidebar-toggle span:nth-child(2) { top: 21px; }
.sidebar-toggle span:nth-child(3) { top: 28px; }
.sidebar-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.sidebar-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.sidebar-toggle[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

@media (max-width: 880px) {
  body.app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 260ms ease;
    box-shadow: 30px 0 80px rgba(0,0,0,0.4);
    z-index: 60;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar.open::after {
    content: "";
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: -1;
    cursor: pointer;
  }
  .sidebar-toggle { display: block; }
  .content { padding-top: 72px; }
  body.sidebar-open { overflow: hidden; }
  /* Touch-target sweep */
  .btn-sm { min-height: 36px; padding: 8px 14px; }
  .sidebar-nav a { padding: 12px 14px; min-height: 44px; }
  .modal-close { width: 40px; height: 40px; font-size: 1.6rem; }
  .row-check input[type="checkbox"] { transform: scale(1.15); }
}

.content {
  padding: 48px 40px 80px;
  min-width: 0;
}
@media (max-width: 720px) { .content { padding: 72px 24px 60px; } }

.page-head {
  margin-bottom: 36px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.page-head h1 {
  margin: 0 0 6px;
  font-size: clamp(1.8rem, 3.6vw, 2.4rem);
  letter-spacing: -0.02em;
  font-weight: 800;
}
.page-head h1 .gradient {
  background: linear-gradient(135deg, var(--accent), var(--accent-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-head p { margin: 0; }
.page-eyebrow {
  display: inline-block;
  padding: 5px 11px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 14px;
}

.site-state {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.site-state .state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}
.site-state.live { border-color: rgba(34, 197, 94, 0.35); background: rgba(34, 197, 94, 0.08); color: #4ade80; }
.site-state.live .state-dot { background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); animation: site-pulse 1.8s ease-out infinite; }
.site-state.dev { border-color: rgba(245, 158, 11, 0.4); background: rgba(245, 158, 11, 0.08); color: #fbbf24; }
.site-state.dev .state-dot { background: #f59e0b; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); animation: site-pulse 1.8s ease-out infinite; }
@keyframes site-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70%  { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  overflow: hidden;
  transition: transform 200ms ease, border-color 200ms ease;
}
.stat::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.5), transparent);
  opacity: 0;
  transition: opacity 200ms ease;
}
.stat:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 58, 237, 0.3);
}
.stat:hover::after { opacity: 1; }
.stat-label {
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 700;
}
.stat-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}

.card-block {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
}
.card-block h2 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.card-block .card-block-sub { color: var(--muted); font-size: 0.9rem; margin: 0 0 18px; }
.card-block ul { margin: 0; padding-left: 20px; color: var(--muted); }
.card-block ul li { margin-bottom: 6px; }
.card-block-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.card-block-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--text);
  transition: border-color 160ms ease, transform 160ms ease;
}
.card-block-list li:hover { border-color: rgba(124, 58, 237, 0.3); transform: translateX(2px); }
.card-block-list .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}
.card-block-list .tag {
  margin-left: auto;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-2);
  color: var(--muted);
  font-weight: 700;
  border: 1px solid var(--line);
}

.dash-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
  align-items: stretch;
}
.dash-grid > .card-block,
.dash-grid > .status-card { margin-bottom: 0; height: 100%; }
@media (max-width: 980px) {
  .dash-grid { grid-template-columns: 1fr; }
}

.status-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.status-card h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.status-card .status-sub { color: var(--muted); font-size: 0.88rem; margin: 0 0 16px; }
.status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.92rem;
}
.status-row:last-of-type { border-bottom: none; }
.status-row .status-label { flex: 1; }
.status-row .status-value { color: var(--muted); font-size: 0.85rem; }
.status-row .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-row .dot.ok {
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: site-pulse 1.8s ease-out infinite;
}
.status-row .dot.muted { background: var(--muted); }
.status-foot {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.setting-card.single { max-width: 720px; }

.setting-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 200ms ease;
}
.setting-card.on {
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.08);
}

.setting-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
}
.setting-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}
.setting-card.on .setting-icon {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}
.setting-title { flex: 1; min-width: 0; }
.setting-title h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  font-weight: 700;
}
.setting-title p { margin: 0; font-size: 0.88rem; line-height: 1.5; }

.setting-body { padding: 22px 24px; flex: 1; display: grid; gap: 18px; }

.reveal { animation: reveal-down 240ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal[hidden] { display: none; }
@keyframes reveal-down {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.setting-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  background: rgba(0, 0, 0, 0.18);
  border-top: 1px solid var(--line);
}
.setting-foot .btn { padding: 10px 22px; }

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.switch-row > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.switch-row strong { font-size: 0.95rem; font-weight: 600; }
.input-with-action .btn { white-space: nowrap; padding: 10px 16px; }

.hint { margin: 12px 0 0; }

.result {
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
  font-weight: 600;
}
.result.ok { color: #4ade80; }
.result.err { color: #fca5a5; }

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  flex-shrink: 0;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.switch .slider {
  position: absolute;
  inset: 0;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: background 220ms ease, border-color 220ms ease;
}
.switch .slider::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 220ms ease, background 220ms ease;
}
.switch input:checked + .slider {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.switch input:checked + .slider::before {
  transform: translate(22px, -50%);
  background: var(--accent);
}
.switch input:focus-visible + .slider {
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25);
}

.btn-sm { padding: 6px 14px; font-size: 0.85rem; border-radius: 8px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88em; background: var(--bg-3); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--line); }

.keys-table { padding: 0; }
.keys-table .setting-body { padding: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.keys-table .table { min-width: 720px; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.table thead th {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.18);
  border-bottom: 1px solid var(--line);
}
.table tbody td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-of-type td { border-bottom: none; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.table .empty { text-align: center; color: var(--muted); padding: 40px 18px; font-size: 0.9rem; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions .btn { margin-left: 6px; }
.table .key-cell { cursor: pointer; transition: background 160ms ease; user-select: all; white-space: nowrap; }
.table .key-cell:hover { background: var(--accent-soft); border-color: var(--accent); }
.table .pill { white-space: nowrap; }

.pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.pill-product { background: var(--accent-soft); color: var(--accent); border-color: rgba(124, 58, 237, 0.35); }
.pill-ok { background: rgba(34, 197, 94, 0.12); color: #4ade80; border-color: rgba(34, 197, 94, 0.3); }
.pill-warn { background: rgba(245, 158, 11, 0.12); color: #fbbf24; border-color: rgba(245, 158, 11, 0.3); }
.pill-err { background: rgba(239, 68, 68, 0.12); color: #fca5a5; border-color: rgba(239, 68, 68, 0.3); }
.pill-muted { background: var(--bg-3); color: var(--muted); border-color: var(--line); }
.pill-locked { background: rgba(34, 211, 238, 0.12); color: #67e8f9; border-color: rgba(34, 211, 238, 0.35); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pill-info { background: rgba(124, 58, 237, 0.14); color: #c4b5fd; border-color: rgba(124, 58, 237, 0.4); }
.pill-admin { background: rgba(239, 68, 68, 0.12); color: #fca5a5; border-color: rgba(239, 68, 68, 0.3); }
.pill-reseller { background: rgba(34, 211, 238, 0.12); color: #67e8f9; border-color: rgba(34, 211, 238, 0.35); }

.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.user-cell .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.user-cell .user-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.user-cell .user-name {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}
.user-cell .user-id {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.danger-zone {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.04);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.danger-zone-text { font-size: 0.85rem; color: var(--muted); }
.danger-zone-text strong { color: #fca5a5; }

.field-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 540px) { .field-group { grid-template-columns: 1fr; } }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.toggle-row .toggle-meta { display: flex; flex-direction: column; gap: 2px; }
.toggle-row strong { font-size: 0.92rem; font-weight: 600; }
.toggle-row .muted { font-size: 0.78rem; }

.field-group-toggle > .field { align-self: stretch; }
.field-group-toggle > .field > input,
.field-group-toggle > .field > .toggle-row { height: 100%; }

.table-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}
.table-toolbar .search-wrap {
  position: relative;
  flex: 1;
  max-width: 360px;
}
.table-toolbar .search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.table-toolbar input.search {
  width: 100%;
  padding: 10px 12px 10px 36px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.table-toolbar input.search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}
.table-toolbar .toolbar-meta {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  font-size: 0.85rem;
}
.table-pagination .range { color: var(--muted); }
.table-pagination .pager {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.table-pagination .pager button {
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}
.table-pagination .pager button:not(:disabled):hover {
  border-color: var(--accent);
  color: var(--text);
}
.table-pagination .pager button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.table-pagination .pager .page-num {
  padding: 6px 10px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.table-pagination .pager .page-num strong { color: var(--text); }

.loader-logo-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--bg-3);
  border-radius: 12px;
}
.loader-logo-preview {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(34, 211, 238, 0.08));
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}
.loader-logo-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.loader-logo-empty {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.loader-logo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.color-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 14px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.color-input-wrap:hover { border-color: #2c2c3a; }
.color-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}
.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #7c3aed;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.color-hex {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
  color: var(--text);
  letter-spacing: 0.02em;
}

.topup-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.topup-chip {
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}
.topup-chip:hover { border-color: rgba(124, 58, 237, 0.5); }
.topup-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
}
.brand-preview-tab.active {
  background: var(--accent-soft);
  color: var(--text);
}

.color-input-wrap input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

.page-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
@media (max-width: 980px) {
  .loader-grid { grid-template-columns: 1fr; }
}
.loader-preview-head .page-eyebrow { margin-bottom: 6px; }

.loader-preview-gui {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  height: 400px;
  background: #0a0a0c;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}
.lpg-accent-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
}
.lpg-close {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: rgba(150, 150, 150, 0.7);
  font-size: 18px;
  line-height: 1;
  font-weight: 300;
  pointer-events: none;
}
.lpg-title {
  position: absolute;
  top: 80px;
  left: 0; right: 0;
  margin: 0;
  text-align: center;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.01em;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--accent);
}
.lpg-divider {
  position: absolute;
  top: 130px;
  left: 50px;
  right: 50px;
  width: auto;
  height: 1px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  margin: 0;
}
.lpg-field-wrap {
  position: absolute;
  top: 152px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  display: flex;
  flex-direction: column;
}
.lpg-label {
  font-size: 13px;
  font-weight: 400;
  color: rgba(160, 160, 165, 1);
  margin-bottom: 6px;
}
.lpg-input {
  display: block;
  height: 40px;
  padding: 11px 12px;
  background: #141416;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  color: rgba(120, 120, 125, 0.7);
  font-size: 14px;
  line-height: 1;
  box-sizing: border-box;
}
.lpg-button {
  width: 100%;
  height: 40px;
  margin-top: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: default;
  font-family: inherit;
  pointer-events: none;
}
.lpg-foot {
  position: absolute;
  bottom: 14px;
  left: 0; right: 0;
  text-align: center;
  color: rgba(140, 140, 145, 1);
  font-size: 12px;
}

.loader-preview-cli {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  background: #0c0c0c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
  font-family: ui-monospace, "Consolas", "Cascadia Code", "Courier New", monospace;
  font-size: 13px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}
.lpc-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, #2b2b2b, #222);
  padding: 6px 12px;
  color: #d4d4d4;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.4);
}
.lpc-controls span {
  display: inline-block;
  padding: 0 10px;
  color: #aaa;
  font-size: 13px;
  line-height: 1;
}
.lpc-body {
  background: #0c0c0c;
  color: #cccccc;
  padding: 14px 16px 24px;
  min-height: 240px;
}
.lpc-line { line-height: 1.55; white-space: pre-wrap; }
.lpc-brand { color: var(--accent); font-weight: 600; }
.lpc-prompt { color: #cccccc; }
.lpc-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: #cccccc;
  vertical-align: -2px;
  animation: cli-blink 1s steps(2, jump-none) infinite;
}
@keyframes cli-blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

.bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.4);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.16), rgba(34, 211, 238, 0.06));
  font-size: 0.9rem;
  animation: bulk-bar-in 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes bulk-bar-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.bulk-bar .bulk-count {
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.bulk-bar .bulk-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.row-check {
  width: 38px;
  padding-right: 0 !important;
}
.row-check input[type="checkbox"],
th.row-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--accent);
}
.table tr[data-id].is-selected {
  background: rgba(124, 58, 237, 0.06);
}
.table tr[data-id].is-selected:hover {
  background: rgba(124, 58, 237, 0.10);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 24px;
  animation: modal-fade 180ms ease;
}
.modal[hidden] { display: none; }
@keyframes modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: modal-pop 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
  overflow: visible;
}
.modal-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent-2) 70%, transparent);
  opacity: 0.7;
  pointer-events: none;
}
.modal-card-sm { max-width: 420px; }
.modal-card-lg { max-width: 560px; }
.modal-card-wide { max-width: 720px; }
.modal-card-xl { max-width: 820px; }
@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.96) translateY(-8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 { margin: 0; font-size: 1.15rem; letter-spacing: -0.01em; font-weight: 700; }
.modal-close {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  border-radius: 8px;
  font-family: inherit;
  transition: background 160ms ease, color 160ms ease;
}
.modal-close:hover { background: var(--bg-3); color: var(--text); }
.modal-body { padding: 22px 24px; display: grid; gap: 16px; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: rgba(0, 0, 0, 0.18);
  border-top: 1px solid var(--line);
}

.field { display: grid; gap: 6px; }
.field > span:first-child {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  font-weight: 600;
  text-transform: uppercase;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-3);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.field textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) center, calc(100% - 13px) center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}
.field code { background: var(--bg-3); padding: 2px 6px; border-radius: 4px; font-size: 0.82em; }

.cselect {
  position: relative;
  outline: none;
}
.cselect-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-3);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.cselect-trigger:hover { border-color: #2c2c3a; }
.cselect.open .cselect-trigger,
.cselect:focus-visible .cselect-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}
.cselect-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cselect-chevron {
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 200ms ease, color 200ms ease;
}
.cselect.open .cselect-chevron { transform: rotate(180deg); color: var(--accent); }

.cselect-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  max-height: 240px;
  overflow-y: auto;
  z-index: 20;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.cselect.open .cselect-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.cselect-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.92rem;
  color: var(--text);
  background: transparent;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  text-align: left;
  width: 100%;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
  user-select: none;
}
.cselect-option:hover,
.cselect-option:focus { background: var(--bg-3); color: var(--text); outline: none; }
.cselect-option[aria-selected="true"] {
  background: transparent;
  color: var(--accent);
  font-weight: 600;
}
.cselect-option[aria-selected="true"]:hover,
.cselect-option[aria-selected="true"]:focus {
  background: var(--bg-3);
}
.cselect-option[aria-selected="true"]::after {
  content: "";
  margin-left: auto;
  width: 5px;
  height: 9px;
  border: solid var(--accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-2px);
  flex-shrink: 0;
}
.cselect-menu::-webkit-scrollbar { width: 8px; }
.cselect-menu::-webkit-scrollbar-track { background: transparent; }
.cselect-menu::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 999px;
  border: 2px solid var(--bg-2);
  background-clip: padding-box;
}

.key-display {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(34, 211, 238, 0.06));
  border: 1px solid var(--accent);
  border-radius: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12), inset 0 0 30px rgba(124, 58, 237, 0.06);
}
.key-display code {
  flex: 1;
  background: none;
  border: none;
  padding: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
  letter-spacing: 0.02em;
}
.key-display .btn { flex-shrink: 0; }
.result-success {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 10px;
  color: #4ade80;
  font-size: 0.88rem;
  font-weight: 500;
}
.result-success svg { flex-shrink: 0; }

.toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 200;
  pointer-events: none;
}
.toast {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 18px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 280ms cubic-bezier(0.2, 0.7, 0.2, 1), opacity 200ms ease;
  pointer-events: auto;
  max-width: 380px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.toast-ok { border-color: rgba(34, 197, 94, 0.4); }
.toast-ok::before { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15); }
.toast-err { border-color: rgba(239, 68, 68, 0.4); color: #fecaca; }
.toast-err::before { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15); }
@media (max-width: 480px) {
  .toast-stack { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: none; }
}

@media (max-width: 720px) {
  .page-head { align-items: flex-start; flex-direction: column; }
  .page-head .btn { width: 100%; justify-content: center; }
  .modal { padding: 16px; }
  .modal-head { padding: 16px 18px; }
  .modal-body { padding: 18px; }
  .modal-foot { padding: 12px 18px; flex-direction: column-reverse; }
  .modal-foot .btn { width: 100%; }
}

.link-accent { color: var(--accent); font-weight: 600; }
.link-accent:hover { color: var(--accent-2); }
.pricing-card-featured {
  border-color: rgba(124, 58, 237, 0.45);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.10), rgba(34, 211, 238, 0.04));
}
.pricing-card-featured::before {
  content: "Best value";
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.tx-list {
  display: grid;
  gap: 6px;
}
.tx-debit { color: #fca5a5; }
.tx-credit { color: #4ade80; }
.tx-empty { padding: 16px; text-align: center; }

.apply-wrap { max-width: 880px; margin: 0 auto; }
.apply-form { padding: 32px; }
.apply-section { padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.apply-section:last-of-type { border-bottom: 0; padding-bottom: 8px; margin-bottom: 8px; }
.apply-section h2 { font-size: 1.1rem; margin: 0 0 4px; }
.apply-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.apply-field-wide { grid-column: 1 / -1; }
.apply-form .field > span:first-child em {
  font-style: normal;
  color: var(--accent);
  font-weight: 600;
  margin-left: 6px;
  font-size: 0.7rem;
  text-transform: uppercase;
}
.apply-form .hint { margin: 0; }
.apply-actions { display: grid; gap: 14px; justify-items: start; padding-top: 8px; }
.apply-actions .btn { min-width: 220px; }
.apply-error {
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  font-size: 0.9rem;
  width: 100%;
}
@media (max-width: 720px) {
  .apply-form { padding: 22px; }
  .apply-grid { grid-template-columns: 1fr; }
  .apply-actions .btn { width: 100%; min-width: 0; }
}
@media (max-width: 980px) {
  .email-edit-grid { grid-template-columns: 1fr; }
  .email-edit-form { border-right: 0; border-bottom: 1px solid var(--line); }
}

.status-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; padding: 4px; }
.status-tile {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  display: grid;
  gap: 12px;
}
.status-tile-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.status-tile-product { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.status-tile-game { margin-top: 2px; }
.status-tile-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: 0.85rem; color: var(--text); }
.status-tile-meta strong { font-size: 0.9rem; }
.status-tile-meta code, .status-tile-meta strong { word-break: break-word; }
.status-tile-note { padding: 8px 10px; background: var(--bg-2); border-radius: 8px; }
.status-tile-actions { display: flex; justify-content: flex-end; }
.pill.pill-warn { background: rgba(234, 179, 8, 0.14); color: #fcd34d; border: 1px solid rgba(234, 179, 8, 0.3); }
.pill.pill-err { background: rgba(239, 68, 68, 0.14); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }

.sidebar-pw-btn { margin-bottom: 8px; }
.loader-lock-banner .btn { flex-shrink: 0; }
body.loader-locked main.content > section,
body.loader-locked main.content > div:not(.loader-lock-banner):not(.page-head) {
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 200ms ease;
  filter: grayscale(0.4);
}
body.loader-locked main.content > .page-head { opacity: 1 !important; pointer-events: auto !important; filter: none !important; }
body.loader-locked main.content > .loader-lock-banner { opacity: 1 !important; pointer-events: auto !important; filter: none !important; }
body.loader-locked main.content > .page-head .btn { opacity: 0.4 !important; pointer-events: none !important; filter: grayscale(0.7) !important; cursor: not-allowed !important; }
body.loader-locked .loader-lock-banner .btn { opacity: 1 !important; pointer-events: auto !important; filter: none !important; cursor: pointer !important; }
.btn:disabled, .btn[disabled] {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  filter: grayscale(0.5);
  pointer-events: none;
}
.color-input-wrap input.color-native[type="color"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  left: -9999px !important;
}
.color-input-wrap.cp-active { cursor: default; }

.color-trigger {
  appearance: none;
  background: transparent;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--text);
  cursor: pointer;
}
.cp-pop {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 200;
  width: 260px;
  padding: 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  display: grid;
  gap: 12px;
  user-select: none;
}
.cp-sv {
  position: relative;
  width: 100%;
  height: 160px;
  border-radius: 10px;
  overflow: hidden;
  cursor: crosshair;
  outline: none;
}
.cp-sv-grad { position: absolute; inset: 0; }
.cp-sv-dot {
  position: absolute;
  width: 14px; height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
  pointer-events: none;
}
.cp-row { display: flex; align-items: center; gap: 10px; }
.cp-hue {
  position: relative;
  flex: 1;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
  cursor: ew-resize;
  outline: none;
}
.cp-hue-dot {
  position: absolute;
  top: 50%;
  width: 16px; height: 16px;
  border: 2px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
  pointer-events: none;
}
.cp-foot { display: flex; align-items: center; gap: 10px; }
.cp-preview {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.cp-hex {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-3);
  color: var(--text);
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.88rem;
  text-transform: uppercase;
}
.cp-hex:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,58,237,0.18); }

.dtp-wrap { position: relative; display: inline-block; }
.dtp-wrap input.dtp-input { cursor: pointer; }
.audit-filters .dtp-wrap input.dtp-input { width: 220px; }
.dtp-pop {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 200;
  width: 260px;
  padding: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  display: grid;
  gap: 8px;
  user-select: none;
}
.dtp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dtp-nav, .dtp-month {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 140ms ease;
}
.dtp-nav:hover, .dtp-month:hover { background: var(--bg-3); }
.dtp-nav { font-size: 1.1rem; line-height: 1; padding: 6px 12px; color: var(--muted); }
.dtp-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dtp-dow span {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  text-align: center;
  padding: 4px 0;
}
.dtp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dtp-day {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  padding: 6px 0;
  border-radius: 6px;
  cursor: pointer;
  transition: background 120ms ease;
}
.dtp-day:hover { background: var(--bg-3); }
.dtp-day.is-muted { color: var(--muted); opacity: 0.4; }
.dtp-day.is-today { box-shadow: inset 0 0 0 1px var(--accent); }
.dtp-day.is-selected { background: var(--accent); color: #fff; font-weight: 600; }
.dtp-time { display: flex; align-items: center; gap: 6px; padding: 8px 4px 0; border-top: 1px solid var(--line); }
.dtp-time-label { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; flex: 1; }
.dtp-time-input {
  width: 48px;
  padding: 6px 8px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.85rem;
  text-align: center;
  -moz-appearance: textfield;
}
.dtp-time-input::-webkit-outer-spin-button, .dtp-time-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dtp-time-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(124,58,237,0.18); }
.dtp-time-sep { color: var(--muted); font-weight: 700; }
.dtp-foot { display: flex; justify-content: space-between; padding-top: 6px; border-top: 1px solid var(--line); }
.dtp-link {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 6px;
  cursor: pointer;
}
.dtp-link:hover { color: var(--text); }
.dtp-link-accent { color: var(--accent); }
.dtp-link-accent:hover { color: var(--accent); filter: brightness(1.2); }

.audit-filters { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 16px; align-items: center; }
.audit-filters .search-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
  max-width: 380px;
}
.audit-filters .search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.audit-filters .search-wrap input.search {
  width: 100%;
  padding: 10px 12px 10px 36px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.audit-filters .audit-input {
  width: 200px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-3);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  color-scheme: dark;
}
.audit-filters input.search:focus,
.audit-filters .audit-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.18);
}
.audit-filters input::placeholder { color: var(--muted); opacity: 0.7; }
.audit-datetime {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.audit-datetime svg { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.audit-datetime input { padding-left: 36px; }

.filter-tabs { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 2px; }
.filter-tab {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 8px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}
.filter-tab:hover { color: var(--text); }
.filter-tab.active { background: var(--bg-3); color: var(--text); }

.sidebar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: auto;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.app-detail { display: grid; gap: 16px; }
.app-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.app-detail-row { display: grid; gap: 4px; }
.app-detail-row .label { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.app-detail-row .value { font-size: 0.92rem; color: var(--text); word-break: break-word; }
.app-detail-row .value a { color: var(--accent); }
.app-detail-row.wide { grid-column: 1 / -1; }
.app-detail-row .value.muted { color: var(--muted); }
.app-detail-row .value pre { white-space: pre-wrap; margin: 0; font-family: inherit; font-size: 0.92rem; line-height: 1.5; }
@media (max-width: 640px) { .app-detail-grid { grid-template-columns: 1fr; } }

.ticket-list-row { cursor: pointer; }
.ticket-list-row:hover td { background: var(--bg-3); }
.ticket-list-row.unread .subject { font-weight: 600; }
.unread-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: middle;
}
.ticket-status-open { background: rgba(245, 158, 11, 0.12); color: #fbbf24; border-color: rgba(245, 158, 11, 0.3); }
.ticket-status-pending { background: rgba(124, 58, 237, 0.14); color: #c4b5fd; border-color: rgba(124, 58, 237, 0.4); }
.ticket-status-resolved { background: rgba(34, 197, 94, 0.12); color: #4ade80; border-color: rgba(34, 197, 94, 0.3); }
@media (max-width: 900px) { .thread-wrap { grid-template-columns: 1fr; } }
.thread-side .setting-card { padding: 18px 20px; }
.thread-side .side-row .label { color: var(--muted); }
.thread-side .side-row .value { color: var(--text); text-align: right; word-break: break-word; }

.thread {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  max-height: 60vh;
  overflow-y: auto;
}
.thread-msg { display: flex; flex-direction: column; max-width: 78%; }
.thread-msg.is-me { align-self: flex-end; align-items: flex-end; }
.thread-msg.is-them { align-self: flex-start; align-items: flex-start; }
.thread-author {
  font-size: 0.74rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 6px 4px;
}
.thread-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--bg-3);
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  border: 1px solid var(--line);
}
.thread-msg.is-me .thread-bubble {
  background: var(--accent-soft);
  border-color: rgba(124, 58, 237, 0.35);
}
.thread-time {
  font-size: 0.7rem;
  color: var(--muted);
  margin: 4px 8px 0;
}
.thread-empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
}

.thread-reply {
  border-top: 1px solid var(--line);
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-2);
}
.thread-reply textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.5;
}
.thread-reply textarea:focus { outline: none; border-color: var(--accent); }
.thread-reply-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.thread-reply-actions .muted { font-size: 0.78rem; }
@media (max-width: 980px) { .analytics-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .analytics-grid { grid-template-columns: 1fr; } }
.analytics-tile .label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.analytics-tile .value { font-size: 1.5rem; font-weight: 700; margin-top: 6px; }
.analytics-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 24px; }
@media (max-width: 880px) { .analytics-charts { grid-template-columns: 1fr; } }
.analytics-chart {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
}
.analytics-chart h3 { margin: 0 0 8px; font-size: 0.92rem; font-weight: 600; }
.analytics-chart svg { width: 100%; height: 220px; display: block; }
.analytics-range {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-3);
  border-radius: 8px;
  border: 1px solid var(--line);
}
.analytics-range button {
  background: none;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
}
.analytics-range button.active {
  background: var(--accent-soft);
  color: var(--text);
}

/* ===== Mobile: table card-stack at <=640px ===== */
@media (max-width: 640px) {
  .table { min-width: 0; }
  .table thead { display: none; }
  .table tbody, .table tr, .table td, .table th { display: block; width: 100%; }
  .table tr {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    background: var(--bg-2);
  }
  .table tr:nth-child(even) { background: var(--bg-3); }
  .table tr.is-selected { background: var(--accent-soft); }
  .table td {
    padding: 6px 0;
    border: 0;
    text-align: left;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    min-width: 0;
  }
  .table td > * { min-width: 0; max-width: 100%; }
  .table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex-shrink: 0;
    font-weight: 600;
  }
  .table td:empty,
  .table td[data-label=""] { display: none; }
  .table td.row-check,
  .table td.actions { justify-content: flex-end; flex-wrap: wrap; }
  .table td.row-check::before,
  .table td.actions::before { display: none; }
  .table-pagination { padding: 12px; flex-direction: column; gap: 10px; }
  .table-pagination .pager { width: 100%; justify-content: center; }
  .table td code,
  .table td .key-cell { word-break: break-all; text-align: right; }
}

/* ===== Mobile: app shell polish <480px ===== */
@media (max-width: 480px) {
  .content { padding: 64px 14px 40px; }
  .page-head h1 { font-size: 1.5rem; }
  .page-head { gap: 14px; }
  .page-head .btn,
  .page-head a.btn { width: 100%; }
  .stat-value { font-size: 1.4rem; }
  .stats { gap: 10px; }
  .analytics-tile { padding: 14px 14px; }
  .analytics-tile .value { font-size: 1.25rem; }
  .modal-head { padding: 16px 18px; }
  .modal-body { padding: 18px; }
  .modal-foot { padding: 14px 18px; }
  .sidebar { width: min(280px, calc(100vw - 56px)); }
  .sidebar.open::after { left: min(280px, calc(100vw - 56px)); }
  .toast-stack { left: 12px; right: 12px; bottom: 12px; }
  .thread-msg { max-width: 92%; }
  .table-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .table-toolbar .toolbar-meta { flex-wrap: wrap; }
}

/* ===== Mobile: public site polish <480px ===== */
@media (max-width: 480px) {
  .section { padding: 56px 0; }
  .section .container { padding: 0 18px; }
  .nav .container { padding: 14px 18px; }
  .page-hero { padding: 48px 0 36px; }
  .page-hero .container { padding: 0 18px; }
  .hero { padding: 64px 0 56px; }
  .hero-grid { gap: 36px; }
  .loader-window { max-width: 100%; }
  .product { padding: 20px; }
  .footer-top { flex-direction: column; align-items: flex-start; gap: 18px; }
  .footer-links { gap: 14px; row-gap: 10px; }
  .apply-form .card-block { padding: 20px; }
  .legal-shell { padding: 0 18px; }
  .legal-shell h1 { font-size: 1.85rem; }
  .legal-shell h2 { font-size: 1.15rem; }
}


body[data-page="radar"] { height: 100vh; overflow: hidden; }

.radar-nav .nav-inner { gap: 16px; }
.radar-nav .brand { flex: 0 0 auto; }
.radar-mode:hover:not(.active) { color: var(--text); background: rgba(255,255,255,0.03); }
.radar-mode.active {
  background: linear-gradient(135deg, var(--accent), #6d28d9);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.32);
}
.radar-pill .dot { width: 8px; height: 8px; }
.overlay-msg .overlay-card .eyebrow { display: inline-block; margin-bottom: 14px; }
.radar-hud .k { color: var(--muted); text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.08em; }
.radar-hud .v { color: var(--text); font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
  .radar-nav .nav-inner { gap: 10px; flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; }
  .radar-status { gap: 6px; }
  .radar-pill { padding: 5px 10px; font-size: 0.78rem; }
  .radar-stage { top: auto; position: relative; height: calc(100vh - 120px); }
  .overlay-msg .overlay-card { padding: 24px; }
  .overlay-msg .overlay-card h2 { font-size: 1.25rem; }
}
.radar-showcase-chrome .pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text);
}
.radar-showcase-chrome .pill .dot { width: 7px; height: 7px; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.15); }
@media (max-width: 900px) { .radar-showcase-body { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .radar-feature-grid { grid-template-columns: 1fr; } }

.page-head h1 .eyebrow.h1-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 12px;
  margin: 0 0 0 12px;
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 1;
  vertical-align: middle;
  position: relative;
  top: -0.22em;
}
.radar-dns-rec .k { color: var(--muted); text-transform: uppercase; font-size: 0.66rem; letter-spacing: 0.08em; }
.radar-dns-rec .v { color: var(--text); }
.settings-tab:hover:not(.active) { color: var(--text); background: rgba(255,255,255,0.03); }
.settings-tab.active {
  background: linear-gradient(135deg, var(--accent), #6d28d9);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.32);
}
.setup-steps .step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
}
.setup-table .k {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  align-self: center;
}
.setup-table .v { color: var(--text); }
@media (max-width: 600px) {
  .setup-table > div { grid-template-columns: 1fr; gap: 2px; }
}
