:root {
  color-scheme: dark;
  --font-sans: "Inter", "Segoe UI Variable", "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", Consolas, ui-monospace, monospace;
  --bg: #07090d;
  --bg-soft: #0a0e14;
  --panel: #10151f;
  --panel-2: #141b27;
  --panel-3: #1a2331;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #eef3f8;
  --text-soft: #c2cbda;
  --muted: #8996a9;
  --muted-2: #5f6b7c;
  --lime: #c9f56b;
  --lime-strong: #d9ff86;
  --lime-soft: rgba(201, 245, 107, 0.12);
  --cyan: #72e7f2;
  --cyan-soft: rgba(114, 231, 242, 0.1);
  --amber: #ffbd68;
  --amber-soft: rgba(255, 189, 104, 0.12);
  --red: #ff7c7c;
  --red-soft: rgba(255, 124, 124, 0.12);
  --green: #77e6a5;
  --green-soft: rgba(119, 230, 165, 0.1);
  --violet: #b8a4ff;
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow-lg: 0 32px 90px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 14px 40px rgba(0, 0, 0, 0.28);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(1100px 680px at 8% -12%, rgba(201, 245, 107, 0.07), transparent 56%),
    radial-gradient(900px 580px at 102% 0%, rgba(114, 231, 242, 0.06), transparent 52%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 20%, transparent 80%);
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-sans);
}

button,
input,
select,
textarea {
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

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

img,
svg {
  display: block;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--lime);
  color: #090c07;
}

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sm {
  width: 14px;
  height: 14px;
}

.icon-lg {
  width: 22px;
  height: 22px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 9px;
  background: var(--lime);
  color: #0b0f08;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.mono,
.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--muted);
}

.text-soft {
  color: var(--text-soft);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 10%, transparent);
}

.btn {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--lime);
  color: #0c1009;
  box-shadow: 0 10px 30px rgba(201, 245, 107, 0.13);
}

.btn-primary:hover {
  background: var(--lime-strong);
  box-shadow: 0 12px 34px rgba(201, 245, 107, 0.2);
}

.btn-secondary {
  border-color: var(--line-strong);
  background: var(--panel-3);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: #202a39;
}

.btn-ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.018);
  color: var(--text-soft);
}

.btn-ghost:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}

.btn-danger {
  border-color: rgba(255, 124, 124, 0.26);
  background: var(--red-soft);
  color: #ffa1a1;
}

.btn-danger:hover {
  border-color: rgba(255, 124, 124, 0.46);
  background: rgba(255, 124, 124, 0.18);
}

.btn-sm {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 11.5px;
}

.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.icon-btn {
  position: relative;
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted);
  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
}

.icon-btn:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.icon-btn.is-danger:hover {
  border-color: rgba(255, 124, 124, 0.3);
  background: var(--red-soft);
  color: #ffa1a1;
}

.icon-btn .icon {
  width: 17px;
  height: 17px;
}

.pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

.pill-success {
  border-color: rgba(119, 230, 165, 0.2);
  background: var(--green-soft);
  color: var(--green);
}

.pill-info {
  border-color: rgba(114, 231, 242, 0.18);
  background: var(--cyan-soft);
  color: var(--cyan);
}

.pill-warning {
  border-color: rgba(255, 189, 104, 0.2);
  background: var(--amber-soft);
  color: var(--amber);
}

.pill-danger {
  border-color: rgba(255, 124, 124, 0.2);
  background: var(--red-soft);
  color: #ffa1a1;
}

.pill-muted {
  color: var(--muted);
}

.card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), transparent 34%),
    linear-gradient(180deg, rgba(16, 21, 31, 0.98), rgba(11, 15, 22, 0.98));
  box-shadow: var(--shadow-md);
}

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

.card-head h2 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.card-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11.5px;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- Admin shell ---------- */

.admin-shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: 100dvh;
}

.sidebar {
  position: sticky;
  inset-block-start: 0;
  display: flex;
  height: 100dvh;
  flex-direction: column;
  gap: 18px;
  padding: 22px 14px 16px;
  overflow-y: auto;
  border-inline-end: 1px solid var(--line);
  background: rgba(7, 10, 15, 0.76);
  backdrop-filter: blur(22px);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 7px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.32), transparent 45%),
    linear-gradient(145deg, var(--lime), #81b83b);
  color: #0b0f08;
  box-shadow:
    0 8px 24px rgba(201, 245, 107, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.brand-mark .icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.brand-word {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.16em;
}

.brand-sub {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
}

.workspace-switch {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-soft);
  text-align: left;
}

.workspace-switch:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
}

.workspace-icon {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  background: var(--lime-soft);
  color: var(--lime);
}

.workspace-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 1px;
}

.workspace-copy strong {
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-copy span {
  color: var(--muted-2);
  font-size: 9.5px;
}

.workspace-switch > .icon {
  width: 13px;
  height: 13px;
  color: var(--muted-2);
  transform: rotate(90deg);
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-label {
  margin: 9px 10px 4px;
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-item {
  position: relative;
  display: flex;
  min-height: 39px;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
}

.nav-item .icon {
  width: 16px;
  height: 16px;
  opacity: 0.76;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
}

.nav-item.is-active {
  border-color: rgba(201, 245, 107, 0.12);
  background:
    linear-gradient(90deg, rgba(201, 245, 107, 0.14), rgba(201, 245, 107, 0.03) 72%, transparent);
  color: var(--text);
}

.nav-item.is-active::before {
  position: absolute;
  inset-block: 9px;
  inset-inline-start: -1px;
  width: 2px;
  border-radius: 999px;
  background: var(--lime);
  box-shadow: 0 0 14px rgba(201, 245, 107, 0.7);
  content: "";
}

.nav-item.is-active .icon {
  color: var(--lime);
  opacity: 1;
}

.nav-count {
  min-width: 20px;
  margin-inline-start: auto;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  text-align: center;
}

.nav-item.is-active .nav-count {
  background: rgba(201, 245, 107, 0.12);
  color: var(--lime);
}

.sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-block-start: auto;
}

.usage-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.usage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-block-end: 11px;
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 600;
}

.usage-head .icon {
  width: 14px;
  height: 14px;
  color: var(--cyan);
}

.usage-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 8px;
  margin-block-start: 9px;
  color: var(--muted-2);
  font-size: 9px;
}

.usage-row strong {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
}

