:root {
  --bg: #070b12;
  --bg-2: #0b111c;
  --panel: rgba(14, 22, 34, 0.92);
  --panel-2: rgba(18, 29, 44, 0.94);
  --panel-strong: #111e2d;
  --text: #edf7ff;
  --text-strong: #ffffff;
  --muted: #91a5b8;
  --muted-2: #668096;
  --line: rgba(128, 225, 239, 0.16);
  --line-strong: rgba(132, 237, 247, 0.38);
  --accent: #20d6c7;
  --accent-strong: #7af9ee;
  --accent-soft: rgba(32, 214, 199, 0.13);
  --violet: #7d7cff;
  --violet-soft: rgba(125, 124, 255, 0.14);
  --amber: #f2b84b;
  --amber-soft: rgba(242, 184, 75, 0.16);
  --rose: #ff6f91;
  --green: #48e39b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --inner-glow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --radius: 8px;
  --font: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(110deg, rgba(32, 214, 199, 0.09), transparent 24%),
    linear-gradient(250deg, rgba(125, 124, 255, 0.1), transparent 28%),
    radial-gradient(circle at 70% 0%, rgba(242, 184, 75, 0.08), transparent 26%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 82%);
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(32, 214, 199, 0.035), transparent 12%, transparent 88%, rgba(125, 124, 255, 0.035)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0, rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 6px);
  z-index: -1;
}

.view {
  position: relative;
}

.view::before {
  content: "";
  display: none;
}

.view::after {
  content: "";
  display: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

#app {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background:
    linear-gradient(180deg, rgba(19, 30, 46, 0.98), rgba(8, 13, 21, 0.98)),
    #0b111c;
  border-right: 1px solid var(--line);
  color: var(--text);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: 16px 0 50px rgba(0, 0, 0, 0.24);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--violet), var(--amber));
}

.brand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 0;
  min-height: 84px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(32, 214, 199, 0.09), rgba(125, 124, 255, 0.08)),
    rgba(255, 255, 255, 0.025);
  box-shadow: var(--inner-glow);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(32, 214, 199, 0.95), rgba(125, 124, 255, 0.85));
  color: #061018;
  font-weight: 900;
  box-shadow: 0 0 28px rgba(32, 214, 199, 0.34);
}

.brand-logo {
  display: block;
  object-fit: contain;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.82),
    0 0 26px rgba(32, 214, 199, 0.28),
    0 0 46px rgba(125, 124, 255, 0.18);
}

.sidebar-logo {
  width: 100%;
  height: auto;
  max-height: 78px;
  padding: 3px;
  flex: 0 0 auto;
}

.boot-logo {
  width: 286px;
  height: auto;
  padding: 4px;
}

.login-logo {
  width: min(330px, 100%);
  height: auto;
  padding: 4px;
}

.app-version {
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}

.login-version {
  align-self: center;
  margin-top: -8px;
}

.topbar-version {
  align-self: center;
  color: var(--muted);
}

.admin-only {
  display: none;
}

.admin-only[hidden] {
  display: none !important;
}

body.is-admin .admin-only {
  display: flex;
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-strong);
}

.brand-subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 9px;
}

.nav-item {
  width: 100%;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: #b6c6d4;
  padding: 11px 12px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: 160ms ease;
}

.nav-item[data-view="builder"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Cpath d='M15 16h5M17.5 13.5v5'/%3E%3C/g%3E%3C/svg%3E");
}

.nav-item[data-view="script"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h9l3 3v15H6z'/%3E%3Cpath d='M14 3v4h4M9 11h6M9 15h6M9 19h3'/%3E%3C/g%3E%3C/svg%3E");
}

.nav-item[data-view="image"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m4 16 4.5-4.5 3.5 3.5 2-2 6 6'/%3E%3Ccircle cx='15.5' cy='9.5' r='1.5'/%3E%3C/g%3E%3C/svg%3E");
}

.nav-item[data-view="storyboard"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M8 4v16M16 4v16M3 10h18M3 16h18'/%3E%3C/g%3E%3C/svg%3E");
}

.nav-item[data-view="video"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m10 9 5 3-5 3z'/%3E%3C/g%3E%3C/svg%3E");
}

.nav-item[data-view="voice"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3a3 3 0 0 0-3 3v6a3 3 0 0 0 6 0V6a3 3 0 0 0-3-3z'/%3E%3Cpath d='M5 10v2a7 7 0 0 0 14 0v-2M12 19v2M8 21h8M3 15c.8-.9 1.6-.9 2.4 0 .8.9 1.6.9 2.4 0M16.2 15c.8-.9 1.6-.9 2.4 0 .8.9 1.6.9 2.4 0'/%3E%3C/g%3E%3C/svg%3E");
}

.nav-item[data-view="library"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h16v14H4z'/%3E%3Cpath d='M4 10h16M9 14h6'/%3E%3Cpath d='M7 6V4h10v2'/%3E%3C/g%3E%3C/svg%3E");
}

.nav-item[data-view="providers"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 7V3M15 7V3M7 7h10v5a5 5 0 0 1-10 0z'/%3E%3Cpath d='M12 17v4M8 21h8'/%3E%3C/g%3E%3C/svg%3E");
}

.nav-item[data-view="dashboard"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V5M4 19h16'/%3E%3Cpath d='M8 16v-4M12 16V8M16 16v-7'/%3E%3C/g%3E%3C/svg%3E");
}

.nav-item[data-view="accounts"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M5 21a7 7 0 0 1 14 0'/%3E%3C/g%3E%3C/svg%3E");
}

.nav-item[hidden] {
  display: none !important;
}

.nav-item::before {
  content: "";
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  background: currentColor;
  opacity: 0.72;
  mask: var(--nav-icon) center / 20px 20px no-repeat;
  -webkit-mask: var(--nav-icon) center / 20px 20px no-repeat;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.045);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  background:
    linear-gradient(90deg, rgba(32, 214, 199, 0.18), rgba(125, 124, 255, 0.12)),
    rgba(255, 255, 255, 0.055);
  color: var(--text-strong);
  border-color: var(--line-strong);
  font-weight: 750;
}

.nav-item.active::before {
  background: var(--accent);
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(32, 214, 199, 0.55));
}

.nav-item.active::after {
  content: "";
  width: 16px;
  height: 16px;
  margin-left: auto;
  background: currentColor;
  opacity: 0.72;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round' d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round' d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
}

.sidebar-note {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  background:
    linear-gradient(180deg, rgba(32, 214, 199, 0.08), rgba(125, 124, 255, 0.055)),
    rgba(255, 255, 255, 0.035);
}

.sidebar-note strong {
  color: var(--accent-strong);
}

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

.topbar {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(105deg, rgba(32, 214, 199, 0.12), transparent 42%),
    linear-gradient(280deg, rgba(125, 124, 255, 0.12), transparent 40%),
    rgba(10, 17, 27, 0.76);
  box-shadow: var(--shadow), var(--inner-glow);
}

.topbar h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
  color: var(--text-strong);
}

.topbar p {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 820px;
}

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

.primary-button,
.ghost-button,
.mini-button {
  border-radius: var(--radius);
  border: 1px solid transparent;
  min-height: 38px;
  padding: 8px 13px;
  transition: 150ms ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), #38a9ff);
  color: #031018;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(32, 214, 199, 0.22);
}

.primary-button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

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

.ghost-button:hover {
  border-color: var(--line-strong);
  color: var(--accent-strong);
  background: rgba(32, 214, 199, 0.08);
}

#refreshStore,
#logoutButton {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#refreshStore::before,
#logoutButton::before {
  content: "";
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  background: currentColor;
  opacity: 0.86;
  mask: var(--action-icon) center / 17px 17px no-repeat;
  -webkit-mask: var(--action-icon) center / 17px 17px no-repeat;
}

#refreshStore {
  --action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 11a8 8 0 0 0-13.5-5.8L4 8'/%3E%3Cpath d='M4 4v4h4'/%3E%3Cpath d='M4 13a8 8 0 0 0 13.5 5.8L20 16'/%3E%3Cpath d='M20 20v-4h-4'/%3E%3C/g%3E%3C/svg%3E");
}

#logoutButton {
  --action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 17l5-5-5-5'/%3E%3Cpath d='M15 12H3'/%3E%3Cpath d='M21 4v16'/%3E%3C/g%3E%3C/svg%3E");
}

.mini-button {
  min-height: 30px;
  padding: 5px 10px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-size: 13px;
}

.mini-button:hover {
  color: var(--accent-strong);
  border-color: var(--line-strong);
}

.mini-button:disabled,
.mini-button:disabled:hover {
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.full-width {
  width: 100%;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(430px, 0.88fr);
  gap: 20px;
  align-items: start;
}

#imageView .split-layout {
  grid-template-columns: minmax(360px, 0.86fr) minmax(520px, 1.14fr);
}

.library-search-panel {
  margin-bottom: 16px;
}

.library-search-header {
  margin-bottom: 12px;
}

.library-search-summary {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  text-align: right;
}

.dashboard-root {
  display: grid;
  gap: 18px;
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
  min-height: 156px;
  border: 1px solid rgba(122, 249, 238, 0.24);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  background:
    linear-gradient(105deg, rgba(32, 214, 199, 0.2), transparent 44%),
    linear-gradient(280deg, rgba(125, 124, 255, 0.22), transparent 42%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 22px),
    rgba(8, 14, 24, 0.92);
  box-shadow: 0 0 54px rgba(32, 214, 199, 0.13), var(--inner-glow);
}

.dashboard-hero::after,
.dashboard-panel::after,
.metric-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(122, 249, 238, 0.07), transparent);
  transform: translateY(-100%);
  animation: scanline 6s linear infinite;
}

.dashboard-kicker,
.dashboard-panel-head span {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.dashboard-hero h2 {
  margin: 8px 0 8px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1;
}

.dashboard-hero p {
  margin: 0;
  color: #b7c9d8;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 132px;
  border: 1px solid rgba(122, 249, 238, 0.2);
  border-radius: var(--radius);
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(32, 214, 199, 0.13), rgba(125, 124, 255, 0.1)),
    rgba(10, 17, 27, 0.82);
  box-shadow: var(--inner-glow), 0 16px 46px rgba(0, 0, 0, 0.22);
}

.metric-ring {
  width: 76px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(7, 11, 18, 0.96) 0 52%, transparent 53%),
    conic-gradient(var(--accent-strong) calc(var(--level) * 1%), rgba(125, 124, 255, 0.22) 0);
  box-shadow: 0 0 28px rgba(32, 214, 199, 0.28);
}

.metric-ring span {
  font-size: 19px;
  font-weight: 900;
  color: #ffffff;
}

.metric-card h3,
.dashboard-panel h3 {
  margin: 0;
  color: var(--text-strong);
}

.metric-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.providers-root {
  display: grid;
  gap: 18px;
}

.provider-center-hero,
.provider-center-section {
  border: 1px solid rgba(122, 249, 238, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(32, 214, 199, 0.08), rgba(125, 124, 255, 0.06)),
    rgba(7, 13, 22, 0.78);
  box-shadow: var(--inner-glow);
}

.provider-center-hero {
  min-height: 138px;
  padding: 22px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.provider-center-hero h2 {
  margin: 8px 0;
  font-size: 30px;
  line-height: 1.12;
}

.provider-center-hero p,
.provider-center-doc {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.provider-center-summary,
.provider-center-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.provider-center-summary > div,
.provider-center-mini-card {
  border: 1px solid rgba(122, 249, 238, 0.14);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.provider-center-mini-card .provider-log-download {
  margin-top: 10px;
  width: fit-content;
}

.provider-center-summary span,
.provider-center-mini-card span,
.provider-center-details span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.provider-center-summary strong,
.provider-center-mini-card strong {
  display: block;
  margin-top: 6px;
  color: var(--text-strong);
  font-size: 22px;
}

.provider-center-section {
  padding: 18px;
}

.provider-center-subsection {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.provider-error-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.provider-error-card {
  border: 1px solid rgba(255, 209, 102, 0.18);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 209, 102, 0.06);
}

.provider-error-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.provider-error-card strong {
  color: var(--text-strong);
}

.provider-error-card span,
.provider-error-card small,
.provider-error-card p {
  color: var(--muted);
  font-size: 12px;
}

.provider-error-card p {
  margin: 8px 0 0;
  line-height: 1.45;
  word-break: break-word;
}

.provider-center-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.provider-center-card {
  border: 1px solid rgba(122, 249, 238, 0.14);
  border-radius: var(--radius);
  padding: 14px;
  display: grid;
  gap: 12px;
  background: rgba(5, 10, 17, 0.62);
}

.provider-center-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.provider-center-icon {
  width: 46px;
  height: 46px;
}

.provider-center-title {
  color: var(--text-strong);
  font-weight: 900;
  line-height: 1.35;
}

.provider-center-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.provider-center-status {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.provider-center-status.is-ok {
  color: #06150e;
  border-color: rgba(72, 227, 155, 0.72);
  background: var(--green);
}

.provider-center-status.is-warning {
  color: #1d1504;
  border-color: rgba(255, 209, 102, 0.68);
  background: var(--yellow);
}

.provider-center-details {
  display: grid;
  gap: 8px;
}

.provider-center-details strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.provider-center-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.provider-center-chip {
  border: 1px solid rgba(122, 249, 238, 0.16);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--accent-strong);
  background: rgba(32, 214, 199, 0.08);
  font-size: 12px;
  font-weight: 800;
}

.provider-center-actions {
  display: flex;
  justify-content: flex-end;
}

.provider-center-config {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(122, 249, 238, 0.1);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.provider-center-config label {
  display: grid;
  gap: 4px;
}

.provider-center-config span,
.provider-center-config-footer small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.provider-center-config input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(122, 249, 238, 0.16);
  border-radius: 8px;
  padding: 8px 9px;
  color: var(--text);
  background: rgba(3, 9, 16, 0.72);
  outline: none;
}

.provider-center-config input:focus {
  border-color: rgba(122, 249, 238, 0.46);
  box-shadow: 0 0 0 3px rgba(122, 249, 238, 0.08);
}

.provider-center-config-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.provider-center-config-footer small {
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.provider-config-modal {
  width: min(620px, 100%);
}

.provider-config-modal-body {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.provider-config-modal-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(122, 249, 238, 0.12);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.provider-center-test-result {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 12px;
  line-height: 1.45;
  background: rgba(255, 255, 255, 0.04);
}

.provider-center-test-result strong {
  color: var(--text-strong);
}

.provider-center-test-result span,
.provider-center-test-result small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.provider-center-test-result.is-ok {
  border-color: rgba(72, 227, 155, 0.36);
  background: rgba(72, 227, 155, 0.08);
}

.provider-center-test-result.is-warning {
  border-color: rgba(255, 209, 102, 0.42);
  background: rgba(255, 209, 102, 0.08);
}

.provider-center-mini-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.provider-center-mini-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.provider-center-warning,
.provider-center-error {
  display: grid;
  gap: 6px;
}

.provider-center-log-list {
  margin-top: 12px;
  display: grid;
  gap: 6px;
}

.provider-center-log-list > div {
  border: 1px solid rgba(122, 249, 238, 0.1);
  border-radius: var(--radius);
  padding: 9px 10px;
  color: var(--muted);
  background: rgba(5, 10, 17, 0.5);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.dashboard-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(128, 225, 239, 0.2);
  border-radius: var(--radius);
  padding: 18px;
  min-height: 280px;
  background:
    linear-gradient(135deg, rgba(32, 214, 199, 0.08), rgba(125, 124, 255, 0.075)),
    rgba(10, 17, 27, 0.78);
  box-shadow: var(--shadow), var(--inner-glow);
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 7% 48%, rgba(122, 249, 238, 0.18), transparent 18%),
    linear-gradient(90deg, rgba(122, 249, 238, 0.12), transparent 42%, rgba(125, 124, 255, 0.1)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 32px);
  opacity: 0.9;
}

.topbar::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 0;
  width: min(520px, 48%);
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--accent-strong), var(--violet));
  box-shadow: 0 0 18px rgba(122, 249, 238, 0.65);
}

.topbar > * {
  position: relative;
  z-index: 1;
}

.dashboard-wide {
  grid-column: span 2;
}

.dashboard-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.pulse-chart {
  height: 220px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  padding: 18px 10px 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(rgba(122, 249, 238, 0.08) 1px, transparent 1px),
    rgba(255, 255, 255, 0.025);
  background-size: 100% 25%;
}

.pulse-day {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  min-width: 0;
}

.pulse-bars {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 4px;
}

.pulse-bar {
  width: 9px;
  min-height: 6px;
  border-radius: 999px 999px 2px 2px;
  box-shadow: 0 0 16px currentColor;
}

.pulse-bar.asset,
.chart-legend .asset {
  color: var(--accent-strong);
  background: var(--accent-strong);
}

.pulse-bar.image,
.chart-legend .image {
  color: #38a9ff;
  background: #38a9ff;
}

.pulse-bar.video,
.chart-legend .video {
  color: var(--violet);
  background: var(--violet);
}

.pulse-label {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.chart-legend {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.chart-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-radius: 999px;
  box-shadow: 0 0 12px currentColor;
}

.energy-list,
.user-orbit-list,
.registry-table,
.radar-stack {
  display: grid;
  gap: 12px;
}

.energy-label,
.user-orbit-row,
.registry-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.energy-label span,
.user-orbit-row strong,
.registry-row span {
  color: var(--text-strong);
  font-weight: 800;
}

.energy-label b,
.user-orbit-row b,
.registry-row b {
  color: var(--accent-strong);
}

.energy-track,
.orbit-track {
  height: 9px;
  border: 1px solid rgba(122, 249, 238, 0.18);
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.energy-track span,
.orbit-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #38a9ff, var(--violet));
  box-shadow: 0 0 18px rgba(32, 214, 199, 0.55);
}

.energy-row em,
.user-orbit-row span,
.registry-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.user-orbit-row {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.user-orbit-row > div:first-child {
  min-width: 150px;
  display: grid;
  gap: 3px;
}

.orbit-track {
  flex: 1;
}

.radar-stack {
  grid-template-columns: repeat(3, 1fr);
}

.radar-node {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(7, 11, 18, 0.94) 0 51%, transparent 52%),
    conic-gradient(from 180deg, var(--accent-strong) var(--degree), rgba(125, 124, 255, 0.18) 0);
  box-shadow: 0 0 32px rgba(32, 214, 199, 0.2);
}

.radar-node span {
  font-size: 24px;
  font-weight: 900;
}

.radar-node em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.registry-row {
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid rgba(122, 249, 238, 0.12);
  background: rgba(255, 255, 255, 0.035);
}

.icon-button-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ui-glyph {
  position: relative;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: currentColor;
}

.ui-glyph::before,
.ui-glyph::after {
  content: "";
  position: absolute;
  inset: 2px;
  border: 2px solid currentColor;
}

.ui-glyph.gear::before {
  border-radius: 50%;
  box-shadow:
    0 -5px 0 -3px currentColor,
    0 5px 0 -3px currentColor,
    5px 0 0 -3px currentColor,
    -5px 0 0 -3px currentColor;
}

.ui-glyph.gear::after {
  inset: 6px;
  border-width: 2px;
  border-radius: 50%;
}

.ui-glyph.pulse::before {
  inset: 7px 1px 6px;
  border: 0;
  border-top: 2px solid currentColor;
}

.ui-glyph.pulse::after {
  inset: 2px 3px;
  border-width: 0 0 2px 2px;
  transform: skewX(-24deg) rotate(-10deg);
}

.ui-glyph.refresh::before {
  border-radius: 50%;
  border-left-color: transparent;
}

.ui-glyph.refresh::after {
  inset: 2px 1px auto auto;
  width: 5px;
  height: 5px;
  border-width: 2px 2px 0 0;
  transform: rotate(45deg);
}

.ui-glyph.search::before {
  inset: 1px 4px 5px 1px;
  border-radius: 50%;
}

.ui-glyph.search::after {
  inset: auto 1px 1px auto;
  width: 7px;
  height: 2px;
  border: 0;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: right center;
}

body[data-current-view="providers"],
body[data-current-view="dashboard"],
body[data-current-view="accounts"] {
  background:
    radial-gradient(circle at 45% 5%, rgba(51, 93, 255, 0.18), transparent 19%),
    radial-gradient(circle at 82% 18%, rgba(154, 64, 255, 0.13), transparent 26%),
    linear-gradient(180deg, #030817 0%, #071024 48%, #040917 100%);
}

body[data-current-view="providers"]::before,
body[data-current-view="dashboard"]::before,
body[data-current-view="accounts"]::before {
  background-image:
    linear-gradient(rgba(125, 166, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 166, 255, 0.045) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.88), transparent 78%);
}

body[data-current-view="providers"] .topbar,
body[data-current-view="dashboard"] .topbar,
body[data-current-view="accounts"] .topbar {
  min-height: 72px;
  margin-bottom: 18px;
  padding: 0 0 16px;
  border: 0;
  border-bottom: 1px solid rgba(79, 105, 171, 0.26);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

body[data-current-view="providers"] .topbar::before,
body[data-current-view="providers"] .topbar::after,
body[data-current-view="dashboard"] .topbar::before,
body[data-current-view="dashboard"] .topbar::after,
body[data-current-view="accounts"] .topbar::before,
body[data-current-view="accounts"] .topbar::after {
  content: none;
}

body[data-current-view="providers"] .topbar h1,
body[data-current-view="dashboard"] .topbar h1,
body[data-current-view="accounts"] .topbar h1 {
  font-size: 32px;
  line-height: 1.08;
  letter-spacing: 0;
}

body[data-current-view="providers"] .topbar p,
body[data-current-view="dashboard"] .topbar p,
body[data-current-view="accounts"] .topbar p {
  margin-top: 8px;
  color: #98a7bd;
  font-size: 15px;
}

body[data-current-view="providers"] .top-actions,
body[data-current-view="dashboard"] .top-actions,
body[data-current-view="accounts"] .top-actions {
  justify-content: flex-end;
  gap: 12px;
}

body[data-current-view="providers"] .top-actions .ghost-button,
body[data-current-view="providers"] .top-actions .status-pill,
body[data-current-view="providers"] .topbar-version,
body[data-current-view="dashboard"] .top-actions .ghost-button,
body[data-current-view="dashboard"] .top-actions .status-pill,
body[data-current-view="dashboard"] .topbar-version,
body[data-current-view="accounts"] .top-actions .ghost-button,
body[data-current-view="accounts"] .top-actions .status-pill,
body[data-current-view="accounts"] .topbar-version {
  min-height: 46px;
  border: 1px solid rgba(80, 104, 170, 0.42);
  border-radius: 8px;
  background: rgba(8, 15, 34, 0.68);
  color: #d7e2f5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body[data-current-view="providers"] .topbar-version,
body[data-current-view="dashboard"] .topbar-version,
body[data-current-view="accounts"] .topbar-version {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: #b6c3d7;
}

body[data-current-view="providers"] .auth-user-badge,
body[data-current-view="dashboard"] .auth-user-badge,
body[data-current-view="accounts"] .auth-user-badge {
  padding-inline: 14px;
  color: #f2f6ff;
}

body[data-current-view="providers"] .auth-user-badge::before,
body[data-current-view="dashboard"] .auth-user-badge::before,
body[data-current-view="accounts"] .auth-user-badge::before {
  box-shadow: 0 0 0 5px rgba(46, 188, 255, 0.12);
}

body[data-current-view="providers"] .primary-button,
body[data-current-view="dashboard"] .primary-button,
body[data-current-view="accounts"] .primary-button {
  border-radius: 8px;
  border-color: rgba(61, 156, 255, 0.55);
  background: linear-gradient(135deg, #984dff, #238cff 56%, #25c8ff);
  color: #ffffff;
  box-shadow: 0 0 24px rgba(61, 126, 255, 0.26);
}

body[data-current-view="providers"] .ghost-button,
body[data-current-view="dashboard"] .ghost-button,
body[data-current-view="providers"] .mini-button,
body[data-current-view="dashboard"] .mini-button,
body[data-current-view="accounts"] .ghost-button,
body[data-current-view="accounts"] .mini-button {
  border-radius: 8px;
}

body[data-current-view="providers"] .nav-item.active,
body[data-current-view="dashboard"] .nav-item.active,
body[data-current-view="library"] .nav-item.active,
body[data-current-view="accounts"] .nav-item.active {
  border-color: rgba(73, 142, 255, 0.74);
  background:
    linear-gradient(92deg, rgba(28, 159, 255, 0.86), rgba(101, 91, 255, 0.72), rgba(142, 63, 255, 0.78));
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 24px rgba(71, 112, 255, 0.28);
}

body[data-current-view="providers"] .nav-item.active::before,
body[data-current-view="dashboard"] .nav-item.active::before,
body[data-current-view="providers"] .nav-item.active::after,
body[data-current-view="dashboard"] .nav-item.active::after,
body[data-current-view="library"] .nav-item.active::before,
body[data-current-view="library"] .nav-item.active::after,
body[data-current-view="accounts"] .nav-item.active::before,
body[data-current-view="accounts"] .nav-item.active::after {
  background: #ffffff;
}

body[data-current-view="providers"] .provider-center-hero,
body[data-current-view="dashboard"] .dashboard-hero {
  min-height: 118px;
  border-radius: 8px;
  border-color: rgba(75, 103, 179, 0.48);
  background:
    linear-gradient(105deg, rgba(28, 56, 110, 0.64), rgba(12, 20, 46, 0.84) 48%, rgba(20, 18, 62, 0.86)),
    rgba(8, 15, 34, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 18px 50px rgba(0, 0, 0, 0.22);
}

.provider-center-overview,
.dashboard-query-strip {
  border: 1px solid rgba(75, 103, 179, 0.48);
  border-radius: 8px;
  background:
    linear-gradient(105deg, rgba(28, 56, 110, 0.64), rgba(12, 20, 46, 0.84) 48%, rgba(20, 18, 62, 0.86)),
    rgba(8, 15, 34, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 18px 50px rgba(0, 0, 0, 0.22);
}

.provider-center-overview {
  display: grid;
  gap: 14px;
  padding: 16px 18px 18px;
}

.provider-center-overview-head,
.dashboard-query-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.provider-center-overview h2 {
  margin: 6px 0 4px;
  color: var(--text-strong);
  font-size: 25px;
  line-height: 1.15;
}

.provider-center-overview p,
.dashboard-query-strip p {
  margin: 0;
  color: #a7b6ca;
}

.dashboard-query-strip {
  min-height: 88px;
  padding: 14px 18px;
}

body[data-current-view="dashboard"] .dashboard-query-strip {
  justify-self: end;
  width: min(900px, 70%);
  min-height: 0;
  margin-top: -96px;
  margin-bottom: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  z-index: 3;
}

body[data-current-view="dashboard"] .dashboard-query-strip > div:first-child {
  display: none;
}

.provider-center-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 370px);
  gap: 14px;
  align-items: start;
}

.provider-center-main,
.provider-center-side,
.provider-center-lower-grid {
  display: grid;
  gap: 14px;
}

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

.provider-center-side {
  position: sticky;
  top: 18px;
}

.provider-center-side .provider-center-mini-grid {
  grid-template-columns: 1fr;
}

.provider-center-side .provider-error-grid {
  grid-template-columns: 1fr;
}

.provider-center-side .provider-center-mini-card {
  min-height: auto;
}

.provider-center-side .provider-center-section {
  min-height: 0;
}

body[data-current-view="dashboard"] .dashboard-hero {
  min-height: 78px;
  padding: 16px 18px;
  align-items: center;
}

body[data-current-view="dashboard"] .dashboard-hero-copy h2 {
  display: none;
}

body[data-current-view="dashboard"] .dashboard-kicker {
  color: #78f4ff;
}

body[data-current-view="dashboard"] .dashboard-hero-copy p {
  margin-top: 4px;
  color: #a7b6ca;
}

body[data-current-view="providers"] .provider-center-hero h2 {
  font-size: 30px;
}

body[data-current-view="providers"] .provider-center-hero p {
  max-width: 760px;
  color: #9daad1;
}

.provider-center-summary {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
}

.provider-center-summary-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 82px;
  border: 1px solid rgba(76, 105, 184, 0.42);
  border-radius: 8px;
  padding: 12px 14px;
  background:
    linear-gradient(135deg, rgba(31, 69, 135, 0.34), rgba(13, 21, 45, 0.76)),
    rgba(9, 16, 35, 0.84);
}

.provider-center-summary-card.violet {
  border-color: rgba(130, 89, 255, 0.25);
  background: linear-gradient(135deg, rgba(105, 78, 255, 0.15), rgba(255, 255, 255, 0.025)), rgba(9, 18, 34, 0.78);
}

.provider-center-summary-card.green {
  border-color: rgba(80, 222, 157, 0.22);
  background: linear-gradient(135deg, rgba(50, 181, 126, 0.13), rgba(255, 255, 255, 0.025)), rgba(9, 18, 34, 0.78);
}

.provider-center-summary-card.yellow {
  border-color: rgba(255, 209, 102, 0.28);
  background: linear-gradient(135deg, rgba(255, 184, 77, 0.13), rgba(255, 255, 255, 0.025)), rgba(9, 18, 34, 0.78);
}

.provider-center-summary-card span,
.provider-center-summary-card small {
  color: #9fb3cb;
}

.provider-center-summary-card strong {
  margin-top: 3px;
  color: #f5f8ff;
  font-size: 23px;
}

.provider-center-summary-icon,
.metric-card-icon,
.operator-rank-icon,
.radar-icon {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.2), transparent 28%),
    linear-gradient(135deg, rgba(36, 149, 255, 0.48), rgba(105, 80, 255, 0.34));
  box-shadow:
    inset 0 0 0 1px rgba(130, 186, 255, 0.2),
    0 12px 26px rgba(0, 0, 0, 0.22),
    0 0 22px rgba(62, 121, 255, 0.2);
}

.provider-center-summary-icon {
  width: 48px;
  height: 48px;
}

.provider-center-summary-icon::before,
.metric-card-icon::before,
.operator-rank-icon::before,
.radar-icon::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  border: 2px solid #78dfff;
  box-shadow: 0 0 10px rgba(120, 223, 255, 0.32);
}

.provider-center-summary-icon::before {
  border: 0;
  background: #8feaff;
  box-shadow: 0 0 16px rgba(105, 215, 255, 0.48);
  mask: var(--summary-icon) center / 26px 26px no-repeat;
  -webkit-mask: var(--summary-icon) center / 26px 26px no-repeat;
}

.provider-center-summary-icon.image::before,
.metric-card-icon.image::before {
  border-radius: 0;
}

.provider-center-summary-icon.image {
  --summary-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m4 16 4.5-4.5 3.5 3.5 2-2 6 6'/%3E%3Ccircle cx='15.5' cy='9.5' r='1.5'/%3E%3C/g%3E%3C/svg%3E");
}

.metric-card-icon.image::before {
  border-radius: 4px;
  background:
    linear-gradient(135deg, transparent 42%, rgba(101, 212, 255, 0.55) 43% 62%, transparent 63%),
    radial-gradient(circle at 72% 28%, #65d4ff 0 2px, transparent 3px);
}

.provider-center-summary-icon.video::before {
  border-radius: 0;
}

.provider-center-summary-icon.video {
  --summary-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m10 9 5 3-5 3z'/%3E%3C/g%3E%3C/svg%3E");
}

.provider-center-summary-icon.voice::before {
  width: 26px;
}

.provider-center-summary-icon.voice {
  --summary-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3a3 3 0 0 0-3 3v6a3 3 0 0 0 6 0V6a3 3 0 0 0-3-3z'/%3E%3Cpath d='M5 10v2a7 7 0 0 0 14 0v-2M12 19v2M8 21h8'/%3E%3C/g%3E%3C/svg%3E");
}

.provider-center-summary-icon.shield::before {
  border-radius: 0;
}

.provider-center-summary-icon.shield {
  --summary-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 20 6v6c0 5-3.2 8-8 9-4.8-1-8-4-8-9V6z'/%3E%3Cpath d='m8.5 12.5 2.2 2.2 4.8-5.1'/%3E%3C/g%3E%3C/svg%3E");
}

.provider-center-summary-icon.network {
  --summary-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v5M12 16v5M4.5 7.5 8 10M16 14l3.5 2.5M19.5 7.5 16 10M8 14l-3.5 2.5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/g%3E%3C/svg%3E");
}

.provider-center-section {
  border-radius: 8px;
  border-color: rgba(75, 103, 179, 0.42);
  background:
    linear-gradient(180deg, rgba(12, 25, 50, 0.9), rgba(7, 14, 29, 0.88)),
    rgba(7, 13, 26, 0.86);
}

.provider-center-section .section-header {
  margin-bottom: 12px;
}

.provider-center-section .section-header h2 {
  font-size: 20px;
}

.provider-center-section .section-header p {
  margin-top: 4px;
  font-size: 13px;
}

.text-link {
  align-self: start;
  color: #8ea3ff;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.provider-center-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.provider-center-card {
  border-radius: 8px;
  border-color: rgba(68, 99, 177, 0.42);
  background:
    linear-gradient(180deg, rgba(13, 29, 59, 0.9), rgba(7, 15, 31, 0.9)),
    rgba(6, 12, 24, 0.82);
  gap: 9px;
  min-height: 204px;
  padding: 12px;
}

.provider-center-card .provider-center-doc {
  display: none;
  font-size: 12px;
  line-height: 1.55;
}

.provider-center-card .provider-center-icon {
  width: 42px;
  height: 42px;
}

.provider-center-card .provider-center-title {
  font-size: 15px;
}

.provider-center-card .provider-center-details {
  gap: 4px;
}

.provider-center-card .provider-center-details strong {
  margin-top: 2px;
}

.provider-center-card .provider-center-chips {
  gap: 5px;
}

.provider-center-card .provider-center-chip {
  padding: 3px 7px;
}

.provider-center-card .provider-center-healthline {
  min-height: 30px;
  padding: 5px 8px;
}

.provider-center-card-head {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.provider-center-healthline {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.035);
}

.provider-center-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 0 0 12px rgba(255, 209, 102, 0.5);
}

.provider-center-dot.is-ok {
  background: var(--green);
  box-shadow: 0 0 12px rgba(72, 227, 155, 0.55);
}

.provider-center-healthline strong {
  color: var(--text-strong);
  font-size: 12px;
}

.provider-center-healthline em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  overflow-wrap: anywhere;
}

