:root {
  --ink: #08233f;
  --muted: #5e7088;
  --line: #dce5ef;
  --soft: #f4f7fb;
  --blue: #2b63ff;
  --blue-dark: #062746;
  --brand-cyan: #28c7bd;
  --brand-navy: #073c72;
  --green: #1ea86a;
  --orange: #df7f13;
  --danger: #d93636;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #fff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { margin: 0; overflow-x: hidden; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 34px;
  padding: 0 6vw;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(16px);
}
.nav,
.nav nav,
.nav-actions {
  min-width: 0;
}
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 900; font-size: 20px; letter-spacing: .01em; }
.brand span:last-child {
  background: linear-gradient(90deg, var(--brand-navy), var(--brand-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.8), rgba(255,255,255,0)),
    url("/assets/rkingai-logo.jpg") 15% 49% / 185px auto no-repeat;
  display: inline-block;
  box-shadow: 0 8px 22px rgba(13, 94, 144, .18);
}
.nav nav { display: flex; gap: 28px; font-weight: 650; color: #2d4058; }
.nav-actions { margin-left: auto; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.nav-actions .ghost,
.nav-actions .primary {
  white-space: nowrap;
}
#loginBtn {
  max-width: min(240px, 26vw);
  overflow: hidden;
  text-overflow: ellipsis;
}
.primary, .ghost, .text-button {
  border: 0;
  border-radius: 24px;
  padding: 12px 20px;
  font-weight: 800;
}
.primary { background: var(--blue); color: #fff; box-shadow: 0 12px 24px rgba(43,99,255,.22); }
.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.large { padding: 15px 28px; }
.lang-button {
  min-width: 44px;
  padding-inline: 14px;
}
.text-link, .text-button { color: var(--blue); background: transparent; padding: 10px 12px; }

.hero {
  min-height: calc(100vh - 68px);
  padding: 120px 6vw 90px;
  text-align: center;
  background:
    linear-gradient(115deg, rgba(255,255,255,.96), rgba(241,250,253,.86) 42%, rgba(245,249,255,.94)),
    url("data:image/svg+xml,%3Csvg width='900' height='620' viewBox='0 0 900 620' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%2398aec2' stroke-opacity='.22' stroke-width='1'%3E%3Cpath d='M0 78 92 0l102 106-75 114L0 78Zm610-34 112 86 132-60 46 119-94 117-142-40-54-222ZM72 482l150-68 94 88-58 112H106L72 482Zm412-42 132-78 124 54-26 130-146 40-84-146Z'/%3E%3Cpath d='M92 0 119 220 194 106M722 130l84 176M664 266l190-196M222 414l36 200M616 362l98 184'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(180deg, #f4fbfd 0%, #fff 86%);
  background-size: cover, min(1000px, 90vw) auto, cover;
  background-position: center, top center, center;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
}
.pill span { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-cyan); box-shadow: 0 0 0 5px #e4f9f8; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; letter-spacing: 0; line-height: .98; margin: 0; }
.hero h1 { max-width: 850px; margin: 28px auto 22px; font-size: clamp(44px, 7.4vw, 86px); font-weight: 500; }
.hero h1 strong, .section h2 strong { color: var(--brand-cyan); font-weight: 500; }
.hero p, .section-copy, .cta p { max-width: 760px; margin: 0 auto; color: #304762; font-size: 19px; line-height: 1.7; }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 34px 0; }
.badges { display: flex; justify-content: center; gap: 34px; color: var(--muted); margin: 24px 0 64px; flex-wrap: wrap; }
.badges span::before { content: ""; display: inline-block; width: 8px; height: 8px; background: #b7c8ff; border-radius: 2px; margin-right: 8px; }

.code-window {
  position: relative;
  width: min(880px, 100%);
  max-width: 880px;
  margin: 0 auto;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(20, 62, 104, .88), rgba(7, 31, 54, .96) 72%),
    linear-gradient(135deg, #0b3155, #071f36);
  color: #eaf6ff;
  border: 1px solid rgba(167, 205, 244, .18);
  border-radius: 10px;
  padding: 64px 30px 30px;
  overflow: auto;
  box-shadow:
    0 30px 70px rgba(8,35,63,.24),
    0 0 0 1px rgba(255,255,255,.04) inset;
  font-family: "SFMono-Regular", Consolas, monospace;
  line-height: 1.8;
}
.code-window::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 42px;
  background:
    radial-gradient(circle at 18px 21px, #ff6b5f 0 4px, transparent 5px),
    radial-gradient(circle at 36px 21px, #ffca4f 0 4px, transparent 5px),
    radial-gradient(circle at 54px 21px, #24c86f 0 4px, transparent 5px),
    linear-gradient(90deg, rgba(21, 73, 119, .96), rgba(16, 55, 91, .96));
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.code-window::after {
  content: attr(data-title);
  position: absolute;
  top: 12px;
  left: 72px;
  color: #9eb9d5;
  font-size: 13px;
}
.code-window code {
  position: relative;
  z-index: 1;
}
.code-window > code::after,
.code-window.compact::after {
  pointer-events: none;
}
.code-window span {
  color: #62f2a8;
}
.code-window code {
  text-shadow: 0 0 18px rgba(107, 220, 255, .08);
}
.code-window::marker {
  display: none;
}
.compact { min-height: 360px; white-space: pre-wrap; }

.code-window + .code-window {
  margin-top: 18px;
}

.section { padding: 100px 6vw; border-top: 1px solid var(--line); }
.split { display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; }
.eyebrow { color: var(--blue); font-weight: 900; letter-spacing: .04em; margin: 0 0 18px; }
.section h2, .cta h2 { font-size: clamp(38px, 4.6vw, 60px); font-weight: 500; margin-bottom: 22px; }
.section > p, .split p { color: #304762; line-height: 1.8; }
.feature-list article { display: grid; grid-template-columns: 110px 1fr 1.5fr; gap: 28px; padding: 28px 0; border-top: 1px solid var(--line); align-items: start; }
.feature-list span { color: var(--blue); font-family: Consolas, monospace; font-weight: 900; }
.feature-list h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 26px; }
.feature-list p { margin: 0; }

.model-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 48px; }
.model-card { position: relative; border: 1px solid var(--line); border-radius: 8px; padding: 28px; background: #fff; min-height: 260px; }
.model-card.recommended { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.model-card h3 { font-family: Georgia, "Times New Roman", serif; font-size: 24px; margin: 20px 0 16px; }
.provider { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 900; font-size: 13px; letter-spacing: .08em; }
.provider::before { content: attr(data-initial); width: 24px; height: 24px; border-radius: 6px; background: #eef5fb; color: var(--ink); display: grid; place-items: center; }
.status { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; font-size: 13px; color: var(--green); }
.status.pending { color: var(--orange); }
.price-row { display: flex; flex-wrap: wrap; gap: 18px 28px; border-top: 1px solid var(--line); margin-top: 24px; padding-top: 18px; }
.price-row small { display: block; color: var(--muted); margin-bottom: 6px; }
.price-row strong { font-family: Consolas, monospace; font-size: 16px; }

.image-api-section {
  background:
    linear-gradient(180deg, #fff 0%, #fff8ee 48%, #f5fbff 100%);
}
.image-api-section .warm {
  color: #d87314;
}
.image-api-copy {
  max-width: 760px;
}
.image-api-copy h2 {
  max-width: 820px;
}
.image-api-copy p:last-child {
  color: #314a63;
  font-size: 19px;
  line-height: 1.8;
  max-width: 720px;
}
.image-api-card {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  min-height: 420px;
  margin-top: 58px;
  border: 1px solid #d9e5ef;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,.88);
  box-shadow:
    0 28px 80px rgba(60, 91, 126, .12),
    0 1px 0 rgba(255,255,255,.85) inset;
}
.image-api-panel {
  padding: 40px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(245,250,255,.92)),
    linear-gradient(90deg, rgba(255,150,80,.12), rgba(65,180,220,.10));
}
.image-api-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.image-api-title strong {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 18px;
}
.image-api-title span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff0d7;
  color: #c46d12;
  font-size: 11px;
  font-weight: 900;
}
.image-api-title small {
  color: #556b80;
}
.image-api-panel p {
  color: #28435d;
  line-height: 1.8;
}
.endpoint-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 22px 0;
}
.endpoint-pills code {
  padding: 9px 12px;
  border: 1px solid #dce8f2;
  border-radius: 7px;
  background: #f7fbff;
  color: #12304c;
  font-size: 12px;
}
.image-price-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid #dce8f2;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
}
.image-price-table th,
.image-price-table td {
  padding: 15px 16px;
  border-bottom: 1px solid #e5eef6;
  text-align: left;
}
.image-price-table th {
  background: #f4f8fc;
  color: #0c2b48;
  font-weight: 900;
}
.image-price-table tr:last-child td {
  border-bottom: 0;
}
.image-price-table td:nth-child(2) {
  font-family: Consolas, monospace;
  font-weight: 900;
}
.image-price-table td:nth-child(3) {
  color: #60758b;
  font-family: Consolas, monospace;
  font-size: 12px;
}
.image-doc-link {
  display: inline-block;
  margin-top: 22px;
  color: var(--blue);
  font-weight: 900;
}
.image-api-visual {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  background:
    linear-gradient(135deg, rgba(255, 116, 92, .8) 0%, rgba(255, 221, 152, .68) 25%, transparent 42%),
    linear-gradient(225deg, rgba(120, 101, 255, .76) 0%, rgba(210, 120, 255, .42) 22%, transparent 42%),
    linear-gradient(8deg, rgba(23, 161, 202, .88) 8%, rgba(92, 212, 193, .65) 32%, transparent 52%),
    linear-gradient(180deg, #fff2cf 0%, #fff7dc 52%, #edfaff 100%);
}
.image-api-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.25), transparent 35%, rgba(255,255,255,.18)),
    repeating-linear-gradient(0deg, rgba(255,255,255,.16) 0 1px, transparent 1px 18px);
  mix-blend-mode: soft-light;
}
.live-chip {
  position: absolute;
  left: 24px;
  bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 999px;
  background: rgba(255,255,255,.86);
  color: #13304c;
  font-family: Consolas, monospace;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(31, 74, 108, .12);
}
.live-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff9c38;
  box-shadow: 0 0 0 5px rgba(255,156,56,.18);
}

.docs { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; align-items: start; }
.docs-polished {
  background:
    linear-gradient(135deg, #f8fbff 0%, #ffffff 42%, #f4fff9 100%);
}
.docs-polished > div:first-child {
  padding: 34px;
  border: 1px solid #dce8f2;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(247,251,255,.78)),
    linear-gradient(135deg, rgba(43,99,255,.08), rgba(30,168,106,.08));
}
.docs-polished .tabs {
  box-shadow: 0 12px 30px rgba(8,35,63,.08);
}
.docs-polished .code-window {
  max-width: none;
  border-color: rgba(82, 170, 226, .28);
  box-shadow:
    0 28px 80px rgba(9, 39, 68, .22),
    0 0 0 1px rgba(255,255,255,.05) inset,
    0 0 60px rgba(84, 210, 186, .12);
}
.plus-list { list-style: none; margin: 28px 0; padding: 0; border-top: 1px solid var(--line); }
.plus-list li { padding: 16px 0; border-bottom: 1px solid var(--line); color: #304762; }
.plus-list li::before { content: "+"; color: var(--blue); font-weight: 900; margin-right: 12px; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: #eaf0f6; border-radius: 999px; margin-bottom: 14px; }
.tabs button { border: 0; background: transparent; border-radius: 999px; padding: 10px 28px; font-weight: 800; color: var(--muted); }
.tabs button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 6px rgba(8,35,63,.12); }

.cta { padding: 100px 6vw; text-align: center; background: var(--soft); border-top: 1px solid var(--line); }
.cta .primary { margin-top: 28px; }
.footer { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(120px, 1fr)); gap: 40px; padding: 64px 6vw; background: #f4f7fb; color: #304762; }
.footer a, .footer strong { display: block; margin-bottom: 14px; }
.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
  color: #60758b;
}

.info-body {
  min-height: 100vh;
  background: #fff;
}
.info-nav {
  justify-content: center;
}
.info-main {
  min-height: 70vh;
}
.info-page {
  width: min(920px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 84px 0 96px;
}
.back-link {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--blue);
  font-weight: 900;
}
.info-page h1 {
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 500;
  margin-bottom: 18px;
}
.info-subtitle {
  max-width: 780px;
  color: #24405d;
  font-size: 18px;
  line-height: 1.8;
}
.info-subtitle a,
.info-page a {
  color: var(--blue);
  font-weight: 850;
}
.info-divider {
  height: 1px;
  margin: 28px 0 36px;
  background: var(--line);
}
.info-stat-grid,
.info-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 54px;
}
.info-stat-card,
.info-card {
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #fff;
}
.info-stat-card span,
.info-card span,
.status-kicker {
  display: block;
  color: #64758b;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .05em;
}
.info-stat-card strong {
  display: block;
  margin-top: 16px;
  font-size: 20px;
}
.info-section,
.status-section,
.legal-section {
  margin-top: 54px;
}
.info-section h2,
.status-section h2,
.legal-section h2 {
  font-size: 31px;
  font-weight: 500;
  margin-bottom: 18px;
}
.info-card h3 {
  margin: 16px 0 12px;
  font-size: 20px;
}
.info-card p,
.legal-section p,
.status-section p {
  color: #304762;
  line-height: 1.8;
}
.status-hero-ok {
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid #bdeed3;
  border-radius: 8px;
  background: #f0fff6;
  padding: 24px;
}
.status-hero-ok strong {
  display: block;
  font-size: 20px;
}
.status-hero-ok small {
  display: block;
  margin-top: 6px;
  color: #698197;
}
.status-dot-large,
.status-row::before {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: #23ce6b;
  box-shadow: 0 0 0 7px #dff8e9;
}
.status-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.status-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 72px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.status-row:last-child {
  border-bottom: 0;
}
.status-row strong,
.status-row small {
  display: block;
}
.status-row small {
  margin-top: 5px;
  color: #60758b;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}
.status-ok {
  border-radius: 999px;
  padding: 8px 12px;
  color: #12805c;
  background: #e9fbf0;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.uptime-chart {
  display: grid;
  grid-template-columns: repeat(30, minmax(6px, 1fr));
  gap: 4px;
  margin: 18px 0 12px;
}
.uptime-chart span {
  height: 28px;
  border-radius: 5px;
  background: #23ce6b;
}
.changelog-list {
  display: grid;
  gap: 0;
}
.changelog-item {
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}
.changelog-item:first-child {
  padding-top: 0;
}
.changelog-item div {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #6b7f95;
}
.changelog-item span {
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--blue);
  background: #f2f6ff;
  font-size: 12px;
  font-weight: 900;
}
.changelog-item h2 {
  margin: 18px 0 14px;
  font-size: 30px;
  font-weight: 500;
}
.changelog-item p {
  color: #304762;
  line-height: 1.8;
}
.legal-section {
  border-top: 1px solid var(--line);
  padding-top: 30px;
}
.legal-section strong {
  color: var(--ink);
}

.hidden { display: none !important; }
.console { background: #fff; }
.console-head, .admin-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.dashboard { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.panel { border: 1px solid var(--line); border-radius: 8px; padding: 24px; background: #fff; }
.panel.wide { grid-column: 1 / -1; }
.panel h3 { margin: 0 0 18px; font-size: 22px; }
.form-row { display: flex; gap: 10px; }
label { display: block; font-weight: 800; margin: 14px 0 8px; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
}
textarea { resize: vertical; }
.notice { color: var(--green); overflow-wrap: anywhere; }
.error { color: var(--danger); min-height: 20px; }
.stack { display: grid; gap: 10px; }
.key-item, .table-row { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
.muted { color: var(--muted); }
.result { min-height: 150px; background: #f7fafc; border: 1px solid var(--line); border-radius: 8px; padding: 14px; overflow: auto; }
.table { display: grid; gap: 8px; }
.table-row { grid-template-columns: 1.1fr .8fr .8fr .6fr; }

.dialog { border: 0; border-radius: 12px; padding: 0; box-shadow: 0 25px 80px rgba(8,35,63,.28); width: min(440px, calc(100vw - 32px)); }
.dialog.auth-dialog { width: min(460px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(8,35,63,.35); backdrop-filter: blur(4px); }
.auth-card { padding: 30px; position: relative; }
.auth-card h2 { font-size: 34px; margin-bottom: 20px; }
.dialog-close { position: absolute; right: 16px; top: 14px; z-index: 2; border: 0; background: transparent; font-size: 28px; color: var(--muted); }
.auth-card .primary { width: 100%; margin-top: 8px; }
.auth-flow { padding: 34px; }
.auth-kicker {
  display: block;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.auth-flow h2 {
  margin: 14px 0 12px;
  font-size: 34px;
}
.auth-flow > p {
  margin: 0 0 26px;
  color: #425a73;
  line-height: 1.65;
}
.auth-flow input {
  min-height: 48px;
}
.auth-code-section {
  margin-top: 12px;
}
.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.auth-code-row .ghost {
  min-height: 48px;
  white-space: nowrap;
}
.auth-flow .error {
  min-height: 24px;
  margin: 6px 0 0;
}
.auth-flow button[disabled] {
  cursor: wait;
  opacity: .72;
}
.auth-switch {
  width: 100%;
  margin-top: 12px;
  text-align: center;
  font-weight: 900;
}

.admin-body { background: #f6f8fb; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.admin-side { background: #082844; color: #fff; padding: 28px 20px; display: flex; flex-direction: column; gap: 10px; }
.admin-side .brand { margin-bottom: 30px; }
.side-tab { text-align: left; border: 0; border-radius: 8px; padding: 13px 14px; background: transparent; color: #cfe0f4; font-weight: 800; }
.side-tab.active, .side-tab:hover { background: rgba(255,255,255,.1); color: #fff; }
.admin-main { padding: 38px; }
.login-panel { max-width: 420px; margin: 10vh auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 30px; }
.login-panel h1, .admin-top h1 { font-family: Georgia, "Times New Roman", serif; margin: 0 0 12px; font-size: 42px; }
.login-panel input { margin-bottom: 12px; }
.admin-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 26px 0; }
.metric { border: 1px solid var(--line); border-radius: 8px; padding: 20px; background: #fff; }
.metric strong { display: block; font-size: 30px; margin-top: 8px; }
.admin-card { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 22px; margin-top: 18px; }
.admin-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.admin-card-head h2 { margin-bottom: 0; }
.admin-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.admin-form .full { grid-column: 1 / -1; }
.admin-list { display: grid; gap: 12px; margin-top: 18px; }
.admin-row { border: 1px solid var(--line); border-radius: 8px; padding: 16px; display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; }
.admin-row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: end; }
.admin-top-actions { display: flex; gap: 10px; align-items: center; }
.tiny { padding: 8px 12px; border-radius: 8px; box-shadow: none; }

.user-dashboard-body {
  min-height: 100vh;
  background: #fff;
}
.dash-topbar {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.dash-topbar nav {
  display: flex;
  gap: 34px;
  color: #31445b;
  font-weight: 800;
}
.dash-user-actions {
  position: absolute;
  right: 6vw;
  display: flex;
  align-items: center;
  gap: 10px;
}
.lang-pill, .avatar {
  display: inline-grid;
  place-items: center;
  height: 40px;
  min-width: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 900;
  background: #fff;
  color: var(--ink);
}
.avatar {
  background: var(--blue);
  color: #fff;
  border-color: #d9e4ff;
  box-shadow: 0 0 0 5px #f2f6ff;
}
.dash-shell {
  min-height: calc(100vh - 88px);
  display: grid;
  grid-template-columns: 290px 1fr;
}
.dash-sidebar {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 88px);
  padding: 44px 30px;
  background: #f3f6fa;
  border-right: 1px solid var(--line);
}
.dash-profile {
  padding-bottom: 30px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.dash-profile h2 {
  font-size: 25px;
  margin: 0 0 10px;
}
.dash-profile p {
  color: var(--muted);
  margin: 0;
}
.dash-menu {
  display: grid;
  gap: 8px;
}
.dash-menu a {
  display: block;
  padding: 14px 18px;
  border-radius: 8px;
  font-weight: 900;
  color: #2d4058;
}
.dash-menu a.active {
  color: var(--blue);
  background: #e5ebff;
}
.dash-logout {
  margin-top: auto;
  border: 0;
  background: transparent;
  color: #52687f;
  text-align: left;
  padding: 12px 18px;
}
.dash-main {
  max-width: 1260px;
  width: 100%;
  padding: 64px 6vw 80px;
}
.dash-page-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
}
.dash-page-head h1 {
  font-size: clamp(42px, 4.5vw, 58px);
  font-weight: 500;
}
.dash-subtitle {
  color: #2f4861;
  font-size: 18px;
  line-height: 1.7;
  margin: 16px 0 0;
}
.dash-divider {
  height: 1px;
  background: var(--line);
  margin: 36px 0 44px;
}
.dash-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.dash-metrics article,
.dash-wide-card,
.dash-card,
.quick-grid a,
.play-config,
.chat-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.dash-metrics article {
  padding: 34px;
  min-height: 170px;
}
.dash-metrics span {
  color: #697a91;
  font-weight: 900;
}
.dash-metrics strong {
  display: block;
  margin: 22px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 48px;
  font-weight: 500;
}
.dash-metrics small {
  color: var(--muted);
  font-weight: 700;
}
.dash-wide-card {
  margin-top: 68px;
  padding: 32px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.dash-big {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  margin-right: 8px;
}
.dash-section-title {
  font-size: 32px;
  margin: 58px 0 26px;
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.quick-grid a {
  padding: 32px;
}
.quick-grid span {
  color: var(--blue);
  font-weight: 900;
  font-family: Consolas, monospace;
}
.quick-grid strong {
  display: block;
  margin: 24px 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
}
.quick-grid p,
.dash-row p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}
.play-config {
  display: grid;
  grid-template-columns: .8fr 1.25fr 1fr;
  gap: 18px;
  padding: 24px;
  background: #f8fbff;
}
.play-config label {
  margin: 0;
  color: #607187;
}
.play-config select {
  margin-top: 8px;
  background: #fff;
}
.chat-box {
  min-height: 420px;
  margin-top: 22px;
  padding: 26px;
}
.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 360px;
}
.empty-chat {
  margin: auto;
  text-align: center;
  color: var(--muted);
}
.empty-chat span {
  display: block;
  width: 34px;
  height: 34px;
  margin: 0 auto 28px;
  border: 2px solid var(--blue);
  border-radius: 6px;
}
.empty-chat button,
.billing-options button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 14px;
  margin: 6px;
  font-weight: 800;
}
.chat-message {
  max-width: 78%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.chat-message.user {
  align-self: flex-end;
  background: #eef4ff;
}
.chat-message.assistant {
  align-self: flex-start;
  background: #fff;
}
.chat-input-row {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 16px;
  align-items: end;
  margin-top: 22px;
}
.dash-hint {
  color: var(--muted);
  text-align: center;
}
.dash-card {
  padding: 26px;
  margin-bottom: 18px;
}
.dash-card h2 {
  font-size: 26px;
  margin-bottom: 18px;
}
.dash-list {
  display: grid;
  gap: 12px;
}
.api-key-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 28px;
}
.api-key-toolbar .primary {
  min-height: 54px;
  padding-inline: 28px;
}
.api-key-table {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.api-key-head,
.api-key-row {
  display: grid;
  grid-template-columns: 1fr 1.15fr .65fr .55fr 1.15fr 1fr 1fr 1.2fr;
  gap: 16px;
  align-items: center;
}
.api-key-head {
  padding: 18px 22px;
  background: #f7faff;
  color: #607187;
  font-weight: 900;
}
.api-key-row {
  min-height: 122px;
  padding: 22px;
  border-top: 1px solid var(--line);
}
.api-key-row code {
  color: #314a63;
  font-family: "SFMono-Regular", Consolas, monospace;
  overflow-wrap: anywhere;
}
.key-status {
  justify-self: start;
  border-radius: 7px;
  padding: 7px 10px;
  font-weight: 900;
}
.key-status.enabled {
  color: #12805c;
  background: #e8faef;
}
.key-status.disabled {
  color: #8a5a11;
  background: #fff4dc;
}
.key-multiplier {
  color: var(--ink);
  font-weight: 900;
  font-family: "SFMono-Regular", Consolas, monospace;
}
.key-quota {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}
.key-quota span:first-child,
.key-quota span:nth-child(3) {
  color: var(--ink);
  font-weight: 900;
}
.key-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.danger-action {
  color: var(--danger);
}
.dash-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}
.key-secret-dialog {
  width: min(700px, calc(100vw - 32px));
}
.key-secret-card {
  position: relative;
  padding: 46px;
  text-align: center;
}
.key-secret-mark {
  width: 52px;
  height: 52px;
  display: block;
  margin: 0 auto 28px;
  border: 11px solid #08233f;
  border-radius: 50%;
  background: var(--blue);
}
.key-secret-card h2 {
  font-size: 38px;
  margin: 0 0 18px;
}
.key-secret-card p {
  color: #314a63;
  line-height: 1.7;
}
.key-secret-value {
  display: block;
  margin: 28px 0 24px;
  padding: 24px;
  border-radius: 8px;
  background: #08233f;
  color: #fff;
  font-family: "SFMono-Regular", Consolas, monospace;
  text-align: left;
  overflow-wrap: anywhere;
}
.key-secret-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
}
.key-secret-actions .primary,
.key-secret-actions .ghost {
  min-height: 54px;
}
.key-secret-warning {
  margin: 22px 0 0;
  font-size: 14px;
}
.usage-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.usage-head,
.usage-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr .7fr .7fr .7fr;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.usage-head {
  background: #f7faff;
  font-weight: 900;
}
.usage-row:last-child {
  border-bottom: 0;
}
.usage-row.empty {
  grid-template-columns: 1fr;
  color: var(--muted);
}
.usage-range-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.usage-range-tabs button {
  border: 1px solid var(--line);
  background: #fff;
  color: #2d4058;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 900;
}
.usage-range-tabs button.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.usage-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.usage-section {
  margin-top: 54px;
}
.usage-section h2 {
  font-size: 24px;
  margin-bottom: 18px;
}
.usage-bar-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
  gap: 8px;
  height: 180px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #fff;
}
.usage-day {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  gap: 10px;
  text-align: center;
}
.usage-day-bar {
  position: relative;
  width: 100%;
  min-height: 6px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--blue), #5c4be8);
}
.usage-day-bar span {
  position: absolute;
  left: 50%;
  top: -22px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.usage-day small {
  color: var(--muted);
  font-size: 12px;
}
.model-usage-head,
.model-usage-row {
  grid-template-columns: 1fr .5fr .5fr;
}
.recent-usage-head,
.recent-usage-row {
  grid-template-columns: 1fr 1fr 1fr .8fr .7fr;
}
.billing-options {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
.docs-section {
  margin-bottom: 42px;
}
.docs-section h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 14px;
}
.docs-section > p,
.docs-note {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 16px;
}
.docs-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.docs-table-row {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 2fr;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.docs-table-row:last-child {
  border-bottom: 0;
}
.docs-table-head {
  background: #f7faff;
  color: #697a91;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  font-weight: 900;
}
.thinking-table .docs-table-row {
  grid-template-columns: 1fr 1.5fr 2fr;
}
.docs-table code,
.docs-info-cell code,
.docs-models code {
  font-family: "SFMono-Regular", Consolas, monospace;
}
.docs-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.docs-info-cell {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 16px 18px;
}
.docs-info-cell div {
  color: #697a91;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 6px;
}
.docs-info-cell code {
  display: block;
  word-break: break-all;
}
.docs-steps-list {
  color: #2f4861;
  padding-left: 22px;
  line-height: 1.9;
  font-size: 15px;
}
.docs-tabs {
  margin-bottom: 16px;
}
.docs-code {
  margin: 0;
  max-width: none;
  width: 100%;
}
.docs-code code {
  white-space: pre;
}
.docs-model-group {
  margin-bottom: 22px;
}
.docs-model-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}
.docs-model-head strong {
  color: #697a91;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
}
.docs-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 4px;
  background: rgba(32, 184, 147, .12);
  color: #0f766e;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 900;
}
.docs-models {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.docs-models code {
  border: 1px solid var(--line);
  background: #f7faff;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
}
.dash-loading {
  color: var(--muted);
}

@media (max-width: 900px) {
  .nav { position: static; height: auto; min-height: 68px; flex-wrap: wrap; gap: 12px 18px; padding: 16px 5vw; }
  .nav nav { order: 3; width: 100%; gap: 18px; overflow-x: auto; padding-bottom: 2px; }
  .nav-actions { margin-left: auto; width: auto; max-width: calc(100vw - 10vw); }
  #loginBtn { max-width: min(190px, 42vw); }
  .hero { padding-top: 80px; }
  .split, .docs, .dashboard, .footer, .admin-shell { grid-template-columns: 1fr; }
  .image-api-card { grid-template-columns: 1fr; }
  .image-api-panel { padding: 28px; }
  .image-api-visual { min-height: 320px; }
  .model-grid { grid-template-columns: 1fr; }
  .feature-list article { grid-template-columns: 1fr; gap: 8px; }
  .admin-side { min-height: auto; }
  .admin-grid, .admin-form { grid-template-columns: 1fr; }
  .table-row { grid-template-columns: 1fr; }
  .dialog.auth-dialog { width: min(460px, calc(100vw - 24px)); }
  .auth-flow { padding: 30px 24px; }
  .auth-code-row { grid-template-columns: 1fr; }
  .dash-topbar { height: auto; min-height: 88px; flex-wrap: wrap; justify-content: flex-start; padding: 18px 5vw; }
  .dash-user-actions { position: static; margin-left: auto; }
  .dash-shell { grid-template-columns: 1fr; }
  .dash-sidebar { min-height: auto; }
  .dash-main { padding: 40px 5vw; }
  .dash-metrics, .usage-metrics, .quick-grid, .play-config, .chat-input-row, .usage-head, .usage-row, .model-usage-head, .model-usage-row, .recent-usage-head, .recent-usage-row, .docs-info-grid, .docs-table-row, .thinking-table .docs-table-row { grid-template-columns: 1fr; }
  .api-key-head { display: none; }
  .api-key-row { grid-template-columns: 1fr; align-items: start; }
  .api-key-toolbar { justify-content: stretch; }
  .key-secret-card { padding: 38px 24px; }
  .key-secret-actions { grid-template-columns: 1fr; }
  .dash-wide-card, .dash-page-head { align-items: flex-start; flex-direction: column; }
  .chat-message { max-width: 100%; }
}

@media (max-width: 560px) {
  .nav-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  #loginBtn {
    max-width: calc(100vw - 180px);
  }
  .hero {
    overflow-x: hidden;
  }
  .hero h1 {
    width: calc(100vw - 48px);
    max-width: 100%;
    font-size: 38px;
    line-height: 1.06;
  }
  .hero h1 strong {
    display: block;
  }
  .hero p,
  .section-copy,
  .cta p {
    width: calc(100vw - 48px);
    max-width: 100%;
    font-size: 17px;
    overflow-wrap: anywhere;
    word-break: break-all;
    line-break: anywhere;
  }
  .hero p {
    width: min(260px, calc(100vw - 96px));
    font-size: 16px;
    word-break: break-all;
    line-break: anywhere;
  }
  .badges {
    max-width: min(280px, calc(100vw - 72px));
    margin-inline: auto;
    gap: 14px 16px;
    padding-inline: 8px;
    font-size: 15px;
  }
}

/* Lunarkx-style admin console */
.admin-body {
  --admin-bg: #05070d;
  --admin-panel: rgba(8, 14, 24, .82);
  --admin-panel-strong: rgba(10, 18, 32, .94);
  --admin-border: rgba(142, 200, 255, .18);
  --admin-text: #edf7ff;
  --admin-muted: #8e9caf;
  --admin-blue: #8ec8ff;
  --admin-cyan: #69e5ff;
  --admin-green: #79f2c6;
  --admin-amber: #f3c56d;
  --admin-red: #ff7b88;
  min-height: 100vh;
  color: var(--admin-text);
  background:
    radial-gradient(circle at 78% 8%, rgba(105, 229, 255, .18), transparent 34%),
    radial-gradient(circle at 16% 86%, rgba(121, 242, 198, .12), transparent 30%),
    linear-gradient(140deg, #05070d 0%, #07111d 48%, #03050a 100%);
}

.admin-body .admin-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.admin-body .admin-bg span {
  position: absolute;
  display: block;
}

.admin-body .admin-grid-bg {
  inset: 0;
  background-image:
    linear-gradient(rgba(142, 200, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(142, 200, 255, .05) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.92), transparent 82%);
}

.admin-body .admin-moon {
  right: clamp(36px, 8vw, 130px);
  top: 34px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(237, 247, 255, .75), rgba(142, 200, 255, .18) 42%, transparent 70%);
  filter: blur(.2px);
  opacity: .5;
}

.admin-body .admin-orbit {
  right: clamp(0px, 4vw, 88px);
  top: 2px;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(142, 200, 255, .18);
  border-radius: 50%;
  transform: rotate(-20deg);
  animation: adminOrbit 24s linear infinite;
}

.admin-body .admin-scan {
  left: -24%;
  top: 0;
  width: 46%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(105, 229, 255, .08), transparent);
  animation: adminScan 12s ease-in-out infinite;
}

.admin-body .admin-haze {
  left: 24%;
  bottom: -22%;
  width: 52%;
  height: 38%;
  background: radial-gradient(ellipse at center, rgba(105, 229, 255, .12), transparent 68%);
}

.admin-body .admin-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-body .admin-side {
  position: sticky;
  top: 0;
  height: 100vh;
  background: rgba(4, 8, 15, .76);
  border-right: 1px solid var(--admin-border);
  color: var(--admin-text);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  backdrop-filter: blur(18px);
  box-shadow: 18px 0 80px rgba(0, 0, 0, .24);
}

.admin-body .admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 18px;
  border-bottom: 1px solid var(--admin-border);
  margin: 0;
  color: var(--admin-text);
}

.admin-body .admin-brand span:last-child {
  display: grid;
  gap: 2px;
}

.admin-body .admin-brand small,
.admin-body .side-status small,
.admin-body .compact-row small,
.admin-body .metric small,
.admin-body .subtitle {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-body .brand-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #f5fbff url("/assets/rkingai-logo.jpg") center / cover no-repeat;
  border: 1px solid rgba(142, 200, 255, .24);
  box-shadow: 0 0 24px rgba(105, 229, 255, .22);
}

.admin-body .admin-nav {
  display: grid;
  gap: 8px;
}

.admin-body .side-tab {
  width: 100%;
  min-height: 42px;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 12px;
  background: transparent;
  color: #b8c5d7;
  font-weight: 900;
  cursor: pointer;
}

.admin-body .side-tab.active,
.admin-body .side-tab:hover {
  color: var(--admin-text);
  background: linear-gradient(135deg, rgba(105, 229, 255, .16), rgba(142, 200, 255, .08));
  border-color: rgba(105, 229, 255, .24);
}

.admin-body .side-status {
  margin-top: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: rgba(10, 18, 32, .62);
}

.admin-body .status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--admin-green);
  box-shadow: 0 0 16px rgba(121, 242, 198, .8);
}

.admin-body .admin-main {
  padding: 34px clamp(20px, 4vw, 56px) 70px;
  min-width: 0;
}

.admin-body .login-panel,
.admin-body .admin-card,
.admin-body .admin-row,
.admin-body .admin-hero-panel,
.admin-body .integration-hero,
.admin-body .metric,
.admin-body .segment-grid article {
  border: 1px solid var(--admin-border);
  background: linear-gradient(180deg, rgba(10, 18, 32, .9), rgba(7, 12, 22, .72));
  box-shadow: 0 24px 90px rgba(0, 0, 0, .28);
  backdrop-filter: blur(18px);
}

.admin-body .login-panel {
  max-width: 440px;
  margin: 10vh auto;
  border-radius: 12px;
  padding: 34px;
}

.admin-body .login-panel h1,
.admin-body .admin-top h1,
.admin-body .admin-hero-panel h2,
.admin-body .integration-hero h2 {
  color: var(--admin-text);
  font-family: Georgia, "Times New Roman", serif;
}

.admin-body .login-panel input,
.admin-body .admin-form input,
.admin-body .admin-form select,
.admin-body .admin-form textarea {
  width: 100%;
  color: var(--admin-text);
  background: rgba(3, 7, 13, .72);
  border: 1px solid rgba(142, 200, 255, .2);
  border-radius: 8px;
  min-height: 42px;
}

.admin-body .admin-form textarea {
  min-height: 88px;
}

.admin-body .login-panel input::placeholder,
.admin-body .admin-form input::placeholder,
.admin-body .admin-form textarea::placeholder {
  color: #68788d;
}

.admin-body .admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.admin-body .admin-top h1 {
  margin: 4px 0 0;
  font-size: clamp(34px, 4vw, 58px);
}

.admin-body .admin-top-actions,
.admin-body .admin-actions,
.admin-body .admin-row-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-body .eyebrow {
  color: var(--admin-cyan);
  text-transform: uppercase;
}

.admin-body .admin-hero-panel,
.admin-body .integration-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  border-radius: 12px;
  padding: clamp(24px, 4vw, 40px);
  margin-bottom: 22px;
}

.admin-body .admin-hero-panel h2,
.admin-body .integration-hero h2 {
  margin: 10px 0;
  font-size: clamp(38px, 5vw, 74px);
}

.admin-body .admin-hero-panel p,
.admin-body .integration-hero p,
.admin-body .muted {
  color: var(--admin-muted);
}

.admin-body .status-line {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  color: #c5d5e8;
  font-size: 13px;
  font-weight: 800;
}

.admin-body .admin-hero-orb {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid rgba(105, 229, 255, .24);
  background: radial-gradient(circle at center, rgba(105, 229, 255, .2), rgba(8, 14, 24, .72));
}

.admin-body .admin-hero-orb strong {
  display: block;
  font-size: 34px;
  color: var(--admin-green);
}

.admin-body .admin-hero-orb span {
  display: block;
  color: var(--admin-muted);
}

.admin-body .admin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0;
}

.admin-body .metric {
  border-radius: 10px;
  padding: 18px;
}

.admin-body .metric span {
  display: block;
  color: var(--admin-muted);
  font-weight: 900;
}

.admin-body .metric strong {
  display: block;
  margin: 10px 0 6px;
  color: var(--admin-text);
  font-size: 28px;
}

.admin-body .admin-two {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 18px;
  margin-top: 18px;
}

.admin-body .admin-card {
  border-radius: 10px;
  padding: 22px;
  margin-top: 18px;
}

.admin-body .admin-card h2,
.admin-body .admin-row h3 {
  color: var(--admin-text);
}

.admin-body .admin-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-body .admin-card-head h2 {
  margin: 0 0 4px;
}

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

.admin-body .admin-form .full {
  grid-column: 1 / -1;
}

.admin-body .admin-list,
.admin-body .model-price-grid,
.admin-body .compact-list {
  display: grid;
  gap: 12px;
}

.admin-body .admin-row {
  border-radius: 10px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
}

.admin-body .row-title,
.admin-body .compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-body .row-title h3 {
  margin: 0 0 6px;
}

.admin-body .compact-row {
  padding: 14px;
  border: 1px solid rgba(142, 200, 255, .12);
  border-radius: 8px;
  background: rgba(3, 7, 13, .4);
}

.admin-body .compact-row div {
  display: grid;
  gap: 4px;
}

.admin-body .status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid rgba(142, 200, 255, .18);
  color: var(--admin-blue);
  background: rgba(142, 200, 255, .1);
}

.admin-body .status-pill.ok {
  color: var(--admin-green);
  background: rgba(121, 242, 198, .12);
  border-color: rgba(121, 242, 198, .26);
}

.admin-body .status-pill.warn {
  color: var(--admin-amber);
  background: rgba(243, 197, 109, .12);
  border-color: rgba(243, 197, 109, .24);
}

.admin-body .status-pill.bad {
  color: #aab8c8;
  background: rgba(142, 200, 255, .08);
  border-color: rgba(142, 200, 255, .18);
}

.admin-body .usage-chart {
  height: 260px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 12px;
  padding-top: 12px;
}

.admin-body .usage-bar {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 7px;
  text-align: center;
  color: var(--admin-muted);
  font-size: 12px;
}

.admin-body .usage-bar span {
  align-self: end;
  min-height: 10px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--admin-cyan), #315dff);
  box-shadow: 0 0 24px rgba(105, 229, 255, .22);
}

.admin-body .usage-bar em {
  color: var(--admin-text);
  font-style: normal;
  font-weight: 900;
}

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

.admin-body .segment-grid article {
  border-radius: 10px;
  padding: 18px;
  display: grid;
  gap: 7px;
}

.admin-body .segment-grid strong {
  color: var(--admin-green);
  font-size: 30px;
}

.admin-body .segment-grid span {
  font-weight: 900;
}

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

.admin-body .table {
  display: grid;
  gap: 8px;
  overflow-x: auto;
}

.admin-body .table-row {
  min-width: 720px;
  display: grid;
  grid-template-columns: 1.4fr .8fr .8fr .8fr;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid rgba(142, 200, 255, .12);
  border-radius: 8px;
  background: rgba(3, 7, 13, .42);
  color: var(--admin-text);
}

.admin-body button.primary,
.admin-body .primary {
  border: 0;
  border-radius: 8px;
  min-height: 40px;
  padding: 0 16px;
  color: #031020;
  background: linear-gradient(135deg, var(--admin-green), var(--admin-cyan));
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(105, 229, 255, .18);
}

.admin-body button.ghost,
.admin-body .ghost {
  border: 1px solid rgba(142, 200, 255, .22);
  border-radius: 8px;
  min-height: 40px;
  padding: 0 14px;
  color: var(--admin-text);
  background: rgba(7, 12, 22, .58);
  font-weight: 900;
}

.admin-body .tiny {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.admin-body .full {
  width: 100%;
}

.admin-body .error {
  color: #b6c5d8;
}

@keyframes adminOrbit {
  from { transform: rotate(-20deg); }
  to { transform: rotate(340deg); }
}

@keyframes adminScan {
  0%, 100% { transform: translateX(0); opacity: .25; }
  50% { transform: translateX(280%); opacity: .55; }
}

@media (prefers-reduced-motion: reduce) {
  .admin-body .admin-orbit,
  .admin-body .admin-scan {
    animation: none;
  }
}

@media (max-width: 1100px) {
  .admin-body .admin-grid,
  .admin-body .segment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-body .admin-two,
  .admin-body .admin-hero-panel,
  .admin-body .integration-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .admin-body .admin-shell {
    grid-template-columns: 1fr;
  }
  .admin-body .admin-side {
    position: relative;
    height: auto;
  }
  .admin-body .admin-grid,
  .admin-body .segment-grid,
  .admin-body .admin-form,
  .admin-body .integration-metrics,
  .admin-body .admin-row {
    grid-template-columns: 1fr;
  }
  .admin-body .admin-top {
    align-items: flex-start;
    flex-direction: column;
  }
  .admin-body .admin-hero-orb {
    width: 120px;
    height: 120px;
  }
}

/* Closer lunarkx admin shell */
.admin-body .admin-shell {
  grid-template-columns: 268px minmax(0, 1fr);
}

.admin-body .admin-side {
  padding: 22px 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), transparent),
    rgba(4, 8, 15, .78);
}