.usage-bar {
  grid-column: 1 / -1;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.usage-bar span {
  display: block;
  width: var(--w, 20%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lime), #77c85a);
}

.usage-bar.is-cyan span {
  background: linear-gradient(90deg, var(--cyan), #4faec0);
}

.user-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 5px 0;
}

.avatar {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  background: linear-gradient(145deg, #263145, #151c28);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.user-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 1px;
}

.user-copy strong {
  font-size: 10.5px;
  font-weight: 650;
}

.user-copy span {
  color: var(--muted-2);
  font-size: 9px;
}

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

.topbar {
  position: sticky;
  inset-block-start: 0;
  z-index: 30;
  display: flex;
  height: 68px;
  align-items: center;
  gap: 18px;
  padding: 0 30px;
  border-block-end: 1px solid var(--line);
  background: rgba(7, 10, 15, 0.78);
  backdrop-filter: blur(20px);
}

.breadcrumbs {
  display: flex;
  min-width: 150px;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-size: 11px;
  white-space: nowrap;
}

.breadcrumbs span:last-child {
  color: var(--text-soft);
}

.breadcrumbs .icon {
  width: 12px;
  height: 12px;
}

.top-search {
  display: flex;
  width: min(380px, 36vw);
  align-items: center;
}

.top-search form {
  width: 100%;
}

.search-box {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  transition:
    border-color 160ms ease,
    background 160ms ease;
}

.search-box:focus-within {
  border-color: rgba(201, 245, 107, 0.4);
  background: rgba(255, 255, 255, 0.04);
}

.search-box .icon {
  width: 15px;
  height: 15px;
  color: var(--muted-2);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 11.5px;
}

.search-box input::placeholder {
  color: var(--muted-2);
}

.search-kbd {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  white-space: nowrap;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-inline-start: auto;
}

.status-chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid rgba(119, 230, 165, 0.15);
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 9.5px;
  font-weight: 650;
}

.status-chip .dot {
  width: 5px;
  height: 5px;
  box-shadow: 0 0 0 3px rgba(119, 230, 165, 0.1);
}

.notif-dot {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-end: 8px;
  width: 5px;
  height: 5px;
  border: 1px solid var(--bg);
  border-radius: 999px;
  background: var(--amber);
}

.menu-toggle {
  display: none;
}

.content {
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: 29px 30px 52px;
}

.view[hidden] {
  display: none;
}

.view.is-active {
  animation: view-in 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-block-end: 22px;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(25px, 2.2vw, 33px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.page-head h1:focus {
  outline: none;
}

.page-sub {
  max-width: 580px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.seg-btn {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 650;
  transition:
    background 150ms ease,
    color 150ms ease;
}

.seg-btn:hover {
  color: var(--text-soft);
}

.seg-btn.is-active {
  background: var(--panel-3);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

/* ---------- Stats ---------- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-block-end: 16px;
}

.stat-card {
  position: relative;
  min-width: 0;
  padding: 16px 16px 13px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    radial-gradient(220px 120px at 100% 0%, rgba(201, 245, 107, 0.045), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.008)),
    var(--panel);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.stat-card::after {
  position: absolute;
  inset-block-start: -20px;
  inset-inline-end: -20px;
  width: 80px;
  height: 80px;
  border-radius: 999px;
  background: rgba(201, 245, 107, 0.06);
  filter: blur(28px);
  content: "";
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
}

.trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 650;
}

.trend .icon {
  width: 11px;
  height: 11px;
}

.trend.is-up {
  color: var(--green);
}

.trend.is-down {
  color: #ff9a9a;
}

.stat-value {
  margin: 12px 0 3px;
  font-size: clamp(25px, 2.4vw, 31px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted-2);
  font-size: 9.5px;
}

.sparkline {
  width: 86px;
  height: 27px;
  overflow: visible;
}

.sparkline path {
  fill: none;
  stroke: var(--lime);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.sparkline.is-cyan path {
  stroke: var(--cyan);
}

.sparkline.is-amber path {
  stroke: var(--amber);
}

.sparkline.is-violet path {
  stroke: var(--violet);
}

/* ---------- Dashboard ---------- */

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.68fr) minmax(300px, 0.92fr);
  gap: 15px;
}

.chart-card {
  grid-column: 1;
}

.channel-card {
  grid-column: 2;
}

.keys-card {
  grid-column: 1;
}

.activity-card {
  grid-column: 2;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px;
  color: var(--muted);
  font-size: 9.5px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: var(--lime);
}

.legend-swatch.is-cyan {
  background: var(--cyan);
}

.chart-figure {
  margin: 0;
  padding: 12px 16px 0;
}

#trend-chart {
  width: 100%;
  height: auto;
  min-height: 250px;
}

.chart-grid-line {
  stroke: rgba(255, 255, 255, 0.055);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.chart-axis-text {
  fill: var(--muted-2);
  font-family: var(--font-sans);
  font-size: 9.5px;
}

.chart-line-activation,
.chart-line-launch {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.chart-line-activation {
  stroke: var(--lime);
  stroke-width: 2.3;
}

.chart-line-launch {
  stroke: var(--cyan);
  stroke-width: 1.8;
  opacity: 0.9;
}

.chart-area {
  fill: url(#chart-area-gradient);
}

.chart-dot {
  fill: var(--lime);
  stroke: #0b0f16;
  stroke-width: 3;
}

.chart-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 20px 17px;
  color: var(--muted-2);
  font-size: 9.5px;
}

.chart-foot strong {
  color: var(--text-soft);
  font-weight: 600;
}

.channel-list {
  display: flex;
  flex-direction: column;
  margin-block-start: 10px;
}

.channel-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  padding: 11px 20px;
  border-block-start: 1px solid var(--line);
}

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

.channel-avatar {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 700;
}

.channel-meta {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.channel-meta strong {
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-meta span {
  color: var(--muted-2);
  font-size: 8.5px;
}

.channel-value {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.channel-bar {
  grid-column: 1 / -1;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.channel-bar span {
  display: block;
  width: var(--w, 50%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lime), #81c957);
}

.channel-row:nth-child(2) .channel-bar span {
  background: linear-gradient(90deg, var(--cyan), #4db7c4);
}

.channel-row:nth-child(3) .channel-bar span {
  background: linear-gradient(90deg, var(--violet), #7a67d2);
}

.channel-row:nth-child(4) .channel-bar span {
  background: linear-gradient(90deg, var(--amber), #c78a39);
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px 0 10px;
  margin: 0;
  list-style: none;
}

.activity-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 20px;
}

.activity-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--lime);
}

.activity-icon .icon {
  width: 13px;
  height: 13px;
}

.activity-icon.is-cyan {
  color: var(--cyan);
}

.activity-icon.is-amber {
  color: var(--amber);
}

.activity-icon.is-violet {
  color: var(--violet);
}

.activity-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.activity-copy p {
  margin: 0;
  color: var(--text-soft);
  font-size: 10.5px;
  line-height: 1.45;
}

.activity-copy p strong {
  color: var(--text);
  font-weight: 650;
}

.activity-copy time {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

/* ---------- Tables ---------- */

.table-shell {
  width: 100%;
  max-inline-size: 100%;
  overflow: auto;
  container-type: inline-size;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.table-shell:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: -2px;
}

.keys-card .table-shell {
  max-block-size: 318px;
}

.recent-keys {
  min-inline-size: 0;
}

.keys-view-table {
  max-block-size: 590px;
}

.data-table {
  width: 100%;
  min-inline-size: 760px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11.5px;
}

.data-table caption {
  text-align: start;
}

.data-table thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 3;
}

.data-table thead th {
  padding: 10px 14px;
  border-block-end: 1px solid var(--line);
  background: #10151f;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: start;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table tbody th,
.data-table tbody td {
  padding: 11px 14px;
  border-block-end: 1px solid rgba(255, 255, 255, 0.045);
  color: var(--text-soft);
  font-weight: 450;
  text-align: start;
  vertical-align: middle;
}

.data-table tbody th {
  position: sticky;
  inset-inline-start: 0;
  z-index: 2;
  background: #10151f;
  color: var(--text);
  font-weight: 500;
}

.data-table tbody tr {
  transition: background 140ms ease;
}

.data-table tbody tr:hover th,
.data-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.028);
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
  border-block-end: 0;
}

.data-table th:first-child,
.data-table td:first-child {
  padding-inline-start: 20px;
}

.data-table th:last-child,
.data-table td:last-child {
  padding-inline-end: 20px;
}

.th-sort {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.th-sort .icon {
  width: 11px;
  height: 11px;
  opacity: 0.4;
  transition: transform 150ms ease;
}

.data-table th[aria-sort] .th-sort {
  color: var(--text);
}

.data-table th[aria-sort] .th-sort .icon {
  color: var(--lime);
  opacity: 1;
}

.data-table th[aria-sort="ascending"] .th-sort .icon {
  transform: rotate(180deg);
}

.key-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.key-link .icon {
  width: 12px;
  height: 12px;
  color: var(--muted-2);
}

.key-link:hover {
  color: var(--lime);
}

.key-link:hover .icon {
  color: var(--lime);
}

.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.icon-action {
  display: inline-grid;
  width: 27px;
  height: 27px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-2);
}

.icon-action:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.icon-action.is-danger:hover {
  border-color: rgba(255, 124, 124, 0.26);
  background: var(--red-soft);
  color: #ffa1a1;
}

.icon-action .icon {
  width: 14px;
  height: 14px;
}

.table-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px 14px;
  border-block-start: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 9.5px;
}

.table-foot strong {
  color: var(--text-soft);
  font-weight: 600;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-btn {
  display: grid;
  min-width: 28px;
  width: auto;
  height: 28px;
  place-items: center;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  white-space: nowrap;
}

.page-btn:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.page-btn.is-active {
  border-color: rgba(201, 245, 107, 0.24);
  background: var(--lime-soft);
  color: var(--lime);
}

.page-btn .icon {
  width: 12px;
  height: 12px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding: 11px;
  margin-block-end: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.02);
}

.toolbar .search-box {
  flex: 1 1 240px;
}

.select {
  min-height: 38px;
  padding: 0 31px 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  appearance: none;
  background-color: rgba(255, 255, 255, 0.025);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238996a9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  color: var(--text-soft);
  font-size: 10.5px;
}

.select:focus {
  border-color: rgba(201, 245, 107, 0.4);
}

.toolbar-spacer {
  flex: 1 1 auto;
}

.count-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
  font-size: 9.5px;
  white-space: nowrap;
}

.count-chip strong {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-weight: 500;
}

/* ---------- Product / batch / reseller cards ---------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-block-end: 15px;
}

.product-card {
  padding: 17px;
}

.product-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.product-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(201, 245, 107, 0.15), rgba(255, 255, 255, 0.02));
  color: var(--lime);
}

.product-card:nth-child(2) .product-icon {
  background: linear-gradient(145deg, rgba(114, 231, 242, 0.13), rgba(255, 255, 255, 0.02));
  color: var(--cyan);
}

.product-card:nth-child(3) .product-icon {
  background: linear-gradient(145deg, rgba(184, 164, 255, 0.13), rgba(255, 255, 255, 0.02));
  color: var(--violet);
}

.product-card h3 {
  margin: 13px 0 4px;
  font-size: 14px;
  font-weight: 650;
}

.product-card p {
  min-height: 34px;
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}

.product-metrics {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-block-start: 14px;
  padding-block-start: 12px;
  border-block-start: 1px solid var(--line);
}

.product-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-metric strong {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

.product-metric span {
  color: var(--muted-2);
  font-size: 8.5px;
}

.product-plans {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-block-start: 12px;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin-block-end: 14px;
}

.mini-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.mini-stat-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--lime);
}

.mini-stat-icon.is-cyan {
  color: var(--cyan);
}

.mini-stat-icon.is-amber {
  color: var(--amber);
}

.mini-stat-icon.is-violet {
  color: var(--violet);
}

.mini-stat-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.mini-stat-copy strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.mini-stat-copy span {
  color: var(--muted-2);
  font-size: 8.5px;
}

.reseller-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin-block-end: 14px;
}

.reseller-card {
  padding: 14px;
}

.reseller-card .channel-person {
  margin-block-end: 12px;
}

.reseller-card .channel-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(201, 245, 107, 0.12), var(--panel-2));
  color: var(--lime);
}

.reseller-card:nth-child(2) .channel-avatar {
  background: linear-gradient(145deg, rgba(114, 231, 242, 0.12), var(--panel-2));
  color: var(--cyan);
}

.reseller-card:nth-child(3) .channel-avatar {
  background: linear-gradient(145deg, rgba(184, 164, 255, 0.12), var(--panel-2));
  color: var(--violet);
}

.reseller-card:nth-child(4) .channel-avatar {
  background: linear-gradient(145deg, rgba(255, 189, 104, 0.12), var(--panel-2));
  color: var(--amber);
}

.reseller-value {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.reseller-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-block-start: 9px;
  padding-block-start: 9px;
  border-block-start: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 8.5px;
}

.reseller-note strong {
  color: var(--green);
  font-family: var(--font-mono);
  font-weight: 600;
}

/* ---------- Dialogs ---------- */

dialog {
  width: min(570px, calc(100vw - 28px));
  max-height: min(86dvh, 780px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.65);
}

dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  background: rgba(2, 4, 7, 0.7);
  backdrop-filter: blur(8px);
  overscroll-behavior: contain;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 0;
}

.dialog-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 680;
  letter-spacing: -0.03em;
}

.dialog-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10.5px;
}

.dialog-body {
  padding: 18px 20px 20px;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-block-start: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.014);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.field.is-wide {
  grid-column: 1 / -1;
}

.field label {
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 600;
}

.field-hint {
  color: var(--muted-2);
  font-size: 9.5px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 41px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  background: rgba(255, 255, 255, 0.024);
  color: var(--text);
  font-size: 11.5px;
}

.field textarea {
  min-height: 76px;
  padding-block: 9px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(201, 245, 107, 0.38);
  background: rgba(255, 255, 255, 0.035);
}

.field input:user-invalid,
.field select:user-invalid,
.field textarea:user-invalid {
  border-color: rgba(255, 124, 124, 0.6);
  background: rgba(255, 124, 124, 0.05);
}

.field-error {
  display: none;
  color: #ff9a9a;
  font-size: 9.5px;
}

.field input:user-invalid + .field-error,
.field select:user-invalid + .field-error {
  display: block;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 10.5px;
}

.check-row input {
  width: 15px;
  height: 15px;
  accent-color: var(--lime);
}

.dialog-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-block-start: 14px;
  padding: 10px 11px;
  border: 1px solid rgba(114, 231, 242, 0.14);
  border-radius: 9px;
  background: var(--cyan-soft);
  color: #9fdfe5;
  font-size: 9.5px;
  line-height: 1.5;
}