.provider-center-details {
  grid-template-columns: minmax(0, 1fr);
}

.provider-center-actions {
  justify-content: flex-start;
  gap: 8px;
}

.provider-center-mini-card.stat-card {
  min-height: 110px;
}

.dashboard-metrics {
  grid-template-columns: repeat(4, minmax(178px, 1fr));
  gap: 14px;
}

.metric-card {
  min-height: 112px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  border-radius: 8px;
  border-color: rgba(73, 103, 181, 0.44);
  background:
    linear-gradient(145deg, rgba(23, 52, 103, 0.68), rgba(11, 21, 44, 0.86)),
    rgba(10, 18, 36, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 18px 42px rgba(0, 0, 0, 0.2);
}

.metric-card.violet {
  border-color: rgba(132, 91, 255, 0.25);
}

.metric-card.green {
  border-color: rgba(71, 220, 153, 0.22);
}

.metric-card.blue {
  border-color: rgba(61, 176, 255, 0.25);
}

.metric-card-icon {
  width: 54px;
  height: 54px;
}

.metric-card-icon.user::before {
  width: 22px;
  height: 22px;
  border-radius: 50% 50% 7px 7px;
  background: radial-gradient(circle at 50% 24%, #65d4ff 0 5px, transparent 6px);
}

.metric-card-icon.network::before {
  border-radius: 50%;
  box-shadow:
    12px 0 0 -8px #65d4ff,
    -12px 0 0 -8px #65d4ff,
    0 12px 0 -8px #65d4ff;
}

.metric-card-icon.box::before {
  border-radius: 4px;
  transform: rotate(45deg);
}

.metric-card h3 {
  color: #dce6f6;
  font-size: 14px;
  font-weight: 850;
}

.metric-card strong {
  display: block;
  margin-top: 4px;
  color: #ffffff;
  font-size: 30px;
  line-height: 1;
}

.metric-sparkline {
  grid-column: 1 / -1;
  height: 18px;
  margin-top: 2px;
  border-bottom: 1px solid rgba(101, 212, 255, 0.16);
  background:
    linear-gradient(135deg, transparent 0 18%, rgba(101, 212, 255, 0.7) 19% 21%, transparent 22% 38%, rgba(128, 98, 255, 0.75) 39% 41%, transparent 42% 58%, rgba(101, 212, 255, 0.8) 59% 61%, transparent 62%);
  opacity: 0.75;
}

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

.dashboard-board-grid {
  grid-template-columns: minmax(470px, 1.35fr) minmax(300px, 0.82fr) minmax(330px, 0.95fr);
  gap: 14px;
}

.dashboard-board-grid .dashboard-wide,
.dashboard-board-grid .dashboard-panel {
  grid-column: span 1;
}

.dashboard-board-grid .dashboard-panel:nth-child(6) {
  grid-column: span 1;
}

.dashboard-panel {
  min-height: 230px;
  border-radius: 8px;
  border-color: rgba(73, 103, 181, 0.44);
  background:
    linear-gradient(180deg, rgba(12, 27, 55, 0.92), rgba(7, 15, 31, 0.9)),
    rgba(10, 17, 31, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 46px rgba(0, 0, 0, 0.22);
}

.dashboard-panel-head {
  align-items: flex-start;
}

.dashboard-panel-head h3 {
  font-size: 21px;
}

.dashboard-panel-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-panel-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 999px;
  background: #4e8cff;
}

.dashboard-panel-legend .asset {
  background: #56e38f;
}

.dashboard-trend-chart {
  height: 202px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
  align-items: end;
  gap: 12px;
  padding: 18px 12px 8px;
  border: 1px solid rgba(80, 113, 186, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(rgba(101, 132, 197, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(101, 132, 197, 0.08) 1px, transparent 1px),
    rgba(10, 20, 40, 0.52);
  background-size: 100% 25%;
}

.dashboard-day {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 6px;
  height: 100%;
  min-width: 0;
  color: var(--muted);
  text-align: center;
}

.dashboard-day-bars {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 5px;
  min-height: 0;
}

.dashboard-day-bars span {
  width: 12px;
  min-height: 8px;
  border-radius: 999px 999px 3px 3px;
}

.dashboard-day-bars .api {
  height: calc(var(--level) * 1%);
  background: linear-gradient(180deg, #65d4ff, #326cff);
  box-shadow: 0 0 14px rgba(79, 147, 255, 0.45);
}

.dashboard-day-bars .saved {
  height: calc(var(--saved) * 1%);
  background: linear-gradient(180deg, #71ee9e, #35a879);
  box-shadow: 0 0 14px rgba(80, 222, 157, 0.35);
}

.dashboard-day b {
  color: #d7e3f5;
  font-size: 12px;
}

.dashboard-day em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.dashboard-donut-wrap {
  display: grid;
  grid-template-columns: 134px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.dashboard-donut {
  width: 134px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(7, 13, 24, 0.96) 0 53%, transparent 54%),
    conic-gradient(#4e8cff 0 var(--a), #805dff var(--a) calc(var(--a) + var(--b)), #54dca2 calc(var(--a) + var(--b)) 100%);
  box-shadow: 0 0 30px rgba(79, 147, 255, 0.22);
}

.dashboard-donut strong {
  color: #ffffff;
  font-size: 28px;
}

.dashboard-donut span {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-type-list {
  display: grid;
  gap: 8px;
}

.ops-dial {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.asset-type-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #4e8cff;
  box-shadow: 0 0 12px rgba(78, 140, 255, 0.45);
}

.asset-type-dot.scene {
  background: #61d9ff;
}

.asset-type-dot.prop {
  background: #71ee9e;
}

.ops-dial b,
.ops-dial strong {
  color: var(--text-strong);
}

.ops-dial em {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.dashboard-provider-bars {
  display: grid;
  gap: 10px;
}

.dashboard-provider-row {
  display: grid;
  grid-template-columns: minmax(82px, 1.1fr) minmax(90px, 1.25fr) auto auto;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-provider-row span {
  color: var(--text-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-provider-row div {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.dashboard-provider-row i {
  display: block;
  width: calc(var(--level) * 1%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4e8cff, #805dff);
  box-shadow: 0 0 14px rgba(100, 126, 255, 0.55);
}

.dashboard-provider-row strong {
  color: var(--text-strong);
}

.dashboard-provider-row em,
.dashboard-provider-row small {
  color: var(--muted);
  font-style: normal;
}

.dashboard-provider-row small {
  grid-column: 2 / -1;
  margin-top: -6px;
}

.dashboard-user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.operator-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 82px;
  border: 1px solid rgba(83, 116, 190, 0.36);
  border-radius: 8px;
  padding: 11px;
  background: linear-gradient(135deg, rgba(41, 75, 147, 0.22), rgba(255, 255, 255, 0.025));
}

.operator-rank-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
}

.operator-rank-icon::before {
  width: 20px;
  height: 20px;
  border-radius: 50% 50% 6px 6px;
  background: radial-gradient(circle at 50% 25%, #65d4ff 0 4px, transparent 5px);
}

.operator-card strong,
.operator-card b {
  color: var(--text-strong);
}

.operator-card em,
.operator-card small {
  color: var(--muted);
  font-style: normal;
}

.operator-card small {
  grid-column: 2 / -1;
  font-size: 12px;
  line-height: 1.45;
}

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

.radar-node {
  aspect-ratio: auto;
  min-height: 82px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(83, 116, 190, 0.36);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(90deg, rgba(83, 133, 255, 0.18) calc(var(--level) * 1%), rgba(255, 255, 255, 0.035) 0),
    rgba(255, 255, 255, 0.025);
  box-shadow: none;
}

.radar-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
}

.radar-icon::before {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}

.radar-node.check .radar-icon::before {
  border-width: 0 0 3px 3px;
  transform: rotate(-45deg);
}

.radar-node.error .radar-icon::before {
  border-radius: 50%;
  border-color: #ff6b6b;
}

.radar-node em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.radar-node strong {
  display: block;
  margin-top: 5px;
  color: var(--text-strong);
  font-size: 24px;
}

.dashboard-type-list .ops-dial {
  min-height: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  justify-items: stretch;
  align-content: center;
  gap: 10px;
  padding: 9px 0;
  border-width: 0 0 1px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.dashboard-type-list .ops-dial b,
.dashboard-type-list .ops-dial em {
  text-align: left;
}

.dashboard-type-list .ops-dial strong {
  text-align: right;
}

.dashboard-user-grid .operator-card {
  min-height: 82px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  justify-items: stretch;
  align-content: center;
  gap: 10px;
  padding: 11px;
  text-align: left;
}

.dashboard-user-grid .operator-card strong,
.dashboard-user-grid .operator-card em,
.dashboard-user-grid .operator-card small {
  text-align: left;
}

.dashboard-pipeline .radar-node {
  min-height: 82px;
}

/* Unified workspace banner: keep every module on the same header system. */
body.is-authenticated .topbar {
  min-height: 92px;
  margin-bottom: 20px;
  padding: 18px 22px;
  border: 1px solid rgba(72, 103, 167, 0.64);
  border-radius: 10px;
  background:
    radial-gradient(circle at 18% 0%, rgba(38, 176, 255, 0.16), transparent 36%),
    radial-gradient(circle at 84% 20%, rgba(133, 82, 255, 0.16), transparent 32%),
    linear-gradient(105deg, rgba(8, 24, 46, 0.96), rgba(7, 15, 32, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 42px rgba(0, 0, 0, 0.18);
  align-items: center;
  overflow: hidden;
}

body.is-authenticated .topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(120, 159, 229, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 159, 229, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.92), transparent 82%);
}

body.is-authenticated .topbar::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, #26d9ff, rgba(132, 91, 255, 0.72), transparent);
  opacity: 0.72;
}

body.is-authenticated .topbar > * {
  position: relative;
  z-index: 1;
}

body.is-authenticated .topbar > div:first-child {
  min-width: 0;
  max-width: min(760px, calc(100% - 520px));
}

body.is-authenticated .topbar h1 {
  margin: 0;
  color: #f6f9ff;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
}

body.is-authenticated .topbar p {
  max-width: 760px;
  margin: 8px 0 0;
  color: #b8c7dc;
  font-size: 15px;
  line-height: 1.45;
}

body.is-authenticated .top-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  white-space: nowrap;
}

body.is-authenticated .top-actions .ghost-button,
body.is-authenticated .top-actions .status-pill,
body.is-authenticated .topbar-version {
  min-height: 44px;
  border: 1px solid rgba(82, 112, 180, 0.58);
  border-radius: 8px;
  background: rgba(7, 15, 32, 0.7);
  color: #dce8f8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

body.is-authenticated .topbar-version {
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  color: #afbfd6;
}

body.is-authenticated .auth-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
}

body.is-authenticated .auth-user-badge::before {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 34%, #f6fbff 0 4px, transparent 5px),
    radial-gradient(circle at 50% 78%, #f6fbff 0 8px, transparent 9px),
    linear-gradient(135deg, #20d6c7, #4f8cff);
  box-shadow: 0 0 14px rgba(32, 214, 199, 0.28);
}

body.is-authenticated .top-actions .ghost-button:hover {
  border-color: rgba(61, 207, 255, 0.72);
  background: rgba(32, 214, 199, 0.1);
  color: #ffffff;
}

@media (max-width: 1280px) {
  body.is-authenticated .topbar > div:first-child {
    max-width: 390px;
  }

  body.is-authenticated .topbar h1 {
    font-size: 28px;
  }

  body.is-authenticated .topbar p {
    font-size: 14px;
  }

  body.is-authenticated .top-actions {
    gap: 8px;
  }

  body.is-authenticated .top-actions .ghost-button,
  body.is-authenticated .top-actions .status-pill,
  body.is-authenticated .topbar-version {
    min-height: 42px;
  }
}

@media (max-width: 980px) {
  body.is-authenticated .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  body.is-authenticated .topbar > div:first-child {
    max-width: none;
  }

  body.is-authenticated .top-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

/* Reference dashboard rebuild. */
body[data-current-view="dashboard"] .content {
  background:
    radial-gradient(circle at 54% -8%, rgba(22, 99, 190, 0.15), transparent 36%),
    linear-gradient(180deg, #06111f 0%, #050c17 100%);
}

body[data-current-view="dashboard"] .topbar {
  min-height: 88px;
  padding: 20px 26px 10px;
  border-bottom-color: rgba(54, 86, 148, 0.45);
}

body[data-current-view="dashboard"] .topbar > div:first-child {
  max-width: 410px;
  min-width: 0;
}

body[data-current-view="dashboard"] .top-actions {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  white-space: nowrap;
}

body[data-current-view="dashboard"] .topbar h1 {
  font-size: 30px;
  line-height: 1.05;
}

body[data-current-view="dashboard"] .topbar p {
  margin-top: 8px;
  color: #b9c5d5;
}

.dashboard-root {
  gap: 0;
}

.ref-dashboard-shell {
  display: grid;
  gap: 14px;
  padding: 0 24px 24px;
}

.ref-dashboard-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 0;
  margin-top: 4px;
  padding-right: clamp(150px, 15vw, 250px);
  pointer-events: none;
  position: relative;
  transform: translateX(30px);
  z-index: 4;
}

.ref-dashboard-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

.ref-dashboard-date-field {
  display: grid;
  grid-template-columns: auto 138px 20px;
  align-items: center;
  height: 42px;
  border: 1px solid rgba(69, 94, 149, 0.74);
  border-radius: 6px;
  background: rgba(7, 15, 30, 0.86);
  color: #dce6f4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  cursor: pointer;
  overflow: hidden;
}

.ref-dashboard-date-field span {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 0 14px;
  border-right: 1px solid rgba(69, 94, 149, 0.44);
  color: #e5ecf7;
  font-size: 14px;
}

.ref-dashboard-date-input {
  width: 138px;
  height: 100%;
  border: 0;
  padding: 0 8px 0 12px;
  background: transparent;
  color: #f5f8ff;
  font-size: 15px;
  outline: 0;
  color-scheme: dark;
  cursor: pointer;
}

.ref-dashboard-date-input::-webkit-calendar-picker-indicator {
  opacity: 0;
}

.ref-dashboard-date-field i {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  background: #99a9c2;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.ref-query-button {
  height: 42px;
  min-width: 96px;
  border: 1px solid rgba(134, 101, 255, 0.72);
  border-radius: 6px;
  padding: 0 18px;
  background: linear-gradient(90deg, #7a32ef, #326cff);
  color: #fff;
  font-size: 15px;
  font-weight: 850;
  box-shadow: 0 0 22px rgba(95, 91, 255, 0.34);
  cursor: pointer;
}

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

.ref-kpi-card,
.ref-panel {
  border: 1px solid rgba(54, 84, 137, 0.82);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 4%, rgba(30, 125, 220, 0.13), transparent 38%),
    linear-gradient(180deg, rgba(9, 26, 49, 0.96), rgba(7, 17, 34, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 18px 42px rgba(0, 0, 0, 0.18);
}

.ref-kpi-card {
  min-height: 146px;
  position: relative;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  column-gap: 16px;
  align-items: start;
  padding: 22px 18px 14px;
  overflow: hidden;
}

.ref-kpi-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 28%, rgba(52, 199, 255, 0.36), transparent 54%),
    rgba(15, 66, 107, 0.86);
  box-shadow: inset 0 0 0 1px rgba(82, 180, 255, 0.15), 0 0 24px rgba(30, 157, 255, 0.2);
}

.ref-kpi-card.violet .ref-kpi-icon {
  background: radial-gradient(circle at 50% 30%, rgba(151, 86, 255, 0.42), transparent 55%), rgba(54, 35, 105, 0.86);
}

.ref-kpi-card.green .ref-kpi-icon {
  background: radial-gradient(circle at 50% 30%, rgba(108, 239, 132, 0.35), transparent 55%), rgba(25, 84, 58, 0.86);
}

.ref-kpi-icon::before {
  content: "";
  width: 38px;
  height: 38px;
  background: #35c8ff;
  filter: drop-shadow(0 0 10px rgba(53, 200, 255, 0.42));
  mask: var(--ref-icon) center / contain no-repeat;
  -webkit-mask: var(--ref-icon) center / contain no-repeat;
}

.ref-kpi-icon.user {
  --ref-icon: var(--ui-symbol-user);
}

.ref-kpi-icon.network {
  --ref-icon: var(--ui-symbol-network);
  background-color: #30205c;
}

.ref-kpi-icon.asset {
  --ref-icon: var(--ui-symbol-asset);
}

.ref-kpi-icon.image {
  --ref-icon: var(--ui-symbol-image);
}

.ref-kpi-card.violet .ref-kpi-icon::before {
  background: #9b6dff;
}

.ref-kpi-card.green .ref-kpi-icon::before {
  background: #82f48b;
}

.ref-kpi-copy h3 {
  margin: 0;
  color: #dce7f5;
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
}

.ref-kpi-copy strong {
  display: block;
  margin-top: 8px;
  color: #ffffff;
  font-size: 31px;
  line-height: 1;
  letter-spacing: 0;
}

.ref-kpi-copy p {
  margin: 9px 0 0;
  color: #c8d3e2;
  font-size: 14px;
}

.is-up {
  color: #71f17e !important;
}

.is-down {
  color: #ff665c !important;
}

.ref-kpi-spark {
  grid-column: 1 / -1;
  height: 32px;
  margin-top: 4px;
}

.ref-kpi-spark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ref-kpi-spark path {
  fill: none;
  stroke: #21cfff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 7px rgba(33, 207, 255, 0.48));
}

.ref-kpi-card.violet .ref-kpi-spark path {
  stroke: #9b6dff;
}

.ref-kpi-card.green .ref-kpi-spark path {
  stroke: #78ef7c;
}

.ref-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(470px, 1.48fr) minmax(300px, 0.94fr) minmax(390px, 1.2fr);
  gap: 12px;
}

.ref-panel {
  min-height: 276px;
  padding: 16px 16px 14px;
  overflow: hidden;
}

.ref-panel-head {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.ref-panel-head h3 {
  flex: 0 0 auto;
  margin: 0;
  color: #f4f8ff;
  font-size: 20px;
  line-height: 1.1;
}

.ref-trend-panel {
  grid-column: span 1;
}

.ref-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  justify-content: flex-end;
  color: #a5b4ca;
  font-size: 12px;
}

.ref-legend span::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 7px;
  border-radius: 2px;
  background: #4f8cff;
}

.ref-legend .asset::before {
  background: #8a60ff;
}

.ref-legend .output::before {
  background: #2bd6f2;
}

.ref-trend-chart {
  position: relative;
  height: 228px;
  overflow: hidden;
}

.ref-trend-chart svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ref-trend-grid line {
  stroke: rgba(98, 126, 180, 0.22);
  stroke-width: 1;
}

.ref-trend-axis text,
.ref-trend-label {
  fill: #9ba9bb;
  font-size: 12px;
}

.ref-trend-bar {
  rx: 2;
}

.ref-trend-bar.api {
  fill: url("#refTrendApi");
}

.ref-trend-bar.asset {
  fill: url("#refTrendAsset");
}

.ref-trend-line {
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ref-trend-line.api {
  stroke: #4f8cff;
  filter: drop-shadow(0 0 7px rgba(79, 140, 255, 0.42));
}

.ref-trend-line.asset {
  stroke: #9166ff;
  filter: drop-shadow(0 0 7px rgba(145, 102, 255, 0.36));
}

.ref-trend-line.output {
  stroke: #2bd6f2;
  filter: drop-shadow(0 0 7px rgba(43, 214, 242, 0.36));
}

.ref-trend-point {
  stroke: #07111f;
  stroke-width: 1.5;
}

.ref-trend-point.api {
  fill: #4f8cff;
}

.ref-trend-point.output {
  fill: #2bd6f2;
}

.ref-trend-tooltip {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 180px;
  border: 1px solid rgba(73, 101, 161, 0.78);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(8, 20, 39, 0.92);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.3);
  color: #dce7f5;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  visibility: hidden;
  z-index: 6;
}

.ref-trend-hover-layer {
  position: absolute;
  left: 44px;
  right: 44px;
  top: 22px;
  bottom: 34px;
  display: grid;
  z-index: 5;
}

.ref-trend-hover-cell {
  position: relative;
  min-width: 0;
}

.ref-trend-hover-cell:hover .ref-trend-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
}

.ref-trend-hover-cell:first-child .ref-trend-tooltip {
  left: 0;
  transform: translate(0, 6px);
}

.ref-trend-hover-cell:first-child:hover .ref-trend-tooltip {
  transform: translate(0, 0);
}

.ref-trend-hover-cell:last-child .ref-trend-tooltip {
  right: 0;
  left: auto;
  transform: translate(0, 6px);
}

.ref-trend-hover-cell:last-child:hover .ref-trend-tooltip {
  transform: translate(0, 0);
}

.ref-trend-tooltip b {
  display: block;
  margin-bottom: 8px;
}

.ref-trend-tooltip span {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  color: #b8c6d8;
  font-size: 12px;
  line-height: 1.8;
}

.ref-trend-tooltip i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #4f8cff;
}

.ref-trend-tooltip i.asset {
  background: #9166ff;
}

.ref-trend-tooltip i.output {
  background: #2bd6f2;
}

.ref-asset-core {
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.ref-donut {
  width: 158px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(7, 15, 29, 0.98) 0 52%, transparent 53%),
    conic-gradient(#4f8cff 0 42%, #8e66ff 42% 70%, #50dce2 70% 88%, #ffbd48 88% 96%, #f59b43 96% 100%);
  box-shadow: 0 0 28px rgba(55, 177, 230, 0.28);
}

.ref-donut strong {
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

.ref-donut span {
  margin-top: 5px;
  color: #b9c8dc;
  font-size: 13px;
}

.ref-asset-list {
  display: grid;
  gap: 13px;
}

.ref-asset-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px 66px;
  gap: 8px;
  align-items: center;
  color: #dfe8f6;
  font-size: 13px;
}

.ref-asset-row span {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  white-space: nowrap;
}

.ref-asset-row i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4f8cff;
}

.ref-asset-row.violet i {
  background: #8e66ff;
}

.ref-asset-row.cyan i {
  background: #50dce2;
}

.ref-asset-row.yellow i {
  background: #ffbd48;
}

.ref-asset-row.orange i {
  background: #f59b43;
}

.ref-asset-row b,
.ref-asset-row strong {
  color: #f2f7ff;
  text-align: right;
}

.ref-provider-table {
  display: grid;
  gap: 12px;
}

.ref-provider-head,
.ref-provider-row {
  display: grid;
  grid-template-columns: minmax(86px, 1fr) minmax(96px, 1fr) 64px 52px 82px;
  gap: 12px;
  align-items: center;
}

.ref-provider-head {
  color: #8797ad;
  font-size: 13px;
  text-align: center;
}

.ref-provider-row {
  min-height: 24px;
  color: #dde7f6;
  font-size: 14px;
  text-align: center;
}

.ref-provider-head span:first-child,
.ref-provider-row > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.ref-provider-row div {
  height: 6px;
  border-radius: 999px;
  background: rgba(77, 103, 145, 0.32);
  overflow: hidden;
}

.ref-provider-row i {
  display: block;
  width: calc(var(--level) * 1%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4f8cff, #7559ff);
}

.ref-provider-row.tone-1 i {
  background: linear-gradient(90deg, #8871ff, #7358d8);
}

.ref-provider-row.tone-2 i {
  background: linear-gradient(90deg, #4a96ff, #326cff);
}

.ref-provider-row.tone-3 i {
  background: linear-gradient(90deg, #f5a45b, #ffbd48);
}

.ref-provider-row.tone-4 i {
  background: linear-gradient(90deg, #7ee07c, #5fcc6b);
}

.ref-provider-row b,
.ref-provider-row em,
.ref-provider-row strong {
  font-style: normal;
  text-align: center;
}

.ref-provider-row strong em {
  font-style: normal;
}

.ref-user-panel {
  min-height: 360px;
}

.ref-user-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 14px;
}

.ref-user-tabs span {
  min-width: 82px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(63, 91, 149, 0.6);
  border-left-width: 0;
  color: #9eacc0;
  font-size: 12px;
}

.ref-user-tabs span:first-child {
  border-left-width: 1px;
  border-radius: 5px 0 0 5px;
}

.ref-user-tabs span:last-child {
  border-radius: 0 5px 5px 0;
}

.ref-user-tabs .active {
  background: linear-gradient(90deg, #274ed0, #6048e6);
  color: #fff;
}

.ref-user-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ref-user-card {
  position: relative;
  min-height: 168px;
  border: 1px solid rgba(71, 101, 160, 0.68);
  border-radius: 8px;
  padding: 28px 12px 10px;
  background: linear-gradient(180deg, rgba(24, 45, 77, 0.9), rgba(10, 21, 39, 0.94));
  text-align: center;
}

.ref-user-card > i {
  position: absolute;
  top: -18px;
  left: 50%;
  width: 42px;
  height: 32px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #ffd05f, #ff9d35);
  filter: drop-shadow(0 4px 8px rgba(255, 170, 50, 0.25));
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 44'%3E%3Cpath fill='black' d='M7 39h50l4-25-15 9L32 4 18 23 3 14zM10 42h44v2H10z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 44'%3E%3Cpath fill='black' d='M7 39h50l4-25-15 9L32 4 18 23 3 14zM10 42h44v2H10z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.ref-user-card.rank-2 > i {
  background: linear-gradient(180deg, #dbe5f7, #8fa4c6);
}

.ref-user-card.rank-3 > i {
  background: linear-gradient(180deg, #ffb177, #d8793e);
}

.ref-user-avatar {
  width: 36px;
  height: 36px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 34%, #62c9ff 0 6px, transparent 7px),
    radial-gradient(circle at 50% 78%, #4f8cff 0 12px, transparent 13px),
    #163762;
}

.ref-user-card strong,
.ref-user-card b,
.ref-user-card span {
  display: block;
}

.ref-user-card strong {
  color: #fff;
  font-size: 13px;
}

.ref-user-card b {
  margin-top: 7px;
  color: #fff;
  font-size: 20px;
}

.ref-user-card span,
.ref-user-card p,
.ref-user-card em {
  color: #97a9bf;
  font-size: 12px;
  font-style: normal;
}

.ref-user-card p {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 12px 0 0;
}

.ref-user-rank-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.ref-user-rank-list div {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 70px 100px 64px;
  gap: 8px;
  align-items: center;
  color: #dce7f5;
  font-size: 13px;
}

.ref-video-panel {
  min-height: 360px;
}

.ref-video-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(86, 110, 153, 0.28);
}

.ref-video-step {
  position: relative;
  text-align: center;
}

.ref-video-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 17px;
  left: calc(50% + 24px);
  width: calc(100% - 38px);
  height: 1px;
  background: linear-gradient(90deg, #89a8ff, transparent);
}

.ref-video-step i {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: rgba(31, 55, 100, 0.95);
  border: 1px solid rgba(92, 129, 205, 0.68);
}

.ref-video-step i::before {
  content: "";
  width: 18px;
  height: 18px;
  background: #9ab8ff;
  mask: var(--ui-symbol-video) center / contain no-repeat;
  -webkit-mask: var(--ui-symbol-video) center / contain no-repeat;
}

.ref-video-step.sync i::before,
.ref-video-step.render i::before {
  mask-image: var(--ui-symbol-refresh);
  -webkit-mask-image: var(--ui-symbol-refresh);
}

.ref-video-step.check i::before {
  background: #7bef82;
  mask-image: var(--ui-symbol-shield);
  -webkit-mask-image: var(--ui-symbol-shield);
}

.ref-video-step.error i::before {
  background: #ff695f;
  mask-image: var(--ui-symbol-warning);
  -webkit-mask-image: var(--ui-symbol-warning);
}

.ref-video-step span,
.ref-video-step em {
  display: block;
  color: #9eadc2;
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.ref-video-step strong {
  display: block;
  margin: 8px 0 3px;
  color: #fff;
  font-size: 20px;
}

.ref-video-dials {
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, 1fr));
  gap: 10px;
  align-items: start;
  margin-top: 16px;
}

.ref-video-dial {
  box-sizing: border-box;
  width: min(96px, 100%);
  aspect-ratio: 1;
  justify-self: center;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  padding: 8px;
  background:
    radial-gradient(circle, rgba(8, 18, 34, 1) 0 58%, transparent 59%),
    conic-gradient(#49dcec 0 calc(var(--level) * 1%), rgba(52, 78, 125, 0.8) 0 100%);
}

.ref-video-dial span,
.ref-video-dial em {
  color: #9eadc2;
  font-size: 11px;
  font-style: normal;
  line-height: 1.15;
  max-width: 74px;
  text-align: center;
}

.ref-video-dial strong {
  color: #fff;
  font-size: 16px;
  line-height: 1.35;
  max-width: 74px;
  text-align: center;
}

.ref-account-panel {
  grid-column: span 1;
  min-height: 360px;
}

.ref-account-table {
  display: grid;
  gap: 0;
}

.ref-account-row {
  display: grid;
  grid-template-columns: minmax(88px, 1fr) 82px 76px 84px 92px 98px 70px;
  gap: 8px;
  align-items: center;
  min-height: 32px;
  border-bottom: 1px solid rgba(83, 109, 153, 0.28);
  color: #dce7f5;
  font-size: 13px;
}

.ref-account-row.head {
  min-height: 28px;
  color: #8f9fb4;
  font-size: 12px;
}

.ref-account-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ref-account-row i {
  display: inline-grid;
  place-items: center;
  min-width: 54px;
  height: 24px;
  border-radius: 999px;
  font-style: normal;
}

.ref-account-row i.enabled {
  background: rgba(82, 238, 108, 0.16);
  color: #75ef82;
}

.ref-account-row i.disabled {
  background: rgba(255, 94, 86, 0.15);
  color: #ff6f65;
}

.ref-link-button {
  margin-top: 12px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #5d8dff;
  font-weight: 850;
  cursor: pointer;
}

.ref-link-button::after {
  content: ">";
  margin-left: 8px;
}

@media (max-width: 1500px) {
  .ref-dashboard-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.85fr);
  }

  .ref-kpi-card {
    grid-template-columns: 58px minmax(0, 1fr);
    column-gap: 14px;
    padding-inline: 16px;
  }

  .ref-kpi-icon {
    width: 56px;
    height: 56px;
  }

  .ref-kpi-copy strong {
    font-size: 28px;
  }

  .ref-asset-core {
    grid-template-columns: 142px minmax(0, 1fr);
    gap: 14px;
  }

  .ref-donut {
    width: 138px;
  }

  .ref-asset-row {
    grid-template-columns: minmax(44px, 1fr) 48px 50px;
    gap: 6px;
    font-size: 12px;
  }

  .ref-video-flow {
    gap: 6px;
  }

  .ref-video-step strong {
    font-size: 18px;
  }

  .ref-video-step span,
  .ref-video-step em {
    font-size: 11px;
  }

  .ref-video-dial {
    width: 76px;
    height: 76px;
    padding: 6px;
  }

  .ref-video-dial span,
  .ref-video-dial em {
    font-size: 10px;
    max-width: 62px;
  }

  .ref-video-dial strong {
    font-size: 15px;
    max-width: 62px;
  }

  .ref-provider-panel,
  .ref-account-panel {
    grid-column: span 2;
  }

  .ref-dashboard-topline {
    padding-right: clamp(120px, 12vw, 190px);
  }
}

@media (max-width: 980px) {
  .ref-dashboard-shell {
    padding: 0 14px 18px;
  }

  .ref-dashboard-topline,
  .ref-kpi-grid,
  .ref-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .ref-dashboard-topline {
    margin-top: 0;
    padding-right: 0;
    transform: none;
  }

  .ref-dashboard-controls,
  .ref-legend,
  .ref-video-flow,
  .ref-video-dials,
  .ref-user-podium {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .ref-provider-panel,
  .ref-account-panel {
    grid-column: auto;
  }

  .ref-account-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: auto;
    padding: 8px 0;
  }
}

/* Storyboard asset reference UI. */
body[data-current-view="storyboard"] .content {
  background:
    radial-gradient(circle at 58% 0%, rgba(66, 93, 214, 0.18), transparent 34%),
    linear-gradient(180deg, #06101f 0%, #050b16 100%);
}

.storyboard-page {
  display: grid;
  gap: 14px;
}

.storyboard-page-head {
  display: grid;
  gap: 4px;
}

.storyboard-page-head h1 {
  margin: 0;
  color: #f4f8ff;
  font-size: 30px;
  line-height: 1.12;
}

.storyboard-page-head p {
  margin: 0;
  color: #b8c6da;
  line-height: 1.5;
}

.storyboard-layout {
  grid-template-columns: minmax(620px, 1.04fr) minmax(520px, 0.96fr);
  gap: 12px;
}

.storyboard-input-panel,
.storyboard-output-panel {
  border-radius: 8px;
  border-color: rgba(60, 89, 151, 0.74);
  background:
    linear-gradient(180deg, rgba(11, 25, 50, 0.96), rgba(5, 13, 28, 0.97)),
    #071224;
  box-shadow: inset 0 1px 0 rgba(142, 172, 255, 0.06), 0 18px 50px rgba(0, 0, 0, 0.22);
}

.storyboard-output-panel {
  padding: 0;
  overflow: hidden;
}

.storyboard-compose {
  display: grid;
  gap: 10px;
}

.storyboard-panel-title,
.storyboard-tab,
.storyboard-output-title,
.storyboard-card-head,
.storyboard-list-head,
.storyboard-shot-title {
  display: flex;
  align-items: center;
}

.storyboard-panel-title {
  gap: 10px;
  color: #f4f8ff;
  font-size: 18px;
  font-weight: 900;
}

.storyboard-title-icon,
.storyboard-tab-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: #56a7ff;
}

.storyboard-chapter-select {
  width: min(260px, 100%);
  min-height: 36px;
  border-radius: 7px;
  border-color: rgba(72, 103, 166, 0.72);
  background: rgba(5, 13, 29, 0.88);
}

.storyboard-script-box {
  position: relative;
}

.storyboard-script-box .chapter-input {
  min-height: 166px;
  max-height: 260px;
  padding-bottom: 30px;
  border-radius: 7px;
  border-color: rgba(72, 103, 166, 0.72);
  background: rgba(5, 13, 29, 0.82);
}

.storyboard-script-box .char-counter {
  position: absolute;
  right: 14px;
  bottom: 12px;
}

.storyboard-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, auto);
  gap: 14px;
  align-items: end;
}

.storyboard-target {
  display: grid;
  gap: 8px;
}

.storyboard-target .option-grid {
  gap: 7px;
}

.storyboard-target .choice {
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 6px;
  color: #a9bad2;
  background: rgba(7, 17, 36, 0.86);
  font-size: 12px;
}

.storyboard-target .choice.selected {
  border-color: #8b54ff;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(126, 77, 255, 0.34), rgba(20, 78, 180, 0.18));
  box-shadow: none;
}

.storyboard-actions {
  display: grid;
  grid-template-columns: 150px 150px;
  gap: 10px;
}

.storyboard-actions .primary-button,
.storyboard-actions .ghost-button {
  min-height: 70px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 900;
}

.storyboard-actions .primary-button,
.storyboard-output-body .primary-button {
  background: linear-gradient(135deg, #a637ff 0%, #217cff 100%);
}

.storyboard-summary,
.storyboard-progress {
  color: #8fa4c3;
  font-size: 12px;
  line-height: 1.5;
}

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

.storyboard-diagnostic-card {
  display: grid;
  gap: 10px;
  min-height: 130px;
  border: 1px solid rgba(60, 89, 151, 0.72);
  border-radius: 8px;
  padding: 14px;
  background: rgba(7, 17, 36, 0.72);
}

.storyboard-card-head {
  justify-content: space-between;
  gap: 12px;
}

.storyboard-card-head h3,
.storyboard-list-head h3 {
  margin: 0;
  color: #f4f8ff;
  font-size: 16px;
}

.storyboard-diagnostic-card p {
  margin: 0;
  color: #aebed3;
  line-height: 1.55;
  font-size: 13px;
}

.storyboard-badge {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 900;
}

.storyboard-badge.good {
  color: #69ef9f;
  background: rgba(61, 225, 143, 0.14);
}

.storyboard-badge.warn {
  color: #ffb55a;
  background: rgba(255, 160, 54, 0.14);
}

.storyboard-gap-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.storyboard-gap-group {
  display: grid;
  gap: 7px;
}

.storyboard-gap-group > strong {
  color: #e8f1ff;
  font-size: 13px;
}

.storyboard-gap-list span {
  border: 1px solid rgba(74, 103, 167, 0.7);
  border-radius: 6px;
  padding: 4px 8px;
  color: #c8d7ee;
  background: rgba(10, 25, 54, 0.82);
  font-size: 12px;
}

.storyboard-shot-panel {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(60, 89, 151, 0.72);
  border-radius: 8px;
  padding: 12px;
  background: rgba(7, 17, 36, 0.64);
}

.storyboard-list-head {
  justify-content: space-between;
}

.storyboard-list-head span {
  margin-left: 6px;
  color: #8fa4c3;
  font-size: 13px;
  font-weight: 700;
}

.storyboard-filter-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.4fr) repeat(4, minmax(92px, 0.8fr)) 70px;
  gap: 8px;
}

.storyboard-filter-row .input,
.storyboard-filter-row select,
.storyboard-filter-row .mini-button {
  min-height: 34px;
  border-radius: 6px;
  font-size: 12px;
}

.storyboard-shot-list {
  display: grid;
  gap: 8px;
  max-height: 560px;
  overflow: auto;
  padding-right: 4px;
}

.storyboard-shot-list.segment-list {
  max-height: 640px;
}

.storyboard-shot-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(170px, 0.78fr) 72px;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 8px 0;
  color: #c7d7e4;
  cursor: pointer;
}

.storyboard-shot-row.expanded {
  grid-template-columns: 44px minmax(0, 1fr) minmax(170px, 0.78fr) 72px;
}

.storyboard-shot-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(74, 103, 167, 0.74);
  border-radius: 6px;
  color: #f4f8ff;
  background: rgba(8, 17, 35, 0.92);
  font-size: 18px;
  font-weight: 700;
}

.storyboard-shot-main,
.storyboard-shot-meta {
  min-width: 0;
}

.storyboard-shot-title {
  gap: 10px;
  margin-bottom: 4px;
}

.storyboard-shot-title strong {
  color: #f4f8ff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storyboard-shot-title span {
  border-radius: 999px;
  padding: 3px 8px;
  color: #aebed3;
  background: rgba(84, 112, 166, 0.22);
  font-size: 12px;
  white-space: nowrap;
}

.storyboard-shot-main p,
.storyboard-shot-meta span {
  margin: 0;
  color: #9fb1ca;
  font-size: 12px;
  line-height: 1.45;
}

.storyboard-shot-main p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storyboard-shot-meta {
  display: grid;
  gap: 2px;
}

.storyboard-shot-row .mini-button {
  border-color: rgba(139, 87, 255, 0.65);
  color: #ffffff;
  background: rgba(86, 49, 165, 0.34);
}

.storyboard-segment-shots {
  display: grid;
  gap: 6px;
  padding: 6px 0 8px 44px;
}

.storyboard-shot-row.nested {
  grid-template-columns: 44px minmax(0, 1fr) minmax(160px, 0.5fr);
  padding: 7px 0;
  border-bottom-color: rgba(255, 255, 255, 0.045);
}

.storyboard-shot-detail {
  grid-column: 2 / 5;
  border: 1px solid rgba(74, 103, 167, 0.5);
  border-radius: 7px;
  padding: 10px;
  color: #b8c6da;
  background: rgba(4, 12, 26, 0.82);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.storyboard-tabbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid rgba(60, 89, 151, 0.74);
}

.storyboard-tab {
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  border: 0;
  border-right: 1px solid rgba(60, 89, 151, 0.5);
  color: #dbe7ff;
  background: rgba(5, 13, 29, 0.58);
  font-weight: 900;
}

.storyboard-tab:last-child {
  border-right: 0;
}

.storyboard-tab.is-active {
  border-bottom: 2px solid #8b54ff;
  background: linear-gradient(135deg, rgba(93, 74, 198, 0.35), rgba(7, 17, 36, 0.66));
}

.storyboard-output-body {
  display: grid;
  gap: 18px;
  padding: 28px 20px 22px;
}

.storyboard-output-pane {
  display: grid;
  gap: 18px;
}

.storyboard-output-pane[hidden] {
  display: none;
}

.storyboard-output-title {
  justify-content: space-between;
  gap: 12px;
}

.storyboard-output-title h2 {
  margin: 0;
  color: #f4f8ff;
  font-size: 18px;
}

.storyboard-output-title p {
  margin: 10px 0 0;
  color: #8fa4c3;
  line-height: 1.5;
  font-size: 13px;
}

.storyboard-prompt-block {
  position: relative;
  margin-bottom: 0;
}

.storyboard-prompt-block textarea {
  min-height: 312px;
  padding: 16px 16px 34px;
  border-radius: 8px;
  border-color: rgba(72, 103, 166, 0.72);
  background: rgba(5, 13, 29, 0.82);
  line-height: 1.75;
}

.storyboard-negative-block textarea {
  min-height: 110px;
}

.storyboard-counter {
  position: absolute;
  right: 14px;
  bottom: 12px;
  color: #8fa4c3;
  font-size: 12px;
}

.storyboard-info-body,
.storyboard-diagnosis-body {
  display: grid;
  gap: 12px;
}

.storyboard-info-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(72, 103, 166, 0.62);
  border-radius: 8px;
  padding: 13px;
  background: rgba(5, 13, 29, 0.78);
}

.storyboard-info-card h3 {
  margin: 0;
  color: #f4f8ff;
  font-size: 16px;
}

.storyboard-info-card p {
  margin: 0;
  color: #aebed3;
  line-height: 1.6;
  font-size: 13px;
}

.storyboard-info-card > strong {
  color: #f4f8ff;
}

.storyboard-info-grid {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px 12px;
}

.storyboard-info-grid span {
  color: #8fa4c3;
  font-size: 12px;
}

.storyboard-info-grid strong {
  min-width: 0;
  color: #dbe7ff;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.storyboard-diagnosis-modal {
  width: min(720px, 100%);
}

@media (max-width: 1360px) {
  .storyboard-layout {
    grid-template-columns: 1fr;
  }

  .storyboard-output-panel {
    position: relative;
    top: auto;
  }
}

@media (max-width: 820px) {
  .storyboard-controls,
  .storyboard-diagnostics,
  .storyboard-filter-row,
  .storyboard-shot-row,
  .storyboard-shot-row.expanded {
    grid-template-columns: 1fr;
  }

  .storyboard-actions {
    grid-template-columns: 1fr;
  }

  .storyboard-shot-detail {
    grid-column: auto;
  }
}

/* Image generation final reference alignment. */
body[data-current-view="image"] .image-generation-layout {
  grid-template-columns: minmax(620px, 0.92fr) minmax(650px, 1.08fr);
}

body[data-current-view="image"] .image-results-panel {
  min-height: 830px;
}

body[data-current-view="image"] .image-prompt-field textarea {
  height: 150px;
  min-height: 150px;
  max-height: 210px;
  resize: vertical;
}

body[data-current-view="image"] .image-result-grid {
  gap: 14px;
}

@media (max-width: 1320px) {
  body[data-current-view="image"] .image-generation-layout {
    grid-template-columns: 1fr;
  }
}

/* Final image page alignment overrides kept at the end to win older module styles. */
body[data-current-view="image"] .image-generation-layout {
  grid-template-columns: minmax(620px, 0.92fr) minmax(650px, 1.08fr);
}

body[data-current-view="image"] .image-results-panel {
  min-height: 830px;
}

body[data-current-view="image"] .image-prompt-field textarea {
  height: 150px;
  min-height: 150px;
  max-height: 210px;
  resize: vertical;
}

body[data-current-view="image"] .image-result-grid {
  gap: 14px;
}

@media (max-width: 1320px) {
  body[data-current-view="image"] .image-generation-layout {
    grid-template-columns: 1fr;
  }
}

/* Final image page alignment overrides kept at the end to win older module styles. */
body[data-current-view="image"] .image-generation-layout {
  grid-template-columns: minmax(620px, 0.92fr) minmax(650px, 1.08fr);
}

body[data-current-view="image"] .image-results-panel {
  min-height: 830px;
}

body[data-current-view="image"] .image-prompt-field textarea {
  height: 150px;
  min-height: 150px;
  max-height: 210px;
  resize: vertical;
}

body[data-current-view="image"] .image-result-grid {
  gap: 14px;
}

@media (max-width: 1320px) {
  body[data-current-view="image"] .image-generation-layout {
    grid-template-columns: 1fr;
  }
}

/* 2026 reference refinements: provider observability, dashboard matrix, and image generation. */
.provider-center-layout {
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 430px);
}

.provider-center-grid {
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
}

.provider-log-table {
  overflow-x: auto;
}

.provider-log-head,
.provider-log-row {
  grid-template-columns: minmax(76px, 0.8fr) minmax(110px, 1.25fr) minmax(78px, 0.9fr) minmax(56px, 0.62fr) minmax(58px, 0.62fr);
}

.provider-log-row strong,
.provider-log-row span {
  min-width: 0;
}

.asset-core-donut {
  background:
    radial-gradient(circle, rgba(7, 13, 24, 0.98) 0 48%, transparent 49%),
    conic-gradient(
      #4e8cff 0 var(--character),
      #54d7e8 var(--character) calc(var(--character) + var(--scene)),
      #ffb547 calc(var(--character) + var(--scene)) 100%
    );
}

.asset-core-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, #78f0ff, #7d62ff 48%, #ffb547);
  mask: linear-gradient(#000 0 0) center / 100% 100%;
  box-shadow: 0 0 22px rgba(101, 212, 255, 0.32);
}

.asset-core-donut strong {
  font-size: 22px;
}

.asset-type-dot.scene {
  background: #54d7e8;
}

.asset-type-dot.prop {
  background: #ffb547;
}

.registry-table {
  gap: 0;
  overflow-x: auto;
}

.registry-row {
  display: grid;
  grid-template-columns: minmax(96px, 1.2fr) minmax(76px, 0.82fr) repeat(4, minmax(70px, 0.72fr)) minmax(72px, 0.72fr);
  align-items: center;
  gap: 10px;
  min-width: 720px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.registry-row.registry-head {
  color: #8fa4c3;
  font-size: 12px;
}

.registry-row span {
  color: #f4f8ff;
  font-weight: 760;
}

.registry-row b {
  color: #d9e5f8;
  font-size: 13px;
}

.registry-row em {
  justify-self: start;
  border-radius: 999px;
  padding: 3px 9px;
  background: rgba(85, 238, 154, 0.12);
  color: #65ef9d;
  font-style: normal;
  font-size: 12px;
  white-space: nowrap;
}

.registry-row em.is-locked {
  background: rgba(255, 83, 83, 0.14);
  color: #ff7474;
}

.image-generation-layout {
  grid-template-columns: minmax(430px, 0.92fr) minmax(560px, 1.14fr);
  align-items: start;
}

.image-generation-panel,
.image-results-panel {
  border-radius: 8px;
  border-color: rgba(70, 103, 181, 0.5);
  background:
    linear-gradient(180deg, rgba(12, 27, 55, 0.92), rgba(7, 15, 31, 0.9)),
    rgba(10, 17, 31, 0.88);
}

.image-generation-panel .form-grid {
  gap: 14px;
}

.image-provider-grid {
  grid-template-columns: repeat(5, minmax(78px, 1fr));
}

.image-generation-panel .provider-card {
  min-height: 96px;
  border-radius: 8px;
  border-color: rgba(70, 103, 181, 0.5);
  background:
    radial-gradient(circle at 50% 18%, rgba(77, 140, 255, 0.16), transparent 54%),
    rgba(9, 20, 42, 0.86);
}

.image-generation-panel .provider-card.selected {
  border-color: rgba(139, 87, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(139, 87, 255, 0.4), 0 0 22px rgba(123, 76, 255, 0.2);
}

.selected-image-asset {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  border: 1px solid rgba(77, 103, 166, 0.58);
  border-radius: 8px;
  padding: 8px;
  background: rgba(5, 13, 29, 0.72);
}

.selected-image-asset.is-empty {
  grid-template-columns: 46px minmax(0, 1fr);
}

.selected-image-asset strong,
.selected-image-asset span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-image-asset strong {
  color: #f4f8ff;
}

.selected-image-asset span {
  color: #8fa4c3;
  font-size: 12px;
}

.selected-image-asset em {
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(85, 238, 154, 0.12);
  color: #65ef9d;
  font-style: normal;
  font-size: 12px;
}

.image-asset-icon {
  width: 46px;
  height: 46px;
  border-radius: 9px;
  background:
    radial-gradient(circle at 50% 35%, rgba(122, 249, 238, 0.4), transparent 44%),
    linear-gradient(135deg, #2e78ff, #7d49ff);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 10px 24px rgba(36, 103, 255, 0.18);
}

.image-asset-icon.scene {
  background: linear-gradient(135deg, #28c6ff, #326cff);
}

.image-asset-icon.prop {
  background: linear-gradient(135deg, #54e39a, #ffb547);
}

.reference-panel {
  border-radius: 8px;
}

.reference-chip {
  border-radius: 8px;
}

.reference-chip img {
  border-radius: 6px;
}

.image-prompt-field textarea {
  min-height: 150px;
}

.image-generation-panel .primary-button {
  width: min(260px, 100%);
  min-height: 46px;
}

.image-result-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(74, 103, 167, 0.48);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(16, 31, 61, 0.72);
  color: #9fb1ca;
}

.image-result-banner span {
  color: #7ee7ad;
  font-weight: 900;
}

.image-result-banner strong {
  color: #eaf2ff;
}

.image-result-banner em {
  color: #8fa4c3;
  font-style: normal;
}

.image-result-banner.is-failed span {
  color: #ff6565;
}

.image-result-banner.is-running span {
  color: #69d8ff;
}

.image-result-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.image-result-card-grid .image-card {
  position: relative;
  border-radius: 8px;
  border-color: rgba(74, 103, 167, 0.54);
  background: rgba(7, 17, 36, 0.82);
}

.image-card-index {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(4, 9, 20, 0.82);
  color: #ffffff;
  font-weight: 900;
}

.image-result-card-grid .image-card img {
  aspect-ratio: 16 / 9;
  max-height: none;
  object-fit: cover;
}

.image-result-card-grid .image-edit-instruction {
  min-height: 48px;
}

.image-result-card-grid .item-actions {
  display: grid;
  grid-template-columns: repeat(6, minmax(34px, 1fr));
}

@media (max-width: 1180px) {
  .image-generation-layout {
    grid-template-columns: 1fr;
  }

  .image-result-card-grid {
    grid-template-columns: 1fr;
  }
}

/* Image generation reference-match pass. */
body[data-current-view="image"] .content {
  background:
    radial-gradient(circle at 42% 0%, rgba(52, 102, 210, 0.16), transparent 36%),
    linear-gradient(180deg, #06101f 0%, #050b16 100%);
}

body[data-current-view="image"] .image-generation-layout {
  grid-template-columns: minmax(560px, 632px) minmax(650px, 1fr);
  gap: 16px;
}

body[data-current-view="image"] .image-generation-panel,
body[data-current-view="image"] .image-results-panel {
  border: 1px solid rgba(60, 89, 151, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(11, 25, 50, 0.96), rgba(5, 13, 28, 0.96)),
    #071224;
  box-shadow: inset 0 1px 0 rgba(142, 172, 255, 0.06), 0 18px 50px rgba(0, 0, 0, 0.22);
}

body[data-current-view="image"] .image-generation-panel {
  padding: 16px 18px;
}

body[data-current-view="image"] .image-results-panel {
  padding: 16px;
}

body[data-current-view="image"] .image-generation-panel > .section-header,
body[data-current-view="image"] .image-results-panel > .section-header {
  margin-bottom: 14px;
  align-items: center;
}

body[data-current-view="image"] .image-generation-panel > .section-header h2,
body[data-current-view="image"] .image-results-panel > .section-header h2 {
  font-size: 18px;
  line-height: 1.2;
}

body[data-current-view="image"] .image-generation-panel > .section-header p,
body[data-current-view="image"] .image-results-panel > .section-header p,
body[data-current-view="image"] .image-results-panel > .info-box,
body[data-current-view="image"] .image-generation-panel .field-hint {
  display: none;
}

body[data-current-view="image"] .image-generation-panel .form-grid {
  gap: 13px;
}

body[data-current-view="image"] .field-label,
body[data-current-view="image"] .field > span {
  color: #edf5ff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

body[data-current-view="image"] .image-provider-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

body[data-current-view="image"] .image-generation-panel .provider-card {
  min-height: 90px;
  padding: 12px 8px;
  border-radius: 8px;
  border-color: rgba(68, 96, 153, 0.66);
  background:
    radial-gradient(circle at 50% 15%, rgba(61, 133, 255, 0.16), transparent 48%),
    rgba(6, 17, 36, 0.9);
}

body[data-current-view="image"] .image-generation-panel .provider-card.selected {
  border-color: #8b54ff;
  background:
    radial-gradient(circle at 50% 15%, rgba(124, 86, 255, 0.22), transparent 52%),
    rgba(10, 21, 44, 0.96);
  box-shadow: 0 0 0 1px rgba(138, 83, 255, 0.45), 0 0 24px rgba(112, 80, 255, 0.2);
}

body[data-current-view="image"] .image-generation-panel .provider-card .provider-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 8px;
}

body[data-current-view="image"] .image-generation-panel .provider-card strong {
  color: #f4f8ff;
  font-size: 13px;
  line-height: 1.2;
}

body[data-current-view="image"] .image-generation-panel .provider-card small,
body[data-current-view="image"] .image-generation-panel .provider-card .provider-card-status {
  display: none;
}

body[data-current-view="image"] .image-input,
body[data-current-view="image"] .input {
  min-height: 42px;
  border-color: rgba(72, 103, 166, 0.72);
  border-radius: 7px;
  background: rgba(5, 13, 29, 0.82);
}

body[data-current-view="image"] .choice-row {
  gap: 8px;
}

body[data-current-view="image"] .choice-row button,
body[data-current-view="image"] .asset-type-picker button {
  min-height: 40px;
  border-radius: 7px;
  border-color: rgba(72, 103, 166, 0.72);
  background: rgba(7, 17, 36, 0.85);
}

body[data-current-view="image"] .choice-row button.active,
body[data-current-view="image"] .asset-type-picker button.active {
  border-color: #8b54ff;
  background: linear-gradient(135deg, rgba(126, 77, 255, 0.24), rgba(20, 78, 180, 0.16));
}

body[data-current-view="image"] .selected-image-asset {
  min-height: 56px;
  border-radius: 7px;
}

body[data-current-view="image"] .reference-panel {
  padding: 0;
  border: 0;
  background: transparent;
}

body[data-current-view="image"] .reference-upload-row {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 10px;
}

body[data-current-view="image"] .reference-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

body[data-current-view="image"] .reference-chip {
  position: relative;
  display: block;
  min-height: 74px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(72, 103, 166, 0.72);
  background: rgba(7, 17, 36, 0.85);
}

body[data-current-view="image"] .reference-chip img {
  width: 100%;
  height: 74px;
  object-fit: cover;
}

body[data-current-view="image"] .reference-chip span {
  display: none;
}

body[data-current-view="image"] .reference-chip button {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border-radius: 999px;
  font-size: 0;
}

body[data-current-view="image"] .reference-chip button::before {
  content: "x";
  font-size: 13px;
}

body[data-current-view="image"] .generation-options {
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.55fr);
  align-items: end;
}

body[data-current-view="image"] .generation-options.single-note {
  display: block;
}

body[data-current-view="image"] .image-option-select,
body[data-current-view="image"] .generation-options .image-select-like {
  width: 100%;
  height: 40px;
  min-height: 40px;
  border-radius: 7px;
  border: 1px solid rgba(78, 117, 188, 0.58);
  background: rgba(4, 15, 33, 0.92);
  color: #e7f0ff;
  font-size: 14px;
}

body[data-current-view="image"] .image-option-select {
  padding: 0 36px 0 12px;
}

body[data-current-view="image"] .generation-options .image-select-like {
  display: flex;
  align-items: center;
  padding: 0 12px;
}

body[data-current-view="image"] .generation-options .image-select-like.muted {
  color: #8797b2;
}

body[data-current-view="image"] .image-prompt-field textarea {
  min-height: 128px;
  border-radius: 7px;
  line-height: 1.65;
}

body[data-current-view="image"] .button-row {
  display: grid;
  grid-template-columns: minmax(220px, 252px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

body[data-current-view="image"] .image-generation-panel .primary-button {
  width: 252px;
  height: 48px;
  border-radius: 7px;
  background: linear-gradient(135deg, #a637ff 0%, #217cff 100%);
  font-size: 16px;
  font-weight: 900;
}

body[data-current-view="image"] .image-result-banner {
  min-height: 42px;
  margin-bottom: 14px;
  border-color: rgba(54, 118, 107, 0.5);
  background: linear-gradient(90deg, rgba(18, 86, 65, 0.38), rgba(13, 32, 53, 0.74));
  grid-template-columns: auto minmax(0, 1fr) auto auto;
}

body[data-current-view="image"] .image-result-banner.is-failed {
  border-color: rgba(255, 91, 91, 0.38);
  background: linear-gradient(90deg, rgba(78, 22, 31, 0.6), rgba(22, 23, 43, 0.82));
}

body[data-current-view="image"] .image-result-card-grid {
  gap: 14px;
}

body[data-current-view="image"] .image-result-card-grid .image-card {
  border-radius: 8px;
  overflow: hidden;
  border-color: rgba(72, 103, 166, 0.72);
  background: rgba(6, 16, 34, 0.92);
}

body[data-current-view="image"] .image-preview-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

body[data-current-view="image"] .image-preview-button:focus-visible {
  outline: 2px solid rgba(105, 145, 255, 0.88);
  outline-offset: -2px;
}

body[data-current-view="image"] .image-result-card-grid .image-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0;
}

body[data-current-view="image"] .image-card-body {
  padding: 10px 12px 12px;
}

body[data-current-view="image"] .image-result-card-grid .item-title {
  display: none;
}

body[data-current-view="image"] .image-result-card-grid .item-meta {
  color: #b9c7de;
}

body[data-current-view="image"] .image-result-card-grid .compact-field {
  display: none;
}

body[data-current-view="image"] .image-result-card-grid .item-actions {
  display: grid;
  grid-template-columns: repeat(6, 42px);
  gap: 8px;
  margin-top: 10px;
}

body[data-current-view="image"] .image-result-card-grid .item-actions .mini-button,
body[data-current-view="image"] .image-result-card-grid .item-actions .link-button {
  width: 42px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 7px;
  font-size: 0;
}

body[data-current-view="image"] .image-result-card-grid .item-actions .link-button {
  display: none;
}

body[data-current-view="image"] [data-copy-text]::before { content: "□"; font-size: 20px; }
body[data-current-view="image"] [data-edit-image-result]::before { content: "✧"; font-size: 19px; }
body[data-current-view="image"] [data-use-image-as-reference]::before { content: "▧"; font-size: 19px; }
body[data-current-view="image"] [data-save-image-result]::before { content: "▣"; font-size: 19px; }
body[data-current-view="image"] [data-download-image]::before { content: "↓"; font-size: 20px; }
body[data-current-view="image"] [data-delete-type="imageResult"]::before { content: "⌫"; font-size: 19px; color: #ff5555; }

@media (max-width: 1280px) {
  body[data-current-view="image"] .image-generation-layout {
    grid-template-columns: 1fr;
  }
}

/* Reference-tight overrides for provider center and dashboard. */
.provider-center-layout {
  grid-template-columns: minmax(0, 1fr) minmax(350px, 386px);
}

.provider-center-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.provider-center-lower-grid .provider-center-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.provider-center-card {
  min-height: 214px;
  padding: 11px;
}

.provider-center-card-head {
  gap: 9px;
}

.provider-center-card .provider-center-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.provider-center-card .provider-center-title {
  overflow: hidden;
  max-width: 118px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-center-card .provider-center-meta {
  overflow: hidden;
  max-width: 132px;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-center-card .provider-center-status {
  padding: 4px 7px;
  font-size: 11px;
  white-space: nowrap;
}

.provider-service-specs {
  gap: 5px;
}

.provider-service-specs div {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 7px;
  align-items: baseline;
}

.provider-service-specs span {
  color: #8b9bb2;
  font-size: 11px;
  white-space: nowrap;
}

.provider-service-specs strong {
  overflow: hidden;
  color: #dce8fb;
  font-size: 11px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-center-card .provider-center-chips {
  min-height: 22px;
  overflow: hidden;
}

.provider-center-card .provider-center-chip {
  border-color: rgba(78, 140, 255, 0.24);
  background: rgba(31, 65, 127, 0.28);
  color: #8ff0b3;
  font-size: 10px;
}

.provider-center-card .provider-center-actions {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.provider-center-card .provider-center-actions .mini-button {
  justify-content: center;
  min-height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

.provider-observe-title {
  margin-bottom: 6px;
}

.provider-observe-tabs {
  display: flex;
  gap: 18px;
  border-bottom: 1px solid rgba(79, 105, 171, 0.24);
  color: #9aa9bd;
  font-size: 13px;
}

.provider-observe-tabs span {
  padding: 0 0 10px;
}

.provider-observe-tabs .active {
  color: #d9e7ff;
  border-bottom: 2px solid #8b5cff;
  box-shadow: 0 8px 16px rgba(139, 92, 255, 0.16);
}

.provider-log-table {
  display: grid;
  gap: 0;
  margin-top: 12px;
}

.provider-log-head,
.provider-log-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1.2fr) 70px 44px 48px;
  gap: 8px;
  align-items: center;
}

.provider-log-head {
  padding: 0 0 8px;
  color: #8999af;
  font-size: 11px;
}

.provider-log-row {
  min-height: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  color: #9aa9bd;
  font-size: 11px;
}

.provider-log-row strong,
.provider-log-row span,
.provider-log-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-log-row strong {
  color: #dce8fb;
  font-weight: 760;
}

.provider-log-row em {
  justify-self: start;
  border-radius: 6px;
  padding: 2px 5px;
  font-style: normal;
  font-weight: 850;
}

.provider-log-row em.is-ok {
  color: #83f39c;
  background: rgba(72, 227, 155, 0.12);
}

.provider-log-row em.is-warning {
  color: #ff7373;
  background: rgba(255, 88, 88, 0.12);
}

.provider-health-card,
.provider-advice-card {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(75, 103, 179, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(14, 31, 63, 0.66), rgba(8, 17, 36, 0.84)),
    rgba(9, 16, 32, 0.76);
}

.provider-side-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.provider-side-card-head h3,
.provider-advice-card h3 {
  margin: 0;
  color: #e8f1ff;
  font-size: 17px;
}

.provider-side-card-head span {
  color: #8ea3ff;
  font-size: 12px;
}

.provider-health-row {
  display: grid;
  grid-template-columns: 76px 28px minmax(0, 1fr) 38px;
  gap: 9px;
  align-items: center;
  min-height: 34px;
  color: #a7b6ca;
  font-size: 12px;
}

.provider-health-row i {
  height: 7px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--health-color) calc(var(--level) * 1%), rgba(255, 255, 255, 0.08) 0);
}

.provider-health-row.ok {
  --health-color: #49e58b;
}

.provider-health-row.danger {
  --health-color: #ff5353;
}

.provider-health-row.warn {
  --health-color: #ffb144;
}

.provider-health-row strong {
  color: #e8f1ff;
}

.provider-health-row em {
  color: #a7b6ca;
  font-style: normal;
  text-align: right;
}

.provider-advice-card p {
  margin: 8px 0 12px;
  color: #a2b0c3;
  font-size: 13px;
  line-height: 1.65;
}

.metric-sparkline {
  position: relative;
  border-bottom: 0;
  background: none;
}

.metric-sparkline svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.metric-sparkline path {
  fill: none;
  stroke: #30d7ff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  filter: drop-shadow(0 0 6px rgba(48, 215, 255, 0.42));
}

.metric-card.violet .metric-sparkline path {
  stroke: #9a63ff;
}

.metric-card.green .metric-sparkline path {
  stroke: #68ee82;
}

.dashboard-trend-chart.is-combo {
  height: 226px;
  display: block;
  padding: 0;
  overflow: hidden;
}

.dashboard-trend-chart.is-combo svg {
  width: 100%;
  height: 100%;
  display: block;
}

.dashboard-trend-chart .trend-grid line {
  stroke: rgba(125, 153, 216, 0.18);
  stroke-width: 1;
}

.dashboard-trend-chart .trend-axis text,
.dashboard-trend-chart .trend-label {
  fill: #97a6ba;
  font-size: 12px;
}

.dashboard-trend-chart .trend-bar {
  rx: 2;
  opacity: 0.92;
}

.dashboard-trend-chart .trend-bar.api {
  fill: url("#trendApiGradient");
}

.dashboard-trend-chart .trend-bar.saved {
  fill: url("#trendSavedGradient");
}

.dashboard-trend-chart .trend-line {
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-trend-chart .trend-line.api {
  stroke: #4e8cff;
  filter: drop-shadow(0 0 6px rgba(78, 140, 255, 0.42));
}

.dashboard-trend-chart .trend-line.saved {
  stroke: #32d9f6;
  filter: drop-shadow(0 0 6px rgba(50, 217, 246, 0.38));
}

.dashboard-trend-chart .trend-point {
  stroke: rgba(6, 12, 24, 0.95);
  stroke-width: 1.6;
}

.dashboard-trend-chart .trend-point.api {
  fill: #4e8cff;
}

.dashboard-trend-chart .trend-point.saved {
  fill: #32d9f6;
}

@media (max-width: 1500px) {
  .provider-center-layout {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 370px);
  }

  .provider-center-grid {
    grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  }

  .provider-center-card .provider-center-title,
  .provider-center-card .provider-center-meta {
    max-width: none;
  }
}

:root {
  --ui-icon-user: url("/assets/ui-icons/user.png");
  --ui-icon-network: url("/assets/ui-icons/network.png");
  --ui-icon-asset: url("/assets/ui-icons/asset.png");
  --ui-icon-image: url("/assets/ui-icons/image.png");
  --ui-icon-video: url("/assets/ui-icons/video.png");
  --ui-icon-voice: url("/assets/ui-icons/voice.png");
  --ui-icon-shield: url("/assets/ui-icons/shield.png");
  --ui-icon-brain: url("/assets/ui-icons/brain.png");
  --ui-icon-refresh: url("/assets/ui-icons/refresh.png");
  --ui-icon-search: url("/assets/ui-icons/search.png");
  --ui-icon-chart: url("/assets/ui-icons/chart.png");
  --ui-icon-warning: url("/assets/ui-icons/warning-key.png");
  --ui-symbol-user: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/g%3E%3C/svg%3E");
  --ui-symbol-network: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3.5'/%3E%3Ccircle cx='5' cy='6' r='2.2'/%3E%3Ccircle cx='19' cy='6' r='2.2'/%3E%3Ccircle cx='5' cy='18' r='2.2'/%3E%3Ccircle cx='19' cy='18' r='2.2'/%3E%3Cpath d='m7 7.5 2.8 2.5M16.2 10 18 7.8M7 16.5l2.8-2.5M16.2 14 18 16.2'/%3E%3C/g%3E%3C/svg%3E");
  --ui-symbol-asset: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3 8 4.5v9L12 21l-8-4.5v-9z'/%3E%3Cpath d='m4 7.5 8 4.5 8-4.5M12 12v9'/%3E%3C/g%3E%3C/svg%3E");
  --ui-symbol-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m4 16 4.5-4.5 3.5 3.5 2-2 6 6'/%3E%3Ccircle cx='15.5' cy='9.5' r='1.5'/%3E%3C/g%3E%3C/svg%3E");
  --ui-symbol-video: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m10 9 5 3-5 3z'/%3E%3C/g%3E%3C/svg%3E");
  --ui-symbol-voice: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3a3 3 0 0 0-3 3v6a3 3 0 0 0 6 0V6a3 3 0 0 0-3-3z'/%3E%3Cpath d='M5 10v2a7 7 0 0 0 14 0v-2M12 19v2M8 21h8'/%3E%3C/g%3E%3C/svg%3E");
  --ui-symbol-shield: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 20 6v6c0 5-3.2 8-8 9-4.8-1-8-4-8-9V6z'/%3E%3Cpath d='m8.5 12.5 2.2 2.2 4.8-5.1'/%3E%3C/g%3E%3C/svg%3E");
  --ui-symbol-brain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3a4 4 0 0 0-4 4 4 4 0 0 0 0 8 4 4 0 0 0 4 4M15 3a4 4 0 0 1 4 4 4 4 0 0 1 0 8 4 4 0 0 1-4 4M9 3v18M15 3v18M9 8H6M15 8h3M9 13H5M15 13h4'/%3E%3C/g%3E%3C/svg%3E");
  --ui-symbol-refresh: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 11a8 8 0 0 0-14.8-4.2L3 9M4 13a8 8 0 0 0 14.8 4.2L21 15M3 4v5h5M21 20v-5h-5'/%3E%3C/g%3E%3C/svg%3E");
  --ui-symbol-warning: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 22 20H2z'/%3E%3Cpath d='M12 9v5M12 17.5h.01'/%3E%3C/g%3E%3C/svg%3E");
}

.provider-center-summary-icon,
.metric-card-icon,
.operator-rank-icon,
.radar-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: visible;
  --ui-symbol: var(--ui-symbol-image);
  background: none !important;
  background-image: none !important;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  border-radius: 0;
  box-shadow: none;
  clip-path: none;
}

.provider-center-summary-icon::before,
.metric-card-icon::before,
.operator-rank-icon::before,
.radar-icon::before {
  content: "";
  display: block;
  width: 70%;
  height: 70%;
  background: linear-gradient(135deg, #4de6ff 0%, #7b71ff 58%, #73ff9f 100%);
  filter: drop-shadow(0 0 10px rgba(80, 206, 255, 0.45));
  mask: var(--ui-symbol) center / contain no-repeat;
  -webkit-mask: var(--ui-symbol) center / contain no-repeat;
}

.provider-center-summary-icon.image,
.metric-card-icon.image {
  --ui-symbol: var(--ui-symbol-image);
}

.provider-center-summary-icon.video,
.radar-node.task .radar-icon {
  --ui-symbol: var(--ui-symbol-video);
}

.provider-center-summary-icon.voice {
  --ui-symbol: var(--ui-symbol-voice);
}

.provider-center-summary-icon.shield,
.radar-node.check .radar-icon {
  --ui-symbol: var(--ui-symbol-shield);
}

.provider-center-summary-icon.network,
.metric-card-icon.network {
  --ui-symbol: var(--ui-symbol-network);
}

.provider-center-summary-icon.brain {
  --ui-symbol: var(--ui-symbol-brain);
}

.metric-card-icon.user,
.operator-rank-icon {
  --ui-symbol: var(--ui-symbol-user);
}

.metric-card-icon.box {
  --ui-symbol: var(--ui-symbol-asset);
}

.radar-node.sync .radar-icon {
  --ui-symbol: var(--ui-symbol-refresh);
}

.radar-node.error .radar-icon {
  --ui-symbol: var(--ui-symbol-warning);
}

.provider-center-summary-card,
.metric-card,
.radar-node {
  align-items: center;
}

.provider-center-summary-icon {
  justify-self: center;
  align-self: center;
}

.metric-card-icon {
  justify-self: center;
  align-self: center;
}

.provider-center-status {
  min-width: 54px;
  text-align: center;
}

.provider-center-status.is-warning {
  border-color: rgba(255, 183, 74, 0.64);
  background: rgba(255, 177, 68, 0.16);
  color: #ffd27a;
  text-shadow: 0 0 10px rgba(255, 177, 68, 0.24);
}

.provider-center-card .provider-center-chips {
  height: 50px;
  min-height: 50px;
  align-content: start;
  overflow: hidden;
}

.provider-center-card .provider-center-chip {
  display: inline-grid;
  place-items: center;
  height: 22px;
  max-width: 88px;
  overflow: hidden;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-center-test-result {
  max-height: 58px;
  overflow: auto;
}

.button-link {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.button-link:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  filter: grayscale(0.35);
}

.provider-advice-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.provider-advice-list div {
  border: 1px solid rgba(80, 144, 255, 0.18);
  border-radius: 8px;
  padding: 9px 10px;
  color: #d5e3f7;
  background: rgba(24, 51, 98, 0.32);
  font-size: 12px;
  line-height: 1.55;
}

body[data-current-view="dashboard"] .dashboard-panel,
body[data-current-view="dashboard"] .metric-card {
  position: relative;
  isolation: isolate;
}

body[data-current-view="dashboard"] .dashboard-panel::before,
body[data-current-view="dashboard"] .metric-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(circle at 18% 0%, rgba(87, 217, 255, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent 42%);
  pointer-events: none;
}

body[data-current-view="dashboard"] .dashboard-panel {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.075),
    inset 0 0 44px rgba(44, 113, 220, 0.08),
    0 20px 54px rgba(0, 0, 0, 0.26);
}

body[data-current-view="dashboard"] .metric-card {
  background:
    linear-gradient(135deg, rgba(31, 75, 145, 0.72), rgba(12, 24, 50, 0.88)),
    rgba(8, 17, 36, 0.92);
}

.dashboard-donut {
  box-shadow:
    0 0 0 1px rgba(105, 232, 190, 0.22),
    0 0 34px rgba(80, 222, 157, 0.28),
    inset 0 0 28px rgba(78, 140, 255, 0.12);
}

.dashboard-trend-chart.is-combo {
  background:
    linear-gradient(rgba(101, 132, 197, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(101, 132, 197, 0.09) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(76, 131, 255, 0.16), transparent 44%),
    rgba(8, 18, 37, 0.58);
}

.provider-center-summary-icon,
.metric-card-icon,
.operator-rank-icon,
.radar-icon {
  overflow: visible;
  border-radius: 0;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  box-shadow: none;
  clip-path: none;
}

.provider-center-summary-icon {
  width: 46px;
  height: 46px;
}

.metric-card-icon {
  width: 50px;
  height: 50px;
}

.operator-rank-icon,
.radar-icon {
  width: 38px;
  height: 38px;
}

.provider-text-model-grid {
  grid-template-columns: repeat(2, minmax(210px, 1fr));
}

body[data-current-view="script"] {
  background:
    radial-gradient(circle at 51% 7%, rgba(66, 141, 255, 0.18), transparent 16%),
    radial-gradient(circle at 82% 28%, rgba(158, 72, 255, 0.12), transparent 22%),
    linear-gradient(180deg, #050a18 0%, #071225 46%, #050b17 100%);
}

body[data-current-view="script"]::before {
  background-image:
    radial-gradient(circle, rgba(169, 201, 255, 0.72) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(122, 249, 238, 0.46) 0 1px, transparent 1.5px);
  background-position: 12% 9%, 71% 16%;
  background-size: 170px 118px, 238px 164px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), transparent 76%);
}

body[data-current-view="script"] .sidebar {
  background:
    linear-gradient(180deg, rgba(9, 18, 38, 0.98), rgba(4, 11, 24, 0.99)),
    #050b16;
  border-right-color: rgba(126, 201, 255, 0.18);
  box-shadow: 16px 0 60px rgba(0, 0, 0, 0.34);
}

body[data-current-view="script"] .brand {
  min-height: 92px;
  border-color: rgba(126, 201, 255, 0.16);
  background:
    radial-gradient(circle at 35% 20%, rgba(177, 60, 255, 0.14), transparent 44%),
    rgba(255, 255, 255, 0.018);
}

body[data-current-view="script"] .nav-item {
  min-height: 46px;
  color: #c3cee1;
}

body[data-current-view="script"] .nav-item.active {
  border-color: rgba(45, 188, 255, 0.72);
  background:
    linear-gradient(92deg, rgba(25, 184, 255, 0.9), rgba(101, 91, 255, 0.72), rgba(170, 59, 255, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 24px rgba(80, 129, 255, 0.32);
}

body[data-current-view="script"] .nav-item.active::before,
body[data-current-view="script"] .nav-item.active::after {
  background: #ffffff;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.55));
}

body[data-current-view="script"] .topbar {
  margin-bottom: 24px;
  padding: 10px 0 12px;
  border-color: transparent;
  background:
    radial-gradient(circle at 48% 30%, rgba(71, 118, 255, 0.18), transparent 9%),
    transparent;
  box-shadow: none;
}

body[data-current-view="script"] .topbar h1 {
  font-size: 34px;
}

body[data-current-view="script"] .topbar p {
  color: #9cabbd;
}

body[data-current-view="script"] .top-actions .ghost-button,
body[data-current-view="script"] .top-actions .status-pill,
body[data-current-view="script"] .topbar-version {
  min-height: 42px;
  border: 1px solid rgba(126, 201, 255, 0.16);
  border-radius: var(--radius);
  padding: 9px 14px;
  background: rgba(10, 17, 34, 0.74);
  color: #dce7f6;
}

.script-progress {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(80px, 0.48fr) minmax(150px, 1fr) minmax(80px, 0.48fr) minmax(150px, 1fr);
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 12px 18px;
  border: 1px solid rgba(126, 201, 255, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(18, 31, 61, 0.78), rgba(8, 15, 32, 0.9)),
    rgba(11, 17, 29, 0.86);
  box-shadow: var(--inner-glow), 0 12px 38px rgba(0, 0, 0, 0.18);
}

.script-progress-step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  min-width: 0;
}

.script-progress-step span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(126, 201, 255, 0.15);
  border-radius: 999px;
  color: #c8d8e8;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 900;
}

.script-progress-step strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  font-size: 13px;
}

.script-progress-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(190, 205, 226, 0.3), transparent);
}

#scriptView[data-script-phase="idea"] [data-script-step="idea"],
#scriptView[data-script-phase="content"] [data-script-step="idea"],
#scriptView[data-script-phase="content"] [data-script-step="content"],
#scriptView[data-script-phase="assets"] [data-script-step] {
  color: var(--text-strong);
}

#scriptView[data-script-phase="idea"] [data-script-step="idea"] span,
#scriptView[data-script-phase="content"] [data-script-step="content"] span,
#scriptView[data-script-phase="assets"] [data-script-step="assets"] span {
  border-color: rgba(126, 201, 255, 0.86);
  color: #ffffff;
  background: linear-gradient(135deg, #24c8ff, #8364ff);
  box-shadow: 0 0 22px rgba(125, 124, 255, 0.4);
}

.script-layout {
  grid-template-columns: minmax(390px, 0.84fr) minmax(560px, 1.16fr);
  gap: 16px;
}

.script-input-panel,
.script-output-panel {
  border-color: rgba(45, 188, 255, 0.42);
  background:
    radial-gradient(circle at 12% 0%, rgba(45, 188, 255, 0.11), transparent 32%),
    linear-gradient(180deg, rgba(20, 30, 62, 0.88), rgba(9, 17, 36, 0.93)),
    rgba(8, 15, 29, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 0 0 1px rgba(255, 255, 255, 0.015),
    0 18px 52px rgba(0, 0, 0, 0.28);
}

.script-output-panel {
  border-color: rgba(166, 61, 255, 0.54);
  background:
    radial-gradient(circle at 84% 0%, rgba(166, 61, 255, 0.15), transparent 34%),
    linear-gradient(180deg, rgba(20, 30, 62, 0.88), rgba(9, 17, 36, 0.93)),
    rgba(8, 15, 29, 0.94);
}

.script-input-panel .section-header h2,
.script-output-panel .section-header h2 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 20px;
}

.script-input-panel .section-header h2::before,
.script-output-panel .section-header h2::before {
  content: "";
  width: 22px;
  height: 22px;
  background: #8d75ff;
  filter: drop-shadow(0 0 9px rgba(141, 117, 255, 0.62));
  mask: var(--script-head-icon) center / 22px 22px no-repeat;
  -webkit-mask: var(--script-head-icon) center / 22px 22px no-repeat;
}

.script-input-panel .section-header h2 {
  --script-head-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8zM5 15l.9 2.1L8 18l-2.1.9L5 21l-.9-2.1L2 18l2.1-.9z'/%3E%3C/g%3E%3C/svg%3E");
}

.script-output-panel .section-header h2 {
  --script-head-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21 8-9-5-9 5 9 5zM3 8v8l9 5 9-5V8M12 13v8'/%3E%3C/g%3E%3C/svg%3E");
}

.script-result-grid,
#scriptForm {
  display: grid;
  gap: 13px;
}

.script-field-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  min-height: 126px;
  padding: 14px;
  border: 1px solid rgba(126, 201, 255, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    rgba(6, 13, 30, 0.7);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015);
}

.script-field-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(166, 61, 255, 0.28), rgba(45, 188, 255, 0.12)),
    rgba(255, 255, 255, 0.045);
}

.script-field-icon::before {
  content: "";
  width: 24px;
  height: 24px;
  background: #9a6dff;
  mask: var(--field-icon) center / 24px 24px no-repeat;
  -webkit-mask: var(--field-icon) center / 24px 24px no-repeat;
  filter: drop-shadow(0 0 8px rgba(169, 136, 255, 0.55));
}

.script-field-icon.book {
  --field-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M4 4.5A2.5 2.5 0 0 1 6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5z'/%3E%3Cpath d='M8 7h8M8 11h8'/%3E%3C/g%3E%3C/svg%3E");
}

.script-field-icon.wand {
  --field-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 4 5 5L8.5 20.5l-5-5z'/%3E%3Cpath d='m14 5 5 5M6 2v4M4 4h4M19 14v4M17 16h4M10 2l1 2M20 3l-2 1'/%3E%3C/g%3E%3C/svg%3E");
}

.script-field-body {
  display: grid;
  gap: 8px;
}

.script-field-body span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-strong);
  font-weight: 850;
}

.script-field-body span b {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #865cff, #33bfff);
  box-shadow: 0 0 12px rgba(134, 92, 255, 0.38);
  font-size: 11px;
}

.script-input {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border: 0;
  outline: 0;
  color: #dcecff;
  background: transparent;
  line-height: 1.7;
}

.script-input::placeholder {
  color: rgba(145, 165, 184, 0.76);
}

.script-field-body em {
  justify-self: end;
  color: var(--muted-2);
  font-size: 12px;
  font-style: normal;
}

.script-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.script-generate-button,
.script-clear-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 18px;
}

.script-generate-button {
  min-width: 178px;
  color: #ffffff;
  border-color: rgba(122, 249, 238, 0.2);
  background: linear-gradient(135deg, #bd34ff 0%, #735cff 48%, #24bdff 100%);
  box-shadow: 0 16px 38px rgba(50, 183, 255, 0.22), 0 0 24px rgba(177, 60, 255, 0.28);
}

.script-generate-button::before,
.script-clear-button::before {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: var(--button-icon) center / 18px 18px no-repeat;
  -webkit-mask: var(--button-icon) center / 18px 18px no-repeat;
}

.script-generate-button {
  --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8zM5 15l.9 2.1L8 18l-2.1.9L5 21l-.9-2.1L2 18l2.1-.9zM18 3l.8 1.7L20.5 5.5l-1.7.8L18 8l-.8-1.7-1.7-.8 1.7-.8z'/%3E%3C/g%3E%3C/svg%3E");
}

.script-clear-button {
  --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6M10 11v6M14 11v6'/%3E%3C/g%3E%3C/svg%3E");
}

.script-quick-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.script-quick-row span {
  margin-right: 2px;
  color: var(--muted);
}

.script-chip {
  min-height: 32px;
  border: 1px solid rgba(126, 201, 255, 0.16);
  border-radius: 7px;
  padding: 6px 12px;
  color: #cdd9e8;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(10, 19, 39, 0.78);
}

.script-chip:hover {
  color: #ffffff;
  border-color: rgba(122, 249, 238, 0.38);
  background: rgba(122, 249, 238, 0.09);
}

.script-record-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.script-record-head strong {
  color: var(--text-strong);
}

.script-generation-records {
  display: grid;
  gap: 8px;
  margin-top: 2px;
  border: 1px solid rgba(126, 201, 255, 0.16);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(5, 12, 24, 0.46);
}

.script-generation-record {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) minmax(150px, auto);
  gap: 10px;
  align-items: center;
  min-height: 34px;
  color: var(--muted);
  border-top: 1px solid rgba(126, 201, 255, 0.09);
  font-size: 12px;
}

.script-generation-record span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 900;
}

.script-generation-record span::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

.script-generation-record span.success {
  color: var(--green);
}

.script-generation-record span.generating {
  color: #38a9ff;
}

.script-generation-record span.warning {
  color: var(--amber);
}

.script-generation-record span.failed {
  color: var(--rose);
}

.script-generation-record strong {
  color: var(--text-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-generation-record em {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  min-width: 0;
  font-style: normal;
  white-space: nowrap;
}

.script-result-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(110px, auto));
  justify-self: start;
  border: 1px solid rgba(126, 201, 255, 0.16);
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  background: rgba(10, 17, 35, 0.72);
}

.script-result-tabs button {
  min-height: 40px;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 8px 18px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.script-result-tabs button.active {
  color: var(--text-strong);
  border-bottom-color: #9b5cff;
  background: linear-gradient(180deg, rgba(126, 91, 255, 0.2), rgba(45, 188, 255, 0.06));
  box-shadow: inset 0 -10px 18px rgba(126, 91, 255, 0.08);
}

.script-empty,
.script-card {
  border: 1px solid rgba(126, 201, 255, 0.18);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 18%, rgba(83, 101, 255, 0.22), transparent 36%),
    linear-gradient(180deg, rgba(18, 31, 62, 0.7), rgba(6, 14, 31, 0.82)),
    rgba(4, 10, 22, 0.72);
  box-shadow: inset 0 0 42px rgba(64, 148, 255, 0.07);
}

.script-empty {
  min-height: 560px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.script-empty .script-result-tabs {
  justify-self: start;
  place-self: start stretch;
  margin: -28px -28px 18px;
}

.script-empty-hero {
  display: grid;
  place-items: center;
  width: 190px;
  height: 132px;
}

.script-empty-visual {
  position: relative;
  width: 106px;
  height: 106px;
  display: grid;
  place-items: center;
}

.script-empty-visual::before {
  content: "";
  position: absolute;
  bottom: 9px;
  width: 142px;
  height: 34px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at center, rgba(125, 124, 255, 0.38), rgba(64, 148, 255, 0.12) 58%, transparent 62%);
}

.script-empty-visual i {
  position: relative;
  width: 64px;
  height: 76px;
  border-radius: 10px;
  transform: rotate(9deg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(157, 151, 255, 0.88));
  box-shadow: 0 18px 38px rgba(125, 124, 255, 0.28);
}

.script-empty-visual i::before,
.script-empty-visual i::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 14px;
  height: 5px;
  border-radius: 999px;
  background: rgba(89, 79, 224, 0.44);
  box-shadow: 0 16px 0 rgba(89, 79, 224, 0.24), 0 32px 0 rgba(89, 79, 224, 0.2);
}

.script-empty-visual i::before {
  top: 18px;
}

.script-empty-visual i::after {
  top: 28px;
  right: 25px;
}

.script-empty strong {
  color: var(--text-strong);
  font-size: 22px;
}

.script-empty > span {
  max-width: 460px;
  color: var(--muted);
  line-height: 1.75;
}

.script-empty p {
  justify-self: stretch;
  margin: 10px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(126, 201, 255, 0.12);
  color: var(--muted);
  text-align: left;
}

.script-empty p b {
  color: #38a9ff;
}

.script-pipeline {
  display: grid;
  grid-template-columns: minmax(86px, 1fr) 18px minmax(86px, 1fr) 18px minmax(86px, 1fr) 18px minmax(86px, 1fr) 18px minmax(86px, 1fr);
  align-items: center;
  gap: 8px;
  width: min(660px, 100%);
  margin-top: 18px;
}

.script-pipeline b {
  display: block;
  width: 18px;
  height: 18px;
  background: rgba(126, 201, 255, 0.62);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}

.script-pipeline-item {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 112px;
  border: 1px solid rgba(126, 201, 255, 0.15);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(10, 19, 39, 0.62);
}

.script-pipeline-icon {
  width: 38px;
  height: 38px;
  background: rgba(215, 226, 245, 0.44);
  mask: var(--pipeline-icon) center / 38px 38px no-repeat;
  -webkit-mask: var(--pipeline-icon) center / 38px 38px no-repeat;
}

.script-pipeline-icon.doc {
  --pipeline-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h9l3 3v15H6z'/%3E%3Cpath d='M14 3v4h4M9 11h6M9 15h6M9 19h3'/%3E%3C/g%3E%3C/svg%3E");
}

.script-pipeline-icon.user {
  --pipeline-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M5 21a7 7 0 0 1 14 0'/%3E%3C/g%3E%3C/svg%3E");
}

.script-pipeline-icon.image {
  --pipeline-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m4 16 4.5-4.5 3.5 3.5 2-2 6 6'/%3E%3Ccircle cx='15.5' cy='9.5' r='1.5'/%3E%3C/g%3E%3C/svg%3E");
}

.script-pipeline-icon.box {
  --pipeline-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21 8-9-5-9 5 9 5zM3 8v8l9 5 9-5V8M12 13v8'/%3E%3C/g%3E%3C/svg%3E");
}

.script-pipeline-icon.film {
  --pipeline-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M8 4v16M16 4v16M3 10h18M3 16h18'/%3E%3C/g%3E%3C/svg%3E");
}

.script-card {
  padding: 16px;
}

.script-card-main {
  min-height: 482px;
}

.script-logline {
  margin: 10px 0 12px;
  color: var(--accent-strong);
  font-weight: 800;
  line-height: 1.55;
}

.script-download-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 12px;
  padding: 12px;
  border: 1px solid rgba(126, 201, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(126, 201, 255, 0.06);
}

.script-download-notice strong {
  display: block;
  color: #f1fbff;
  font-size: 14px;
  margin-bottom: 3px;
}

.script-download-notice span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.script-download-notice .mini-button {
  flex: 0 0 auto;
}

.script-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.script-meta-row span {
  padding: 6px 9px;
  border: 1px solid rgba(126, 201, 255, 0.14);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
}

.script-text {
  max-height: 520px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #dcecff;
  line-height: 1.78;
  border: 1px solid rgba(126, 201, 255, 0.13);
  border-radius: var(--radius);
  padding: 14px;
  background:
    linear-gradient(rgba(126, 201, 255, 0.045) 1px, transparent 1px),
    rgba(0, 0, 0, 0.24);
  background-size: 100% 28px;
}

.script-text-preview {
  max-height: 310px;
  overflow: hidden;
}

.compact-primary-button {
  width: auto;
  min-height: 34px;
  padding: 8px 12px;
  white-space: nowrap;
}

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

.script-asset-kind-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.script-asset-kind-tabs button {
  min-height: 42px;
  border: 1px solid rgba(126, 201, 255, 0.18);
  border-radius: 8px;
  background: rgba(6, 16, 30, 0.64);
  color: #cbdbe7;
  font-weight: 800;
  cursor: pointer;
}

.script-asset-kind-tabs button.active {
  border-color: rgba(83, 120, 255, 0.72);
  background: linear-gradient(135deg, rgba(72, 69, 245, 0.34), rgba(20, 124, 255, 0.24));
  color: #fff;
}

.script-asset-group {
  display: grid;
  gap: 10px;
}

.script-asset-group h3 {
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-strong);
}

.script-asset-group h3 span {
  color: var(--accent-strong);
}

.script-asset-item {
  padding: 11px;
  border: 1px solid rgba(126, 201, 255, 0.13);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.script-asset-item strong {
  color: var(--accent-strong);
}

.script-asset-name {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.script-asset-detail {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.compact-empty {
  min-height: auto;
  padding: 8px;
}

.script-asset-item p {
  margin: 7px 0;
  color: var(--muted);
  line-height: 1.55;
}

.script-asset-prompt {
  padding-top: 7px;
  border-top: 1px solid rgba(126, 201, 255, 0.1);
}

.script-asset-prompt span {
  display: block;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 4px;
}

.script-asset-item em {
  color: var(--muted-2);
  font-size: 12px;
  font-style: normal;
}

.dashboard-hero-copy {
  max-width: 760px;
}

.dashboard-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  align-items: end;
}

.dashboard-date-field {
  min-width: 178px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-date-input {
  min-height: 42px;
  color: var(--text-strong);
  border: 1px solid rgba(122, 249, 238, 0.32);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(3, 8, 14, 0.7);
  box-shadow: inset 0 0 22px rgba(32, 214, 199, 0.11), 0 0 18px rgba(32, 214, 199, 0.08);
}

.metric-card.violet,
.ops-dial.violet {
  --dial-color: var(--violet);
}

.metric-card.blue,
.ops-dial.blue {
  --dial-color: #38a9ff;
}

.metric-card.pink,
.ops-dial.pink {
  --dial-color: #ff5edb;
}

.metric-card.cyan,
.ops-dial.cyan,
.metric-card {
  --dial-color: var(--accent-strong);
}

.metric-ring {
  background:
    radial-gradient(circle, rgba(7, 11, 18, 0.96) 0 49%, transparent 50%),
    conic-gradient(from 210deg, var(--dial-color) calc(var(--level) * 1%), rgba(125, 124, 255, 0.18) 0);
}

.orbital-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(82px, 1fr));
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(122, 249, 238, 0.12);
  background:
    radial-gradient(circle at 50% 34%, rgba(32, 214, 199, 0.16), transparent 38%),
    linear-gradient(rgba(122, 249, 238, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 249, 238, 0.08) 1px, transparent 1px),
    rgba(255, 255, 255, 0.02);
  background-size: auto, 100% 26px, 26px 100%, auto;
}

.orbital-day,
.ops-dial,
.operator-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(122, 249, 238, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(32, 214, 199, 0.08), rgba(125, 124, 255, 0.07)),
    rgba(6, 12, 21, 0.72);
  box-shadow: inset 0 0 28px rgba(122, 249, 238, 0.08), 0 18px 34px rgba(0, 0, 0, 0.18);
}

.orbital-day {
  min-height: 156px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
}

.orbital-day-ring,
.ops-dial-ring,
.operator-orb {
  position: relative;
  width: 82px;
  aspect-ratio: 1;
  border-radius: 999px;
  display: grid;
  place-items: center;
  align-content: center;
  background:
    radial-gradient(circle, rgba(7, 11, 18, 0.98) 0 48%, transparent 49%),
    conic-gradient(from 210deg, var(--accent-strong) calc(var(--level) * 1%), rgba(125, 124, 255, 0.16) 0);
  box-shadow: 0 0 24px rgba(32, 214, 199, 0.28), inset 0 0 20px rgba(122, 249, 238, 0.08);
}

.orbital-day-ring::before,
.ops-dial-ring::before,
.operator-orb::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  border: 1px dashed rgba(122, 249, 238, 0.22);
  animation: dialSpin 14s linear infinite;
}

.orbital-day-ring::after,
.ops-dial-ring::after,
.operator-orb::after {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 16px rgba(125, 124, 255, 0.18);
}

.orbital-day-ring strong,
.ops-dial-ring strong,
.operator-orb span {
  color: #ffffff;
  font-size: 20px;
  font-weight: 950;
}

.orbital-day-ring span,
.ops-dial-ring span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.orbital-day b,
.ops-dial b,
.operator-card strong {
  color: var(--text-strong);
  font-weight: 900;
  text-align: center;
}

.orbital-day em,
.ops-dial em,
.operator-card em,
.operator-card small {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-align: center;
}

.ops-dial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 12px;
}

.ops-dial {
  min-height: 174px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  padding: 14px 10px;
}

.ops-dial-ring {
  background:
    radial-gradient(circle, rgba(7, 11, 18, 0.98) 0 48%, transparent 49%),
    conic-gradient(from 210deg, var(--dial-color) calc(var(--level) * 1%), rgba(125, 124, 255, 0.16) 0);
}

.operator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.operator-card {
  min-height: 184px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  padding: 14px;
}

.operator-orb {
  background:
    radial-gradient(circle, rgba(7, 11, 18, 0.98) 0 48%, transparent 49%),
    conic-gradient(from 210deg, #38a9ff calc(var(--level) * 1%), rgba(255, 94, 219, 0.16) 0);
}

@keyframes dialSpin {
  to {
    transform: rotate(360deg);
  }
}

.dashboard-loading,
.dashboard-error {
  min-height: 220px;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--accent-strong);
  background: rgba(10, 17, 27, 0.8);
}

@keyframes scanline {
  to {
    transform: translateY(100%);
  }
}

.library-search-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.search-submit-button,
.search-clear-button {
  flex: 0 0 auto;
}

.search-input-wrap {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 8px;
}

.search-input-label {
  font-size: 12px;
  color: var(--muted);
}

.search-input {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.search-input::placeholder {
  color: color-mix(in srgb, var(--muted) 85%, transparent);
}

.search-input:focus {
  outline: none;
  border-color: rgba(32, 214, 199, 0.5);
  box-shadow: 0 0 0 3px rgba(32, 214, 199, 0.14);
  background: rgba(255, 255, 255, 0.065);
}

.search-clear-button {
  white-space: nowrap;
}

.library-workflow-panel {
  margin-top: 12px;
}

.library-filter-row {
  display: grid;
  grid-template-columns: 160px minmax(180px, 260px) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.library-filter-row label {
  display: grid;
  gap: 6px;
}

.library-filter-row label span,
.library-batch-actions > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.library-filter-row select,
.library-filter-row input,
.library-tags-editor input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(122, 249, 238, 0.16);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--text);
  background: rgba(3, 9, 16, 0.72);
  outline: none;
}

.library-batch-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  align-items: start;
}

.panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), transparent 150px),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--inner-glow);
  padding: 18px;
  min-width: 0;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(122, 249, 238, 0.62), transparent);
}

.output-panel {
  position: sticky;
  top: 20px;
  background:
    linear-gradient(180deg, rgba(32, 214, 199, 0.09), transparent 170px),
    var(--panel-2);
}

.section-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 15px;
}

.section-header h2 {
  margin: 0;
  font-size: 18px;
  color: var(--text-strong);
}

.section-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--amber-soft);
  border: 1px solid rgba(242, 184, 75, 0.3);
  color: #ffd791;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.segment {
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 11px 8px;
  min-width: 0;
  transition: 140ms ease;
}

.segment:last-child {
  border-right: 0;
}

.segment:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.segment.active {
  background:
    linear-gradient(135deg, rgba(32, 214, 199, 0.2), rgba(125, 124, 255, 0.12));
  color: var(--accent-strong);
  font-weight: 800;
}

.step-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.step-tab {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  padding: 8px 11px;
  transition: 140ms ease;
}

.step-tab:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.step-tab.active {
  background: rgba(32, 214, 199, 0.14);
  color: var(--accent-strong);
  border-color: var(--line-strong);
  box-shadow: 0 0 0 1px rgba(32, 214, 199, 0.08);
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.provider-picker {
  align-content: start;
}

.provider-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 8px;
}

