:root {
  --bg: #0d0f12;
  --bg-soft: #111419;
  --bg-elev: #171b21;
  --bg-card: #191d24;
  --bg-hover: #222832;
  --border: #2a3039;
  --border-strong: #3a424e;
  --text: #f3f5f7;
  --text-soft: #c9ced6;
  --text-muted: #8e97a5;
  --accent: #5b8cff;
  --accent-2: #8dacff;
  --accent-3: #e7b45d;
  --warm: #e7b45d;
  --good: #43bf8a;
  --bad: #ef7079;
  --grad: #5b8cff;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 18px 48px rgba(0, 0, 0, .32);
  color-scheme: dark;
}

* { letter-spacing: 0 !important; }
html { background: var(--bg); }
body { background: var(--bg); color: var(--text); }
button, input, textarea, select { min-width: 0; }
button, a, input, textarea, select { transition: border-color .16s, background-color .16s, color .16s, opacity .16s; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid rgba(91, 140, 255, .9);
  outline-offset: 2px;
}
input::placeholder, textarea::placeholder { color: #697280; opacity: 1; }
select { color-scheme: dark; }
* { scrollbar-width: thin; scrollbar-color: #39414d transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #39414d; border-radius: 8px; }
*::-webkit-scrollbar-track { background: transparent; }

/* Shared controls */
.btn, .primary-btn, .secondary-btn, .ghost-btn, .text-btn {
  border-radius: 7px;
  min-height: 38px;
  box-shadow: none;
}
.btn-primary, .primary-btn { background: var(--accent); color: #fff; }
.btn-primary:hover, .primary-btn:hover { background: #4b7dec; opacity: 1; }
.btn-soft, .secondary-btn { background: var(--bg-elev); border-color: var(--border); }
.btn-soft:hover, .secondary-btn:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.btn-ghost, .ghost-btn { border-color: var(--border); }
.btn-danger { background: rgba(239, 112, 121, .1); border: 1px solid rgba(239, 112, 121, .22); }
.btn-danger:hover { background: rgba(239, 112, 121, .17); }
.icon-btn { border-radius: 7px; }

/* Front website */
.site-body .container { width: min(1320px, calc(100% - 48px)); }
.site-body .section { padding: 54px 0; }
.site-body .section-tight { padding: 38px 0 56px; }
.site-body .section-head { align-items: center; margin-bottom: 22px; }
.site-body .section-head h1,
.site-body .section-head h2 { font-size: 24px !important; line-height: 1.3; }
.site-body .grad-text { background: none; color: var(--accent-2); }

.site-body .nav {
  min-height: 64px;
  background: rgba(13, 15, 18, .94);
  border-color: var(--border);
  backdrop-filter: blur(16px);
}
.site-body .nav-inner { height: 64px; gap: 18px; }
.site-body .brand { gap: 10px; font-size: 17px; }
.site-body .brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: var(--accent);
  box-shadow: none;
}
.site-body .nav-links { gap: 4px; }
.site-body .nav-links a { padding: 8px 11px; border-radius: 6px; font-size: 13px; }
.site-body .nav-links a:hover { color: var(--text); background: var(--bg-elev); }
.site-body .nav-links a.active { color: #fff; background: #222936; }
.site-body .nav-user { gap: 8px; }
.site-body .nav-user-main { border: 1px solid transparent; padding: 3px 6px 3px 3px; }
.site-body .nav-user-main:hover { border-color: var(--border); background: var(--bg-elev); }
.site-body .avatar { width: 30px; height: 30px; }
.site-body .nav-wallet {
  border-radius: 7px;
  padding: 6px 10px;
  background: #14181e;
  border-color: var(--border);
}
.site-body .nav-wallet-label { color: var(--text-soft); }
.site-body .nav-dropdown {
  top: 64px;
  background: #111419;
  border-color: var(--border);
  padding: 10px 24px 18px;
}
.site-body .nav-dropdown a { padding: 12px 4px; }

.site-body .hero {
  min-height: 480px;
  height: min(620px, calc(100svh - 96px));
  display: flex;
  align-items: flex-end;
  padding: 76px 0 72px;
  isolation: isolate;
  background: url('/static/media/hero-workspace.jpg') center / cover no-repeat;
  border-bottom: 1px solid var(--border);
}
.site-body .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(5, 8, 12, .63);
}
.site-body .hero-glow { display: none; }
.site-body .hero-inner { width: min(1320px, calc(100% - 48px)); max-width: none; margin: 0 auto; text-align: left; }
.site-body .hero-badge {
  margin-bottom: 18px;
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(10, 14, 20, .68);
  border-color: rgba(255, 255, 255, .2);
  color: #dce2eb;
}
.site-body .hero-badge .dot { box-shadow: none; }
.site-body .hero h1 { max-width: 760px; margin: 0 0 14px; font-size: 48px; line-height: 1.12; }
.site-body .hero .lead { max-width: 680px; margin: 0 0 26px; color: #c7ced8; font-size: 16px; }
.site-body .gen-box {
  max-width: 760px;
  margin: 0;
  padding: 8px;
  border-radius: 8px;
  border-color: rgba(255, 255, 255, .2);
  background: rgba(13, 16, 21, .9);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .3);
}
.site-body .gen-box textarea { min-height: 56px; padding: 9px 12px; }
.site-body .gen-box .gen-go { border-radius: 7px; background: var(--accent); padding: 0 20px; }
.site-body .gen-box .gen-go:hover { background: #4b7dec; opacity: 1; }
.site-body .hero .gen-status { max-width: 760px; margin: 14px 0 0; background: rgba(13, 16, 21, .94); }

.site-body .hero + .section { background: #101318; }
.site-body .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.site-body .vcard,
.site-body .project-card,
.site-body .tool-card,
.site-body .copy-item { border-radius: 8px; background: var(--bg-card); }
.site-body .vcard:hover,
.site-body .project-card:hover,
.site-body .tool-card:hover { transform: translateY(-2px); border-color: #46505e; }
.site-body .vthumb { aspect-ratio: 16 / 9; }
.site-body .vmeta { padding: 13px 14px 15px; }
.site-body .project-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.site-body .project-cover { aspect-ratio: 16 / 9; }
.site-body .project-cover-empty { background: #151a21; }
.site-body .project-delete-btn { min-height: 30px; }
.site-body .tab-row { gap: 22px; }
.site-body .tab-row button { padding: 10px 2px; font-size: 14px; }
.site-body .empty { padding: 64px 20px; border: 1px dashed var(--border); border-radius: 8px; background: #111419; }

.site-body .auth-wrap {
  min-height: calc(100vh - 64px);
  background: url('/static/media/covers/v12.jpg') center / cover no-repeat;
  position: relative;
  isolation: isolate;
}
.site-body .auth-wrap::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(6, 9, 13, .72); }
.site-body .auth-card { border-radius: 8px; background: rgba(17, 20, 25, .95); border-color: var(--border-strong); }

.site-body .copy-header { max-width: 980px; margin: 0 auto 24px; text-align: left; }
.site-body .copy-kicker { padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--accent-2); }
.site-body .copy-header h1 { margin: 8px 0 6px; font-size: 32px; }
.site-body .copy-header p { font-size: 14px; }
.site-body .copy-box { max-width: 980px; }
.site-body .copy-results,
.site-body .copy-results-head { max-width: 1180px; }
.site-body .copy-box { border-radius: 8px; padding: 22px; box-shadow: none; background: #14181e; }
.site-body .copy-box textarea { min-height: 180px; border-radius: 7px; background: #0e1115; }
.site-body .copy-model-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.site-body .copy-field { display: grid; grid-template-columns: 78px minmax(0, 1fr); }
.site-body .copy-model-select { width: 100%; border-radius: 7px; background: #0e1115; }
.site-body .copy-box-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.site-body #copyStatus { max-width: 980px; padding: 16px 18px; border-radius: 8px; }
.site-body .copy-waiting-state { display: grid; gap: 11px; }
.site-body .copy-waiting-row { display: flex; min-width: 0; align-items: center; gap: 10px; }
.site-body .copy-waiting-row strong { color: var(--text-soft); font-size: 13px; }
.site-body .copy-waiting-elapsed { margin-left: auto; color: var(--accent-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.site-body .copy-waiting-spinner {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 2px solid #394352;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: copy-waiting-spin .8s linear infinite;
}
.site-body .copy-waiting-track { height: 4px; overflow: hidden; border-radius: 4px; background: #252b34; }
.site-body .copy-waiting-track span {
  display: block;
  width: 36%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  animation: copy-waiting-slide 1.5s ease-in-out infinite;
}
.site-body .copy-waiting-state p { margin: 0; color: var(--text-muted); font-size: 12px; }
@keyframes copy-waiting-spin { to { transform: rotate(360deg); } }
@keyframes copy-waiting-slide {
  from { transform: translateX(-110%); }
  to { transform: translateX(290%); }
}
.site-body .copy-results { gap: 18px; }
.site-body .copy-results-head { margin-top: 32px; }
.site-body .copy-item {
  padding: 0;
  overflow: hidden;
  border-color: var(--border-strong);
  background: #14181e;
}
.site-body .copy-item-head {
  min-height: 66px;
  margin: 0;
  padding: 12px 16px;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  background: #171b21;
}
.site-body .copy-item-tag { min-width: 0; }
.site-body .copy-item-num { border-radius: 6px; background: var(--accent); }
.site-body .copy-item-title-wrap { display: grid; min-width: 0; gap: 2px; }
.site-body .copy-item-title { overflow: hidden; color: var(--text); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.site-body .copy-item-meta { color: var(--text-muted); font-size: 12px; }
.site-body .copy-item-actions { flex: 0 0 auto; }
.site-body .copy-item-actions .btn { min-height: 32px; padding: 5px 10px; }
.site-body .copy-delete-btn { color: #f28a92; }

.site-body .copy-document {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  height: clamp(540px, 70vh, 760px);
  min-height: 0;
}
.site-body .copy-document-sidebar {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: #101318;
}
.site-body .copy-directory-head {
  display: grid;
  gap: 3px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border);
}
.site-body .copy-directory-head strong { color: var(--text); font-size: 14px; }
.site-body .copy-directory-head span { color: var(--text-muted); font-size: 11px; }
.site-body .copy-toc {
  min-height: 0;
  padding: 10px;
  overflow: auto;
}
.site-body .copy-toc-link {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  margin: 1px 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.site-body .copy-toc-link:hover { background: #191e25; color: var(--text-soft); }
.site-body .copy-toc-link.active {
  color: #dce6ff;
  background: rgba(91, 140, 255, .13);
  box-shadow: inset 3px 0 0 var(--accent);
}
.site-body .copy-toc-level-2 { padding-left: 24px; font-size: 13px; }
.site-body .copy-toc-level-3 { padding-left: 38px; font-size: 12px; }
.site-body .copy-toc-marker {
  width: 20px;
  flex: 0 0 20px;
  color: #687384;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.site-body .copy-toc-level-2 .copy-toc-marker,
.site-body .copy-toc-level-3 .copy-toc-marker { color: #566174; font-size: 16px; }
.site-body .copy-toc-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.site-body .copy-document-main {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: #0f1216;
  scroll-behavior: smooth;
}
.site-body .copy-document-main:focus-visible { outline-offset: -3px; }
.site-body .copy-document-content {
  width: min(100%, 820px);
  min-height: 100%;
  margin: 0 auto;
  padding: 42px 50px 84px;
  color: var(--text-soft);
}
.site-body .copy-content-heading {
  scroll-margin-top: 30px;
  color: var(--text);
  line-height: 1.45;
}
.site-body .copy-content-heading-1 { margin: 34px 0 20px; font-size: 24px; }
.site-body .copy-content-heading-1:first-child { margin-top: 0; }
.site-body .copy-content-heading-2 { margin: 28px 0 15px; font-size: 18px; }
.site-body .copy-content-heading-3 { margin: 22px 0 12px; font-size: 15px; }
.site-body .copy-body-line {
  min-height: 1.8em;
  margin: 0 0 7px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.8;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.site-body .copy-line-label { color: #e4e8ee; font-weight: 700; }
.site-body .copy-list-line { position: relative; padding-left: 18px; }
.site-body .copy-list-line::before {
  content: "";
  position: absolute;
  top: .8em;
  left: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-2);
}
.site-body .copy-spacer { height: 9px; }
.site-body .copy-section-start { scroll-margin-top: 30px; }
.site-body .wallet-modal-card { border-radius: 8px; background: var(--bg-card); border-color: var(--border-strong); }
.site-body .footer { margin-top: 0; padding: 34px 0 24px; background: #0b0d10; }
.site-body .footer-inner { align-items: center; }
.site-body .footer-nav { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.site-body .footer-nav a { margin: 0; color: var(--text-muted); font-size: 13px; }
.site-body .footer-nav a:hover { color: var(--text); }
.site-body .footer .legal { margin-top: 24px; padding-top: 18px; text-align: left; }
.site-body .empty .big svg { width: 38px; height: 38px; }
.site-body .empty a { color: var(--accent-2); }

/* Admin */
.admin-body .admin-shell { min-height: 100vh; background: var(--bg); }
.admin-body .sidebar { width: 224px; background: #111419; border-color: var(--border); }
.admin-body .sidebar .brand { min-height: 68px; padding: 16px 18px; font-size: 15px; }
.admin-body .sidebar .brand .mark { width: 32px; height: 32px; border-radius: 7px; background: var(--accent); }
.admin-body .side-nav { padding: 12px 10px; gap: 3px; }
.admin-body .side-nav a { min-height: 42px; padding: 9px 11px; border-radius: 6px; }
.admin-body .side-nav a.active {
  color: #fff;
  background: #222936;
  box-shadow: inset 3px 0 0 var(--accent);
}
.admin-body .sidebar .foot { padding: 14px 18px; }
.admin-body .main { padding: 28px 32px 52px; background: #0d0f12; }
.admin-body .topbar,
.admin-body .model-page-head { min-height: 48px; margin-bottom: 20px; }
.admin-body .topbar h1,
.admin-body .model-page-title h1 { font-size: 22px; line-height: 1.3; }
.admin-body .stat-grid { gap: 12px; margin-bottom: 20px; }
.admin-body .stat-card { min-height: 126px; border-radius: 8px; padding: 18px; background: #161a20; }
.admin-body .stat-card .label { color: #a4abb6; }
.admin-body .stat-card .value { margin-top: 12px; font-size: 28px; line-height: 1; }
.admin-body .panel { border-radius: 8px; background: #15191f; }
.admin-body .panel-head { min-height: 54px; padding: 13px 16px; }
.admin-body .panel-body { padding: 18px; }
.admin-body table { font-size: 13.5px; }
.admin-body th { padding: 11px 13px; background: #12161b; color: #969fac; }
.admin-body td { padding: 12px 13px; }
.admin-body tbody tr:hover td { background: #191e25; }
.admin-body .pill { border-radius: 6px; padding: 3px 8px; }
.admin-body .progress > span { background: var(--accent); }
.admin-body .field input,
.admin-body .field textarea,
.admin-body .field select,
.admin-body .admin-filter-input,
.admin-body .admin-filter-select,
.admin-body .admin-inline-input,
.admin-body .admin-inline-select {
  border-radius: 7px;
  background: #0f1216;
  border: 1px solid var(--border);
}
.admin-body .modal { border-radius: 8px; background: #171b21; box-shadow: var(--shadow); }
.admin-body #modelModal .modal { width: min(760px, 100%); }
.admin-body .form-section-title {
  margin-top: 2px;
  padding: 12px 0 8px;
  border-top: 1px solid var(--border);
  color: #aeb5c0;
  font-size: 12px;
  font-weight: 700;
}
.admin-body .form-section-title:first-child { padding-top: 0; border-top: 0; }
.admin-body .field-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.admin-body .field-check input { width: 16px; height: 16px; accent-color: var(--accent); }
.admin-body .modal-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.admin-body .modal-form-actions-start,
.admin-body .modal-form-actions-end { display: flex; align-items: center; gap: 10px; }
.admin-body .modal-form-actions.modal-form-actions-end { justify-content: flex-end; }
.admin-body .model-search,
.admin-body .model-filter-select { background: #12161b; }
.admin-body .model-table th { background: #12161b; }
.admin-body .model-toolbar { padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: #111419; }
.admin-body .model-search { border-color: transparent; background: #191e25; }
.admin-body .model-filter-select { border-color: transparent; background: #191e25; }
.admin-body .user-table { min-width: 1520px; }
.admin-body .user-credit-cell { min-width: 220px; }
.admin-body .user-group-cell { min-width: 175px; }
.admin-body .user-account { display: flex; align-items: center; gap: 10px; }
.admin-body .admin-user-avatar { width: 30px; height: 30px; flex: 0 0 30px; font-size: 12px; }
.admin-body .user-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-width: 320px; }
.admin-body .user-action-form { display: flex; align-items: center; gap: 6px; }
.admin-body .user-action-form input { width: 112px; padding: 6px 8px; font-size: 12.5px; }
.admin-body .user-action-form select { padding: 6px 28px 6px 9px; font-size: 12.5px; }
.admin-body .page-title-group { min-width: 0; }
.admin-body .page-sub { margin: 4px 0 0; color: var(--text-muted); font-size: 12.5px; }
.admin-body .admin-filter-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-body .admin-filter-input { width: 240px; padding: 8px 11px; outline: 0; }
.admin-body .admin-filter-select { padding: 8px 30px 8px 11px; outline: 0; }
.admin-body .admin-inline-form { display: none; gap: 10px; margin-bottom: 16px; padding: 14px; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 8px; background: #15191f; }
.admin-body .admin-inline-form.is-open { display: flex; }
.admin-body .admin-inline-input { flex: 1; min-width: 150px; padding: 9px 11px; outline: 0; }
.admin-body .admin-inline-wide { flex-grow: 2; min-width: 220px; }
.admin-body .table-scroll { padding: 0; overflow-x: auto; }
.admin-body .table-prompt { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-body .table-progress-cell { min-width: 125px; }
.admin-body .table-result-link { color: var(--accent-2); }
.admin-body .dashboard-prompt { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-body .dashboard-thumb-cell { width: 72px; }
.admin-body .dashboard-video-title { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-body .video-title-cell { max-width: 220px; }
.admin-body .table-title-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-body .category-name { display: inline-flex; align-items: center; gap: 7px; }
.admin-body .category-name svg { width: 16px; height: 16px; }
.admin-body .dashboard-split { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .8fr); gap: 12px; margin-bottom: 20px; }
.admin-body .chart-panel { margin-top: 0; }
.admin-body .chart-wrap { width: 100%; height: 300px; }
.admin-body .chart-wrap #modelChart { width: 100%; height: 100%; }

/* Generation studio */
.studio-body .auth-screen {
  background: url('/static/media/covers/v12.jpg') center / cover no-repeat;
  position: relative;
  isolation: isolate;
}
.studio-body .auth-screen::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(6, 9, 13, .72); }
.studio-body .auth-card { border-radius: 8px; background: rgba(17, 20, 25, .96); border-color: var(--border-strong); }
.studio-body .brand-mark { border-radius: 7px; background: var(--accent); box-shadow: none; }
.studio-body .app-shell { background: var(--bg); }
.studio-body .sidebar { width: 216px; background: #111419; }
.studio-body .brand-block { min-height: 68px; padding: 14px 16px; }
.studio-body .side-nav { padding: 12px 10px; }
.studio-body .nav-item { min-height: 42px; border-radius: 6px; padding: 9px 11px; }
.studio-body .nav-item.active { background: #222936; box-shadow: inset 3px 0 0 var(--accent); }
.studio-body .workspace { padding: 24px 28px 48px; }
.studio-body .topbar { min-height: 52px; margin-bottom: 18px; }
.studio-body .topbar h1 { font-size: 21px; }
.studio-body .topbar .eyebrow,
.studio-body .kicker { color: var(--accent-2); }
.studio-body .balance-pill { border-radius: 7px; padding: 7px 11px; background: #15191f; }
.studio-body .studio-grid { grid-template-columns: minmax(500px, 1fr) minmax(340px, 420px); gap: 18px; }
.studio-body .composer-column,
.studio-body .preview-column { border-radius: 8px; padding: 20px; background: #14181e; }
.studio-body .preview-column { position: sticky; top: 24px; }
.studio-body .prompt-input,
.studio-body .select { border-radius: 7px; background: #0e1115; }
.studio-body .control-section { margin-bottom: 0; padding: 16px 0; border-top: 1px solid var(--border); }
.studio-body .mention-row { margin-bottom: 16px; }
.studio-body .upload-slot { min-height: 106px; border-radius: 7px; background: #11151a; }
.studio-body .submit-row { margin-top: 2px; padding-top: 18px; border-top: 1px solid var(--border); }
.studio-body .preview-content { min-height: 420px; border: 1px dashed var(--border); border-radius: 7px; background: #101318; }
.studio-body .preview-empty { min-height: 418px; }
.studio-body .preview-empty .empty-art { color: var(--accent-2); }
.studio-body .history-filters { border-radius: 7px; background: #13171c; }
.studio-body .history-filter { border-radius: 5px; }
.studio-body .history-item,
.studio-body .shot-card,
.studio-body .modal-card { border-radius: 8px; }
.studio-body .modal-card { background: #171b21; }

/* Project editor */
.editor-body .editor-shell { min-height: 100vh; background: var(--bg); }
.editor-body .editor-sidebar { width: auto; background: #111419; padding: 14px; }
.editor-body .editor-brand { display: flex; align-items: center; gap: 9px; min-height: 40px; color: var(--text); }
.editor-body .editor-brand-mark { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; background: var(--accent); }
.editor-body .editor-brand-mark svg { width: 14px; height: 14px; color: #fff; }
.editor-body .editor-brand strong { font-size: 14px; }
.editor-body .editor-back { min-height: 40px; padding: 0 8px; border-bottom: 1px solid var(--border); }
.editor-body .editor-sidebar-title { color: #a2a9b5; font-weight: 600; }
.editor-body .shot-list-item { border-radius: 7px; background: #171b21; }
.editor-body .shot-list-item.active { border-color: var(--accent); background: #1c2431; box-shadow: inset 3px 0 0 var(--accent); }
.editor-body .editor-topbar { min-height: 64px; padding: 12px 18px; background: #111419; }
.editor-body .editor-tabs { padding: 3px; border: 1px solid var(--border); border-radius: 7px; background: #0e1115; }
.editor-body .editor-tabs .tab { min-height: 34px; padding: 7px 11px; border-radius: 5px; }
.editor-body .editor-tabs .tab.active { background: #242b35; color: #fff; }
.editor-body .shot-cards,
.editor-body .asset-view { padding: 18px; }
.editor-body .shot-cards { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.editor-body .shot-card,
.editor-body .asset-card { border-radius: 8px; background: #171b21; }
.editor-body .shot-prompt,
.editor-body .shot-controls select,
.editor-body select,
.editor-body .field input,
.editor-body .field textarea,
.editor-body .field select,
.editor-body .prompt-edit-text,
.editor-body .editor-footer input { border-radius: 7px; background: #0e1115; }
.editor-body .asset-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.editor-body .asset-card .asset-delete,
.editor-body .asset-card .asset-edit,
.editor-body .media-lightbox-close { border-radius: 7px; }
.editor-body .asset-thumb-placeholder { background: #151a21; }
.editor-body .modal { border-radius: 8px; background: #171b21; }
.editor-body .mention-menu { border-radius: 8px; }
.editor-body .editor-footer { min-height: 64px; padding: 11px 18px; background: #111419; }

.project-create-body .project-create-wrap { padding: 44px 20px; }
.project-create-body .project-create-card { width: min(680px, 100%); border-radius: 8px; padding: 30px; background: #14181e; box-shadow: none; }
.project-create-body .project-create-card h1 { font-size: 24px; }
.project-create-body .project-create-card input,
.project-create-body .project-create-card textarea { border-radius: 7px; background: #0e1115; }

@media (max-width: 1180px) {
  .site-body .grid,
  .site-body .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .studio-body .studio-grid { grid-template-columns: minmax(0, 1fr) 360px; }
  .admin-body .dashboard-split { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .admin-body .admin-shell,
  .studio-body .app-shell { display: block; }
  .admin-body .sidebar,
  .studio-body .sidebar {
    display: flex;
    width: 100%;
    height: auto;
    min-height: 58px;
    position: sticky;
    top: 0;
    z-index: 80;
    flex-direction: row;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .admin-body .sidebar .brand,
  .studio-body .brand-block { min-height: 58px; padding: 10px 14px; border-bottom: 0; border-right: 1px solid var(--border); }
  .admin-body .side-nav,
  .studio-body .side-nav { flex: 1; flex-direction: row; gap: 4px; padding: 8px; overflow-x: auto; }
  .admin-body .side-nav a,
  .studio-body .nav-item { min-height: 38px; flex: 0 0 auto; white-space: nowrap; }
  .admin-body .sidebar .foot,
  .studio-body .sidebar-bottom { display: none; }
  .admin-body .main,
  .studio-body .workspace { padding: 20px 18px 42px; }
  .studio-body .studio-grid { grid-template-columns: 1fr; }
  .studio-body .preview-column { position: static; }
  .site-body .grid,
  .site-body .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-body .copy-document { grid-template-columns: 220px minmax(0, 1fr); }
  .site-body .copy-document-content { padding-right: 32px; padding-left: 32px; }
  .editor-body .editor-topbar { flex-wrap: wrap; }
  .editor-body .editor-tabs { max-width: 100%; overflow-x: auto; }
}

@media (max-width: 680px) {
  .site-body .container,
  .site-body .hero-inner { width: calc(100% - 28px); }
  .site-body .hero { min-height: 400px; height: min(520px, calc(100svh - 88px)); padding: 48px 0 42px; }
  .site-body .hero h1 { font-size: 36px; }
  .site-body .hero .lead { font-size: 15px; }
  .site-body .gen-box { flex-direction: column; }
  .site-body .gen-box .gen-go { min-height: 44px; justify-content: center; }
  .site-body .section { padding: 40px 0; }
  .site-body .grid,
  .site-body .project-grid { grid-template-columns: 1fr; }
  .site-body .copy-model-bar { grid-template-columns: 1fr; }
  .site-body .copy-field { grid-template-columns: 1fr; gap: 6px; }
  .site-body .copy-box-actions { align-items: stretch; flex-direction: column; }
  .site-body .copy-box-actions .btn { width: 100%; }
  .site-body .copy-waiting-row { align-items: flex-start; flex-wrap: wrap; }
  .site-body .copy-waiting-elapsed { width: 100%; margin-left: 25px; }
  .site-body .copy-item-head { align-items: flex-start; flex-wrap: wrap; }
  .site-body .copy-item-actions { display: grid; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-body .copy-item-actions .btn { justify-content: center; }
  .site-body .copy-document { display: block; height: auto; }
  .site-body .copy-document-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .site-body .copy-directory-head { padding: 13px 14px 10px; }
  .site-body .copy-toc {
    display: flex;
    gap: 6px;
    padding: 8px 10px 11px;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .site-body .copy-toc-link,
  .site-body .copy-toc-level-2,
  .site-body .copy-toc-level-3 {
    width: auto;
    min-height: 34px;
    flex: 0 0 auto;
    padding: 6px 10px;
    border: 1px solid var(--border);
    white-space: nowrap;
  }
  .site-body .copy-toc-link.active { border-color: rgba(91, 140, 255, .45); box-shadow: none; }
  .site-body .copy-toc-marker { display: none; }
  .site-body .copy-toc-text { max-width: 190px; }
  .site-body .copy-document-main { height: min(62vh, 560px); min-height: 420px; }
  .site-body .copy-document-content { padding: 28px 20px 60px; }
  .site-body .copy-content-heading-1 { font-size: 21px; }
  .site-body .copy-content-heading-2 { font-size: 17px; }
  .site-body .wallet-modal-body form { flex-direction: column; }
  .site-body .footer-inner { align-items: flex-start; flex-direction: column; }
  .site-body .footer-nav { gap: 10px 18px; }
  .admin-body .sidebar .brand span,
  .studio-body .brand-block > div:last-child { display: none; }
  .admin-body .sidebar .brand,
  .studio-body .brand-block { border-right: 0; }
  .admin-body .stat-grid { grid-template-columns: 1fr 1fr; }
  .admin-body .stat-card { min-height: 110px; padding: 15px; }
  .admin-body .topbar { align-items: flex-start; gap: 12px; flex-direction: column; }
  .admin-body .modal-form-actions { align-items: stretch; flex-direction: column; }
  .admin-body .modal-form-actions-start,
  .admin-body .modal-form-actions-end { justify-content: flex-end; flex-wrap: wrap; }
  .admin-body .admin-filter-input { width: 100%; }
  .studio-body .topbar { align-items: flex-start; gap: 12px; flex-direction: column; }
  .studio-body .user-menu { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .studio-body .control-grid,
  .studio-body .upload-grid { grid-template-columns: 1fr; }
  .studio-body .submit-row { align-items: stretch; flex-direction: column; gap: 12px; }
  .studio-body .submit-row .primary-btn { width: 100%; }
  .editor-body .editor-tools { width: 100%; flex-wrap: wrap; }
  .editor-body .editor-tools select { flex: 1; }
  .editor-body .shot-cards { grid-template-columns: 1fr; padding: 12px; }
  .editor-body .asset-view { padding: 14px; }
  .editor-body .asset-actions,
  .editor-body .asset-upload { align-items: stretch; flex-direction: column; }
  .editor-body .asset-upload input[type="text"] { width: 100%; }
  .editor-body .editor-footer { align-items: stretch; flex-wrap: wrap; }
  .editor-body .editor-footer label { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .site-body .copy-waiting-spinner,
  .site-body .copy-waiting-track span { animation-duration: 3s; }
}

/* Pricing management refinement and desktop scroll isolation */
.admin-body .admin-shell {
  align-items: flex-start;
  overflow: clip;
}

@supports not (overflow: clip) {
  .admin-body .admin-shell { overflow: hidden; }
}

@media (min-width: 901px) {
  .admin-body .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    isolation: isolate;
    flex: 0 0 224px;
  }

  .admin-body .main {
    position: relative;
    z-index: 1;
    min-width: 0;
    overflow: hidden;
  }
}

.admin-body .model-page-head {
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 18px;
}

.admin-body .model-page-title p {
  max-width: 720px;
  margin-top: 7px;
  color: #8d97a6;
  font-size: 12px;
}

.admin-body .model-page-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.admin-body .model-page-actions .btn {
  min-height: 36px;
  padding: 8px 12px;
  border-color: rgba(255, 255, 255, .12);
  background: #171c23;
}

.admin-body .model-page-actions .btn-primary,
.admin-body .model-page-actions .btn:hover {
  border-color: rgba(56, 189, 248, .34);
  background: #1d2732;
}

.admin-body .pricing-stat-grid {
  gap: 10px;
  margin-bottom: 12px;
}

.admin-body .pricing-stat {
  position: relative;
  min-height: 72px;
  overflow: hidden;
  border-color: rgba(255, 255, 255, .1);
  background: linear-gradient(135deg, #171c23, #14181e);
}

.admin-body .pricing-stat::after {
  position: absolute;
  right: -20px;
  bottom: -34px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: rgba(56, 189, 248, .08);
  content: '';
}

.admin-body .pricing-stat:nth-child(2)::after { background: rgba(244, 114, 182, .08); }
.admin-body .pricing-stat:nth-child(3)::after { background: rgba(129, 140, 248, .08); }
.admin-body .pricing-stat:nth-child(4)::after { background: rgba(245, 158, 11, .08); }
.admin-body .pricing-stat strong { position: relative; z-index: 1; font-size: 25px; }

.admin-body .pricing-tip {
  margin-bottom: 12px;
  border-color: rgba(56, 189, 248, .22);
  background: linear-gradient(90deg, rgba(56, 189, 248, .08), rgba(56, 189, 248, .025));
}

.admin-body .pricing-batch-panel {
  align-items: stretch;
  gap: 20px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-color: rgba(255, 255, 255, .1);
  background: #171c23;
}

.admin-body .pricing-batch-copy {
  justify-content: center;
  min-width: 205px;
}

.admin-body .pricing-batch-copy strong {
  color: #f2f5f9;
  font-size: 13px;
}

.admin-body .pricing-batch-form {
  flex: 1;
  justify-content: flex-end;
}

.admin-body .pricing-batch-form .model-filter-select,
.admin-body .pricing-batch-value,
.admin-body .pricing-batch-form .btn {
  min-height: 38px;
}

.admin-body .pricing-batch-form .model-filter-select {
  min-width: 132px;
}

.admin-body .pricing-batch-form .btn {
  padding-inline: 15px;
}

.admin-body .pricing-batch-status {
  min-width: 112px;
}

.admin-body .model-table-panel {
  position: relative;
  z-index: auto;
  overflow: visible;
  border-color: rgba(255, 255, 255, .1);
  background: #151a20;
}

.admin-body .pricing-table-scroll {
  position: relative;
  z-index: 0;
  max-height: min(560px, calc(100vh - 366px));
  min-height: 260px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
}

.admin-body .pricing-table {
  min-width: 1120px;
}

.admin-body .pricing-table th {
  z-index: 3;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06);
  background: #12171d;
}

.admin-body .pricing-table td {
  padding-block: 13px;
}

.admin-body .pricing-table tbody tr:hover td {
  background: #1a2028;
}

.admin-body .pricing-edit-cell {
  min-width: 258px;
}

.admin-body .pricing-edit-form {
  gap: 7px;
}

.admin-body .pricing-edit-form .model-billing-select,
.admin-body .pricing-edit-form .model-billing-input,
.admin-body .pricing-edit-form .model-billing-save {
  min-height: 36px;
}

.admin-body .pricing-edit-form .model-billing-select {
  min-width: 82px;
}

.admin-body .pricing-edit-form .model-billing-save {
  padding-inline: 10px;
}

@media (max-width: 1050px) and (min-width: 901px) {
  .admin-body .pricing-batch-panel { align-items: flex-start; flex-direction: column; gap: 10px; }
  .admin-body .pricing-batch-form { justify-content: flex-start; width: 100%; }
}

/* Keep the batch pricing controls on one line on desktop-sized screens. */
@media (min-width: 1051px) {
  .admin-body .pricing-batch-form { flex-wrap: nowrap; }
  .admin-body .pricing-batch-status { flex: 0 0 112px; }
}

/* Use one vertical scroll context for pricing. Nested vertical scrolling made the
   table header paint over rows and made the fixed sidebar look like it covered content. */
@media (min-width: 901px) {
  .admin-body .admin-shell { overflow: visible; }
  .admin-body .main { overflow: visible; }
}

.admin-body .pricing-table-scroll {
  max-height: none;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: auto;
  scrollbar-gutter: auto;
}

.admin-body .pricing-table th {
  position: static;
  z-index: auto;
  box-shadow: none;
}

/* Bright technology theme */
:root {
  --bg: #09162a; --bg-soft: #0d2038; --bg-elev: #112a47; --bg-card: #102742;
  --bg-hover: #173a5e; --border: rgba(112,211,255,.18); --border-strong: rgba(112,211,255,.34);
  --text: #f5fbff; --text-soft: #c7dcf6; --text-muted: #87a6c9;
  --accent: #35d8ff; --accent-2: #7c83ff; --accent-3: #3ef0ba;
  --warm: #ffbf5a; --good: #3ee6a3; --bad: #ff6b84;
  --grad: linear-gradient(120deg, #25d9ff, #6b7cff 52%, #b36bff);
  --shadow: 0 20px 54px rgba(2,10,25,.46); color-scheme: dark;
}
body.site-body, body.studio-body, body.editor-body, body.admin-body {
  background-color: var(--bg);
  background-image: radial-gradient(circle at 8% 0%, rgba(53,216,255,.14), transparent 34%), radial-gradient(circle at 92% 8%, rgba(124,131,255,.16), transparent 32%), linear-gradient(180deg,#0b1b31,#09162a 42%,#081321);
  background-attachment: fixed;
}
::selection { color:#04111f; background:#62e4ff; }
input:focus, textarea:focus, select:focus { border-color:rgba(53,216,255,.62)!important; box-shadow:0 0 0 3px rgba(53,216,255,.10); }
.btn-primary, .primary-btn, .site-body .gen-box .gen-go { background:var(--grad); box-shadow:0 10px 26px rgba(65,146,255,.28); }
.btn-primary:hover, .primary-btn:hover, .site-body .gen-box .gen-go:hover { background:linear-gradient(120deg,#45e6ff,#7d8cff 52%,#c176ff); }
.btn-soft, .secondary-btn, .btn-ghost, .ghost-btn { backdrop-filter:blur(12px); }

/* Front website */
.site-body .nav { background:rgba(8,22,41,.88); box-shadow:0 10px 30px rgba(2,10,24,.26); }
.site-body .brand-mark, .site-body .avatar { box-shadow:0 0 0 1px rgba(255,255,255,.12),0 8px 24px rgba(53,216,255,.20); }
.site-body .nav-links a.active, .admin-body .side-nav a.active, .studio-body .nav-item.active { color:#fff; background:linear-gradient(120deg,rgba(53,216,255,.24),rgba(124,131,255,.25)); box-shadow:inset 0 0 0 1px rgba(90,214,255,.20),0 8px 22px rgba(33,117,201,.16); }
.site-body .nav-wallet { background:linear-gradient(135deg,rgba(18,52,84,.92),rgba(16,39,66,.92)); }
.site-body .hero::before { background:linear-gradient(90deg,rgba(5,19,36,.88),rgba(7,24,47,.58) 55%,rgba(11,28,55,.34)); }
.site-body .hero h1 { text-shadow:0 0 28px rgba(53,216,255,.18); }
.site-body .hero h1 .grad-text { background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent; }
.site-body .hero-badge { background:rgba(11,37,64,.74); border-color:rgba(88,214,255,.32); color:#dff8ff; box-shadow:0 0 22px rgba(53,216,255,.10); }
.site-body .gen-box { background:rgba(10,31,55,.90); border-color:rgba(102,218,255,.30); box-shadow:0 20px 50px rgba(2,11,28,.52); }
.site-body .hero + .section { background:linear-gradient(180deg,rgba(11,31,55,.72),rgba(8,20,37,.42)); }
.site-body .vcard, .site-body .project-card, .site-body .tool-card, .site-body .copy-item, .site-body .copy-box, .site-body .empty { border-color:var(--border); background:linear-gradient(145deg,rgba(18,48,79,.94),rgba(12,34,59,.94)); box-shadow:0 16px 40px rgba(2,10,24,.26); }
.site-body .vcard:hover, .site-body .project-card:hover, .site-body .tool-card:hover { border-color:rgba(82,220,255,.52); box-shadow:0 18px 44px rgba(15,106,166,.25); }
.site-body .project-cover-empty, .site-body .vthumb { background:linear-gradient(135deg,rgba(20,63,101,.95),rgba(33,48,96,.95)); }
.site-body .copy-box textarea, .site-body .copy-model-select { background:rgba(7,23,42,.88); }
.site-body .copy-item-head { background:linear-gradient(120deg,rgba(20,56,91,.96),rgba(23,42,80,.96)); }
.site-body .copy-document-sidebar { background:rgba(8,26,48,.96); }
.site-body .copy-document-main { background:rgba(7,21,39,.96); }
.site-body .copy-toc-link.active { background:rgba(53,216,255,.15); }
.site-body .auth-wrap::before { background:linear-gradient(120deg,rgba(5,19,36,.80),rgba(9,27,53,.62)); }
.site-body .auth-card { background:rgba(12,34,58,.94); border-color:rgba(106,215,255,.30); box-shadow:var(--shadow); }
.site-body .footer { background:#071321; }

/* Studio */
.studio-body .app-shell, .studio-body .workspace { background:transparent; }
.studio-body .sidebar { background:rgba(8,27,49,.94); border-color:var(--border); box-shadow:10px 0 34px rgba(2,10,24,.24); }
.studio-body .sidebar .brand-block { border-color:var(--border); }
.studio-body .topbar { border-color:var(--border); }
.studio-body .composer-column, .studio-body .preview-column, .studio-body .shot-card, .studio-body .history-item, .studio-body .modal-card { border-color:rgba(108,215,255,.22); background:linear-gradient(145deg,rgba(18,48,79,.94),rgba(12,33,58,.95)); box-shadow:0 18px 46px rgba(2,10,24,.34); }
.studio-body .preview-content { background:rgba(8,26,48,.82); border-color:rgba(85,203,255,.26); }
.studio-body .prompt-input, .studio-body .select { background:rgba(7,22,40,.92); }
.studio-body .upload-slot { background:rgba(9,29,51,.90); border-color:rgba(88,201,255,.22); }
.studio-body .upload-slot:hover { border-color:var(--accent); box-shadow:0 0 22px rgba(53,216,255,.12); }
.studio-body .history-filters, .studio-body .model-summary { background:rgba(9,30,53,.92); }
.studio-body .balance-pill { background:linear-gradient(120deg,rgba(53,216,255,.16),rgba(124,131,255,.18)); border-color:rgba(92,213,255,.22); }

/* Project editor */
.editor-body .editor-shell { background:transparent; }
.editor-body .editor-sidebar { background:rgba(8,27,49,.95); border-color:var(--border); }
.editor-body .editor-main { background:rgba(9,23,42,.72); }
.editor-body .editor-topbar, .editor-body .editor-footer { background:rgba(10,31,54,.94); border-color:var(--border); }
.editor-body .shot-list-item.active, .editor-body .editor-tabs .tab.active { background:linear-gradient(120deg,rgba(53,216,255,.20),rgba(124,131,255,.23)); color:#fff; }
.editor-body .shot-card, .editor-body .asset-card, .editor-body .asset-empty, .editor-body .modal { border-color:rgba(108,215,255,.22); background:linear-gradient(145deg,rgba(18,48,79,.95),rgba(12,33,58,.96)); box-shadow:0 16px 42px rgba(2,10,24,.30); }
.editor-body .shot-prompt, .editor-body .select, .editor-body .asset-map-input, .editor-body .asset-upload input[type="text"] { background:rgba(7,22,40,.92); }
.editor-body .shot-card.selected, .editor-body .asset-card.selected { border-color:var(--accent); box-shadow:0 0 0 2px rgba(53,216,255,.16),0 16px 42px rgba(2,10,24,.30); }
.editor-body .asset-thumb { background:linear-gradient(135deg,rgba(20,63,101,.95),rgba(33,48,96,.95)); }
.editor-body .asset-toolbar { border-bottom-color:var(--border); }

/* Admin */
.admin-body .sidebar { background:rgba(8,27,49,.96); }
.admin-body .main { background:rgba(9,23,42,.72); }
.admin-body .panel, .admin-body .stat-card, .admin-body .model-toolbar { background:linear-gradient(145deg,rgba(18,48,79,.94),rgba(12,33,58,.95)); border-color:var(--border); }
.admin-body th, .admin-body .model-table th { background:rgba(10,34,59,.98); }
.admin-body tbody tr:hover td, .admin-body .pricing-table tbody tr:hover td { background:rgba(53,216,255,.07); }
.admin-body .modal { background:#102742; }
* { scrollbar-color:rgba(84,196,238,.52) transparent; }
*::-webkit-scrollbar-thumb { background:linear-gradient(180deg,#39cfff,#677cff); border-radius:8px; }

@media (max-width: 720px) {
  .site-body .nav { background:rgba(8,22,41,.96); }
  .studio-body .composer-column, .studio-body .preview-column { box-shadow:0 12px 30px rgba(2,10,24,.28); }
}