.dialog-note .icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  margin-block-start: 1px;
}

.key-detail-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.02);
}

.key-detail-value {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
  margin-block-start: 14px;
}

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-block-end: 1px solid rgba(255, 255, 255, 0.045);
  font-size: 10.5px;
}

.detail-row span {
  color: var(--muted);
}

.detail-row strong {
  color: var(--text-soft);
  font-weight: 550;
  text-align: end;
}

.device-mini-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-block-start: 14px;
}

.device-mini {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.018);
}

.device-mini .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.device-mini div {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 1px;
}

.device-mini strong {
  font-size: 10px;
  font-weight: 600;
}

.device-mini span {
  color: var(--muted-2);
  font-size: 8.5px;
}

.danger-note {
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 124, 124, 0.2);
  border-radius: 10px;
  background: var(--red-soft);
  color: #ffb3b3;
  font-size: 10.5px;
  line-height: 1.55;
}

.danger-note .icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: #ff9a9a;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  inset: auto 22px 22px auto;
  z-index: 80;
  display: flex;
  width: min(360px, calc(100vw - 30px));
  align-items: flex-start;
  gap: 11px;
  padding: 13px 13px 13px 12px;
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #151c27;
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

.toast:not(:popover-open):not(.is-fallback-open) {
  display: none;
}