.image-provider-grid {
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
}

.provider-card {
  position: relative;
  width: 100%;
  min-height: 92px;
  border: 1px solid rgba(128, 225, 239, 0.12);
  border-radius: 18px;
  padding: 8px 7px 7px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 22%, rgba(122, 249, 238, 0.08), transparent 46%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.014)),
    rgba(5, 10, 17, 0.62);
  box-shadow: var(--inner-glow);
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.provider-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background:
    linear-gradient(145deg, rgba(32, 214, 199, 0.095), rgba(125, 124, 255, 0.075)),
    rgba(5, 10, 17, 0.84);
}

.provider-card:focus-visible {
  outline: none;
  border-color: rgba(122, 249, 238, 0.86);
  box-shadow: 0 0 0 3px rgba(32, 214, 199, 0.16), var(--inner-glow);
}

.provider-card.selected {
  border-color: rgba(122, 249, 238, 0.72);
  background:
    linear-gradient(145deg, rgba(32, 214, 199, 0.18), rgba(125, 124, 255, 0.13)),
    rgba(5, 10, 17, 0.9);
  box-shadow: 0 0 0 1px rgba(122, 249, 238, 0.12), 0 16px 34px rgba(32, 214, 199, 0.12);
}

.provider-card-status {
  position: absolute;
  top: 5px;
  right: 5px;
  max-width: calc(100% - 10px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 1px 5px;
  color: var(--muted);
  background: rgba(5, 10, 17, 0.78);
  font-size: 10px;
  line-height: 1.2;
}

.provider-card-status.is-configured {
  color: #07140f;
  border-color: rgba(72, 227, 155, 0.72);
  background: var(--green);
}

.provider-icon {
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 0;
  display: grid;
  place-items: center;
  padding: 0;
  color: #ffffff;
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  word-break: keep-all;
  overflow: visible;
  overflow-wrap: anywhere;
  box-shadow: none;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.36)) drop-shadow(0 0 10px rgba(122, 249, 238, 0.12));
}