.admin-body .admin-brand {
  min-height: 72px;
  padding: 10px 8px 18px;
}

.admin-body .admin-nav {
  gap: 0;
}

.admin-body .side-tab {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 5px 0;
  padding: 0 12px;
  color: #aebbd0;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.admin-body .side-tab span:first-child {
  display: grid;
  place-items: center;
  width: 32px;
  height: 28px;
  border: 1px solid rgba(142, 200, 255, .12);
  border-radius: 7px;
  color: var(--admin-blue);
  background: rgba(142, 200, 255, .06);
  font-size: 11px;
  font-weight: 950;
}

.admin-body .side-tab span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-body .side-tab.active,
.admin-body .side-tab:hover {
  background: linear-gradient(90deg, rgba(142, 200, 255, .14), rgba(121, 242, 198, .06));
  border-color: rgba(142, 200, 255, .26);
  transform: translateX(2px);
}

.admin-body .admin-main {
  padding: 0;
}

.admin-body .admin-top {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 86px;
  margin: 0;
  padding: 18px 26px;
  border-bottom: 1px solid var(--admin-border);
  background: rgba(5, 9, 17, .78);
  backdrop-filter: blur(18px);
}

.admin-body #adminContent {
  padding: 22px 26px 56px;
}

.admin-body .page-title {
  min-width: 220px;
}