.toast.is-fallback-open {
  display: flex;
}

.toast-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
}

.toast[data-tone="info"] .toast-icon {
  background: var(--cyan-soft);
  color: var(--cyan);
}

.toast[data-tone="warning"] .toast-icon {
  background: var(--amber-soft);
  color: var(--amber);
}

.toast[data-tone="danger"] .toast-icon {
  background: var(--red-soft);
  color: #ff9a9a;
}

.toast-icon .icon {
  width: 15px;
  height: 15px;
}

.toast-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.toast-copy strong {
  font-size: 10.5px;
  font-weight: 650;
}

.toast-copy span {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.45;
}

.toast-close {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-2);
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

/* ---------- Landing ---------- */

.landing-page {
  background:
    radial-gradient(1000px 700px at 12% -8%, rgba(201, 245, 107, 0.09), transparent 55%),
    radial-gradient(900px 620px at 95% 8%, rgba(114, 231, 242, 0.06), transparent 54%),
    #07090d;
}

.landing-shell {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 30px 56px;
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 6px 42px;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-brand .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.landing-brand-word {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.18em;
}

.landing-brand-tag {
  margin-inline-start: 4px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.landing-nav-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.05em;
}

.landing-nav-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.landing-nav-meta .dot {
  color: var(--green);
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.65fr);
  gap: 42px;
  align-items: end;
  padding-block: 22px 54px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-block-end: 18px;
  padding: 5px 9px;
  border: 1px solid rgba(201, 245, 107, 0.16);
  border-radius: 999px;
  background: var(--lime-soft);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
}

.hero-kicker .dot {
  width: 5px;
  height: 5px;
}

.hero-title {
  max-width: 760px;
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 680;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.hero-title span {
  color: var(--lime);
}

.hero-sub {
  max-width: 620px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-block-start: 26px;
}

.hero-actions .btn {
  min-height: 44px;
  padding-inline: 17px;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-block-start: 1px solid var(--line);
}

.hero-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-block-end: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
}

.hero-meta-row strong {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
}

.prototype-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.prototype-card {
  position: relative;
  display: flex;
  min-height: 390px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 35%),
    var(--panel);
  transition:
    border-color 200ms ease,
    transform 200ms ease,
    box-shadow 200ms ease;
}

.prototype-card:hover {
  border-color: rgba(201, 245, 107, 0.22);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  transform: translateY(-3px);
}

.prototype-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 21px 0;
}

.prototype-card-index {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
}

.prototype-card h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.prototype-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10.5px;
}

.prototype-card-arrow {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.prototype-card:hover .prototype-card-arrow {
  border-color: rgba(201, 245, 107, 0.2);
  background: var(--lime-soft);
  color: var(--lime);
}

.preview-frame {
  position: relative;
  flex: 1;
  margin: 18px 20px 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0a0e14;
}

.preview-browser-bar {
  display: flex;
  height: 27px;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border-block-end: 1px solid var(--line);
  background: #0e131c;
}

.preview-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #394351;
}

.preview-url {
  width: 46%;
  height: 9px;
  margin-inline: auto;
  border-radius: 999px;
  background: #171e29;
}