.provider-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}

.provider-logo-fallback {
  color: #f4fffd;
  font-size: 12px;
  line-height: 1.1;
}

.provider-model {
  width: 100%;
  min-height: 15px;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-tone-custom .provider-icon,
.provider-tone-generic .provider-icon {
  background:
    linear-gradient(145deg, rgba(32, 214, 199, 0.14), rgba(125, 124, 255, 0.1)),
    rgba(5, 10, 17, 0.84);
}

.choice-row,
.asset-type-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.asset-type-choice {
  flex: 1 1 86px;
}

.model-select-panel {
  border: 1px solid rgba(128, 225, 239, 0.14);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.image-action-field {
  align-content: end;
}

.reference-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.reference-panel.is-disabled {
  opacity: 0.72;
}

.reference-upload-row,
.reference-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.reference-upload-row input[type="file"] {
  display: none;
}

.reference-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 7px;
  background: rgba(255, 255, 255, 0.04);
}

.reference-chip img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.reference-chip span {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-field {
  gap: 6px;
}

.image-edit-instruction {
  min-height: 58px;
}

.image-result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.image-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--inner-glow);
}

.image-card img,
.library-image-thumb {
  width: 100%;
  display: block;
  background: rgba(255, 255, 255, 0.035);
}

.image-card img {
  max-height: min(68vh, 720px);
  object-fit: contain;
  border-bottom: 1px solid var(--line);
}

.image-prompt-field {
  position: relative;
}

.image-prompt-field textarea {
  padding-bottom: 44px;
}

.image-prompt-timing {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 20px);
  color: var(--muted);
  font-size: 12px;
  pointer-events: none;
}

.image-prompt-failure {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255, 112, 112, 0.28);
  border-radius: 8px;
  padding: 10px;
  color: #ffdede;
  background: rgba(255, 112, 112, 0.08);
}

.image-prompt-failure strong,
.image-prompt-failure span,
.image-prompt-failure small {
  display: block;
}

.image-prompt-failure strong {
  color: #fff3f3;
  font-size: 13px;
}

.image-prompt-failure span,
.image-prompt-failure small {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
}

.image-prompt-failure small {
  color: var(--muted);
}

.image-card-body {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.image-task-card {
  border-color: rgba(255, 209, 102, 0.42);
  background: rgba(255, 209, 102, 0.07);
}

.image-task-status {
  padding: 10px;
  color: #1d1504;
  background: var(--yellow);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.image-task-error,
.video-task-error {
  padding: 9px 10px;
  border-radius: 8px;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.library-image-thumb {
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.library-collapsible,
.image-record-summary {
  cursor: pointer;
}

.library-collapsible:focus,
.library-collapsible:focus-within,
.library-collapsible:hover,
.image-record-summary:focus-within,
.image-record-summary:hover {
  border-color: var(--line-strong);
}

.library-collapsible.is-expanded {
  background:
    linear-gradient(135deg, rgba(32, 214, 199, 0.08), rgba(255, 255, 255, 0.035));
}

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

.library-inline-detail {
  cursor: text;
  max-height: min(56vh, 620px);
  overflow: auto;
  border: 1px solid rgba(128, 225, 239, 0.12);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.library-reference-panel,
.library-tags-editor,
.library-meta-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.library-reference-panel {
  justify-content: space-between;
  border: 1px solid rgba(122, 249, 238, 0.12);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(122, 249, 238, 0.055);
}

.library-reference-panel strong {
  color: var(--text-strong);
}

.library-reference-panel span {
  color: var(--muted);
  font-size: 12px;
}

.library-tags-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
}

.library-meta-badges {
  margin-top: 6px;
}

.library-meta-badges span {
  border: 1px solid rgba(122, 249, 238, 0.18);
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--accent-strong);
  background: rgba(32, 214, 199, 0.08);
  font-size: 11px;
  font-weight: 800;
}

.library-select-control {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.image-record-body {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.image-detail-modal {
  width: min(980px, 100%);
  max-height: min(92vh, 920px);
  overflow: auto;
}

.image-record-preview {
  width: 100%;
  max-height: 58vh;
  object-fit: contain;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.image-prompt-detail {
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}


.field {
  display: grid;
  gap: 8px;
}

.field > span,
.field-label {
  color: #d8e7f2;
  font-weight: 800;
  font-size: 14px;
}

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

.split-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.char-counter {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.char-counter.over-limit,
.limit-warning {
  color: #ff8f8f;
}

.input-error {
  border-color: rgba(255, 143, 143, 0.72) !important;
  box-shadow: 0 0 0 1px rgba(255, 143, 143, 0.18), 0 0 24px rgba(255, 80, 80, 0.08);
}

.chapter-input {
  min-height: 230px;
  line-height: 1.72;
}

@media (max-width: 720px) {
  .chapter-input {
    min-height: 180px;
  }
}

.asset-search-box {
  border: 1px solid rgba(122, 249, 238, 0.14);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.asset-choice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.asset-search-row {
  display: flex;
  gap: 8px;
}

.asset-search-row .input {
  flex: 1;
}

.asset-search-clear {
  width: auto;
  white-space: nowrap;
}

.choice-meta {
  color: var(--muted-2);
  font-size: 12px;
}

.section-divider {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(5, 10, 17, 0.72);
  color: var(--text);
  padding: 10px 11px;
  outline: none;
  box-shadow: var(--inner-glow);
}

textarea {
  resize: vertical;
  min-height: 86px;
  line-height: 1.62;
}

select option {
  color: #172026;
  background: #ffffff;
}

.input::placeholder,
textarea::placeholder {
  color: #5f768c;
}

.input:focus,
textarea:focus,
select:focus {
  border-color: rgba(122, 249, 238, 0.82);
  box-shadow: 0 0 0 3px rgba(32, 214, 199, 0.14), var(--inner-glow);
}

.option-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-expand-row {
  display: flex;
  margin-top: 8px;
}

.option-expand-toggle {
  font-size: 12px;
  padding: 6px 10px;
}

.choice {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  color: #c7d7e4;
  padding: 8px 10px;
  min-height: 36px;
  max-width: 100%;
  transition: 140ms ease;
}

.choice:hover {
  border-color: var(--line-strong);
  color: var(--text-strong);
  background: rgba(255, 255, 255, 0.07);
}

.choice.selected {
  background:
    linear-gradient(135deg, rgba(32, 214, 199, 0.2), rgba(125, 124, 255, 0.16));
  color: var(--accent-strong);
  border-color: rgba(122, 249, 238, 0.62);
  font-weight: 800;
  box-shadow: 0 0 18px rgba(32, 214, 199, 0.1);
}

.custom-line {
  display: flex;
  gap: 8px;
  align-items: center;
}

.custom-line .input {
  flex: 1;
}

.summary-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  background:
    linear-gradient(135deg, rgba(32, 214, 199, 0.12), rgba(125, 124, 255, 0.07)),
    rgba(255, 255, 255, 0.035);
  margin-bottom: 14px;
}

.info-box {
  border: 1px solid rgba(125, 124, 255, 0.2);
  border-radius: var(--radius);
  padding: 12px 13px;
  background:
    linear-gradient(135deg, rgba(125, 124, 255, 0.11), rgba(32, 214, 199, 0.06)),
    rgba(255, 255, 255, 0.028);
  margin-bottom: 14px;
}

.info-box p {
  margin: 0;
  color: #c5d5e1;
  line-height: 1.62;
  font-size: 13px;
}

.summary-label {
  color: var(--accent-strong);
  font-size: 12px;
  margin-bottom: 6px;
  font-weight: 800;
}

.summary-box p {
  margin: 0;
  line-height: 1.65;
  color: #dcebf5;
}

.compact-field {
  margin-bottom: 14px;
}

.prompt-block {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.prompt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #d8e7f2;
  font-weight: 800;
  font-size: 14px;
}

.item-list {
  display: grid;
  gap: 10px;
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--muted);
  line-height: 1.7;
  background: rgba(255, 255, 255, 0.028);
}

.item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  display: grid;
  gap: 8px;
}

.item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

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

.item-title {
  font-weight: 850;
  color: var(--text-strong);
}

.item-meta {
  color: var(--muted);
  font-size: 12px;
}

.generation-elapsed {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(122, 249, 238, 0.14);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--accent-strong);
  background: rgba(32, 214, 199, 0.08);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.item-body {
  color: #c3d3df;
  line-height: 1.6;
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
}

.shot-draft-list {
  margin-top: 4px;
}

.shot-draft {
  background:
    linear-gradient(135deg, rgba(32, 214, 199, 0.09), rgba(125, 124, 255, 0.045)),
    rgba(255, 255, 255, 0.025);
}


.shot-draft.collapsed {
  cursor: pointer;
}

.shot-draft.collapsed:hover {
  border-color: rgba(32, 214, 199, 0.4);
  background:
    linear-gradient(135deg, rgba(32, 214, 199, 0.13), rgba(125, 124, 255, 0.06)),
    rgba(255, 255, 255, 0.03);
}

.shot-draft.expanded {
  cursor: pointer;
}

.tag-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  border-radius: 999px;
  background: rgba(32, 214, 199, 0.11);
  border: 1px solid rgba(32, 214, 199, 0.2);
  color: var(--accent-strong);
  font-size: 12px;
  padding: 4px 8px;
}

body:not(.is-authenticated) #app,
body.is-auth-checking #app,
body.is-auth-checking .login-screen {
  display: none;
}

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

body:not(.is-auth-checking) .boot-screen {
  display: none;
}

.boot-card {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background: rgba(9, 15, 24, 0.78);
  box-shadow: var(--shadow), var(--inner-glow);
  backdrop-filter: blur(18px);
}

.boot-mark {
  flex: 0 0 auto;
}

.boot-kicker {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.boot-title {
  margin-top: 4px;
  color: var(--text-strong);
  font-size: 18px;
  font-weight: 800;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 18% 18%, rgba(32, 214, 199, 0.18), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(125, 124, 255, 0.18), transparent 30%),
    radial-gradient(circle at 50% 88%, rgba(242, 184, 75, 0.08), transparent 28%);
  filter: blur(2px);
  pointer-events: none;
}

body.is-authenticated .login-screen {
  display: none;
}

.login-shell {
  width: min(1120px, 100%);
  min-height: 660px;
  display: grid;
  grid-template-columns: minmax(360px, 0.78fr) minmax(0, 1.22fr);
  gap: 18px;
  position: relative;
  z-index: 1;
}

.login-card,
.login-visual {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background: rgba(9, 15, 24, 0.78);
  box-shadow: var(--shadow), var(--inner-glow);
  overflow: hidden;
}

.login-card {
  position: relative;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  backdrop-filter: blur(18px);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--violet), transparent);
}

.login-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.login-mark {
  flex: 0 0 auto;
}

.login-kicker {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-card h1 {
  margin: 4px 0 0;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1;
  color: var(--text-strong);
}

.login-lead {
  margin: 0;
  color: #c7d8e6;
  line-height: 1.78;
  max-width: 420px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-submit {
  min-height: 44px;
  margin-top: 4px;
}

.login-message {
  min-height: 22px;
  color: #ffd791;
  font-size: 13px;
  line-height: 1.55;
}

.login-message.success {
  color: var(--green);
}

.login-message.error {
  color: #ff9db4;
}

.login-config-hint {
  border: 1px solid rgba(125, 124, 255, 0.22);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  line-height: 1.7;
}

.login-config-hint code {
  color: var(--accent-strong);
}

.login-visual {
  position: relative;
  min-height: 520px;
  background:
    linear-gradient(135deg, rgba(32, 214, 199, 0.12), rgba(125, 124, 255, 0.1)),
    #070b12;
}

.login-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.9;
}

.login-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 11, 18, 0.45), transparent 42%),
    linear-gradient(0deg, rgba(7, 11, 18, 0.64), transparent 42%);
}

.login-visual-overlay {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.login-visual-overlay span,
.auth-user-badge {
  backdrop-filter: blur(12px);
}

.login-visual-overlay span {
  border: 1px solid rgba(122, 249, 238, 0.26);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(5, 10, 17, 0.52);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.auth-user-badge {
  align-self: center;
  background: rgba(32, 214, 199, 0.11);
  border-color: rgba(32, 214, 199, 0.28);
  color: var(--accent-strong);
}

.danger-button {
  background: linear-gradient(135deg, #ff7d90, #ffb14f);
  color: #18050c;
}

.library-delete {
  border-color: rgba(255, 111, 145, 0.28);
  color: #ffc3d0;
}

.library-delete:hover {
  border-color: rgba(255, 111, 145, 0.56);
  background: rgba(255, 111, 145, 0.12);
  color: #ffe3ea;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 7, 12, 0.72);
  backdrop-filter: blur(10px);
}

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

.modal-card {
  width: min(520px, 100%);
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 160px),
    rgba(8, 13, 21, 0.96);
  box-shadow: var(--shadow), var(--inner-glow);
  padding: 20px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.modal-kicker {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}

.modal-head h3 {
  margin: 0;
  font-size: 20px;
  color: var(--text-strong);
}

.modal-body {
  margin: 14px 0 0;
  color: #c7d8e6;
  line-height: 1.7;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  min-width: 220px;
  max-width: min(420px, calc(100vw - 44px));
  border-radius: var(--radius);
  background: #101a27;
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 1180px) {
  #app {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .split-layout,
  #imageView .split-layout,
  .library-grid,
  .form-two-col,
  .login-shell {
    grid-template-columns: 1fr;
  }

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

  .library-batch-actions {
    justify-content: flex-start;
  }

  .output-panel {
    position: static;
  }

  .login-shell {
    min-height: auto;
  }

  .login-visual {
    min-height: 360px;
    order: -1;
  }
}

@media (max-width: 760px) {
  #app {
    display: block;
  }

  .login-screen {
    padding: 14px;
  }

  .login-shell {
    gap: 14px;
  }

  .login-card {
    padding: 20px;
    gap: 18px;
  }

  .login-lead {
    max-width: none;
  }

  .login-visual {
    min-height: 240px;
  }

  .login-visual-overlay {
    left: 14px;
    right: 14px;
    bottom: 14px;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 14px;
  }

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

  .sidebar-note {
    display: none;
  }

  .main {
    padding: 14px;
  }

  .library-grid {
    gap: 12px;
  }

  .library-grid .panel {
    padding: 12px;
  }

  .library-grid .section-header {
    margin-bottom: 10px;
  }

  .library-grid .section-header p {
    display: none;
  }

  .image-card img {
    max-height: 72vh;
  }

  .topbar {
    display: grid;
  }

  .topbar h1 {
    font-size: 24px;
  }

  .top-actions,
  .button-row,
  .custom-line,
  .modal-actions,
  .item-actions,
  .library-search-row,
  .asset-search-row,
  .asset-choice-head {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

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

  .library-grid .item-actions .library-delete {
    grid-column: 1 / -1;
  }

  .library-inline-detail {
    max-height: 46vh;
  }

  .library-search-summary {
    text-align: left;
  }

  .search-submit-button,
  .search-clear-button,
  .asset-search-clear {
    min-height: 44px;
  }

  .primary-button,
  .ghost-button,
  .mini-button,
  .auth-user-badge {
    width: 100%;
  }

  .modal-card {
    padding: 16px;
  }

  .modal-head {
    display: grid;
  }

  .auth-user-badge {
    justify-content: center;
  }

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

  .segment {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .segment:last-child {
    border-bottom: 0;
  }
}


.full-span {
  grid-column: 1 / -1;
}

.compact-row {
  margin-top: 10px;
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.035);
  color: #cbdbe7;
  font-size: 13px;
}

.checkbox-row label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.video-task-card {
  border: 1px solid rgba(32, 214, 199, 0.24);
  border-radius: var(--radius);
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(32, 214, 199, 0.1), rgba(125, 124, 255, 0.06)),
    rgba(255, 255, 255, 0.035);
  display: grid;
  gap: 10px;
}

.video-result-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-empty {
  padding: 12px;
}


/* Video generation redesign */
.video-generation-layout { align-items: start; }
.video-create-form { gap: 18px; }
.video-workflow-hint p { margin-bottom: 0; }
.video-side-controls { display: grid; gap: 14px; align-content: start; }
.video-model-panel select { font-weight: 800; }
.video-capability-note p { margin-bottom: 0; }
.video-upload-zone {
  display: grid; gap: 8px; place-items: center; min-height: 142px; padding: 22px;
  border: 1px dashed rgba(126, 201, 255, 0.45); border-radius: 20px;
  background: linear-gradient(135deg, rgba(78, 169, 255, 0.10), rgba(255, 132, 183, 0.07));
  color: var(--text); text-align: center; cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.video-upload-zone:hover {
  border-color: rgba(126, 201, 255, 0.85); transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(78, 169, 255, 0.16), rgba(255, 132, 183, 0.11));
}
.video-file-input { display: none; }
.upload-plus {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 999px;
  background: rgba(126, 201, 255, 0.16); border: 1px solid rgba(126, 201, 255, 0.36);
  font-size: 30px; line-height: 1;
}
.video-upload-zone small { color: var(--muted); max-width: 560px; }
.video-media-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 220px));
  gap: 12px;
  align-items: stretch;
  justify-content: start;
  margin-top: 12px;
}
.video-media-card, .video-result-card {
  min-width: 0; border: 1px solid rgba(126, 201, 255, 0.16); border-radius: 18px;
  background: rgba(7, 13, 21, 0.36);
}
.video-media-card { overflow: visible; }
.video-result-card { overflow: hidden; }
.video-media-preview {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
  background: rgba(255,255,255,0.04);
  display: grid;
  place-items: center;
}
.video-media-preview img, .video-media-preview video { width: 100%; height: 100%; object-fit: cover; }
.video-audio-preview {
  width: 100%;
  height: 100%;
  min-height: 118px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(32, 214, 199, 0.15), rgba(255, 132, 183, 0.10)),
    rgba(4, 10, 18, 0.62);
}
.video-audio-preview audio { width: 100%; min-width: 0; height: 32px; }
.audio-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 42px;
}
.audio-wave span {
  width: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7af9ee, #7e8cff);
}
.audio-wave span:nth-child(1) { height: 18px; }
.audio-wave span:nth-child(2) { height: 31px; }
.audio-wave span:nth-child(3) { height: 42px; }
.audio-wave span:nth-child(4) { height: 26px; }
.audio-wave span:nth-child(5) { height: 36px; }
.video-media-target {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.audio-thumb, .video-pending-box {
  min-height: 150px; display: grid; place-items: center; color: var(--muted);
  background: radial-gradient(circle at top left, rgba(126, 201, 255, 0.18), rgba(255,255,255,0.03));
}
.video-media-body {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
}
.video-media-body .item-title,
.video-media-body .item-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.video-media-body .item-title {
  line-height: 1.35;
  word-break: break-word;
}
.video-media-body .item-meta {
  white-space: nowrap;
}

body[data-current-view="library"] .library-search-panel {
  margin-bottom: 14px;
  padding: 0;
  border-color: rgba(56, 88, 142, 0.58);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(14, 31, 55, 0.9), rgba(7, 18, 33, 0.86));
}