.admin-body .page-title h1 {
  margin: 3px 0 5px;
  color: #fff;
  font-family: inherit;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0;
}

.admin-body .admin-top .eyebrow {
  margin: 0;
  color: var(--admin-blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
}

.admin-body .admin-top .subtitle {
  margin: 0;
  max-width: 560px;
}

.admin-body .admin-top-actions {
  justify-content: flex-end;
  flex: 1;
}

.admin-body .admin-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(360px, 30vw);
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(142, 200, 255, .18);
  border-radius: 8px;
  background: rgba(4, 8, 15, .64);
  color: var(--admin-muted);
}

.admin-body .admin-search input {
  width: 100%;
  min-height: 34px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--admin-text);
  font-weight: 750;
}

.admin-body .range-tabs {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(142, 200, 255, .16);
  border-radius: 999px;
  background: rgba(4, 8, 15, .64);
}

.admin-body .range-tab {
  min-width: 42px;
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 900;
}

.admin-body .range-tab.active,
.admin-body .range-tab:hover {
  color: #031020;
  background: var(--admin-blue);
}

.admin-body .top-token {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  color: var(--admin-muted);
  border: 1px solid rgba(142, 200, 255, .14);
  border-radius: 999px;
  background: rgba(142, 200, 255, .06);
  font-size: 12px;
  font-weight: 850;
}

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