.preview-admin-body {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  min-height: 262px;
}

.preview-sidebar {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 8px;
  border-inline-end: 1px solid var(--line);
  background: #0b1017;
}

.preview-logo {
  width: 24px;
  height: 24px;
  margin: 0 0 9px 3px;
  border-radius: 7px;
  background: linear-gradient(145deg, var(--lime), #78aa38);
}

.preview-nav-line {
  height: 8px;
  border-radius: 3px;
  background: #161d28;
}

.preview-nav-line.is-active {
  background: rgba(201, 245, 107, 0.24);
}

.preview-main {
  min-width: 0;
  padding: 16px;
}

.preview-main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-block-end: 13px;
}

.preview-main-title {
  width: 42%;
  height: 11px;
  border-radius: 3px;
  background: #273141;
}

.preview-main-pill {
  width: 42px;
  height: 12px;
  border-radius: 999px;
  background: rgba(201, 245, 107, 0.2);
}

.preview-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-block-end: 11px;
}

.preview-stat {
  height: 45px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #111824;
}

.preview-stat::before {
  display: block;
  width: 35%;
  height: 4px;
  margin-block-end: 8px;
  border-radius: 2px;
  background: #2a3545;
  content: "";
}

.preview-stat::after {
  display: block;
  width: 60%;
  height: 8px;
  border-radius: 2px;
  background: #c9f56b;
  opacity: 0.72;
  content: "";
}

.preview-stat:nth-child(2)::after {
  background: #72e7f2;
}

.preview-stat:nth-child(3)::after {
  background: #b8a4ff;
}

.preview-chart {
  position: relative;
  height: 78px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    #0e141d;
  background-size: 24px 24px;
}

.preview-chart svg {
  position: absolute;
  inset: 12px 8px 8px;
  width: calc(100% - 16px);
  height: calc(100% - 20px);
}

.preview-table {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-block-start: 11px;
}

.preview-table-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.preview-table-row span {
  height: 6px;
  border-radius: 2px;
  background: #1d2634;
}

.preview-table-row span:first-child {
  width: 31%;
}

.preview-table-row span:nth-child(2) {
  width: 22%;
}

.preview-table-row span:nth-child(3) {
  width: 12%;
  background: rgba(119, 230, 165, 0.36);
}

.preview-table-row span:last-child {
  width: 8%;
  margin-inline-start: auto;
  background: #2c3646;
}

.packer-preview .preview-frame {
  margin-block-start: 18px;
  border-radius: 11px;
}

.preview-desktop {
  min-height: 292px;
  padding: 20px 18px;
  background:
    radial-gradient(400px 220px at 30% 0%, rgba(201, 245, 107, 0.08), transparent 70%),
    radial-gradient(400px 240px at 100% 100%, rgba(114, 231, 242, 0.08), transparent 70%),
    #070a0f;
}

.preview-app {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 9px;
  background: #0b1017;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.preview-titlebar {
  display: flex;
  height: 24px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border-block-end: 1px solid var(--line);
  background: #111721;
}

.preview-titlebar .preview-dot:first-child {
  background: #ff7c7c;
}

.preview-titlebar .preview-dot:nth-child(2) {
  background: #ffbd68;
}

.preview-titlebar .preview-dot:nth-child(3) {
  background: #77e6a5;
}

.preview-app-body {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  min-height: 228px;
}

.preview-rail {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 11px 7px;
  border-inline-end: 1px solid var(--line);
  background: #090d13;
}

.preview-step {
  display: flex;
  align-items: center;
  gap: 5px;
}

.preview-step::before {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 1px solid #2a3545;
  border-radius: 999px;
  content: "";
}

.preview-step::after {
  width: 40px;
  height: 5px;
  border-radius: 2px;
  background: #1a2330;
  content: "";
}

.preview-step.is-active::before {
  border-color: var(--lime);
  background: var(--lime);
  box-shadow: 0 0 12px rgba(201, 245, 107, 0.3);
}

.preview-step.is-active::after {
  background: rgba(201, 245, 107, 0.26);
}

.preview-content {
  padding: 14px;
}

.preview-content-title {
  width: 37%;
  height: 10px;
  margin-block-end: 8px;
  border-radius: 3px;
  background: #2b3647;
}

.preview-content-sub {
  width: 56%;
  height: 5px;
  margin-block-end: 15px;
  border-radius: 2px;
  background: #1b2431;
}

.preview-dropzone {
  display: grid;
  min-height: 88px;
  place-items: center;
  border: 1px dashed #2c3849;
  border-radius: 6px;
  background: #0d131c;
}

.preview-dropzone::before {
  width: 25px;
  height: 25px;
  border: 1px solid #354256;
  border-radius: 7px;
  content: "";
}

.preview-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-block-start: 10px;
}

.preview-field {
  height: 20px;
  border: 1px solid #202b3a;
  border-radius: 4px;
  background: #0d131c;
}

.preview-field.is-wide {
  grid-column: 1 / -1;
}

.preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-block-start: 12px;
}

.preview-footer span {
  width: 44%;
  height: 5px;
  border-radius: 2px;
  background: #1b2431;
}

.preview-footer strong {
  width: 34px;
  height: 17px;
  border-radius: 4px;
  background: var(--lime);
}

.design-notes {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 12px;
  margin-block-start: 16px;
}

.note-card {
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.note-card .eyebrow {
  margin-block-end: 7px;
}

.note-card strong {
  display: block;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
}

.note-card p {
  margin: 5px 0 0;
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.55;
}

.landing-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-block-start: 30px;
  padding-block-start: 16px;
  border-block-start: 1px solid var(--line);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
}

/* ---------- Packer desktop ---------- */

.packer-page {
  overflow: hidden;
  background: #05070a;
}

.desktop-stage {
  position: relative;
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 24px;
  overflow: auto;
  background:
    radial-gradient(900px 550px at 18% 0%, rgba(201, 245, 107, 0.08), transparent 62%),
    radial-gradient(900px 650px at 92% 100%, rgba(114, 231, 242, 0.07), transparent 62%),
    linear-gradient(160deg, #05070a, #080c12 55%, #05070a);
}

.desktop-stage::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, black 15%, transparent 75%);
}

.desktop-wallpaper-meta {
  position: absolute;
  inset: 18px 22px auto auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.16);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
}