body[data-current-view="library"] .library-search-panel::before {
  opacity: 0.3;
}

.library-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 12px;
  align-items: stretch;
  padding: 14px;
  border-bottom: 1px solid rgba(56, 88, 142, 0.38);
}

.library-search-row {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) auto minmax(260px, 0.72fr) 38px;
  gap: 16px;
  align-items: center;
}

.library-search-field,
.library-toolbar-block {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.library-search-field > span,
.library-toolbar-block > span {
  flex: 0 0 auto;
  color: #eef5ff;
  font-size: 15px;
  font-weight: 900;
}

.library-search-field {
  position: relative;
}

.library-search-field .search-input {
  height: 42px;
  padding: 0 74px 0 16px;
  border-color: rgba(58, 89, 142, 0.72);
  border-radius: 7px;
  background: rgba(4, 13, 25, 0.82);
  color: #edf5ff;
}

.library-search-submit,
.library-search-clear,
.library-filter-button {
  position: relative;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid rgba(67, 102, 162, 0.72);
  border-radius: 7px;
  background: rgba(7, 18, 33, 0.9);
  color: #d8e6f5;
}

.library-search-submit {
  position: absolute;
  right: 39px;
  top: 3px;
}

.library-search-clear {
  position: absolute;
  right: 3px;
  top: 3px;
}

.library-search-submit::before,
.library-search-clear::before,
.library-filter-button::before,
.library-action-icon {
  content: "";
  display: inline-block;
  width: 17px;
  height: 17px;
  background: currentColor;
  mask: var(--library-icon) center / contain no-repeat;
  -webkit-mask: var(--library-icon) center / contain no-repeat;
}

.library-search-submit::before {
  --library-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.6-3.6'/%3E%3C/g%3E%3C/svg%3E");
}

.library-search-clear::before {
  --library-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/g%3E%3C/svg%3E");
}

.library-filter-button::before {
  --library-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h16M7 12h10M10 18h4'/%3E%3C/g%3E%3C/svg%3E");
}

.library-status-tabs {
  gap: 8px;
}

.library-status-tabs button {
  min-width: 74px;
  height: 42px;
  border: 1px solid rgba(58, 89, 142, 0.72);
  border-radius: 7px;
  background: rgba(5, 15, 30, 0.72);
  color: #aebbd0;
  font-weight: 800;
}

.library-status-tabs button.active {
  border-color: rgba(93, 106, 255, 0.82);
  background: linear-gradient(135deg, rgba(92, 70, 255, 0.55), rgba(23, 65, 159, 0.38));
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(162, 169, 255, 0.12), 0 0 18px rgba(78, 94, 255, 0.18);
}

.library-tag-field input {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 1px solid rgba(58, 89, 142, 0.72);
  border-radius: 7px;
  padding: 0 36px 0 13px;
  color: #dce8f6;
  background: rgba(4, 13, 25, 0.82);
}

.library-tag-field::after {
  content: "";
  width: 10px;
  height: 10px;
  margin-left: -34px;
  border-right: 2px solid #8aa2c4;
  border-bottom: 2px solid #8aa2c4;
  transform: rotate(45deg) translateY(-3px);
  pointer-events: none;
}

.library-selection-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  border-left: 1px solid rgba(56, 88, 142, 0.36);
  color: #b8c6dc;
  font-weight: 800;
}

.library-selection-summary b {
  color: #8da4ff;
  font-size: 18px;
}

.library-selection-summary .button-link {
  color: #83a0ff;
}

body[data-current-view="library"] .library-workflow-panel {
  margin: 0;
  padding: 12px 14px;
}

body[data-current-view="library"] .library-batch-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.library-command-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(58, 89, 142, 0.72);
  border-radius: 7px;
  background: rgba(7, 18, 33, 0.82);
  color: #e2ecf8;
  font-weight: 900;
}

.library-command-button:hover:not(:disabled) {
  border-color: rgba(114, 143, 255, 0.78);
  background: rgba(20, 43, 78, 0.82);
}

.library-command-button.danger {
  color: #ff505e;
  border-color: rgba(255, 65, 79, 0.34);
}

.library-command-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

body[data-current-view="library"] .library-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

body[data-current-view="library"] .library-grid .panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 640px;
  padding: 14px;
  border-color: rgba(56, 88, 142, 0.64);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(14, 32, 57, 0.9), rgba(7, 18, 33, 0.86));
}

body[data-current-view="library"] .library-grid .section-header {
  margin-bottom: 12px;
}

body[data-current-view="library"] .library-grid .section-header h2 {
  font-size: 19px;
}

body[data-current-view="library"] .library-grid .section-header p {
  margin: 0;
  color: #aebbd0;
  font-size: 14px;
  font-weight: 800;
}

body[data-current-view="library"] .item-list {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
}

body[data-current-view="library"] .item-list.is-expanded {
  max-height: 560px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-color: rgba(80, 136, 255, 0.62) rgba(18, 34, 58, 0.45);
  scrollbar-width: thin;
}

body[data-current-view="library"] .item-list.is-expanded::-webkit-scrollbar {
  width: 8px;
}

body[data-current-view="library"] .item-list.is-expanded::-webkit-scrollbar-track {
  background: rgba(18, 34, 58, 0.45);
  border-radius: 999px;
}

body[data-current-view="library"] .item-list.is-expanded::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7c5cff, #26a6ff);
  border-radius: 999px;
}

.library-record-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 0 0 12px;
  border-bottom: 1px solid rgba(56, 88, 142, 0.36);
  color: #dbe7f4;
  cursor: pointer;
}

.library-record-card:last-child {
  border-bottom: 0;
}

.library-record-main {
  position: relative;
  display: grid;
  grid-template-columns: 18px 58px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.library-image-record .library-record-main {
  grid-template-columns: 18px 112px minmax(0, 1fr) auto;
}

.library-select-control {
  position: relative;
  align-self: start;
  padding-top: 4px;
  width: 18px;
  height: 22px;
  cursor: pointer;
}

.library-select-control input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

.library-select-control span {
  width: 17px;
  height: 17px;
  border: 1px solid rgba(107, 135, 178, 0.72);
  border-radius: 4px;
  background: rgba(6, 16, 31, 0.9);
}

.library-select-control input:checked + span {
  border-color: #6f79ff;
  background: linear-gradient(135deg, #6a59ff, #2888ff);
}

.library-select-control input:checked + span::after {
  content: "";
  display: block;
  width: 8px;
  height: 5px;
  margin: 4px auto 0;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

.library-kind-icon,
.library-thumb {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  border: 1px solid rgba(56, 88, 142, 0.5);
  background: rgba(22, 43, 80, 0.82);
}

.library-thumb {
  width: 112px;
  object-fit: cover;
}

.library-kind-icon {
  position: relative;
  display: grid;
  place-items: center;
}

.library-kind-icon::before {
  content: "";
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #8b6cff, #20b7ff);
  mask: var(--library-kind-icon) center / contain no-repeat;
  -webkit-mask: var(--library-kind-icon) center / contain no-repeat;
}

.library-kind-icon.person {
  background: linear-gradient(135deg, rgba(98, 64, 190, 0.9), rgba(31, 56, 120, 0.92));
  --library-kind-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm0 2c-4.4 0-8 2.2-8 5v1h16v-1c0-2.8-3.6-5-8-5Z'/%3E%3C/svg%3E");
}

.library-kind-icon.image {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.88), rgba(20, 184, 166, 0.68));
  --library-kind-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 5h16v14H4V5Zm2 2v8l4-4 3 3 2-2 3 3V7H6Zm3 3a1.7 1.7 0 1 0 0-3.4A1.7 1.7 0 0 0 9 10Z'/%3E%3C/svg%3E");
}

.library-kind-icon.box {
  background: linear-gradient(135deg, rgba(246, 139, 26, 0.95), rgba(134, 86, 18, 0.8));
  --library-kind-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='m12 2 9 5v10l-9 5-9-5V7l9-5Zm0 2.3L5.2 8 12 11.7 18.8 8 12 4.3ZM5 10.1v5.7l6 3.3v-5.7l-6-3.3Zm8 9 6-3.3v-5.7l-6 3.3v5.7Z'/%3E%3C/svg%3E");
}

.library-kind-icon.document {
  --library-kind-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 3h9l4 4v14H6V3Zm8 1.8V8h3.2L14 4.8ZM8 11v2h8v-2H8Zm0 4v2h6v-2H8Z'/%3E%3C/svg%3E");
}

.library-kind-icon.video {
  --library-kind-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 5h16v14H4V5Zm6 4v6l5-3-5-3Z'/%3E%3C/svg%3E");
}

.library-record-copy {
  min-width: 0;
}

.library-record-title {
  overflow: hidden;
  color: #f0f6ff;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-record-body-text {
  display: -webkit-box;
  min-height: 34px;
  margin-top: 5px;
  overflow: hidden;
  color: #aebbd0;
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.library-record-meta {
  margin-top: 5px;
  color: #aab7cc;
  font-size: 12px;
  line-height: 1.35;
}

.library-type-badge {
  justify-self: end;
  min-width: 42px;
  border: 1px solid rgba(112, 89, 255, 0.46);
  border-radius: 999px;
  padding: 3px 8px;
  color: #c6a8ff;
  background: rgba(91, 67, 199, 0.22);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.library-type-badge.scene {
  border-color: rgba(67, 204, 112, 0.42);
  color: #78e58d;
  background: rgba(31, 136, 61, 0.18);
}

.library-type-badge.prop {
  border-color: rgba(241, 173, 45, 0.42);
  color: #ffd06f;
  background: rgba(177, 106, 18, 0.18);
}

.library-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  padding-left: 28px;
}

.library-icon-button {
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 28px;
  border: 1px solid rgba(58, 89, 142, 0.62);
  border-radius: 7px;
  background: rgba(7, 18, 33, 0.78);
  color: #eef5ff;
}

.library-icon-button b {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.library-icon-button:hover {
  color: #ffffff;
  border-color: rgba(119, 147, 255, 0.78);
  background: rgba(22, 45, 82, 0.9);
}

.library-icon-button.is-active {
  color: #ffffff;
  border-color: rgba(126, 112, 255, 0.9);
  background: linear-gradient(135deg, rgba(101, 91, 255, 0.62), rgba(28, 159, 255, 0.34));
  box-shadow: 0 0 14px rgba(80, 106, 255, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.library-icon-button.archive.is-active {
  border-color: rgba(95, 220, 142, 0.74);
  background: rgba(36, 142, 78, 0.28);
  color: #7df0a2;
}

.library-icon-button.danger,
.library-footer-legend .trash {
  color: #ff4050;
}

.library-action-icon.star {
  --library-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linejoin='round' d='m12 3 2.8 5.7 6.2.9-4.5 4.4 1.1 6.2-5.6-3-5.6 3 1.1-6.2L3 9.6l6.2-.9L12 3Z'/%3E%3C/svg%3E");
}

.library-action-icon.archive {
  --library-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M6 7v13h12V7M9 3h6l1 4H8l1-4Z'/%3E%3Cpath d='M10 12h4'/%3E%3C/g%3E%3C/svg%3E");
}

.library-action-icon.copy {
  --library-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='8' y='8' width='11' height='12' rx='2'/%3E%3Cpath d='M5 16V6a2 2 0 0 1 2-2h8'/%3E%3C/g%3E%3C/svg%3E");
}

.library-action-icon.video {
  --library-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='13' height='14' rx='2'/%3E%3Cpath d='m16 10 5-3v10l-5-3Z'/%3E%3C/g%3E%3C/svg%3E");
}

.library-action-icon.download,
.library-action-icon.export {
  --library-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 10l5 5 5-5M5 21h14'/%3E%3C/g%3E%3C/svg%3E");
}

.library-action-icon.trash {
  --library-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6M10 11v6M14 11v6'/%3E%3C/g%3E%3C/svg%3E");
}

.library-action-icon.prompt {
  --library-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h12v18H6zM9 8h6M9 12h6M9 16h3'/%3E%3C/g%3E%3C/svg%3E");
}

.library-view-all {
  justify-self: center;
  margin-top: 12px;
  border: 0;
  background: transparent;
  color: #83a0ff;
  font-weight: 900;
}

.library-view-all:disabled {
  cursor: default;
  opacity: 0.42;
}

.library-view-all.is-expanded {
  color: #66e7ff;
}

.library-view-all::after {
  content: "›";
  margin-left: 8px;
}

.library-view-all.is-expanded::after {
  content: "⌃";
}

.library-empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  color: #7f91ad;
  border: 1px dashed rgba(58, 89, 142, 0.54);
  border-radius: 8px;
  background: rgba(7, 18, 33, 0.42);
}

.library-footer-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  padding: 14px 4px 0;
  color: #b4c3d8;
  font-size: 14px;
}

.library-footer-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.video-media-role {
  width: 100%; max-width: 100%; min-height: 36px; border: 1px solid rgba(126, 201, 255, 0.18); border-radius: 10px;
  background: rgba(4, 10, 18, 0.7); color: var(--text); padding: 7px 9px;
}
.video-media-body .mini-button {
  width: 100%;
  justify-self: stretch;
}
.video-main-prompt textarea { min-height: 210px; font-size: 15px; line-height: 1.7; }
.simple-video-mode { display: flex; flex-wrap: wrap; gap: 8px; }
.form-three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.advanced-video-settings {
  border: 1px solid rgba(126, 201, 255, 0.14); border-radius: 18px; padding: 14px;
  background: rgba(255,255,255,0.025);
}
.advanced-video-settings summary, .prompt-debug-panel summary { cursor: pointer; color: var(--text); font-weight: 700; }
.compact-advanced-grid { margin-top: 14px; }
.video-result-grid { display: grid; gap: 14px; }
.video-task-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 10px;
}
.video-task-summary > div {
  border: 1px solid rgba(122, 249, 238, 0.14);
  border-radius: var(--radius);
  padding: 12px;
  background: linear-gradient(135deg, rgba(32, 214, 199, 0.08), rgba(125, 124, 255, 0.06)), rgba(7, 13, 22, 0.72);
}
.video-task-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.video-task-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--text-strong);
  font-size: 22px;
}
.video-preview-box { background: rgba(3, 8, 14, 0.72); }
.generated-video { width: 100%; max-height: 520px; display: block; background: #000; }
.prompt-debug-panel { margin-top: 16px; border-top: 1px solid rgba(126, 201, 255, 0.14); padding-top: 14px; }
@media (max-width: 920px) { .form-three-col { grid-template-columns: 1fr; } }

@media (max-width: 1180px) {
  .dashboard-metrics,
  .dashboard-grid,
  .provider-center-summary,
  .video-task-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .provider-center-layout,
  .provider-center-lower-grid,
  .dashboard-board-grid {
    grid-template-columns: 1fr;
  }
  .provider-center-side {
    position: static;
  }
  body[data-current-view="dashboard"] .dashboard-query-strip {
    width: 100%;
    margin-top: 0;
    margin-bottom: 0;
  }
  body[data-current-view="dashboard"] .dashboard-query-strip > div:first-child {
    display: block;
  }
  .dashboard-donut-wrap,
  .dashboard-pipeline {
    grid-template-columns: 1fr;
  }
  .script-layout {
    grid-template-columns: 1fr;
  }
  .script-output-panel {
    position: relative;
    top: auto;
  }
  .dashboard-wide {
    grid-column: span 2;
  }
}

@media (max-width: 760px) {
  .dashboard-hero,
  .provider-center-hero,
  .metric-card {
    flex-direction: column;
  }
  .provider-center-summary,
  .video-task-summary {
    grid-template-columns: 1fr;
  }
  .provider-center-overview-head,
  .dashboard-query-strip {
    align-items: stretch;
    flex-direction: column;
  }
  .provider-center-overview-head .primary-button {
    width: 100%;
  }
  .provider-center-card-head {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .provider-center-status {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .dashboard-metrics,
  .dashboard-grid,
  .script-layout,
  .radar-stack,
  .dashboard-pipeline,
  .orbital-week {
    grid-template-columns: 1fr;
  }
  .dashboard-donut-wrap {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }
  .dashboard-donut {
    justify-self: center;
  }
  .dashboard-provider-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .dashboard-provider-row div,
  .dashboard-provider-row small {
    grid-column: 1 / -1;
  }
  .dashboard-provider-row em {
    display: none;
  }
  .script-progress {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .script-progress-line {
    display: none;
  }
  .script-progress-step {
    justify-content: flex-start;
  }
  .script-field-card {
    grid-template-columns: 1fr;
  }
  .script-action-row > *,
  .script-download-notice .mini-button {
    flex: 1 1 100%;
  }
  .script-download-notice {
    align-items: stretch;
    flex-direction: column;
  }
  .script-generation-record {
    grid-template-columns: 1fr;
    gap: 4px;
    align-items: start;
  }
  .script-generation-record em {
    justify-content: flex-start;
    white-space: normal;
  }
  .script-result-tabs {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .script-pipeline {
    grid-template-columns: 1fr;
  }
  .script-pipeline b {
    display: none;
  }
  .script-pipeline-item {
    min-height: 82px;
  }
  .script-asset-columns {
    grid-template-columns: 1fr;
  }
  .dashboard-wide {
    grid-column: span 1;
  }
  .dashboard-controls {
    justify-content: stretch;
  }
  .dashboard-controls > * {
    flex: 1 1 100%;
  }
  .sidebar-logo {
    width: 100%;
  }
  .login-logo,
  .boot-logo {
    width: min(300px, 100%);
  }
}


/* Reusable video reference map */
.reference-map-panel,
.shot-reference-panel,
.temporary-reference-panel {
  border: 1px solid rgba(126, 201, 255, 0.12);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,0.018);
}
.compact-upload-zone {
  min-height: 104px;
  padding: 16px;
}
.video-reference-table {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.video-reference-row {
  display: grid;
  grid-template-columns: auto 76px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(126, 201, 255, 0.14);
  border-radius: 16px;
  background: rgba(5, 12, 20, 0.42);
}
.reference-code-pill {
  min-width: 58px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(126, 201, 255, 0.14);
  color: var(--text);
  font-weight: 800;
  text-align: center;
}
.reference-code-pill strong,
.reference-code-pill span { display: block; }
.reference-code-pill span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.reference-thumb {
  width: 76px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  font-size: 12px;
}
.reference-thumb img,
.reference-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.reference-audio-thumb {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  gap: 4px;
  background: linear-gradient(145deg, rgba(122, 249, 238, 0.18), rgba(255, 132, 183, 0.10));
}
.reference-audio-icon {
  width: 36px;
  height: 30px;
  background: currentColor;
  color: #7af9ee;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M8 24v6M16 14v20M24 8v32M32 16v16M40 22v8'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M8 24v6M16 14v20M24 8v32M32 16v16M40 22v8'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}
.reference-audio-thumb small { color: var(--muted); font-weight: 800; }
.reference-edit-fields {
  display: grid;
  grid-template-columns: 92px minmax(160px, 1fr) 140px;
  gap: 8px;
}
.reference-edit-fields select {
  border: 1px solid rgba(126, 201, 255, 0.18);
  border-radius: 12px;
  background: rgba(4, 10, 18, 0.7);
  color: var(--text);
  padding: 8px 10px;
}
.reference-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.reference-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}
.current-reference-title {
  margin-top: 12px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.accounts-root {
  display: grid;
  gap: 14px;
}

.accounts-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(520px, 1.22fr);
  gap: 18px;
  align-items: start;
}

.accounts-console {
  display: grid;
  grid-template-columns: minmax(360px, 0.78fr) minmax(540px, 1.18fr) minmax(370px, 0.82fr);
  gap: 12px;
  align-items: start;
}

.account-create-panel,
.account-list-panel,
.account-side-panel {
  min-height: 100%;
  border-radius: 8px;
  border-color: rgba(72, 101, 164, 0.46);
  background:
    linear-gradient(145deg, rgba(13, 31, 55, 0.86), rgba(5, 14, 28, 0.9) 48%, rgba(8, 18, 34, 0.86)),
    rgba(4, 11, 23, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 18px 46px rgba(0, 0, 0, 0.18);
}

.account-create-panel .section-header,
.account-list-panel .section-header {
  margin-bottom: 14px;
}

.account-create-panel .section-header p,
.account-list-panel .section-header p {
  display: none;
}

.account-create-panel .section-header h2,
.account-list-panel .section-header h2,
.account-side-head h2 {
  font-size: 20px;
  line-height: 1.15;
}

.account-error {
  min-height: auto;
  margin-bottom: 14px;
  padding: 12px;
}

.account-table {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(72, 101, 164, 0.24);
  border-radius: 8px;
  background: rgba(7, 18, 34, 0.28);
}

.account-table-head {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 84px 106px 92px 140px 62px;
  gap: 10px;
  padding: 13px 14px;
  background: rgba(12, 28, 48, 0.56);
  color: #aebbd0;
  font-size: 12px;
  font-weight: 800;
}

.account-summary-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 84px 106px 92px 140px 62px;
  gap: 10px;
  align-items: center;
  text-align: left;
  min-height: 56px;
  padding: 10px 14px;
  border: 0;
  border-top: 1px solid rgba(72, 101, 164, 0.22);
  border-radius: 0;
  background: rgba(5, 14, 28, 0.22);
  color: inherit;
  cursor: pointer;
  transition: 140ms ease;
}

.account-summary-row:hover,
.account-summary-row.active {
  border-color: rgba(71, 112, 255, 0.58);
  background:
    linear-gradient(90deg, rgba(13, 67, 180, 0.38), rgba(11, 45, 105, 0.08)),
    rgba(15, 37, 76, 0.24);
  box-shadow: inset 3px 0 0 rgba(64, 123, 255, 0.94);
}

.account-summary-row strong,
.account-summary-row span {
  display: block;
}

.account-summary-row strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-strong);
}

.account-summary-row span {
  color: var(--muted);
  font-size: 12px;
}

.account-summary-row em {
  width: max-content;
  padding: 3px 9px;
  border-radius: 999px;
  color: #90ffb3;
  background: rgba(40, 210, 112, 0.16);
  font-size: 13px;
  font-style: normal;
  text-align: right;
}

.account-summary-row i {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  color: #cbdbe7;
  font-style: normal;
}

.account-row-icon,
.account-row-action,
.account-action-icon,
.account-role-icon {
  display: inline-block;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  background: currentColor;
  mask: var(--account-icon) center / contain no-repeat;
  -webkit-mask: var(--account-icon) center / contain no-repeat;
}

.account-row-icon {
  color: #7aa7ff;
  --account-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M5 21a7 7 0 0 1 14 0'/%3E%3C/g%3E%3C/svg%3E");
}

.account-row-action.edit,
.account-action-icon.save {
  --account-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z'/%3E%3C/g%3E%3C/svg%3E");
}

.account-row-action.delete,
.account-action-icon.trash {
  --account-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6M10 11v6M14 11v6'/%3E%3C/g%3E%3C/svg%3E");
}

.account-action-icon.plus {
  --account-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/g%3E%3C/svg%3E");
}

.account-action-icon.lock {
  --account-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/g%3E%3C/svg%3E");
}

.account-search-field {
  display: block;
  margin-bottom: 14px;
  position: relative;
}

.account-search-field span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.account-search-field::before,
.account-icon-field::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  background: #7f91ad;
  pointer-events: none;
  mask: var(--account-field-icon) center / contain no-repeat;
  -webkit-mask: var(--account-field-icon) center / contain no-repeat;
}

.account-search-field::before {
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  --account-field-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/g%3E%3C/svg%3E");
}

.account-search-field input {
  padding-left: 42px;
}

.account-side-panel {
  display: grid;
  gap: 14px;
}

.account-side-head,
.account-section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-side-head h2 {
  margin: 0;
}

.account-side-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.icon-only {
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 22px;
}

.account-detail-title {
  color: #f1f6ff;
  font-size: 15px;
  font-weight: 900;
}

.account-info-list {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px 16px;
  margin: 0;
}

.account-info-list div {
  display: contents;
}

.account-info-list dt {
  color: #93a1b8;
}

.account-info-list dd {
  margin: 0;
  color: #dbe8f2;
}

.account-status-pill {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  color: #90ffb3;
  background: rgba(40, 210, 112, 0.16);
}

.account-safe-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.account-create-panel .field:not(.permission-field):not(.account-role-field) {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  position: relative;
}

.account-create-panel .field > span,
.account-role-field > span,
.permission-field > span,
.permission-field .account-section-row > span {
  color: #c9d4e6;
  font-size: 14px;
  font-weight: 800;
}

.account-icon-field::before {
  left: 100px;
  top: 50%;
  transform: translateY(-50%);
}

.account-icon-user {
  --account-field-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M5 21a7 7 0 0 1 14 0'/%3E%3C/g%3E%3C/svg%3E");
}

.account-icon-lock {
  --account-field-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/g%3E%3C/svg%3E");
}

.account-icon-field input {
  padding-left: 38px;
}

.account-role-field {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.account-role-segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.account-role-segment label {
  position: relative;
}

.account-role-segment input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.account-role-segment label > span.account-role-icon,
.account-role-segment b {
  position: relative;
  z-index: 1;
}

.account-role-segment label {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(72, 101, 164, 0.42);
  border-radius: 6px;
  background: rgba(8, 19, 36, 0.72);
  color: #cbd7eb;
  cursor: pointer;
}

.account-role-segment label:has(input:checked) {
  border-color: rgba(56, 148, 255, 0.82);
  background: linear-gradient(135deg, rgba(40, 74, 225, 0.72), rgba(16, 112, 211, 0.58));
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 0 20px rgba(54, 113, 255, 0.18);
}

.account-role-icon.user {
  --account-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M5 21a7 7 0 0 1 14 0'/%3E%3C/g%3E%3C/svg%3E");
}

.account-role-icon.shield {
  --account-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 20 6v6c0 5-3.2 8-8 9-4.8-1-8-4-8-9V6z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/g%3E%3C/svg%3E");
}

.provider-icon-upload-field small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.account-detail-modal {
  width: min(760px, calc(100vw - 32px));
}

.account-detail-body,
.account-reset-form {
  display: grid;
  gap: 14px;
}

.account-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-detail-meta span {
  border: 1px solid rgba(126, 201, 255, 0.16);
  border-radius: 999px;
  padding: 6px 10px;
  color: #cbdbe7;
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
}

.account-detail-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(126, 201, 255, 0.12);
  border-radius: 12px;
  background: rgba(5, 12, 20, 0.34);
}

.account-detail-message {
  border: 1px solid rgba(126, 201, 255, 0.18);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: #cbdbe7;
  background: rgba(255, 255, 255, 0.035);
  font-size: 13px;
}

.account-detail-message.success {
  border-color: rgba(72, 227, 155, 0.32);
  color: #bdf8d9;
  background: rgba(72, 227, 155, 0.09);
}

.account-detail-message.error {
  border-color: rgba(255, 111, 145, 0.32);
  color: #ffc3d0;
  background: rgba(255, 111, 145, 0.09);
}

.account-section-title,
.permission-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.account-permission-summary {
  margin: 0;
  color: #cbdbe7;
  font-size: 13px;
  line-height: 1.6;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 8px;
}

.account-quota-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  max-height: 344px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-color: rgba(80, 136, 255, 0.62) rgba(18, 34, 58, 0.45);
  scrollbar-width: thin;
}

.quota-choice {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(126, 201, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.quota-choice span {
  color: #d8e6f0;
  font-size: 12px;
  font-weight: 800;
}

.quota-choice input {
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
}

.quota-choice small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.quota-choice.disabled {
  opacity: 0.72;
}

.permission-choice {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid rgba(126, 201, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: #d8e6f0;
  font-size: 13px;
}

.permission-choice input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}

.permission-choice small {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 11px;
}

.permission-choice.disabled {
  opacity: 0.66;
}

.button-row.compact {
  margin-top: 0;
}

.account-detail-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.mini-button.danger {
  border-color: rgba(255, 107, 107, 0.34);
  color: #ffd0d0;
}

.mini-button.danger:disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

body[data-current-view="accounts"] .account-detail-section {
  border-color: rgba(72, 101, 164, 0.24);
  border-radius: 8px;
  background: rgba(6, 17, 34, 0.38);
}

body[data-current-view="accounts"] .account-section-title,
body[data-current-view="accounts"] .permission-field > span {
  color: #dce7fb;
}

body[data-current-view="accounts"] .permission-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

body[data-current-view="accounts"] .permission-choice {
  min-height: 34px;
  gap: 8px;
  padding: 7px 9px;
  border-color: rgba(72, 101, 164, 0.34);
  border-radius: 6px;
  background: rgba(13, 29, 53, 0.58);
  color: #d8e6f0;
  font-size: 12px;
  font-weight: 750;
}

body[data-current-view="accounts"] .permission-choice input {
  position: relative;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  appearance: none;
  border: 1px solid rgba(111, 139, 200, 0.62);
  border-radius: 4px;
  background: rgba(6, 14, 28, 0.72);
  accent-color: auto;
}

body[data-current-view="accounts"] .permission-choice input:checked {
  border-color: rgba(106, 105, 255, 0.96);
  background: linear-gradient(135deg, #7f57ff, #2f89ff);
  box-shadow: 0 0 12px rgba(79, 106, 255, 0.32);
}

body[data-current-view="accounts"] .permission-choice input:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(45deg);
}

.account-quota-table {
  display: grid;
  max-height: 326px;
  overflow-y: auto;
  border: 1px solid rgba(72, 101, 164, 0.24);
  border-radius: 8px;
  background: rgba(5, 15, 30, 0.32);
  scrollbar-color: rgba(80, 136, 255, 0.62) rgba(18, 34, 58, 0.45);
  scrollbar-width: thin;
}

.account-quota-table.is-usage {
  max-height: 300px;
}

.account-quota-table::-webkit-scrollbar,
.account-quota-grid::-webkit-scrollbar {
  width: 8px;
}

.account-quota-table::-webkit-scrollbar-track,
.account-quota-grid::-webkit-scrollbar-track {
  background: rgba(18, 34, 58, 0.45);
  border-radius: 999px;
}

.account-quota-table::-webkit-scrollbar-thumb,
.account-quota-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7c5cff, #26a6ff);
  border-radius: 999px;
}

.account-quota-head,
.account-quota-row {
  display: grid;
  grid-template-columns: minmax(158px, 1.35fr) minmax(92px, 0.7fr) minmax(104px, 0.75fr);
  gap: 10px;
  align-items: center;
}

.account-quota-table.is-usage .account-quota-head,
.account-quota-table.is-usage .account-quota-row {
  grid-template-columns: minmax(92px, 1fr) 88px minmax(110px, 1fr);
}

.account-quota-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  background: rgba(10, 25, 45, 0.95);
  box-shadow: 0 1px 0 rgba(72, 101, 164, 0.22), 0 10px 20px rgba(0, 0, 0, 0.18);
  color: #aebbd0;
  font-size: 12px;
  font-weight: 800;
}

.account-quota-row {
  min-height: 46px;
  padding: 7px 12px;
  border-top: 1px solid rgba(72, 101, 164, 0.18);
}

.account-quota-row input {
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 6px;
}

.account-service-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #d8e6f0;
  font-size: 13px;
  font-weight: 800;
}