.admin-body .metric,
.admin-body .admin-card,
.admin-body .admin-row,
.admin-body .admin-hero-panel,
.admin-body .integration-hero,
.admin-body .segment-grid article {
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .045), transparent),
    var(--admin-panel);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .04);
}

.admin-body .metric {
  position: relative;
  min-height: 118px;
  overflow: hidden;
  padding: 16px;
}

.admin-body .metric::after {
  position: absolute;
  right: -28px;
  bottom: -42px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(142, 200, 255, .18), transparent 68%);
  content: "";
}

.admin-body .metric strong {
  margin: 16px 0 6px;
  font-size: 28px;
  font-weight: 900;
}

.admin-body .admin-card {
  margin-top: 14px;
  padding: 16px;
}

.admin-body .admin-card-head {
  align-items: center;
  margin-bottom: 14px;
}

.admin-body .admin-card-head h2 {
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.admin-body .admin-two {
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, .8fr);
  gap: 14px;
  margin-top: 14px;
}

.admin-body .admin-hero-panel,
.admin-body .integration-hero {
  grid-template-columns: minmax(0, 1fr) minmax(320px, .7fr);
  margin-bottom: 14px;
  padding: 22px;
  overflow: hidden;
}

.admin-body .admin-hero-panel h2,
.admin-body .integration-hero h2 {
  margin: 8px 0;
  font-size: clamp(34px, 4vw, 58px);
}