.app-window {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(1240px, calc(100vw - 40px));
  height: min(820px, calc(100dvh - 42px));
  min-height: 620px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 42px minmax(0, 1fr) 29px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 13px;
  background: #0a0e15;
  box-shadow:
    0 50px 130px rgba(0, 0, 0, 0.66),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.window-titlebar {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border-block-end: 1px solid var(--line);
  background: #10161f;
  user-select: none;
}

.window-app-icon {
  display: grid;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
  background: linear-gradient(145deg, var(--lime), #7cae39);
  color: #0b0f08;
}

.window-app-icon .icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.1;
}

.window-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.window-title strong {
  color: var(--text);
  font-weight: 650;
}

.window-title span {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.window-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-inline-start: 11px;
  color: var(--muted-2);
  font-size: 9.5px;
}

.window-menu span:hover {
  color: var(--text-soft);
}

.window-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: auto;
}

.window-control {
  display: grid;
  width: 29px;
  height: 26px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted-2);
}

.window-control:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.window-control.is-close:hover {
  background: #c94545;
  color: white;
}

.window-control .icon {
  width: 12px;
  height: 12px;
}

.app-body {
  display: grid;
  min-height: 0;
  grid-template-columns: 224px minmax(0, 1fr);
}

.packer-rail {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 18px;
  padding: 20px 12px 14px;
  overflow-y: auto;
  border-inline-end: 1px solid var(--line);
  background: #080c12;
}

.rail-head {
  padding: 0 7px;
}

.rail-head .eyebrow {
  margin-block-end: 5px;
}

.rail-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.rail-steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rail-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  width: 100%;
  padding: 9px 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  text-align: start;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    color 150ms ease;
}

.rail-step:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
}

.rail-step.is-active {
  border-color: rgba(201, 245, 107, 0.14);
  background: linear-gradient(90deg, rgba(201, 245, 107, 0.11), rgba(201, 245, 107, 0.025));
  color: var(--text);
}

.rail-step.is-done .rail-step-num {
  border-color: rgba(119, 230, 165, 0.28);
  background: var(--green-soft);
  color: var(--green);
}

.rail-step-num {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.rail-step.is-active .rail-step-num {
  border-color: rgba(201, 245, 107, 0.35);
  background: var(--lime);
  color: #0b0f08;
  box-shadow: 0 0 18px rgba(201, 245, 107, 0.16);
}

.rail-step-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.rail-step-copy strong {
  font-size: 10px;
  font-weight: 600;
}

.rail-step-copy span {
  color: var(--muted-2);
  font-size: 8.5px;
  line-height: 1.35;
}

.rail-step.is-active .rail-step-copy span {
  color: rgba(201, 245, 107, 0.56);
}

.rail-foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-block-start: auto;
}

.recent-build {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.018);
}

.recent-build-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recent-build-head .icon {
  width: 12px;
  height: 12px;
}

.recent-build strong {
  display: block;
  margin-block-start: 8px;
  color: var(--text-soft);
  font-size: 9.5px;
  font-weight: 600;
}

.recent-build span {
  display: block;
  margin-block-start: 2px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
}

.packer-main {
  min-width: 0;
  min-height: 0;
  padding: 26px 30px 44px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.step-panel {
  max-width: 920px;
  margin: 0 auto;
}

.step-panel[hidden] {
  display: none !important;
}

.step-head {
  margin-block-end: 22px;
}

.step-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-block-end: 8px;
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
}

.step-kicker::after {
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, rgba(201, 245, 107, 0.45), transparent);
  content: "";
}

.step-title {
  margin: 0;
  font-size: clamp(22px, 2.3vw, 29px);
  font-weight: 680;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.step-title:focus {
  outline: none;
}

.step-sub {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.step-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(250px, 0.65fr);
  gap: 14px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), transparent 34%),
    #0d121a;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.14);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 15px 0;
}

.panel-head h3 {
  margin: 0;
  font-size: 11.5px;
  font-weight: 650;
}

.panel-head p {
  margin: 4px 0 0;
  color: var(--muted-2);
  font-size: 9px;
}

.panel-body {
  padding: 14px 15px 15px;
}

.dropzone {
  position: relative;
  display: flex;
  min-height: 210px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px;
  border: 1px dashed rgba(201, 245, 107, 0.22);
  border-radius: 11px;
  background:
    radial-gradient(220px 130px at 50% 0%, rgba(201, 245, 107, 0.07), transparent 72%),
    rgba(255, 255, 255, 0.012);
  text-align: center;
  transition:
    border-color 160ms ease,
    background 160ms ease;
}

.dropzone:hover {
  border-color: rgba(201, 245, 107, 0.42);
  background:
    radial-gradient(260px 150px at 50% 0%, rgba(201, 245, 107, 0.1), transparent 72%),
    rgba(255, 255, 255, 0.018);
}

.dropzone-icon {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border: 1px solid rgba(201, 245, 107, 0.2);
  border-radius: 13px;
  background: var(--lime-soft);
  color: var(--lime);
}

.dropzone-icon .icon {
  width: 21px;
  height: 21px;
}

.dropzone h4 {
  margin: 4px 0 0;
  font-size: 12.5px;
  font-weight: 650;
}

.dropzone p {
  margin: 0;
  color: var(--muted-2);
  font-size: 9.5px;
}

.dropzone-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-block-start: 5px;
}

.payload-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.payload-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--cyan-soft);
  color: var(--cyan);
}

.payload-icon .icon {
  width: 18px;
  height: 18px;
}

.payload-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.payload-copy strong {
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payload-copy span {
  color: var(--muted-2);
  font-size: 8.5px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-block-start: 9px;
}

.chip {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
}

.chip.is-lime {
  border-color: rgba(201, 245, 107, 0.16);
  background: var(--lime-soft);
  color: var(--lime);
}

.tree {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-block-start: 10px;
}

.tree-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 5px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.tree-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.tree-row .icon {
  width: 12px;
  height: 12px;
  color: var(--muted-2);
}

.tree-row.is-folder {
  color: var(--text-soft);
}

.tree-row.is-folder .icon {
  color: var(--amber);
}

.tree-row.is-indent {
  padding-inline-start: 22px;
}

.tree-row.is-deep {
  padding-inline-start: 37px;
}

.tree-row span:last-child {
  margin-inline-start: auto;
  color: var(--muted-2);
  font-size: 7.5px;
}

.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-block-start: 12px;
}