.account-service-name > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.account-service-name b {
  min-width: 0;
  overflow: hidden;
  color: #d8e6f0;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-service-name em {
  min-width: 0;
  overflow: hidden;
  color: #7f91ad;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-service-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.account-service-icon img {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(94, 167, 255, 0.48));
}

.account-service-icon.quota-provider {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.account-service-icon.quota-provider img {
  width: 21px;
  height: 21px;
  filter: drop-shadow(0 0 4px rgba(109, 178, 255, 0.32));
}

.account-service-icon.quota-volcengine,
.account-service-icon.quota-video-volcengine {
  background: transparent;
}

.account-service-icon.quota-total,
.account-service-icon.quota-script,
.account-service-icon.quota-storyboard,
.account-service-icon.quota-image,
.account-service-icon.quota-video,
.account-service-icon.quota-video-query {
  background: transparent;
}

.account-service-icon.quota-voice-design,
.account-service-icon.quota-voice-clone {
  background: transparent;
}

.account-service-icon.quota-xai img,
.account-service-icon.quota-video-xai img {
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.36));
}

.quota-total {
  color: #8f7aff;
  --account-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 13a8 8 0 0 1 16 0'/%3E%3Cpath d='M12 13l4-5'/%3E%3Cpath d='M6 17h12'/%3E%3C/g%3E%3C/svg%3E");
}

.quota-script {
  color: #f8c85c;
  --account-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h9l3 3v15H6z'/%3E%3Cpath d='M14 3v4h4M9 12h6M9 16h4'/%3E%3C/g%3E%3C/svg%3E");
}

.quota-storyboard {
  color: #ffb85c;
  --account-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M7 5v14M17 5v14M3 10h18M3 14h18'/%3E%3C/g%3E%3C/svg%3E");
}

.quota-image {
  color: #67e8f9;
  --account-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='14' rx='2'/%3E%3Ccircle cx='9' cy='10' r='1.5'/%3E%3Cpath d='M6 17l4-4 3 3 2-2 3 3'/%3E%3C/g%3E%3C/svg%3E");
}

.quota-openai {
  color: #9cf2d0;
  --account-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 3a4 4 0 0 1 4 4c3 0 5 2 5 5a4 4 0 0 1-4 4 4 4 0 0 1-8 0 4 4 0 0 1-4-4c0-3 2-5 5-5a4 4 0 0 1 2-4z'/%3E%3Cpath d='M9 12h6M12 9v6'/%3E%3C/g%3E%3C/svg%3E");
}

.quota-volcengine,
.quota-video-volcengine {
  color: #ff6f91;
  --account-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M13.2 2.8c.2 2.7-1.6 4.2-3.2 5.8-1.3 1.3-2.5 2.7-2.5 5 0 3 2.1 5 4.5 5s4.5-2 4.5-4.8c0-1.8-.8-3.3-2.1-4.6.1 1.8-.8 3-2.1 3.7.2-2.9-2-4.8.9-10.1z'/%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' d='M5 14c0 4 3 7 7 7s7-3 7-7c0-3.5-2-5.8-4.2-8.1'/%3E%3C/svg%3E");
}

.quota-aliyun,
.quota-video-aliyun {
  color: #48b7ff;
  --account-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 18h10a4 4 0 0 0 .5-8A6 6 0 0 0 6.2 8.5 4.5 4.5 0 0 0 7 18z'/%3E%3Cpath d='M9 13h6'/%3E%3C/g%3E%3C/svg%3E");
}

.quota-xai,
.quota-video-xai {
  color: #d4e1ff;
  --account-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 5l14 14M19 5L5 19'/%3E%3Cpath d='M12 3l1.5 4L17 9l-3.5 2L12 15l-1.5-4L7 9l3.5-2z'/%3E%3C/g%3E%3C/svg%3E");
}

.quota-custom-image,
.quota-custom-video {
  color: #a78bfa;
  --account-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 7V4M15 7V4M9 20v-3M15 20v-3M7 9H4M7 15H4M20 9h-3M20 15h-3'/%3E%3Crect x='7' y='7' width='10' height='10' rx='2'/%3E%3C/g%3E%3C/svg%3E");
}

.quota-video {
  color: #5eead4;
  --account-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='14' rx='2'/%3E%3Cpath d='M10 9l5 3-5 3z'/%3E%3C/g%3E%3C/svg%3E");
}

.quota-video-query {
  color: #93c5fd;
  --account-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h16v10H4z'/%3E%3Cpath d='M8 20h8M12 16v4M8 10h5'/%3E%3Cpath d='M17 10a3 3 0 1 1-1 2.2'/%3E%3C/g%3E%3C/svg%3E");
}

.quota-voice-design {
  color: #76f7b1;
  --account-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 13v-2M8 17V7M12 20V4M16 17V7M20 13v-2'/%3E%3C/g%3E%3C/svg%3E");
}

.quota-voice-clone {
  color: #f0abfc;
  --account-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='3' width='6' height='11' rx='3'/%3E%3Cpath d='M5 11a7 7 0 0 0 14 0M12 18v3M9 21h6M4 5h3M17 5h3M5 8h2M17 8h2'/%3E%3C/g%3E%3C/svg%3E");
}

.account-quota-scope {
  min-width: 0;
  overflow: hidden;
  color: #8fa3bd;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-usage-cell {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.account-usage-cell b {
  color: #b9c8dc;
  font-size: 11px;
}

.account-usage-cell i {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(72, 101, 164, 0.28);
}

.account-usage-cell i::before {
  content: "";
  display: block;
  width: calc(var(--usage, 0) * 1%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #785fff, #3d89ff);
}

.account-create-button,
.account-clear-button,
.account-safe-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 6px;
}

.account-create-button,
body[data-current-view="accounts"] .account-create-button {
  min-height: 48px;
  background: linear-gradient(135deg, #8d3eff, #197dff 62%, #20b6ff);
  color: #ffffff;
}

.account-clear-button {
  min-height: 48px;
  border-color: rgba(72, 101, 164, 0.42);
  background: rgba(6, 15, 29, 0.66);
}

.account-safe-actions .primary-button {
  min-height: 44px;
}

body[data-current-view="accounts"] .account-safe-button.reset {
  background: linear-gradient(135deg, rgba(24, 88, 211, 0.86), rgba(25, 73, 173, 0.88));
}

body[data-current-view="accounts"] .account-safe-button.save {
  background: linear-gradient(135deg, #7f36ff, #4b46ff 58%, #196bff);
}

body[data-current-view="accounts"] .account-safe-button.delete {
  border-color: rgba(255, 76, 99, 0.44);
  background: linear-gradient(135deg, rgba(151, 35, 54, 0.94), rgba(112, 24, 45, 0.92));
}

.boot-error {
  grid-column: 1 / -1;
  color: #ffd0d0;
  font-size: 12px;
}

@media (max-width: 980px) {
  .accounts-layout,
  .accounts-console,
  .account-summary-row {
    grid-template-columns: 1fr;
  }
  .account-table-head {
    display: none;
  }
  .account-safe-actions {
    grid-template-columns: 1fr;
  }
  .account-summary-row em {
    text-align: left;
  }
}
@media (max-width: 1100px) {
  .video-reference-row,
  .reference-edit-fields,
  .reference-code-row {
    grid-template-columns: 1fr;
  }
  .reference-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
  }
}


.voice-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 20px;
}

.voice-input-panel,
.voice-output-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(110, 206, 255, 0.16);
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 8%, rgba(46, 178, 255, 0.16), transparent 26%),
    radial-gradient(circle at 84% 16%, rgba(114, 93, 255, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(8, 17, 34, 0.96), rgba(6, 12, 24, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 22px 70px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(76, 150, 255, 0.05);
}

.voice-input-panel::before,
.voice-output-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, rgba(0,0,0,0.95), transparent 92%);
  opacity: 0.42;
}

.voice-input-panel > *,
.voice-output-panel > * {
  position: relative;
  z-index: 1;
}

.voice-stage {
  position: relative;
  min-height: 250px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: center;
  padding: 30px 30px 28px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(130, 211, 255, 0.14);
  background:
    radial-gradient(circle at 72% 50%, rgba(126, 111, 255, 0.25), transparent 28%),
    radial-gradient(circle at 60% 48%, rgba(53, 204, 255, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(14, 29, 54, 0.92), rgba(7, 17, 36, 0.94));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 16px 48px rgba(0,0,0,0.2);
}

.voice-stage::after {
  content: "";
  position: absolute;
  inset: auto -8% -18% auto;
  width: 58%;
  height: 72%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46,178,255,0.12), transparent 68%);
  filter: blur(14px);
  pointer-events: none;
}

.voice-stage-copy h2 {
  margin: 0;
  font-size: 42px;
  line-height: 1.08;
  color: #f7fbff;
  letter-spacing: 0.02em;
}

.voice-stage-copy p {
  margin: 14px 0 0;
  max-width: 560px;
  color: rgba(224, 238, 255, 0.72);
  line-height: 1.8;
  font-size: 14px;
}

.voice-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(71, 198, 255, 0.12);
  border: 1px solid rgba(113, 215, 255, 0.16);
  color: #82e0ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.voice-stage-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.voice-stage-tags span {
  padding: 8px 14px;
  border-radius: 999px;
  color: #d6f4ff;
  font-size: 12px;
  border: 1px solid rgba(126, 212, 255, 0.16);
  background: linear-gradient(135deg, rgba(45, 129, 255, 0.16), rgba(96, 237, 255, 0.09));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.voice-visualizer {
  position: relative;
  width: 290px;
  height: 220px;
  justify-self: end;
}

.voice-ring,
.voice-core {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.voice-ring {
  border: 1px solid rgba(122, 220, 255, 0.24);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.08), inset 0 0 20px rgba(56, 189, 248, 0.08);
}

.ring-one { width: 210px; height: 210px; }
.ring-two { width: 154px; height: 154px; border-color: rgba(168, 143, 255, 0.28); }
.ring-three { width: 106px; height: 106px; border-color: rgba(101, 234, 255, 0.34); }

.voice-core {
  width: 54px;
  height: 54px;
  background: radial-gradient(circle at 30% 30%, #9ff3ff, #42c2ff 45%, #6f5dff 100%);
  box-shadow: 0 0 36px rgba(83, 212, 255, 0.44), 0 0 86px rgba(111, 93, 255, 0.26);
}

.voice-wave-bars {
  position: absolute;
  inset: 50% 0 auto 0;
  transform: translateY(-50%);
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.voice-wave-bars i,
.upload-wave i {
  display: block;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(165,244,255,0.95), rgba(64,167,255,0.25));
  box-shadow: 0 0 18px rgba(78, 195, 255, 0.26);
}

.voice-wave-bars i {
  height: calc(18px + (var(--i) % 6) * 12px);
  opacity: calc(0.34 + (var(--i) * 0.03));
}

.voice-mode-shell {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.voice-mode-card,
.voice-style-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(124, 214, 255, 0.12);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(15, 32, 60, 0.95), rgba(8, 19, 39, 0.95));
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.voice-mode-card {
  min-height: 132px;
  padding: 22px;
  display: grid;
  align-content: start;
  gap: 7px;
  text-align: left;
}

.voice-mode-card .mode-icon {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  color: #c8f6ff;
  background: linear-gradient(135deg, rgba(52,177,255,0.26), rgba(114,93,255,0.2));
  border: 1px solid rgba(136, 225, 255, 0.16);
  font-size: 18px;
}

.voice-mode-card strong,
.voice-style-card strong {
  color: #f4fbff;
  font-size: 16px;
}

.voice-mode-card small,
.voice-style-card small {
  color: rgba(218, 233, 255, 0.66);
  line-height: 1.6;
}

.voice-mode-card:hover,
.voice-style-card:hover,
.voice-mode-card.active,
.voice-style-card.selected {
  transform: translateY(-2px);
  border-color: rgba(121, 220, 255, 0.36);
  background: linear-gradient(135deg, rgba(26, 85, 150, 0.44), rgba(16, 36, 74, 0.96));
  box-shadow: 0 14px 30px rgba(7, 29, 70, 0.28), inset 0 0 0 1px rgba(154,235,255,0.08);
}

.voice-glass-card {
  position: relative;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(121, 213, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), transparent 32%),
    linear-gradient(180deg, rgba(15, 30, 57, 0.94), rgba(8, 18, 36, 0.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 12px 30px rgba(0,0,0,0.16);
}

.voice-card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.voice-card-title span {
  color: #f1fbff;
  font-size: 16px;
  font-weight: 800;
}

.voice-card-title em {
  font-style: normal;
  color: rgba(126, 225, 255, 0.7);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.voice-style-card {
  min-height: 120px;
  display: grid;
  align-content: start;
  gap: 8px;
  text-align: left;
  padding: 18px;
}

.voice-style-card span {
  width: 32px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7de3ff, #7c74ff);
  box-shadow: 0 0 20px rgba(84, 197, 255, 0.26);
}

.voice-input,
.voice-glass-card textarea,
.voice-glass-card select {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(118, 215, 255, 0.14);
  background: linear-gradient(180deg, rgba(9, 20, 39, 0.96), rgba(6, 15, 30, 0.96));
  color: #eaf8ff;
  padding: 13px 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.voice-input:focus,
.voice-glass-card textarea:focus,
.voice-glass-card select:focus {
  border-color: rgba(131, 232, 255, 0.58);
  box-shadow: 0 0 0 3px rgba(69, 196, 255, 0.12), inset 0 1px 0 rgba(255,255,255,0.02);
}

.voice-slider-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.voice-slider {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(117, 211, 255, 0.12);
  background: rgba(7, 18, 36, 0.84);
}

.voice-slider > span {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #e7f8ff;
}

.voice-slider strong {
  color: #83ebff;
  font-size: 18px;
}

.voice-slider input[type="range"] {
  width: 100%;
  margin: 14px 0 10px;
  accent-color: #4fdcff;
}

.voice-slider div {
  display: flex;
  justify-content: space-between;
  color: rgba(205, 227, 255, 0.5);
}

.voice-upload-zone {
  position: relative;
  min-height: 180px;
  border-radius: 24px;
  padding: 24px;
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  border: 1px dashed rgba(127, 222, 255, 0.24);
  background:
    radial-gradient(circle at 50% 12%, rgba(66, 195, 255, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(13, 27, 54, 0.95), rgba(8, 19, 39, 0.95));
  overflow: hidden;
}

.voice-upload-zone::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.04);
  pointer-events: none;
}

.voice-upload-zone input {
  display: none;
}

.voice-upload-zone strong {
  font-size: 18px;
  color: #f1fbff;
}

.voice-upload-zone small {
  max-width: 560px;
  color: rgba(222, 236, 255, 0.66);
  line-height: 1.7;
}

.upload-wave {
  position: absolute;
  inset: auto 20px 18px 20px;
  height: 42px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 4px;
  opacity: 0.84;
}

.upload-wave i {
  height: calc(8px + (var(--i) % 7) * 4px);
}

.voice-consent {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  color: #ffe6a2;
  border: 1px solid rgba(255, 202, 91, 0.18);
  background: linear-gradient(135deg, rgba(255, 184, 75, 0.14), rgba(255, 214, 137, 0.06));
}

.voice-output-panel .summary-box,
.voice-output-panel .prompt-block,
.voice-output-panel .info-box {
  border-radius: 22px;
  border: 1px solid rgba(120, 210, 255, 0.12);
  background: linear-gradient(180deg, rgba(14, 31, 59, 0.9), rgba(8, 18, 36, 0.94));
}

.voice-output-panel textarea {
  min-height: 160px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(9, 20, 39, 0.96), rgba(6, 15, 30, 0.96));
}

.voice-output-panel #voicePrompt {
  min-height: 220px;
}

.voice-output-panel #voicePayload {
  font-family: Consolas, 'Courier New', monospace;
  font-size: 12px;
}

.voice-api-note code {
  color: #8deaff;
}

@media (max-width: 1220px) {
  .voice-layout {
    grid-template-columns: 1fr;
  }

  .voice-stage {
    grid-template-columns: 1fr;
  }

  .voice-visualizer {
    justify-self: center;
  }
}

@media (max-width: 920px) {
  .voice-style-grid,
  .voice-mode-shell,
  .voice-slider-grid,
  .form-three-col {
    grid-template-columns: 1fr;
  }

  .voice-stage {
    padding: 22px;
    min-height: auto;
  }

  .voice-stage-copy h2 {
    font-size: 34px;
  }

  .voice-visualizer {
    width: 240px;
    height: 180px;
  }

  .ring-one { width: 170px; height: 170px; }
  .ring-two { width: 124px; height: 124px; }
  .ring-three { width: 86px; height: 86px; }
}

.voice-page {
  display: grid;
  gap: 20px;
}

.voice-page-header {
  border-radius: 28px;
  border: 1px solid rgba(112, 209, 255, 0.14);
  background:
    radial-gradient(circle at 82% 50%, rgba(107, 91, 255, 0.18), transparent 22%),
    radial-gradient(circle at 12% 0%, rgba(48, 188, 255, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(8, 18, 36, 0.96), rgba(6, 13, 26, 0.98));
}

.voice-page-kicker {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
  color: #8ce8ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  border: 1px solid rgba(112, 222, 255, 0.18);
  background: rgba(48, 188, 255, 0.08);
}

.voice-page-header h2 {
  margin: 0;
  font-size: 36px;
  color: #f6fbff;
}

.voice-page-header p {
  margin: 12px 0 0;
  max-width: 900px;
  color: rgba(228, 238, 255, 0.74);
  line-height: 1.75;
}

.voice-workspace {
  display: block;
}

.voice-dual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.voice-studio-card {
  position: relative;
  overflow: hidden;
  min-height: 760px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(119, 215, 255, 0.16);
  background:
    radial-gradient(circle at 88% 10%, rgba(98, 89, 255, 0.16), transparent 26%),
    radial-gradient(circle at 12% 0%, rgba(48, 188, 255, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(9, 20, 40, 0.98), rgba(6, 14, 28, 0.98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 24px 60px rgba(0,0,0,0.25);
}

.voice-studio-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.024) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.92), transparent 95%);
}

.voice-card-head,
.voice-card-body {
  position: relative;
  z-index: 1;
}

.voice-card-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.voice-card-kicker {
  color: #8de8ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  margin-bottom: 8px;
}

.voice-card-head h3 {
  margin: 0;
  color: #f7fbff;
  font-size: 28px;
}

.voice-card-head p {
  margin: 10px 0 0;
  color: rgba(228, 238, 255, 0.7);
  line-height: 1.7;
}

.voice-card-icon {
  width: 112px;
  height: 112px;
  flex: 0 0 112px;
  border-radius: 50%;
  position: relative;
  border: 1px solid rgba(129, 223, 255, 0.18);
  background: radial-gradient(circle, rgba(86,220,255,0.26), rgba(18,38,75,0.2) 60%, transparent 75%);
  box-shadow: 0 0 40px rgba(67, 194, 255, 0.14), inset 0 0 24px rgba(67, 194, 255, 0.12);
}

.design-icon::before,
.clone-icon::before,
.design-icon::after,
.clone-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.design-icon::before {
  width: 68px;
  height: 68px;
  border: 1px solid rgba(137, 238, 255, 0.4);
}

.design-icon::after {
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #88ecff, #5f71ff);
  box-shadow: 0 0 24px rgba(93, 204, 255, 0.35);
}

.clone-icon::before {
  width: 60px;
  height: 60px;
  border: 1px dashed rgba(137, 238, 255, 0.42);
}