.admin-body .admin-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
}

.admin-body .admin-form input,
.admin-body .admin-form select {
  width: 220px;
}

.admin-body .admin-form textarea,
.admin-body .admin-form .full {
  flex: 1 1 100%;
}

.admin-body .admin-form button.full {
  flex: 0 0 auto;
  width: auto;
}

.admin-body .admin-row {
  padding: 14px;
}

.admin-body .table-row {
  min-height: 58px;
  padding: 12px 14px;
  border-color: rgba(142, 200, 255, .10);
  background: rgba(4, 8, 15, .38);
}

.admin-body .compact-row {
  min-height: 58px;
  border-radius: 7px;
}

.admin-body .usage-chart {
  height: 230px;
}

.admin-body button.primary,
.admin-body .primary {
  min-height: 36px;
  border-radius: 7px;
}

.admin-body button.ghost,
.admin-body .ghost {
  min-height: 36px;
  border-radius: 7px;
}

@media (max-width: 1180px) {
  .admin-body .admin-grid,
  .admin-body .integration-metrics,
  .admin-body .segment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-body .admin-two,
  .admin-body .integration-hero,
  .admin-body .admin-hero-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .admin-body .admin-side {
    position: static;
    height: auto;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
  }
  .admin-body .admin-brand,
  .admin-body .side-status {
    min-width: max-content;
  }
  .admin-body .admin-nav {
    display: flex;
    gap: 8px;
  }
  .admin-body .side-tab {
    grid-template-columns: 32px max-content;
    min-width: max-content;
    margin: 0;
  }
  .admin-body .admin-top,
  .admin-body .page-title {
    align-items: stretch;
    flex-direction: column;
  }
  .admin-body .admin-search {
    width: 100%;
  }
  .admin-body #adminContent {
    padding: 16px 12px 42px;
  }
}

/* Wizard style for upstream/model automation */
.admin-body .wizard-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(105, 229, 255, .18);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(105, 229, 255, .08), rgba(121, 242, 198, .035)),
    rgba(4, 8, 15, .38);
}

.admin-body .wizard-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.admin-body .wizard-row label,
.admin-body .wizard-panel > label {
  display: grid;
  gap: 7px;
  color: #c7d5e8;
  font-size: 12px;
  font-weight: 900;
}

.admin-body .wizard-row label span {
  color: var(--admin-blue);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.admin-body .wizard-row .wide {
  grid-column: span 2;
}

.admin-body .wizard-panel input,
.admin-body .wizard-panel select,
.admin-body .wizard-panel textarea {
  width: 100%;
}

.admin-body .wizard-panel textarea.full {
  min-height: 84px;
}

.admin-body .wizard-panel > button,
.admin-body .wizard-panel > .primary {
  justify-self: start;
}

.admin-body .inline-editor {
  margin-top: 12px;
  border: 1px solid rgba(142, 200, 255, .12);
  border-radius: 8px;
  background: rgba(4, 8, 15, .32);
}

.admin-body .inline-editor summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--admin-blue);
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
  user-select: none;
}