.mode-option {
  position: relative;
  display: flex;
  min-height: 84px;
  flex-direction: column;
  gap: 4px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.016);
  cursor: pointer;
}

.mode-option:hover {
  border-color: var(--line-strong);
}

.mode-option:has(input:checked) {
  border-color: rgba(201, 245, 107, 0.28);
  background: rgba(201, 245, 107, 0.06);
}

.mode-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.mode-option strong {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 600;
}

.mode-option span {
  color: var(--muted-2);
  font-size: 8.5px;
  line-height: 1.45;
}

.mode-option .chip {
  align-self: flex-start;
  margin-block-start: auto;
}

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

.protection-card {
  position: relative;
  display: flex;
  min-height: 146px;
  flex-direction: column;
  gap: 6px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.016);
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.protection-card:hover {
  border-color: var(--line-strong);
}

.protection-card:has(input:checked) {
  border-color: rgba(201, 245, 107, 0.3);
  background:
    radial-gradient(180px 90px at 100% 0%, rgba(201, 245, 107, 0.08), transparent 70%),
    rgba(201, 245, 107, 0.04);
  box-shadow: inset 0 0 0 1px rgba(201, 245, 107, 0.06);
}

.protection-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.protection-icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--muted);
}

.protection-card:has(input:checked) .protection-icon {
  border-color: rgba(201, 245, 107, 0.2);
  background: var(--lime-soft);
  color: var(--lime);
}

.protection-icon .icon {
  width: 15px;
  height: 15px;
}

.protection-card strong {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 600;
}

.protection-card p {
  margin: 0;
  color: var(--muted-2);
  font-size: 8.5px;
  line-height: 1.5;
}

.protection-card .chip {
  align-self: flex-start;
  margin-block-start: auto;
}

.form-rows {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.packer-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.packer-field label {
  color: var(--text-soft);
  font-size: 9.5px;
  font-weight: 600;
}

.packer-field input,
.packer-field select {
  width: 100%;
  min-height: 37px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: rgba(255, 255, 255, 0.024);
  color: var(--text);
  font-size: 10.5px;
}

.packer-field input:focus,
.packer-field select:focus {
  border-color: rgba(201, 245, 107, 0.36);
}

.packer-field input[readonly] {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.connection-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid rgba(119, 230, 165, 0.16);
  border-radius: 9px;
  background: var(--green-soft);
}

.connection-card .icon {
  width: 17px;
  height: 17px;
  color: var(--green);
}

.connection-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.connection-copy strong {
  color: #b8f0ce;
  font-size: 9.5px;
  font-weight: 600;
}

.connection-copy span {
  color: rgba(184, 240, 206, 0.55);
  font-family: var(--font-mono);
  font-size: 8px;
}

.info-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(114, 231, 242, 0.13);
  border-radius: 8px;
  background: var(--cyan-soft);
  color: #a5e3e8;
  font-size: 9px;
  line-height: 1.5;
}

.info-note .icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  margin-block-start: 1px;
}

.setting-list {
  display: flex;
  flex-direction: column;
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-block-end: 1px solid var(--line);
}

.setting-row:last-child {
  border-block-end: 0;
}

.setting-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.setting-copy strong {
  color: var(--text-soft);
  font-size: 9.5px;
  font-weight: 600;
}

.setting-copy span {
  color: var(--muted-2);
  font-size: 8.5px;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 34px;
  height: 20px;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch span {
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.switch span::after {
  position: absolute;
  inset-block-start: 3px;
  inset-inline-start: 3px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #7e8a9b;
  transition:
    transform 160ms ease,
    background 160ms ease;
  content: "";
}

.switch input:checked + span {
  border-color: rgba(201, 245, 107, 0.3);
  background: var(--lime-soft);
}

.switch input:checked + span::after {
  background: var(--lime);
  transform: translateX(14px);
}

.switch input:focus-visible + span {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.signing-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.016);
}

.signing-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.signing-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--violet);
  color: #151020;
}

.signing-icon .icon {
  width: 16px;
  height: 16px;
}

.signing-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.signing-copy strong {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 600;
}

.signing-copy span {
  color: var(--muted-2);
  font-size: 8.5px;
}

.signing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-block-start: 9px;
}

.build-summary {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-block-end: 1px solid var(--line);
  color: var(--muted);
  font-size: 9.5px;
}

.summary-row:last-child {
  border-block-end: 0;
}

.summary-row strong {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  text-align: end;
}

.summary-row strong.is-lime {
  color: var(--lime);
}

.build-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-block-start: 13px;
}

.build-actions .btn-primary {
  flex: 1;
}

.progress-wrap {
  margin-block-start: 14px;
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-block-end: 6px;
  color: var(--muted);
  font-size: 8.5px;
}

.progress-head strong {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-weight: 500;
}

.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lime), #83d04b);
  transition: width 320ms ease;
}

.build-log {
  height: 132px;
  margin-block-start: 10px;
  padding: 9px 10px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #070b10;
  color: #8c9aab;
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1.75;
  scrollbar-gutter: stable;
}

.log-line {
  display: flex;
  gap: 7px;
  white-space: pre-wrap;
}

.log-line span {
  color: #4e5a6b;
}

.log-line.is-ok {
  color: #9ce0b8;
}

.log-line.is-warn {
  color: #ffc77d;
}

.build-success {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-block-start: 12px;
  padding: 11px;
  border: 1px solid rgba(119, 230, 165, 0.2);
  border-radius: 9px;
  background: var(--green-soft);
}

.build-success-icon {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: rgba(119, 230, 165, 0.14);
  color: var(--green);
}

.build-success-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.build-success-copy strong {
  color: #c6f4d6;
  font-size: 10px;
  font-weight: 600;
}

.build-success-copy span {
  overflow: hidden;
  color: rgba(198, 244, 214, 0.55);
  font-family: var(--font-mono);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hash-box {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-block-start: 8px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
}

.hash-box code {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hash-box .icon-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
}

.hash-box .icon-btn .icon {
  width: 12px;
  height: 12px;
}

.statusbar {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 12px;
  border-block-start: 1px solid var(--line);
  background: #0e141d;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 7.5px;
  white-space: nowrap;
}

.statusbar-group {
  display: flex;
  align-items: center;
  gap: 11px;
}

.statusbar-group:last-child {
  margin-inline-start: auto;
}

.statusbar-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.statusbar-item .dot {
  width: 4px;
  height: 4px;
  box-shadow: none;
}

.statusbar-item.is-green {
  color: var(--green);
}

.statusbar-item.is-lime {
  color: var(--lime);
}

.step-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-block-start: 18px;
  padding-block-start: 14px;
  border-block-start: 1px solid var(--line);
}