.clone-icon::after {
  width: 30px;
  height: 30px;
  background: radial-gradient(circle, #a6f4ff, #40bfff 58%, #625eff 100%);
  box-shadow: 0 0 26px rgba(93, 204, 255, 0.34);
}

.voice-card-body {
  display: grid;
  gap: 16px;
}

.voice-main-field textarea,
.voice-result-box textarea {
  min-height: 160px;
}

.voice-main-field textarea {
  font-size: 14px;
  line-height: 1.75;
}

.voice-input,
.voice-studio-card textarea {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(118, 215, 255, 0.14);
  background: linear-gradient(180deg, rgba(9, 20, 39, 0.96), rgba(6, 15, 30, 0.96));
  color: #eaf8ff;
  padding: 15px 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.voice-input:focus,
.voice-studio-card textarea:focus {
  border-color: rgba(131, 232, 255, 0.58);
  box-shadow: 0 0 0 3px rgba(69, 196, 255, 0.12), inset 0 1px 0 rgba(255,255,255,0.02);
}

.voice-upload-zone {
  position: relative;
  min-height: 220px;
  border-radius: 24px;
  padding: 24px;
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  border: 1px dashed rgba(127, 222, 255, 0.24);
  background:
    radial-gradient(circle at 50% 12%, rgba(66, 195, 255, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(13, 27, 54, 0.95), rgba(8, 19, 39, 0.95));
  overflow: hidden;
}

.voice-upload-zone input { display: none; }

.voice-upload-zone strong {
  font-size: 22px;
  color: #f1fbff;
}

.voice-upload-zone small {
  max-width: 520px;
  color: rgba(222, 236, 255, 0.66);
  line-height: 1.7;
}

.upload-wave {
  position: absolute;
  inset: auto 20px 18px 20px;
  height: 42px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 4px;
  opacity: 0.84;
}

.upload-wave i {
  display: block;
  width: 4px;
  height: calc(8px + (var(--i) % 7) * 4px);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(165,244,255,0.95), rgba(64,167,255,0.25));
  box-shadow: 0 0 18px rgba(78, 195, 255, 0.26);
}

.voice-action-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.voice-inline-hint {
  color: rgba(216, 231, 247, 0.58);
  font-size: 12px;
}

.voice-result-box {
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(120, 210, 255, 0.12);
  background: linear-gradient(180deg, rgba(14, 31, 59, 0.9), rgba(8, 18, 36, 0.94));
}

.voice-result-box textarea {
  min-height: 150px;
  font-family: Consolas, 'Courier New', monospace;
  font-size: 12px;
  margin-top: 10px;
}

.voice-consent {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  color: #ffe6a2;
  border: 1px solid rgba(255, 202, 91, 0.18);
  background: linear-gradient(135deg, rgba(255, 184, 75, 0.14), rgba(255, 214, 137, 0.06));
}

@media (max-width: 1100px) {
  .voice-dual-grid {
    grid-template-columns: 1fr;
  }

  .voice-studio-card {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .voice-card-head {
    flex-direction: column;
  }

  .voice-card-icon {
    width: 92px;
    height: 92px;
    flex-basis: 92px;
  }

  .voice-page-header h2 {
    font-size: 30px;
  }
}

.voice-top-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.voice-strip-card {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(113, 214, 255, 0.14);
  background: linear-gradient(180deg, rgba(10, 24, 47, 0.96), rgba(6, 15, 31, 0.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  display: grid;
  gap: 8px;
}

.voice-strip-label {
  color: #8fe8ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.voice-strip-card small {
  color: rgba(221, 235, 255, 0.62);
  line-height: 1.65;
}

.voice-card-provider-row {
  margin-top: 14px;
}

.voice-provider-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(120, 210, 255, 0.16);
  background: rgba(22, 44, 82, 0.74);
  color: #dff7ff;
}

.voice-provider-chip.is-ok {
  color: #9ff7cc;
  border-color: rgba(74, 216, 153, 0.24);
  background: rgba(28, 73, 58, 0.34);
}

.voice-provider-chip.is-warning {
  color: #ffe3a0;
  border-color: rgba(255, 205, 102, 0.24);
  background: rgba(86, 62, 18, 0.28);
}

.voice-result-body {
  margin-top: 10px;
}

.voice-result-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.voice-result-meta div {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(120, 208, 255, 0.1);
  background: rgba(9, 19, 36, 0.7);
}

.voice-result-meta span {
  display: block;
  margin-bottom: 6px;
  color: rgba(214, 228, 247, 0.52);
  font-size: 12px;
}

.voice-result-meta strong {
  color: #f2fbff;
  font-size: 13px;
}

.voice-result-note,
.voice-result-empty {
  padding: 14px 16px;
  border-radius: 16px;
  line-height: 1.7;
}

.voice-result-note {
  color: rgba(231, 243, 255, 0.76);
  background: rgba(14, 31, 59, 0.62);
  border: 1px solid rgba(118, 209, 255, 0.1);
}

.voice-result-empty {
  color: rgba(206, 221, 241, 0.58);
  background: rgba(12, 23, 43, 0.52);
  border: 1px dashed rgba(118, 209, 255, 0.12);
}

.voice-audio-player {
  width: 100%;
  margin-top: 12px;
}

@media (max-width: 1100px) {
  .voice-top-strip {
    grid-template-columns: 1fr;
  }

  .voice-result-meta {
    grid-template-columns: 1fr;
  }
}

.voice-upload-zone.is-disabled {
  opacity: 0.62;
  pointer-events: none;
}

.voice-result-actions {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.voice-result-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.voice-result-buttons .mini-button {
  min-width: 88px;
  justify-content: center;
}

body[data-current-view="voice"] {
  background:
    linear-gradient(180deg, #020713 0%, #06142d 48%, #07133a 100%);
}

.voice-page {
  min-height: 100vh;
}

.voice-workspace {
  min-height: 100vh;
}

.voice-reference-shell {
  --voice-bg: #030919;
  --voice-bg-2: #071632;
  --voice-panel: rgba(9, 22, 51, 0.84);
  --voice-panel-strong: rgba(12, 27, 61, 0.94);
  --voice-line: rgba(73, 150, 255, 0.34);
  --voice-line-soft: rgba(105, 177, 255, 0.18);
  --voice-blue: #2eb7ff;
  --voice-blue-2: #4094ff;
  --voice-purple: #8b45ff;
  --voice-text: #f4f8ff;
  --voice-muted: rgba(222, 231, 255, 0.72);
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
  padding: 0 36px 44px;
  background:
    linear-gradient(90deg, rgba(18, 111, 255, 0.1), transparent 22%, transparent 74%, rgba(132, 49, 255, 0.12)),
    linear-gradient(180deg, var(--voice-bg) 0%, #06132b 42%, #06113a 100%);
  color: var(--voice-text);
}

.voice-reference-shell::before {
  content: "";
  position: absolute;
  inset: 68px 0 auto 0;
  height: 238px;
  pointer-events: none;
  z-index: -1;
  background:
    linear-gradient(90deg, transparent 0%, rgba(40, 168, 255, 0.26) 16%, transparent 38%),
    linear-gradient(270deg, transparent 0%, rgba(160, 54, 255, 0.26) 18%, transparent 42%),
    repeating-linear-gradient(90deg, rgba(83, 161, 255, 0.14) 0 1px, transparent 1px 56px);
  clip-path: polygon(0 35%, 12% 46%, 22% 38%, 36% 55%, 49% 43%, 61% 52%, 73% 35%, 86% 48%, 100% 28%, 100% 86%, 0 86%);
  opacity: 0.86;
}

.voice-reference-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(67, 144, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(67, 144, 255, 0.06) 1px, transparent 1px);
  background-size: 78px 78px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 72%);
}

.voice-hero-panel {
  position: relative;
  min-height: 184px;
  display: grid;
  grid-template-columns: 330px minmax(420px, 1fr) 380px;
  align-items: center;
  gap: 18px;
  padding: 30px 0 18px;
}

.voice-hero-copy {
  position: relative;
  z-index: 2;
  text-align: center;
}

.voice-hero-copy h2 {
  margin: 0;
  font-size: clamp(56px, 5.6vw, 84px);
  line-height: 0.98;
  font-weight: 950;
  color: transparent;
  background: linear-gradient(90deg, #38c7ff 10%, #76d8ff 38%, #f0d8ff 68%, #a85dff 94%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 0 32px rgba(61, 173, 255, 0.3);
}

.voice-hero-copy p {
  margin: 18px 0 0;
  color: rgba(245, 248, 255, 0.88);
  font-size: 22px;
  font-weight: 600;
}

.voice-hero-orbit {
  position: relative;
  width: 286px;
  height: 150px;
  justify-self: center;
}

.voice-orbit-ring,
.voice-mic-symbol,
.voice-orbit-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.voice-orbit-ring {
  border-radius: 50%;
  border: 1px solid rgba(48, 173, 255, 0.38);
  box-shadow: 0 0 26px rgba(39, 154, 255, 0.24), inset 0 0 22px rgba(39, 154, 255, 0.12);
}

.voice-orbit-ring.ring-a { width: 140px; height: 140px; }
.voice-orbit-ring.ring-b { width: 96px; height: 96px; border-color: rgba(90, 196, 255, 0.48); }
.voice-orbit-ring.ring-c { width: 188px; height: 84px; top: 78%; border-color: rgba(35, 148, 255, 0.34); }

.voice-orbit-glow {
  width: 154px;
  height: 18px;
  top: 82%;
  border-radius: 50%;
  background: rgba(28, 177, 255, 0.34);
  filter: blur(10px);
}

.voice-mic-symbol {
  width: 42px;
  height: 58px;
  background: linear-gradient(180deg, #80f0ff, #287eff);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 64'%3E%3Cg fill='none' stroke='black' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='14' y='5' width='20' height='34' rx='10'/%3E%3Cpath d='M7 29a17 17 0 0 0 34 0M24 46v12M15 58h18M19 17h10M19 26h10'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 64'%3E%3Cg fill='none' stroke='black' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='14' y='5' width='20' height='34' rx='10'/%3E%3Cpath d='M7 29a17 17 0 0 0 34 0M24 46v12M15 58h18M19 17h10M19 26h10'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 0 16px rgba(50, 185, 255, 0.9));
}

.voice-profile-visual {
  position: relative;
  height: 172px;
  justify-self: stretch;
}

.voice-profile-wave {
  position: absolute;
  left: -20px;
  right: 54px;
  top: 50%;
  height: 96px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  opacity: 0.94;
}

.voice-profile-wave i,
.voice-waveform i {
  display: block;
  width: 3px;
  height: var(--h);
  border-radius: 999px;
  background: linear-gradient(180deg, #28d9ff, #5367ff 48%, #b13dff);
  box-shadow: 0 0 14px rgba(77, 151, 255, 0.34);
}

.voice-profile-wave i {
  opacity: calc(0.2 + (var(--i) % 12) * 0.06);
  transform: scaleY(calc(0.58 + (var(--i) % 9) * 0.07));
}

.voice-profile-face {
  position: absolute;
  right: -26px;
  top: 0;
  width: 118px;
  height: 172px;
  border-right: 4px solid rgba(97, 194, 255, 0.92);
  border-radius: 48% 0 0 48%;
  filter: drop-shadow(0 0 18px rgba(62, 162, 255, 0.8));
}

.voice-profile-face::before {
  content: "";
  position: absolute;
  right: -7px;
  top: 20px;
  width: 88px;
  height: 124px;
  border: 2px solid rgba(101, 198, 255, 0.74);
  border-right: 0;
  border-bottom-color: transparent;
  border-radius: 58% 0 0 48%;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 18% 100%, 26% 72%, 10% 58%, 26% 44%, 14% 20%);
}

.voice-dual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: 20px;
}

.voice-studio-card {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  padding: 22px;
  border: 1px solid var(--voice-line);
  border-radius: 8px;
  background:
    linear-gradient(150deg, rgba(45, 126, 255, 0.14), transparent 36%),
    linear-gradient(330deg, rgba(139, 69, 255, 0.13), transparent 30%),
    var(--voice-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 20px 52px rgba(0, 0, 0, 0.22);
}

.voice-studio-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(100, 174, 255, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(100, 174, 255, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 92%);
}

.voice-studio-card.is-playing {
  border-color: rgba(75, 199, 255, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 0 1px rgba(52, 161, 255, 0.12),
    0 24px 60px rgba(0, 0, 0, 0.25),
    0 0 34px rgba(53, 151, 255, 0.16);
}

.voice-card-title-row,
.voice-card-body,
.voice-card-subtitle {
  position: relative;
  z-index: 1;
}

.voice-card-title-row {
  display: grid;
  grid-template-columns: 56px auto auto 1fr;
  align-items: center;
  gap: 14px;
}

.voice-card-title-row h3 {
  margin: 0;
  color: #ffffff;
  font-size: 26px;
  line-height: 1.1;
}

.voice-card-number {
  color: #7c77ff;
  font-size: 32px;
  font-weight: 950;
  line-height: 1;
}

.voice-card-icon {
  width: 56px;
  height: 56px;
  display: inline-grid;
  place-items: center;
  align-items: center;
  justify-items: center;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(104, 177, 255, 0.44);
  border-radius: 14px;
  background:
    radial-gradient(circle at 28% 20%, rgba(133, 235, 255, 0.38), transparent 34%),
    linear-gradient(145deg, rgba(33, 141, 255, 0.94), rgba(105, 55, 221, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.2),
    inset 0 -14px 26px rgba(6, 14, 46, 0.24),
    0 0 24px rgba(64, 167, 255, 0.28);
}

.voice-card-icon::before {
  content: "";
  position: absolute;
  inset: auto;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, #ffffff, #bcecff 62%, #fff);
  filter: drop-shadow(0 0 9px rgba(185, 245, 255, 0.5));
  mask: var(--voice-card-icon) center / contain no-repeat;
  -webkit-mask: var(--voice-card-icon) center / contain no-repeat;
}

.voice-card-icon::after {
  content: "";
  position: absolute;
  inset: auto;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 42px;
  height: 42px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(215, 241, 255, 0.22);
  border-radius: 11px;
  background:
    linear-gradient(90deg, transparent 0 20%, rgba(255,255,255,0.2) 20% 21%, transparent 21% 42%, rgba(255,255,255,0.14) 42% 43%, transparent 43% 100%),
    radial-gradient(circle at 78% 78%, rgba(82, 242, 255, 0.24), transparent 34%);
  opacity: 0.86;
}

.voice-card-icon.design-icon::before {
  --voice-card-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 22c2.4-8 4.8-8 7.2 0s4.8 8 7.2 0 4.8-8 7.6 0'/%3E%3Cpath d='M8 6v10M16 4v12M24 8v8'/%3E%3Ccircle cx='8' cy='10' r='2'/%3E%3Ccircle cx='16' cy='8' r='2'/%3E%3Ccircle cx='24' cy='12' r='2'/%3E%3C/g%3E%3C/svg%3E");
}

.voice-card-icon.clone-icon::before {
  --voice-card-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='10' y='4' width='8' height='14' rx='4'/%3E%3Cpath d='M6 13v2a8 8 0 0 0 16 0v-2M14 23v5M10 28h8'/%3E%3Cpath d='M20 7h2.5A4.5 4.5 0 0 1 27 11.5v5A4.5 4.5 0 0 1 22.5 21H20'/%3E%3Cpath d='M24 10.5v7'/%3E%3C/g%3E%3C/svg%3E");
}

.voice-provider-chip {
  justify-self: start;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  color: #6ee5ff;
  border: 1px solid rgba(64, 181, 255, 0.35);
  background: rgba(17, 67, 128, 0.62);
  font-size: 12px;
  font-weight: 800;
}

.voice-provider-chip.is-warning {
  color: #77dbff;
  border-color: rgba(64, 181, 255, 0.32);
  background: rgba(18, 67, 128, 0.52);
}

.voice-provider-chip.is-ok {
  color: #9af7d1;
  border-color: rgba(84, 225, 160, 0.34);
  background: rgba(30, 83, 75, 0.42);
}

.voice-card-subtitle {
  margin: 13px 0 18px;
  color: var(--voice-muted);
  font-size: 15px;
  line-height: 1.65;
}

.voice-card-body {
  display: grid;
  gap: 14px;
}

.voice-field-label {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #ffffff;
  font-size: 15px;
}

.voice-field-label span {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(82, 139, 255, 0.4);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(45, 72, 141, 0.76);
  font-weight: 900;
}

.voice-field-label strong,
.voice-upload-label {
  color: #ffffff;
  font-weight: 900;
}

.voice-field-label em {
  color: rgba(224, 232, 255, 0.62);
  font-style: normal;
  font-size: 13px;
}

.voice-clone-text-label {
  margin-top: 4px;
}

.voice-textarea-wrap {
  position: relative;
}

.voice-input,
.voice-studio-card textarea {
  width: 100%;
  border: 1px solid rgba(112, 159, 229, 0.34);
  border-radius: 8px;
  background: rgba(8, 23, 51, 0.78);
  color: #f2f7ff;
  padding: 15px 18px;
  outline: none;
  resize: vertical;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.voice-studio-card textarea {
  min-height: 112px;
  line-height: 1.8;
  font-size: 15px;
}

.voice-input::placeholder,
.voice-studio-card textarea::placeholder {
  color: rgba(213, 224, 255, 0.52);
}

.voice-input:focus,
.voice-studio-card textarea:focus {
  border-color: rgba(64, 181, 255, 0.88);
  box-shadow: 0 0 0 3px rgba(37, 146, 255, 0.16), inset 0 1px 0 rgba(255,255,255,0.05);
}

.voice-char-count {
  position: absolute;
  right: 16px;
  bottom: 12px;
  color: rgba(227, 234, 255, 0.76);
  font-size: 12px;
  pointer-events: none;
}

.voice-preset-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: rgba(236, 243, 255, 0.82);
  font-size: 13px;
}

.voice-preset-chip,
.voice-swap-button {
  min-height: 26px;
  border: 1px solid rgba(95, 157, 255, 0.22);
  border-radius: 6px;
  background: rgba(29, 55, 104, 0.64);
  color: rgba(231, 239, 255, 0.88);
  padding: 3px 12px;
  font-size: 12px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.voice-preset-chip {
  cursor: pointer;
}

.voice-preset-chip:hover {
  border-color: rgba(76, 190, 255, 0.56);
  background: rgba(42, 85, 154, 0.7);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(47, 165, 255, 0.18);
}

.voice-preset-chip:active {
  transform: translateY(1px) scale(0.98);
}

.voice-swap-button {
  margin-left: auto;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-color: transparent;
  background: transparent;
  color: #ffffff;
  transition: color 160ms ease, filter 160ms ease, transform 160ms ease;
}

.voice-swap-button::after {
  content: "";
  width: 15px;
  height: 15px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 11a8 8 0 0 0-13.5-5.8L4 8'/%3E%3Cpath d='M4 4v4h4M4 13a8 8 0 0 0 13.5 5.8L20 16'/%3E%3Cpath d='M20 20v-4h-4'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 11a8 8 0 0 0-13.5-5.8L4 8'/%3E%3Cpath d='M4 4v4h4M4 13a8 8 0 0 0 13.5 5.8L20 16'/%3E%3Cpath d='M20 20v-4h-4'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.voice-swap-button:hover {
  color: #67d8ff;
  filter: drop-shadow(0 0 10px rgba(60, 190, 255, 0.45));
}

.voice-swap-button:active {
  transform: translateY(1px) scale(0.98);
}

.voice-player-strip {
  --voice-level: 0;
  position: relative;
  min-height: 72px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 12px 16px 12px 12px;
  border: 1px solid rgba(75, 144, 255, 0.26);
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 50%, rgba(37, 204, 255, 0.22), transparent 34%),
    linear-gradient(90deg, rgba(5, 19, 47, 0.92), rgba(17, 33, 82, 0.72));
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.voice-player-strip::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(67, 216, 255, 0.52), rgba(132, 70, 255, 0.42), transparent);
  transform: translateY(-50%);
  box-shadow: 0 0 18px rgba(62, 183, 255, 0.28);
  opacity: 0.72;
}

.voice-player-strip.is-playing {
  border-color: rgba(78, 197, 255, 0.56);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 0 30px rgba(55, 170, 255, 0.24);
}

.voice-round-play {
  grid-column: 1;
  width: 46px;
  height: 46px;
  position: relative;
  z-index: 2;
  cursor: pointer;
  display: grid;
  place-items: center;
  border: 1px solid rgba(71, 126, 255, 0.7);
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(55, 107, 255, 0.48), rgba(40, 28, 95, 0.9));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 0 22px rgba(62, 112, 255, 0.24);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.voice-round-play::before {
  content: "";
  width: 17px;
  height: 18px;
  margin-left: 3px;
  background: #ffffff;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  transition: clip-path 160ms ease, background 160ms ease, margin 160ms ease, width 160ms ease;
}

.voice-round-play:hover {
  border-color: rgba(132, 211, 255, 0.95);
  filter: brightness(1.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 0 30px rgba(65, 177, 255, 0.35);
}

.voice-round-play:active {
  transform: scale(0.94);
}

.voice-round-play.is-playing {
  background: linear-gradient(135deg, #16b7ff, #8d43ff 78%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 0 32px rgba(70, 177, 255, 0.48);
}

.voice-round-play.is-playing::before {
  width: 18px;
  height: 18px;
  margin-left: 0;
  clip-path: none;
  background: linear-gradient(90deg, #fff 0%, #fff 36%, transparent 36%, transparent 64%, #fff 64%, #fff 100%);
}

.voice-waveform {
  position: absolute;
  inset: 8px 10px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 2px;
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.62) 5%, #000 12%, #000 88%, rgba(0,0,0,0.62) 95%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.62) 5%, #000 12%, #000 88%, rgba(0,0,0,0.62) 95%, transparent 100%);
}

.voice-waveform i {
  flex: 1 1 0;
  width: auto;
  min-width: 2px;
  height: clamp(10px, var(--h), 50px);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(146, 244, 255, 0.95) 0%, rgba(48, 170, 255, 0.92) 46%, rgba(153, 69, 255, 0.9) 100%);
  opacity: 0.56;
  transform: scaleY(calc(0.76 + var(--voice-level, 0)));
  transform-origin: center;
  transition: transform 190ms cubic-bezier(0.2, 0.8, 0.25, 1), opacity 160ms ease, filter 160ms ease;
  will-change: transform;
}

.voice-player-strip.is-playing .voice-waveform i {
  animation: voiceWavePulse 520ms cubic-bezier(0.45, 0, 0.2, 1) infinite alternate;
  animation-delay: var(--delay);
  opacity: 0.92;
  filter: drop-shadow(0 0 8px rgba(73, 216, 255, 0.62));
}

.voice-duration {
  grid-column: 3;
  justify-self: end;
  position: relative;
  z-index: 2;
  min-width: 92px;
  padding: 7px 10px;
  border: 1px solid rgba(98, 156, 245, 0.22);
  border-radius: 999px;
  background: rgba(5, 18, 44, 0.7);
  color: rgba(233, 238, 255, 0.86);
  font-size: 13px;
  text-align: center;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}

.voice-command-row {
  display: grid;
  grid-template-columns: 1.12fr 1fr 1fr;
  gap: 14px;
}

.voice-command-button {
  min-height: 50px;
  position: relative;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(83, 146, 226, 0.38);
  border-radius: 8px;
  overflow: hidden;
  color: #ffffff;
  background: rgba(9, 25, 55, 0.78);
  font-size: 17px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  transition: transform 160ms ease, filter 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.voice-command-button.is-primary {
  border-color: rgba(85, 120, 255, 0.6);
  background: linear-gradient(135deg, #238aff, #b032ff);
  box-shadow: 0 14px 28px rgba(54, 115, 255, 0.28);
}

.voice-command-button:hover:not(:disabled) {
  border-color: rgba(107, 205, 255, 0.62);
  filter: brightness(1.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 12px 26px rgba(32, 116, 255, 0.22);
}

.voice-command-button.is-primary:hover:not(:disabled) {
  box-shadow: 0 16px 34px rgba(86, 95, 255, 0.34), 0 0 24px rgba(66, 214, 255, 0.24);
}

.voice-command-button:active:not(:disabled) {
  transform: translateY(1px) scale(0.985);
}

.voice-command-button:disabled {
  cursor: not-allowed;
  opacity: 0.66;
}

.voice-command-button::before {
  content: "";
  width: 22px;
  height: 22px;
  display: inline-block;
  background: currentColor;
  flex: 0 0 auto;
  transition: clip-path 160ms ease, background 160ms ease;
}

.voice-command-button.is-primary::before {
  display: none;
}

.voice-command-button.is-play::before {
  clip-path: polygon(20% 10%, 86% 50%, 20% 90%);
}

.voice-command-button.is-play.is-playing {
  border-color: rgba(91, 215, 255, 0.62);
  background: linear-gradient(135deg, rgba(19, 116, 195, 0.92), rgba(75, 45, 162, 0.88));
}

.voice-command-button.is-play.is-playing::before {
  clip-path: none;
  border-radius: 2px;
  background: linear-gradient(90deg, currentColor 0%, currentColor 36%, transparent 36%, transparent 64%, currentColor 64%, currentColor 100%);
}

.voice-command-button.is-download::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M5 21h14'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M5 21h14'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.voice-click-feedback {
  animation: voiceClickFeedback 420ms cubic-bezier(0.2, 0.9, 0.24, 1) both;
}

@keyframes voiceClickFeedback {
  0% {
    transform: scale(0.985);
    filter: brightness(1.24);
  }
  46% {
    transform: scale(1.018);
    filter: brightness(1.14);
    box-shadow: 0 0 0 4px rgba(75, 198, 255, 0.14), 0 0 24px rgba(74, 160, 255, 0.28);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

@keyframes voiceWavePulse {
  0% {
    transform: scaleY(calc(0.58 + var(--voice-level, 0)));
    opacity: 0.62;
  }
  100% {
    transform: scaleY(calc(0.92 + var(--voice-level, 0)));
    opacity: 1;
  }
}

.voice-upload-label {
  font-size: 15px;
}

.voice-upload-zone {
  position: relative;
  cursor: pointer;
  min-height: 150px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  border: 1px dashed rgba(125, 160, 238, 0.64);
  border-radius: 8px;
  background: rgba(19, 42, 88, 0.52);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.voice-upload-zone input {
  display: none;
}

.voice-upload-zone strong {
  color: rgba(237, 244, 255, 0.86);
  font-size: 16px;
  font-weight: 700;
}

.voice-upload-zone small {
  color: rgba(219, 229, 255, 0.66);
  font-size: 12px;
}

.voice-upload-zone.is-disabled {
  opacity: 0.68;
  pointer-events: none;
}

.voice-upload-zone:hover {
  border-color: rgba(91, 206, 255, 0.86);
  background: rgba(28, 57, 113, 0.64);
  box-shadow: inset 0 0 0 1px rgba(68, 181, 255, 0.18), 0 0 26px rgba(46, 144, 255, 0.18);
}

.voice-upload-zone:active {
  transform: scale(0.992);
}

.voice-upload-icon {
  width: 50px;
  height: 50px;
  background: rgba(178, 202, 255, 0.92);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='black' stroke-width='4.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 49H15a11 11 0 0 1-1-22 18 18 0 0 1 34 6 9 9 0 0 1-2 18h-4'/%3E%3Cpath d='M32 50V28M22 38l10-10 10 10'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='black' stroke-width='4.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 49H15a11 11 0 0 1-1-22 18 18 0 0 1 34 6 9 9 0 0 1-2 18h-4'/%3E%3Cpath d='M32 50V28M22 38l10-10 10 10'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.voice-upload-tip,
.voice-card-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(222, 231, 255, 0.74);
  font-size: 12px;
  line-height: 1.5;
}

.voice-upload-tip {
  width: fit-content;
  margin-top: -5px;
  padding: 5px 12px;
  border: 1px solid rgba(94, 153, 237, 0.2);
  border-radius: 8px;
  background: rgba(9, 26, 57, 0.86);
}

.voice-upload-tip span,
.voice-card-note span {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  background: #f7d76a;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.voice-upload-tip p,
.voice-card-note p {
  margin: 0;
}

.voice-slider-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.voice-slider-control {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.voice-slider-control span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  font-weight: 800;
  white-space: nowrap;
}

.voice-slider-control span i {
  width: 15px;
  height: 15px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(160, 190, 255, 0.48);
  border-radius: 50%;
  color: rgba(215, 228, 255, 0.84);
  font-size: 10px;
  font-style: normal;
}

.voice-slider-control input[type="range"] {
  --value: 50%;
  width: 100%;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  background:
    linear-gradient(90deg, #2fd8ff 0%, #357dff 54%, #a64bff 100%) left center / var(--value) 6px no-repeat,
    linear-gradient(90deg, rgba(82, 131, 202, 0.32), rgba(111, 92, 176, 0.32)) center / 100% 6px no-repeat;
  cursor: pointer;
  outline: none;
  transition: filter 140ms ease, background-size 80ms linear;
}

.voice-slider-control input[type="range"]::-webkit-slider-runnable-track {
  height: 22px;
  border: 0;
  background: transparent;
}

.voice-slider-control input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 3px solid rgba(232, 242, 255, 0.96);
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(135deg, #dff8ff, #ffffff);
  box-shadow: 0 0 0 5px rgba(62, 145, 255, 0.18), 0 5px 15px rgba(24, 74, 162, 0.42);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.voice-slider-control input[type="range"]::-moz-range-track {
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(82, 131, 202, 0.32);
}

.voice-slider-control input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2fd8ff, #357dff 54%, #a64bff);
}

.voice-slider-control input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 3px solid rgba(232, 242, 255, 0.96);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 5px rgba(62, 145, 255, 0.18), 0 5px 15px rgba(24, 74, 162, 0.42);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.voice-slider-control input[type="range"]:hover::-webkit-slider-thumb,
.voice-slider-control input[type="range"]:focus-visible::-webkit-slider-thumb,
.voice-slider-control.is-sliding input[type="range"]::-webkit-slider-thumb {
  transform: scale(1.16);
  border-color: #ffffff;
  box-shadow: 0 0 0 7px rgba(61, 192, 255, 0.2), 0 0 20px rgba(88, 118, 255, 0.36);
}

.voice-slider-control input[type="range"]:hover::-moz-range-thumb,
.voice-slider-control input[type="range"]:focus-visible::-moz-range-thumb,
.voice-slider-control.is-sliding input[type="range"]::-moz-range-thumb {
  transform: scale(1.16);
  border-color: #ffffff;
  box-shadow: 0 0 0 7px rgba(61, 192, 255, 0.2), 0 0 20px rgba(88, 118, 255, 0.36);
}

.voice-slider-control input[type="range"]:active,
.voice-slider-control.is-sliding input[type="range"] {
  filter: brightness(1.12) saturate(1.18);
}

.voice-slider-control input[type="range"]:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.voice-slider-control strong {
  color: #ffffff;
  font-size: 15px;
  white-space: nowrap;
  transition: color 140ms ease, text-shadow 140ms ease;
}

.voice-slider-control.is-sliding strong {
  color: #8ce8ff;
  text-shadow: 0 0 14px rgba(75, 203, 255, 0.58);
}

@media (prefers-reduced-motion: reduce) {
  .voice-player-strip.is-playing .voice-waveform i,
  .voice-click-feedback {
    animation: none;
  }
}

.voice-result-toast {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(86, 198, 255, 0.28);
  border-radius: 8px;
  background: rgba(8, 28, 58, 0.78);
  color: rgba(233, 242, 255, 0.82);
  font-size: 12px;
}

.voice-result-toast span {
  color: #85f7c8;
  font-weight: 900;
}

.voice-result-toast strong {
  color: #ffffff;
}

.voice-result-toast em {
  overflow: hidden;
  color: rgba(224, 235, 255, 0.72);
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-flow-panel {
  position: relative;
  margin-top: 22px;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 114px;
  padding: 15px 26px;
  border: 1px solid var(--voice-line);
  border-radius: 8px;
  background: rgba(8, 24, 57, 0.86);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.voice-flow-title strong {
  display: block;
  color: #ffffff;
  font-size: 23px;
  line-height: 1.2;
}

.voice-flow-title span {
  display: block;
  margin-top: 8px;
  color: rgba(220, 230, 255, 0.78);
  font-size: 14px;
}

.voice-flow-items {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1.1fr) 24px minmax(0, 1fr) 24px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.voice-flow-item {
  min-height: 72px;
  display: grid;
  grid-template-columns: 56px 28px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(94, 150, 232, 0.3);
  border-radius: 8px;
  background: rgba(17, 39, 83, 0.72);
}

.voice-flow-icon {
  width: 42px;
  height: 42px;
  display: inline-block;
  background: linear-gradient(135deg, #72caff, #b76aff);
}

.voice-flow-grid {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linejoin='round'%3E%3Crect x='6' y='6' width='12' height='12'/%3E%3Crect x='30' y='6' width='12' height='12'/%3E%3Crect x='6' y='30' width='12' height='12'/%3E%3Crect x='30' y='30' width='12' height='12'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linejoin='round'%3E%3Crect x='6' y='6' width='12' height='12'/%3E%3Crect x='30' y='6' width='12' height='12'/%3E%3Crect x='6' y='30' width='12' height='12'/%3E%3Crect x='30' y='30' width='12' height='12'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.voice-flow-upload {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 6h22l6 6v30H10z'/%3E%3Cpath d='M32 6v8h8M18 31h12M24 20v16M18 26l6-6 6 6'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 6h22l6 6v30H10z'/%3E%3Cpath d='M32 6v8h8M18 31h12M24 20v16M18 26l6-6 6 6'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.voice-flow-text {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 8h24M24 8v32M14 40h20'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 8h24M24 8v32M14 40h20'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.voice-flow-wave {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M8 24v6M16 14v20M24 8v32M32 16v16M40 22v8'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M8 24v6M16 14v20M24 8v32M32 16v16M40 22v8'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.voice-flow-index {
  width: 27px;
  height: 27px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(138, 111, 255, 0.72);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(59, 64, 176, 0.64);
  font-weight: 900;
}

.voice-flow-item strong {
  display: block;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.3;
}

.voice-flow-item small {
  display: block;
  margin-top: 5px;
  color: rgba(221, 231, 255, 0.72);
  font-size: 12px;
  line-height: 1.3;
}

.voice-flow-arrow {
  width: 21px;
  height: 35px;
  justify-self: center;
  background: #ffffff;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cpath fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round' d='m7 5 10 15L7 35'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cpath fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round' d='m7 5 10 15L7 35'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (max-width: 1280px) {
  .voice-hero-panel {
    grid-template-columns: 220px minmax(360px, 1fr) 260px;
  }

}

@media (max-width: 1100px) {
  .voice-reference-shell {
    padding-inline: 22px;
  }

  .voice-hero-panel {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .voice-hero-orbit,
  .voice-profile-visual {
    display: none;
  }

  .voice-dual-grid {
    grid-template-columns: 1fr;
  }

  .voice-studio-card {
    min-height: auto;
  }

  .voice-flow-panel,
  .voice-flow-items {
    display: grid;
    grid-template-columns: 1fr;
  }

  .voice-flow-arrow {
    display: none;
  }
}

@media (max-width: 760px) {
  .voice-reference-shell {
    padding: 0 14px 28px;
  }

  .voice-hero-copy h2 {
    font-size: 44px;
  }

  .voice-hero-copy p {
    font-size: 17px;
  }

  .voice-card-title-row {
    grid-template-columns: 48px auto minmax(0, 1fr);
  }

  .voice-card-title-row .voice-provider-chip {
    grid-column: 1 / -1;
  }

  .voice-card-icon {
    width: 48px;
    height: 48px;
  }

  .voice-card-icon::before {
    width: 30px;
    height: 30px;
  }

  .voice-card-icon::after {
    width: 38px;
    height: 38px;
  }

  .voice-card-number {
    font-size: 26px;
  }

  .voice-card-title-row h3 {
    font-size: 22px;
  }

  .voice-field-label {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .voice-field-label em {
    flex-basis: 100%;
    padding-left: 41px;
  }

  .voice-command-row,
  .voice-slider-row,
  .voice-player-strip,
  .voice-result-toast {
    grid-template-columns: 1fr;
  }

  .voice-player-strip {
    justify-items: stretch;
  }

  .voice-round-play {
    grid-column: 1;
    justify-self: start;
  }

  .voice-duration {
    grid-column: 1;
    justify-self: end;
  }

  .voice-flow-panel {
    padding: 16px;
  }

  .voice-flow-item {
    grid-template-columns: 42px 26px minmax(0, 1fr);
  }
}

/* Final dashboard density overrides: keep the new reference layout ahead of legacy orbital styles. */
.dashboard-type-list .ops-dial {
  min-height: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  justify-items: stretch;
  align-content: center;
  gap: 10px;
  padding: 9px 0;
  border-width: 0 0 1px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.dashboard-type-list .ops-dial b,
.dashboard-type-list .ops-dial em {
  text-align: left;
}

.dashboard-type-list .ops-dial strong {
  text-align: right;
}

.dashboard-user-grid .operator-card {
  min-height: 82px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  justify-items: stretch;
  align-content: center;
  gap: 10px;
  padding: 11px;
  text-align: left;
}

.dashboard-user-grid .operator-card strong,
.dashboard-user-grid .operator-card em,
.dashboard-user-grid .operator-card small {
  text-align: left;
}

.dashboard-pipeline .radar-node {
  min-height: 82px;
}