.admin-body .inline-editor .compact-form {
  padding: 12px;
  border-top: 1px solid rgba(142, 200, 255, .1);
}

.admin-body .channel-row,
.admin-body .model-row {
  background:
    linear-gradient(90deg, rgba(105, 229, 255, .045), transparent 32%),
    var(--admin-panel);
}

.admin-body .channel-row .row-title h3,
.admin-body .model-row .row-title h3 {
  font-size: 17px;
}

@media (max-width: 1180px) {
  .admin-body .wizard-row {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 760px) {
  .admin-body .wizard-row,
  .admin-body .wizard-row .wide {
    grid-template-columns: 1fr;
    grid-column: auto;
  }
  .admin-body .wizard-panel > button,
  .admin-body .wizard-panel > .primary {
    justify-self: stretch;
  }
}

/* Admin polish pass */
.admin-body .admin-view {
  display: grid;
  gap: 14px;
}

.admin-body .metric-grid-refined {
  margin-top: 0;
}

.admin-body .refined-hero {
  min-height: 220px;
}

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

.admin-body .hero-stat-grid article {
  min-height: 118px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid rgba(142, 200, 255, .16);
  border-radius: 8px;
  background: rgba(4, 8, 15, .42);
}

.admin-body .hero-stat-grid strong {
  color: var(--admin-green);
  font-size: 34px;
  line-height: 1;
}

.admin-body .hero-stat-grid span {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 900;
}

.admin-body .compact-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  align-items: start;
}

.admin-body .compact-form input,
.admin-body .compact-form select {
  width: 100%;
}

.admin-body .compact-form textarea,
.admin-body .compact-form .full {
  grid-column: 1 / -1;
  width: 100%;
}

.admin-body .compact-form button:not(.tiny) {
  width: max-content;
  min-width: 116px;
}

.admin-body .compact-form label {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c7d5e8;
  border: 1px solid rgba(142, 200, 255, .16);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(3, 7, 13, .42);
  font-weight: 850;
}

.admin-body .admin-form input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-height: 14px;
  accent-color: var(--admin-cyan);
}

.admin-body .admin-table {
  display: grid;
  gap: 8px;
  overflow-x: auto;
}

.admin-body .admin-table-row {
  min-width: 760px;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(140px, .7fr) minmax(160px, .8fr) minmax(160px, .8fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(142, 200, 255, .1);
  border-radius: 8px;
  background: rgba(4, 8, 15, .38);
  color: var(--admin-text);
}

.admin-body .admin-table-row strong,
.admin-body .compact-row strong {
  color: #fff;
}

.admin-body .admin-table-row small,
.admin-body .admin-row small {
  display: block;
  margin-top: 4px;
  color: var(--admin-muted);
  font-size: 11px;
  font-weight: 750;
}

.admin-body .empty-state {
  min-height: 92px;
  display: grid;
  place-items: center;
  color: var(--admin-muted);
  border: 1px dashed rgba(142, 200, 255, .18);
  border-radius: 8px;
  background: rgba(4, 8, 15, .26);
  font-weight: 850;
}

.admin-body .user-card-list {
  margin-top: 0;
}

.admin-body .user-row-card,
.admin-body .channel-row,
.admin-body .model-row {
  grid-template-columns: minmax(0, 1fr) 84px;
}

.admin-body .vertical-actions {
  align-content: start;
  align-items: stretch;
  flex-direction: column;
}

.admin-body .vertical-actions button {
  width: 100%;
}

.admin-body .content-item {
  align-items: stretch;
}

.admin-body .content-item input {
  margin-top: 8px;
  width: min(360px, 100%);
}

.admin-body .error {
  max-height: 90px;
  overflow: auto;
  padding: 8px 10px;
  border: 1px solid rgba(255, 123, 136, .22);
  border-radius: 8px;
  background: rgba(255, 123, 136, .08);
  font-size: 12px;
}

.admin-body code {
  color: #d8f5ff;
  font-size: 11px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.admin-body .muted {
  overflow-wrap: anywhere;
}

.admin-body .admin-card + .admin-list,
.admin-body .admin-list + .admin-card {
  margin-top: 0;
}

@media (max-width: 1180px) {
  .admin-body .compact-form {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
  .admin-body .hero-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .admin-body .compact-form,
  .admin-body .hero-stat-grid {
    grid-template-columns: 1fr;
  }
  .admin-body .compact-form button:not(.tiny) {
    width: 100%;
  }
  .admin-body .user-row-card,
  .admin-body .channel-row,
  .admin-body .model-row {
    grid-template-columns: 1fr;
  }
  .admin-body .vertical-actions {
    flex-direction: row;
  }
}

/* Lunarkx-style admin refinements */
.admin-body .curve-chart {
  min-height: 248px;
  display: grid;
  gap: 8px;
  align-items: end;
}

.admin-body .curve-chart svg {
  width: 100%;
  height: 220px;
  overflow: visible;
}

.admin-body .chart-grid-lines line {
  stroke: rgba(142, 200, 255, .11);
  stroke-width: 1;
}

.admin-body .chart-area {
  fill: url(#curveFill);
}

.admin-body .chart-curve {
  fill: none;
  stroke: #67e8f9;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 12px rgba(103, 232, 249, .35));
}

.admin-body .curve-chart circle {
  fill: #e9fbff;
  stroke: #67e8f9;
  stroke-width: 3;
}

.admin-body .chart-label-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--admin-muted);
  font-size: 11px;
  font-weight: 850;
}

.admin-body .share-layout {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  align-items: center;
}

.admin-body .donut-chart {
  width: 158px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(9, 17, 29, .98) 0 51%, transparent 52%),
    conic-gradient(var(--segments));
  border: 1px solid rgba(142, 200, 255, .18);
  box-shadow: 0 0 42px rgba(74, 222, 255, .12);
}

.admin-body .donut-chart span,
.admin-body .donut-chart small {
  grid-area: 1 / 1;
}

.admin-body .donut-chart span {
  color: #fff;
  font-size: 30px;
  font-weight: 950;
}

.admin-body .donut-chart small {
  margin-top: 46px;
  color: var(--admin-muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.admin-body .share-row i {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 0 12px currentColor;
}

.admin-body .share-detail {
  margin-top: 12px;
}

.admin-body .group-inline-list .admin-row {
  border-color: rgba(103, 232, 249, .14);
  background: linear-gradient(135deg, rgba(12, 24, 38, .78), rgba(4, 8, 15, .78));
}

.admin-body .modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(circle at 70% 15%, rgba(103, 232, 249, .13), transparent 34%),
    rgba(1, 5, 10, .78);
  backdrop-filter: blur(10px);
}

.admin-body .modal-backdrop[hidden] {
  display: none;
}

.admin-body .channel-modal {
  position: relative;
  width: min(1120px, 100%);
  max-height: calc(100vh - 64px);
  overflow: auto;
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid rgba(142, 200, 255, .24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(20, 32, 49, .98), rgba(8, 15, 26, .98)),
    var(--admin-panel);
  box-shadow: 0 24px 90px rgba(0, 0, 0, .45);
}

.admin-body .channel-modal h2 {
  margin: 0;
  color: #fff;
  font-size: 28px;
  line-height: 1.1;
}

.admin-body .channel-modal label {
  display: grid;
  gap: 8px;
  color: #aebbd0;
  font-weight: 900;
}

.admin-body .channel-modal input,
.admin-body .channel-modal select,
.admin-body .channel-modal textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(142, 200, 255, .2);
  border-radius: 8px;
  background: rgba(2, 7, 14, .78);
  color: #edf8ff;
  padding: 0 14px;
  font: inherit;
  font-weight: 850;
}

.admin-body .channel-modal textarea {
  min-height: 120px;
  padding: 12px 14px;
  resize: vertical;
}

.admin-body .modal-grid {
  display: grid;
  gap: 14px;
}

.admin-body .modal-grid.three {
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 1fr) minmax(160px, .8fr);
}

.admin-body .modal-grid.five {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.admin-body .modal-check {
  min-height: 44px;
  display: flex !important;
  align-items: center;
  gap: 10px !important;
}

.admin-body .modal-check input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--admin-cyan);
}

.admin-body .modal-note {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  color: #5a6472;
  font-weight: 850;
}

.admin-body .modal-note strong {
  color: #1b2534;
}

.admin-body .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.admin-body .modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  border: 0;
  background: transparent;
  color: #9aa8ba;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.admin-body .dashboard-command {
  min-height: 190px;
  background:
    linear-gradient(135deg, rgba(103, 232, 249, .1), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, .045), transparent),
    var(--admin-panel);
}

.admin-body .admin-dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, .75fr);
  gap: 14px;
  align-items: stretch;
}

.admin-body .admin-dashboard-layout.tight {
  grid-template-columns: minmax(0, 1fr) minmax(420px, 1fr);
}

.admin-body .user-summary-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.admin-body .collapsed-user,
.admin-body .channel-row-refined,
.admin-body .model-row-compact {
  align-items: start;
  background:
    linear-gradient(90deg, rgba(103, 232, 249, .045), transparent 34%),
    var(--admin-panel);
}

.admin-body .user-chip-line,
.admin-body .channel-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.admin-body .user-chip-line span,
.admin-body .channel-meta-line span {
  max-width: 100%;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(142, 200, 255, .13);
  border-radius: 999px;
  padding: 0 9px;
  color: #aebbd0;
  background: rgba(4, 8, 15, .38);
  font-size: 11px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.admin-body .diagnostic-note {
  margin-top: 10px;
  border: 1px solid rgba(142, 200, 255, .12);
  border-radius: 8px;
  background: rgba(4, 8, 15, .28);
}

.admin-body .diagnostic-note summary {
  min-height: 32px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: #9fb2c8;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.admin-body .diagnostic-note code {
  display: block;
  max-height: 88px;
  overflow: auto;
  padding: 10px;
  color: #c7d5e8;
  border-top: 1px solid rgba(142, 200, 255, .1);
}

.admin-body .model-toolbox {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, .7fr);
  gap: 14px;
}