.step-foot-note {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
  font-size: 8.5px;
}

.step-foot-note .icon {
  width: 12px;
  height: 12px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .admin-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .sidebar {
    padding-inline: 11px;
  }

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

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

  .chart-card,
  .channel-card,
  .keys-card,
  .activity-card {
    grid-column: 1;
  }

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

  .app-body {
    grid-template-columns: 190px minmax(0, 1fr);
  }

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

  .packer-main {
    padding: 22px 22px 38px;
  }
}

@media (max-width: 900px) {
  .admin-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    z-index: 50;
    width: min(280px, calc(100vw - 42px));
    transform: translateX(-105%);
    transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 30px 0 80px rgba(0, 0, 0, 0.45);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(2, 4, 7, 0.68);
    backdrop-filter: blur(4px);
  }

  .menu-toggle {
    display: inline-grid;
  }

  .topbar {
    padding-inline: 18px;
  }

  .breadcrumbs {
    min-width: 0;
  }

  .top-search {
    width: min(360px, 44vw);
  }

  .content {
    padding: 23px 18px 44px;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }

  .page-actions {
    justify-content: flex-start;
  }

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

  .landing-shell {
    padding-inline: 20px;
  }

  .landing-hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-block: 14px 38px;
  }

  .hero-meta {
    max-width: 560px;
  }

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

  .design-notes {
    grid-template-columns: 1fr 1fr;
  }

  .app-window {
    width: calc(100vw - 24px);
    height: auto;
    min-height: 0;
  }

  .desktop-stage {
    display: block;
    padding: 12px;
  }

  .app-body {
    display: block;
  }

  .packer-rail {
    position: sticky;
    inset-block-start: 0;
    z-index: 4;
    display: flex;
    flex-direction: row;
    gap: 6px;
    padding: 9px 10px;
    overflow-x: auto;
    overflow-y: hidden;
    border-inline-end: 0;
    border-block-end: 1px solid var(--line);
    scrollbar-width: none;
  }

  .packer-rail::-webkit-scrollbar {
    display: none;
  }

  .rail-head,
  .rail-foot {
    display: none;
  }

  .rail-steps {
    flex-direction: row;
    gap: 4px;
  }

  .rail-step {
    width: auto;
    min-width: 46px;
    grid-template-columns: 27px;
    padding: 6px;
  }

  .rail-step-copy {
    display: none;
  }

  .packer-main {
    max-height: none;
    padding: 20px 16px 34px;
  }

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

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

@media (max-width: 640px) {
  .topbar {
    gap: 10px;
    padding-inline: 13px;
  }

  .top-search,
  .status-chip,
  .breadcrumbs {
    display: none;
  }

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

  .product-grid,
  .reseller-grid,
  .mini-stats,
  .design-notes {
    grid-template-columns: 1fr;
  }

  .page-head h1 {
    font-size: 27px;
  }

  .page-actions {
    width: 100%;
  }

  .page-actions .btn {
    flex: 1;
  }

  .form-grid,
  .detail-grid,
  .field-row {
    grid-template-columns: 1fr;
  }

  .dialog-head,
  .dialog-body {
    padding-inline: 15px;
  }

  .dialog-actions {
    padding-inline: 15px;
  }

  .key-detail-value {
    font-size: 11px;
  }

  .landing-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding-block-end: 28px;
  }

  .landing-nav-meta {
    flex-wrap: wrap;
  }

  .hero-title {
    font-size: clamp(34px, 10.5vw, 48px);
  }

  .hero-sub {
    font-size: 12px;
  }

  .prototype-card {
    min-height: 360px;
  }

  .prototype-card-head {
    padding-inline: 16px;
  }

  .preview-frame {
    margin-inline: 14px;
  }

  .preview-admin-body {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .preview-app-body {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .window-menu,
  .window-title span {
    display: none;
  }

  .window-titlebar {
    gap: 7px;
  }

  .step-title {
    font-size: 23px;
  }

  .packer-main {
    padding-inline: 13px;
  }

  .step-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .step-foot .btn {
    width: 100%;
  }

  .build-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .build-actions .btn {
    width: 100%;
  }

  .toast {
    inset: auto 14px 14px;
    width: auto;
  }
}

@container (width < 720px) {
  .responsive-table {
    min-inline-size: 0;
  }

  .responsive-table,
  .responsive-table thead,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table th,
  .responsive-table td {
    display: block;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table tbody tr {
    padding: 13px 15px;
    border-block-end: 1px solid var(--line);
  }

  .responsive-table tbody tr:hover th,
  .responsive-table tbody tr:hover td {
    background: transparent;
  }

  .responsive-table tbody th,
  .responsive-table tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 4px 0;
    border: 0;
    background: transparent;
    text-align: end;
  }

  .responsive-table tbody th {
    position: static;
    padding-block: 0 7px;
    font-size: 12px;
    text-align: start;
  }

  .responsive-table tbody td::before {
    color: var(--muted-2);
    content: attr(data-label);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-align: start;
    text-transform: uppercase;
  }

  .responsive-table tbody th::before {
    content: none;
  }

  .responsive-table .table-actions {
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Prototype interaction polish ---------- */

.packer-stack {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 14px;
}

.dropzone.is-dragging {
  border-color: var(--lime);
  background:
    radial-gradient(260px 150px at 50% 0%, rgba(201, 245, 107, 0.14), transparent 72%),
    rgba(201, 245, 107, 0.035);
}

.protection-card:has(input:focus-visible),
.mode-option:has(input:focus-visible) {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.packer-field input:user-invalid,
.packer-field select:user-invalid {
  border-color: rgba(255, 124, 124, 0.6);
  background: rgba(255, 124, 124, 0.05);
}

.icon-action[disabled] {
  cursor: not-allowed;
  opacity: 0.38;
  transform: none;
}

.table-empty {
  display: flex;
  min-height: 220px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 28px;
  color: var(--muted-2);
  text-align: center;
}

.table-empty strong {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 650;
}

.table-empty span {
  font-size: 10px;
}

#keys-empty-state td {
  padding: 0;
}

#keys-empty-state td::before {
  content: none;
}

@container (width < 720px) {
  #keys-empty-state {
    padding: 0;
  }

  #keys-empty-state td {
    display: block;
  }
}