.admin-body .price-multiplier-panel,
.admin-body .settings-sync-bar {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(142, 200, 255, .16);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(121, 242, 198, .06), rgba(103, 232, 249, .035)),
    rgba(4, 8, 15, .44);
}

.admin-body .price-multiplier-panel h3,
.admin-body .settings-sync-bar h2 {
  margin: 0;
  color: #fff;
}

.admin-body .price-field-toggles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-body .price-field-toggles label,
.admin-body .row-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c7d5e8;
  font-weight: 850;
}

.admin-body .price-field-toggles input,
.admin-body .row-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--admin-cyan);
}

.admin-body .price-line {
  margin-bottom: 0;
}

.admin-body .settings-sync-bar {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.admin-body .settings-sync-bar span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(121, 242, 198, .22);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--admin-green);
  background: rgba(121, 242, 198, .08);
  font-weight: 900;
  font-size: 12px;
}

.admin-body .admin-users-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-body .admin-users-toolbar input {
  max-width: 220px;
}

.admin-body .quota-table {
  overflow-x: auto;
  border: 1px solid rgba(142, 200, 255, .14);
  border-radius: 8px;
}

.admin-body .quota-table-row {
  min-width: 1560px;
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) 110px 120px 120px 120px 130px 130px minmax(210px, 1.2fr) minmax(190px, 1fr) 320px;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(142, 200, 255, .12);
  background: rgba(4, 8, 15, .34);
  color: var(--admin-text);
}

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

.admin-body .quota-table-head {
  min-height: 48px;
  color: var(--admin-blue);
  background:
    linear-gradient(180deg, rgba(142, 200, 255, .08), rgba(142, 200, 255, .03)),
    rgba(10, 21, 34, .88);
  font-size: 12px;
  font-weight: 950;
}

.admin-body .quota-table-row strong {
  color: #fff;
}

.admin-body .quota-table-row small {
  display: block;
  margin-top: 5px;
  color: var(--admin-muted);
  font-size: 11px;
  font-weight: 800;
}

.admin-body .quota-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-body .clip-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-body .customer-modal {
  width: min(1060px, 100%);
}

.admin-body .modal-grid.four {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.admin-body .customer-modal > label {
  display: grid;
  gap: 8px;
  color: #aebbd0;
  font-weight: 900;
}

.admin-body .user-modal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-body .user-modal-badges span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(142, 200, 255, .26);
  border-radius: 6px;
  padding: 0 12px;
  color: #bfe2ff;
  background: rgba(2, 7, 14, .72);
  font-size: 12px;
  font-weight: 900;
}

.admin-body .users-page-stack {
  display: grid;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
}

.admin-body .lunark-panel {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(142, 200, 255, .18);
  border-radius: 8px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.045), transparent), rgba(13, 24, 38, .86);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .04);
}

.admin-body .lunark-panel-head,
.admin-body .user-panel-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.admin-body .lunark-panel-head {
  position: relative;
  padding-right: 120px;
}

.admin-body .lunark-panel-head > div,
.admin-body .user-panel-toolbar > div {
  min-width: 0;
}

.admin-body .lunark-panel-head > button,
.admin-body .user-panel-toolbar > button {
  flex-shrink: 0;
}

.admin-body .toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.admin-body .lunark-panel-head > button {
  position: absolute;
  top: 0;
  right: 0;
}

.admin-body .lunark-panel-head h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 19px;
  font-weight: 950;
}

.admin-body .lunark-panel-head p {
  margin: 0;
  color: var(--admin-muted);
  font-size: 14px;
  font-weight: 750;
}

.admin-body .compact-button {
  min-height: 38px;
  border-radius: 8px;
  padding: 8px 16px;
  white-space: nowrap;
}

.admin-body .lunark-table {
  overflow-x: auto;
  border: 1px solid rgba(142, 200, 255, .14);
  border-radius: 8px;
  background: rgba(3, 7, 13, .34);
}

.admin-body .lunark-table-row {
  display: grid;
  align-items: center;
  gap: 14px;
  min-height: 66px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(142, 200, 255, .12);
  color: #c8d4e5;
  font-weight: 800;
}

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

.admin-body .lunark-table-head {
  min-height: 52px;
  color: var(--admin-blue);
  background: linear-gradient(180deg, rgba(142, 200, 255, .08), rgba(142, 200, 255, .03)), rgba(13, 27, 42, .96);
  font-size: 13px;
  font-weight: 950;
}

.admin-body .lunark-table-row strong {
  color: #fff;
}

.admin-body .lunark-table-row small {
  display: block;
  margin-top: 5px;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 750;
}

.admin-body .group-rules-row,
.admin-body .group-rules-table .lunark-table-head {
  min-width: 1330px;
  grid-template-columns: 250px 72px 128px 128px 132px 80px 220px 112px 150px;
}

.admin-body .user-panel-toolbar.secondary {
  align-items: center;
}

.admin-body .small-filter {
  width: 190px;
}

.admin-body .wide-filter {
  width: min(390px, 100%);
}

.admin-body .user-panel-toolbar input,
.admin-body .inline-user-form input {
  min-height: 38px;
  border: 1px solid rgba(142, 200, 255, .2);
  border-radius: 8px;
  background: rgba(2, 7, 14, .72);
  color: #edf8ff;
  padding: 0 12px;
  font-weight: 850;
  outline: none;
}

.admin-body .user-panel-toolbar input::placeholder,
.admin-body .inline-user-form input::placeholder {
  color: rgba(196, 209, 226, .72);
}

.admin-body .user-panel-toolbar input:focus,
.admin-body .inline-user-form input:focus {
  border-color: rgba(120, 205, 255, .72);
  box-shadow: 0 0 0 3px rgba(120, 205, 255, .12);
}

.admin-body .billing-page-stack,
.admin-body .models-page-stack {
  display: grid;
  gap: 18px;
  min-width: 0;
}

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

.admin-body .billing-two {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 18px;
  min-width: 0;
}

.admin-body .billing-create-form,
.admin-body .model-publish-form,
.admin-body .model-card-form {
  display: grid;
  gap: 14px;
}

.admin-body .billing-create-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-body .billing-create-form label,
.admin-body .model-publish-form label,
.admin-body .clean-price-panel label {
  display: grid;
  gap: 7px;
  color: #aebbd0;
  font-size: 13px;
  font-weight: 900;
}

.admin-body .billing-create-form input,
.admin-body .billing-create-form select,
.admin-body .model-publish-form input,
.admin-body .model-publish-form select,
.admin-body .model-publish-form textarea,
.admin-body .model-card-form input,
.admin-body .model-card-form select,
.admin-body .model-card-form textarea,
.admin-body .clean-price-panel input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(142, 200, 255, .2);
  border-radius: 8px;
  background: rgba(2, 7, 14, .74);
  color: #edf8ff;
  padding: 0 13px;
  font-weight: 850;
  outline: none;
}

.admin-body .model-publish-form textarea,
.admin-body .model-card-form textarea {
  min-height: 92px;
  padding: 12px 13px;
}

.admin-body .billing-create-form input::placeholder,
.admin-body .model-publish-form input::placeholder,
.admin-body .model-publish-form textarea::placeholder,
.admin-body .model-card-form input::placeholder {
  color: rgba(196, 209, 226, .66);
}

.admin-body .billing-create-form input:focus,
.admin-body .billing-create-form select:focus,
.admin-body .model-publish-form input:focus,
.admin-body .model-publish-form select:focus,
.admin-body .model-publish-form textarea:focus,
.admin-body .model-card-form input:focus,
.admin-body .model-card-form select:focus,
.admin-body .model-card-form textarea:focus,
.admin-body .clean-price-panel input:focus {
  border-color: rgba(120, 205, 255, .72);
  box-shadow: 0 0 0 3px rgba(120, 205, 255, .12);
}

.admin-body .billing-create-form button {
  align-self: end;
}

.admin-body .billing-account-row,
.admin-body .billing-account-table .lunark-table-head {
  min-width: 1380px;
  grid-template-columns: 220px 92px 120px 92px 100px 100px 95px 105px 118px 210px;
}

.admin-body .topup-row,
.admin-body .topup-table .lunark-table-head {
  min-width: 860px;
  grid-template-columns: minmax(240px, 1.5fr) 110px 110px 100px 110px 130px;
}

.admin-body .ledger-row,
.admin-body .ledger-table .lunark-table-head {
  min-width: 720px;
  grid-template-columns: minmax(240px, 1.5fr) 130px 120px 140px;
}

.admin-body .amount-plus {
  color: #79f2c6;
  font-weight: 950;
}

.admin-body .amount-minus {
  color: #ff8da1;
  font-weight: 950;
}

.admin-body .model-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.admin-body .model-publish-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 16px;
  border: 1px solid rgba(142, 200, 255, .14);
  border-radius: 8px;
  background: rgba(3, 7, 13, .32);
}

.admin-body .model-publish-form .field-wide {
  grid-column: span 2;
}

.admin-body .model-publish-form .field-full {
  grid-column: 1 / -1;
}

.admin-body .model-publish-form .checkline {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-body .model-publish-form .checkline input,
.admin-body .model-card-form label input,
.admin-body .clean-price-panel input[type="checkbox"] {
  width: auto;
  min-height: auto;
}

.admin-body .clean-price-panel {
  min-height: 100%;
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(121, 242, 198, .16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 0%, rgba(105, 229, 255, .12), transparent 34%),
    rgba(4, 12, 20, .72);
}

.admin-body .clean-price-panel h3 {
  margin: -8px 0 0;
  color: #fff;
  font-size: 20px;
}

.admin-body .clean-price-panel small {
  color: #9aa8ba;
  font-weight: 800;
}

.admin-body .model-list-grid {
  display: grid;
  gap: 14px;
}

.admin-body .model-price-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(340px, .82fr) minmax(420px, 1.18fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(142, 200, 255, .16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), transparent),
    rgba(5, 12, 22, .78);
  box-shadow: 0 18px 56px rgba(0, 0, 0, .18);
}

.admin-body .model-card-main,
.admin-body .model-card-side {
  min-width: 0;
}

.admin-body .model-card-main {
  display: grid;
  align-content: start;
  gap: 12px;
}

.admin-body .model-card-side {
  display: grid;
  gap: 12px;
}

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

.admin-body .model-price-card-head .row-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.admin-body .model-price-card-head strong {
  color: #edf8ff;
  font-size: 18px;
}

.admin-body .model-price-card-head small {
  display: block;
  margin-top: 4px;
  color: #9aa8ba;
  font-size: 13px;
}

.admin-body .model-price-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.admin-body .billing-chips {
  justify-content: flex-end;
}

.admin-body .model-price-chips span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(142, 200, 255, .16);
  border-radius: 999px;
  padding: 0 10px;
  color: #bfe2ff;
  background: rgba(142, 200, 255, .07);
  font-size: 12px;
  font-weight: 900;
}

.admin-body .model-inline-editor summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(142, 200, 255, .14);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(2, 7, 14, .5);
  color: #9bd0ff;
  font-weight: 900;
  cursor: pointer;
}

.admin-body .model-card-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(142, 200, 255, .12);
  border-radius: 8px;
  background: rgba(2, 7, 14, .34);
}

.admin-body .model-card-form label {
  display: grid;
  gap: 7px;
  color: #aebbd0;
  font-size: 12px;
  font-weight: 900;
}

.admin-body .model-card-form .full {
  grid-column: 1 / -1;
}

.admin-body .model-card-form input:disabled {
  color: #86a4bf;
  border-style: dashed;
  background: rgba(2, 7, 14, .35);
  cursor: not-allowed;
}

.admin-body .model-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.admin-body .model-card-actions {
  display: grid;
  gap: 8px;
  align-self: start;
  min-width: 92px;
}

.admin-body .channels-page-stack {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.admin-body .clean-channel-hero {
  align-items: stretch;
}

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

.admin-body .channel-card-clean {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(142, 200, 255, .16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), transparent),
    rgba(5, 12, 22, .78);
  box-shadow: 0 18px 56px rgba(0, 0, 0, .18);
}

.admin-body .channel-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.admin-body .channel-card-head strong {
  display: block;
  color: #edf8ff;
  font-size: 19px;
  font-weight: 950;
}

.admin-body .channel-card-head small {
  display: block;
  margin-top: 5px;
  color: #9aa8ba;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.admin-body .channel-stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.admin-body .channel-stat-grid span {
  min-height: 64px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px solid rgba(142, 200, 255, .12);
  border-radius: 8px;
  padding: 9px;
  background: rgba(3, 7, 13, .34);
}

.admin-body .channel-stat-grid b {
  color: #edf8ff;
  font-size: 16px;
}

.admin-body .channel-stat-grid small {
  color: #8fa0b7;
  font-size: 11px;
  font-weight: 850;
}

.admin-body .clean-channel-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-body .clean-channel-meta span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(142, 200, 255, .14);
  border-radius: 999px;
  padding: 0 10px;
  color: #b9c7d9;
  background: rgba(142, 200, 255, .06);
  font-size: 12px;
  font-weight: 850;
}

.admin-body .channel-inline-editor summary {
  color: #9bd0ff;
  font-weight: 900;
  cursor: pointer;
}

.admin-body .channel-edit-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.admin-body .channel-edit-form input,
.admin-body .channel-edit-form select,
.admin-body .channel-edit-form textarea,
.admin-body .clean-channel-modal input,
.admin-body .clean-channel-modal select,
.admin-body .clean-channel-modal textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(142, 200, 255, .2);
  border-radius: 8px;
  background: rgba(2, 7, 14, .76);
  color: #edf8ff;
  padding: 0 13px;
  font-weight: 850;
  outline: none;
}

.admin-body .channel-edit-form textarea,
.admin-body .clean-channel-modal textarea {
  min-height: 120px;
  padding: 12px 13px;
}

.admin-body .channel-edit-form .full {
  grid-column: 1 / -1;
}

.admin-body .channel-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-body .clean-channel-modal {
  width: min(1080px, calc(100vw - 40px));
  max-height: calc(100vh - 54px);
  overflow: auto;
}

.admin-body .clean-channel-modal h2 {
  margin-bottom: 8px;
}

.admin-body .modal-subtitle {
  margin: 0 0 20px;
  color: #9aa8ba;
  font-weight: 800;
}

.admin-body .clean-channel-modal label {
  color: #aebbd0;
  font-weight: 900;
}

.admin-body .provider-model-preview,
.admin-body .clean-modal-note {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(121, 242, 198, .16);
  border-radius: 8px;
  padding: 14px 16px;
  background: rgba(121, 242, 198, .08);
}

.admin-body .provider-model-preview strong,
.admin-body .clean-modal-note strong {
  color: #edf8ff;
}

.admin-body .provider-model-preview span,
.admin-body .clean-modal-note span {
  color: #aebbd0;
  font-weight: 800;
}

.admin-body .bulk-tools {
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-body .selected-count {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(142, 200, 255, .35);
  border-radius: 6px;
  padding: 0 10px;
  color: #9bd0ff;
  background: rgba(3, 7, 13, .48);
  font-size: 12px;
  font-weight: 900;
}

.admin-body .user-data-row,
.admin-body .user-data-head {
  min-width: 2100px;
  grid-template-columns: 36px 170px 240px 110px 130px 110px 130px 120px 110px 140px 90px 100px 90px 105px 120px 120px 120px 120px 210px 210px 320px;
}

.admin-body .user-data-row {
  min-height: 74px;
}

.admin-body .user-data-row input[type="checkbox"],
.admin-body .user-data-head input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--admin-cyan);
}

.admin-body .table-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-body .danger {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  color: #fff;
  background: #fb7185;
  font-weight: 900;
}

.admin-body .table-pill,
.admin-body .tag-chip {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.admin-body .table-pill.green {
  color: #6af3c2;
  border: 1px solid rgba(106, 243, 194, .3);
  background: rgba(48, 170, 130, .18);
}

.admin-body .tag-chip {
  color: #9bd0ff;
  border: 1px solid rgba(142, 200, 255, .22);
  background: rgba(142, 200, 255, .1);
}

.admin-body .new-user-drawer {
  margin-top: 14px;
  border: 1px solid rgba(142, 200, 255, .14);
  border-radius: 8px;
  background: rgba(3, 7, 13, .38);
}

.admin-body .new-user-drawer summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: var(--admin-blue);
  cursor: pointer;
  font-weight: 950;
}

.admin-body .new-user-drawer .compact-form {
  padding: 14px;
  border-top: 1px solid rgba(142, 200, 255, .12);
}

.admin-body .user-modal-backdrop {
  background: rgba(1, 5, 10, .76);
  backdrop-filter: blur(10px);
}

.admin-body .user-edit-dialog {
  position: relative;
  width: min(1000px, calc(100vw - 48px));
  max-height: calc(100vh - 64px);
  overflow: auto;
  display: grid;
  gap: 20px;
  padding: 26px 28px;
  border: 1px solid rgba(142, 200, 255, .28);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(18, 30, 47, .98), rgba(7, 13, 24, .98));
  box-shadow: 0 24px 90px rgba(0, 0, 0, .52);
}

.admin-body .group-edit-dialog {
  width: min(840px, calc(100vw - 48px));
}

.admin-body .user-edit-dialog h2 {
  margin: 0;
  color: #fff;
  font-size: 24px;
  font-weight: 950;
}

.admin-body .user-edit-dialog label {
  display: grid;
  gap: 8px;
  margin: 0;
  color: #aebbd0;
  font-size: 16px;
  font-weight: 850;
}

.admin-body .user-edit-dialog input,
.admin-body .user-edit-dialog select,
.admin-body .user-edit-dialog textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(142, 200, 255, .22);
  border-radius: 8px;
  background: rgba(2, 7, 14, .8);
  color: #edf8ff;
  padding: 0 14px;
  font: inherit;
  font-weight: 850;
}

.admin-body .user-edit-dialog textarea {
  min-height: 116px;
  padding: 12px 14px;
}

.admin-body .dialog-grid {
  display: grid;
  gap: 14px;
}

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

.admin-body .dialog-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-body .dialog-grid .span-two {
  grid-column: span 2;
}

.admin-body .half-row {
  grid-template-columns: minmax(180px, .9fr) minmax(360px, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
}

.admin-body .number-control {
  display: grid;
  grid-template-columns: 42px minmax(80px, 1fr) 42px;
  border: 1px solid rgba(142, 200, 255, .22);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(2, 7, 14, .8);
}

.admin-body .number-control input {
  border: 0;
  border-radius: 0;
  text-align: center;
}

.admin-body .number-control button {
  border: 0;
  color: #8ab8e5;
  background: #eef6ff;
  font-weight: 950;
}

.admin-body .switch-field input[type="checkbox"] {
  width: 54px;
  height: 30px;
  min-height: 30px;
  accent-color: var(--admin-blue);
}

@media (max-width: 980px) {
  .admin-body .share-layout,
  .admin-body .modal-grid.three,
  .admin-body .modal-grid.five,
  .admin-body .modal-grid.four {
    grid-template-columns: 1fr;
  }
  .admin-body .donut-chart {
    width: 138px;
  }
  .admin-body .admin-dashboard-layout,
  .admin-body .admin-dashboard-layout.tight,
  .admin-body .model-toolbox,
  .admin-body .settings-sync-bar {
    grid-template-columns: 1fr;
  }
  .admin-body .user-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-body .lunark-panel-head,
  .admin-body .user-panel-toolbar,
  .admin-body .bulk-tools {
    align-items: stretch;
    flex-direction: column;
  }
  .admin-body .small-filter,
  .admin-body .wide-filter {
    width: 100%;
  }
  .admin-body .dialog-grid.three,
  .admin-body .dialog-grid.four,
  .admin-body .half-row {
    grid-template-columns: 1fr;
  }
  .admin-body .dialog-grid .span-two {
    grid-column: auto;
  }
  .admin-body .billing-metrics,
  .admin-body .billing-two,
  .admin-body .billing-create-form,
  .admin-body .model-workbench,
  .admin-body .model-publish-form,
  .admin-body .model-card-form,
  .admin-body .model-price-card,
  .admin-body .channel-list-grid,
  .admin-body .channel-edit-form {
    grid-template-columns: 1fr;
  }
  .admin-body .channel-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-body .model-publish-form .field-wide,
  .admin-body .model-publish-form .field-full {
    grid-column: auto;
  }
}
