:root {
  color-scheme: dark;
  --bg: #06070a;
  --panel: #101218;
  --panel-2: #151923;
  --panel-3: #1d2330;
  --ink: #f7f9ff;
  --muted: #9aa4b5;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.16);
  --green: #b8ff4d;
  --cyan: #46d9ff;
  --orange: #ffb54d;
  --rose: #ff5f8a;
  --danger: #ff6b7a;
  --shadow: 0 26px 90px rgba(0, 0, 0, 0.42);
  --panel-pad: 28px;
  --gap: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(70, 217, 255, 0.16), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(184, 255, 77, 0.12), transparent 26%),
    linear-gradient(180deg, #0a0c12 0%, #06070a 48%, #08090d 100%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

select {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.page {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 22px 24px 28px;
}

.nav {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 0 18px;
  background: rgba(10, 12, 18, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.28);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  color: transparent;
  background: linear-gradient(145deg, #101721 0%, #0b1018 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 28px rgba(70, 217, 255, 0.18);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 5px solid var(--cyan);
  border-right-color: transparent;
  border-radius: 50%;
  filter: drop-shadow(0 0 8px rgba(70, 217, 255, 0.38));
}

.brand-mark::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid var(--green);
  transform: translateY(-50%);
  filter: drop-shadow(0 0 7px rgba(184, 255, 77, 0.42));
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-menu::-webkit-scrollbar {
  display: none;
}

.nav-menu a {
  flex: 0 0 auto;
  margin-right: 32px;
  color: #d8d8d8;
  font-size: 14px;
  line-height: 22px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: white;
}

.composer,
.live-panel,
.outputs {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(21, 25, 35, 0.94), rgba(12, 14, 20, 0.96));
  box-shadow: var(--shadow);
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1.16;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.15;
}

.form-subtitle {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.studio {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(340px, 0.68fr);
  gap: var(--gap);
  align-items: start;
  margin-top: 22px;
}

.composer {
  padding: var(--panel-pad);
}

.composer-head,
.job-head,
.outputs-head,
.detail-section-head,
.progress-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.composer-head {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.outline-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  padding: 0 16px;
  font-weight: 880;
}

.outline-button {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

.outline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 0 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 880;
  text-decoration: none;
}

.outline-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.compact-action {
  min-height: 38px;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 13px;
  white-space: nowrap;
}

.detail-section-head {
  margin-bottom: 0;
}

.primary-button {
  width: 100%;
  min-height: 62px;
  margin-top: 10px;
  color: #07100b;
  background: linear-gradient(135deg, var(--green), #7dffbc);
  box-shadow: 0 18px 46px rgba(184, 255, 77, 0.2);
}

.primary-button:disabled {
  cursor: progress;
  opacity: 0.75;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: 22px;
}

.upload-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 196px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035));
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.upload-zone::before {
  content: "";
  position: absolute;
  inset: 16px 16px auto auto;
  width: 96px;
  height: 96px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(184, 255, 77, 0.28), rgba(70, 217, 255, 0.12));
}

.video-zone::before {
  background: linear-gradient(135deg, rgba(255, 95, 138, 0.26), rgba(255, 181, 77, 0.12));
}

.upload-zone:hover,
.upload-zone.has-files {
  border-color: rgba(184, 255, 77, 0.62);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.24);
  transform: translateY(-2px);
}

.upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-symbol {
  z-index: 1;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  border-radius: 16px;
  color: #08100b;
  background: var(--green);
  font-size: 26px;
  font-weight: 800;
}

.video-zone .upload-symbol {
  color: white;
  background: var(--rose);
}

.upload-zone strong {
  z-index: 1;
  font-size: 20px;
}

.upload-zone small {
  z-index: 1;
  display: block;
  max-width: 310px;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.upload-zone em {
  z-index: 1;
  display: block;
  max-width: 100%;
  margin-top: 16px;
  color: var(--green);
  font-size: 13px;
  font-style: normal;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-picker {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.asset-picker span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.asset-picker select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 42px 0 14px;
  color: var(--ink);
  color-scheme: dark;
  appearance: none;
  background-color: rgba(255, 255, 255, 0.07);
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(220, 227, 238, 0.72) 50%),
    linear-gradient(135deg, rgba(220, 227, 238, 0.72) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) 50%,
    calc(100% - 16px) 50%;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px;
  outline: none;
}

.asset-picker select:focus {
  border-color: rgba(184, 255, 77, 0.72);
}

.asset-picker select option {
  color: var(--ink);
  background: #101218;
}

.asset-picker small {
  min-height: 18px;
  color: rgba(154, 164, 181, 0.78);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.linked-video-picker {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.linked-video-picker[hidden] {
  display: none;
}

.linked-video-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.linked-video-head span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.linked-video-head small,
.linked-video-empty {
  color: rgba(154, 164, 181, 0.78);
  font-size: 12px;
  line-height: 1.45;
}

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

.linked-video-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.linked-video-card.is-selected {
  border-color: rgba(184, 255, 77, 0.58);
  background: rgba(184, 255, 77, 0.075);
  box-shadow: 0 0 0 1px rgba(184, 255, 77, 0.1), 0 16px 36px rgba(0, 0, 0, 0.16);
}

.linked-video-preview {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 9 / 16;
  border: 0;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: #05070b;
}

.linked-video-preview video {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.linked-video-preview::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(180deg, transparent, rgba(3, 5, 9, 0.72));
  pointer-events: none;
}

.linked-video-preview.is-playing .play-badge {
  opacity: 0;
  transform: scale(0.92);
}

.linked-video-select {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 10px;
  cursor: pointer;
}

.linked-video-select input {
  margin-top: 3px;
  accent-color: var(--green);
}

.linked-video-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.linked-video-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.linked-video-copy small {
  color: rgba(154, 164, 181, 0.78);
  font-size: 12px;
  line-height: 1.35;
}

.settings-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  align-items: end;
  margin-top: 20px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.field input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

.field input:focus {
  border-color: rgba(184, 255, 77, 0.72);
}

.count-summary {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.count-summary strong {
  color: var(--green);
  font-size: 16px;
}

.billing-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 11px 12px;
  color: rgba(220, 227, 238, 0.78);
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  font-weight: 750;
}

.billing-preview strong {
  color: var(--ink);
}

.billing-preview em {
  color: var(--muted);
  font-style: normal;
}

.billing-preview.is-insufficient {
  border-color: rgba(255, 95, 138, 0.28);
  background: rgba(255, 95, 138, 0.07);
}

.billing-preview.is-insufficient em {
  color: #ffd2d8;
}

.empty-output {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
}

.empty-output {
  color: var(--muted);
  padding: 14px;
}

.empty-output {
  grid-column: 1 / -1;
}

.form-error {
  min-height: 22px;
  margin: 18px 0 0;
  color: var(--danger);
  font-weight: 850;
}

.live-panel {
  position: sticky;
  top: 96px;
  padding: var(--panel-pad);
}

.job-box {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.job-id {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}

.progress-topline {
  margin-top: 18px;
  color: var(--muted);
  font-weight: 850;
}

.progress-topline strong {
  color: var(--ink);
}

.progress-track {
  height: 11px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  transition: width 0.45s ease;
}

.progress-fill.failed {
  background: linear-gradient(90deg, var(--danger), var(--orange));
}

.reason-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.reason-list[hidden] {
  display: none;
}

.reason-list p {
  margin: 0;
  border: 1px solid rgba(255, 107, 122, 0.22);
  border-radius: 12px;
  padding: 10px 12px;
  color: #ffd8de;
  background: rgba(255, 107, 122, 0.08);
  font-size: 13px;
  line-height: 1.45;
}

.reason-list.compact {
  margin-top: 12px;
}

.stage-list {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.stage-item {
  position: relative;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px 11px 38px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-weight: 850;
}

.stage-item::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 10px;
  height: 10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translateY(-50%);
}

.stage-item.active {
  color: var(--ink);
  border-color: rgba(184, 255, 77, 0.46);
  background: rgba(184, 255, 77, 0.09);
}

.stage-item.done::before,
.stage-item.active::before {
  border-color: var(--green);
  background: var(--green);
}

.outputs {
  margin-top: 20px;
  border-color: rgba(255, 255, 255, 0.075);
  padding: var(--panel-pad);
  background:
    linear-gradient(180deg, rgba(21, 25, 35, 0.78), rgba(10, 12, 18, 0.84)),
    rgba(10, 12, 18, 0.72);
  scroll-margin-top: 104px;
}

.record-summary {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.records-page {
  margin-top: 22px;
}

.records-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: var(--panel-pad);
  background: linear-gradient(180deg, rgba(21, 25, 35, 0.94), rgba(12, 14, 20, 0.96));
  box-shadow: var(--shadow);
}

.record-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.record-stat {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.045);
}

.record-stat span,
.record-stat strong {
  display: block;
}

.record-stat span {
  color: var(--muted);
  font-size: 13px;
}

.record-stat strong {
  margin-top: 8px;
  font-size: 24px;
  line-height: 1;
}

.billing-settings-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.04);
}

.billing-settings-panel h2 {
  margin: 0 0 5px;
  font-size: 18px;
}

.billing-settings-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.billing-settings-form {
  display: flex;
  align-items: end;
  gap: 10px;
}

.billing-settings-form label {
  display: grid;
  grid-template-columns: minmax(0, 120px) auto;
  gap: 6px;
  align-items: center;
}

.billing-settings-form label span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.billing-settings-form input {
  width: 120px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.billing-settings-form em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.storage-panel {
  margin-top: 14px;
}

.storage-actions {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.storage-summary {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.storage-summary strong,
.storage-summary em,
.storage-summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storage-summary strong {
  color: var(--ink);
  font-size: 13px;
}

.storage-summary em {
  color: var(--orange);
  font-style: normal;
}

.storage-summary div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.record-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  margin-top: 18px;
}

.asset-page {
  margin-top: 22px;
}

.asset-hero,
.asset-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 24px;
  padding: var(--panel-pad);
  background: linear-gradient(180deg, rgba(21, 25, 35, 0.86), rgba(12, 14, 20, 0.9));
  box-shadow: var(--shadow);
}

.asset-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  margin-top: 18px;
  padding: 14px;
  box-shadow: none;
}

.asset-toolbar-main {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 220px;
  gap: 14px;
  min-width: 0;
}

.primary-action {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  padding: 0 16px;
  color: #07100b;
  background: linear-gradient(135deg, var(--green), #7dffbc);
  font-weight: 880;
}

.compact-primary {
  min-width: 108px;
}

.asset-search,
.asset-filter {
  display: grid;
  gap: 8px;
}

.asset-search span,
.asset-filter span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.asset-search input,
.asset-filter select,
.asset-modal .field input,
.asset-modal .field select,
.asset-detail-info .field input,
.asset-detail-info .field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 13px;
  color: var(--ink);
  background-color: rgba(255, 255, 255, 0.06);
  outline: none;
}

.asset-filter select,
.asset-modal .field select,
.asset-detail-info .field select,
.record-filter select {
  color-scheme: dark;
  appearance: none;
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(220, 227, 238, 0.72) 50%),
    linear-gradient(135deg, rgba(220, 227, 238, 0.72) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 14px) 50%;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px;
}

.asset-filter select option,
.asset-modal .field select option,
.asset-detail-info .field select option,
.record-filter select option {
  color: var(--ink);
  background: #101218;
}

.asset-search input:focus,
.asset-filter select:focus,
.asset-modal .field input:focus,
.asset-modal .field select:focus,
.asset-detail-info .field input:focus,
.asset-detail-info .field select:focus {
  border-color: rgba(184, 255, 77, 0.58);
}

.asset-refresh {
  min-height: 44px;
  min-width: 96px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  padding: 0 18px;
  color: rgba(247, 249, 255, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.045);
  font-weight: 860;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.asset-refresh:hover {
  border-color: rgba(70, 217, 255, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.065);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2), 0 0 24px rgba(70, 217, 255, 0.07);
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.asset-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(12, 15, 22, 0.78);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  backdrop-filter: blur(18px);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.asset-card:hover {
  border-color: rgba(70, 217, 255, 0.2);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.26), 0 0 34px rgba(70, 217, 255, 0.08);
  transform: translateY(-2px);
}

.asset-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.asset-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.asset-card:hover .asset-cover img {
  transform: scale(1.025);
}

.asset-cover-empty {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted);
  font-weight: 850;
}

.asset-card-actions {
  position: absolute;
  inset: auto 10px 10px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.asset-card:hover .asset-card-actions {
  opacity: 1;
  transform: translateY(0);
}

.asset-card-actions button,
.asset-detail-image button,
.ghost-icon {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--ink);
  background: rgba(10, 12, 18, 0.72);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 820;
}

.asset-card-actions button {
  flex: 1 1 auto;
}

.asset-card-body {
  padding: 13px;
}

.asset-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.asset-card-title strong {
  min-width: 0;
  overflow: hidden;
  color: #f6f8ff;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-card-title span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  color: rgba(184, 255, 77, 0.78);
  background: rgba(184, 255, 77, 0.08);
  font-size: 11px;
  font-weight: 820;
}

.asset-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  color: rgba(220, 227, 238, 0.7);
  font-size: 12px;
}

.asset-empty {
  grid-column: 1 / -1;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: 34px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
}

.asset-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  color: rgba(220, 227, 238, 0.72);
  font-size: 13px;
}

.asset-pagination[hidden] {
  display: none;
}

.asset-pagination div {
  display: flex;
  gap: 8px;
}

.asset-pagination button {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 820;
}

.asset-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.asset-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-page {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

.auth-panel {
  width: min(440px, 100%);
  align-self: start;
  justify-self: center;
  margin: 56px auto 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(21, 25, 35, 0.94), rgba(12, 14, 20, 0.96));
  box-shadow: var(--shadow);
}

.auth-head {
  margin-bottom: 20px;
}

.auth-head h1 {
  margin: 0 0 8px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.auth-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  font-weight: 850;
}

.auth-tabs button.active {
  background: rgba(70, 217, 255, 0.16);
  border-color: rgba(70, 217, 255, 0.32);
}

.auth-form {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.auth-form[hidden] {
  display: none;
}

.auth-field,
.auth-field input {
  min-width: 0;
}

.auth-field input {
  box-sizing: border-box;
}

.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 12px;
  align-items: end;
  min-width: 0;
}

.auth-code-row .outline-button {
  width: 100%;
  padding: 0 12px;
  white-space: nowrap;
}

.auth-form .primary-button {
  width: 100%;
}

.auth-text-link {
  justify-self: end;
  border: 0;
  padding: 0;
  color: rgba(154, 164, 181, 0.82);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
}

.auth-text-link:hover {
  color: var(--ink);
}

.admin-page {
  display: grid;
  gap: 18px;
}

.admin-nav {
  border: 1px solid rgba(70, 217, 255, 0.12);
  border-radius: 18px;
  padding: 12px 16px;
  background: rgba(8, 12, 18, 0.68);
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.account-actions [hidden] {
  display: none;
}

.section-title {
  margin: 10px 0 0;
  font-size: 18px;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  font-size: 13px;
}

.admin-table th {
  color: var(--muted);
  font-weight: 850;
}

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

.danger-action {
  border-color: rgba(255, 92, 92, 0.36);
  color: #ffd2d2;
}

.usage-analytics {
  display: block;
}

.usage-chart-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.usage-chart-card h2 {
  margin: 0;
  font-size: 18px;
}

.usage-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.usage-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.usage-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.usage-metric-tabs {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.usage-tabs button,
.usage-metric-tabs button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  font-weight: 850;
}

.usage-metric-tabs button {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.usage-tabs button.active,
.usage-metric-tabs button.active {
  border-color: rgba(70, 217, 255, 0.34);
  background: rgba(70, 217, 255, 0.14);
}

.usage-range-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.usage-summary-item {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.035);
}

.usage-summary-item span,
.usage-summary-item strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-summary-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.usage-summary-item strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 18px;
}

.usage-chart {
  position: relative;
  min-height: 260px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(15, 19, 28, 0.86), rgba(8, 10, 15, 0.96)),
    repeating-linear-gradient(180deg, transparent 0 51px, rgba(255, 255, 255, 0.025) 51px 52px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.usage-line-chart {
  display: block;
  width: 100%;
  height: auto;
  min-height: 260px;
}

.usage-grid-line {
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 1;
}

.usage-axis-line {
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 1;
}

.usage-axis-label {
  fill: rgba(231, 237, 248, 0.46);
  font-family: "Inter", "SF Pro Display", "SF Pro Text", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: 0;
}

.usage-x-label {
  fill: rgba(231, 237, 248, 0.4);
  font-size: 9.5px;
  font-weight: 520;
}

.usage-area-path {
  fill: url("#usageAreaGradient");
}

.usage-line-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.usage-line-path {
  stroke: #78c8ff;
  stroke-width: 1.8;
}

.usage-hit-area {
  fill: transparent;
  pointer-events: all;
}

.usage-focus-line {
  opacity: 0;
  stroke: rgba(255, 255, 255, 0.28);
  stroke-dasharray: 4 5;
  stroke-width: 1;
  transition: opacity 0.16s ease;
}

.usage-line-point circle {
  fill: #101722;
  opacity: 0;
  stroke: #78c8ff;
  stroke-width: 1.8;
  transition:
    opacity 0.16s ease,
    r 0.16s ease,
    stroke-width 0.16s ease;
}

.usage-line-point:hover .usage-focus-line,
.usage-line-point.is-active .usage-focus-line {
  opacity: 1;
}

.usage-line-point:hover circle,
.usage-line-point.is-active circle {
  r: 5.4;
  opacity: 1;
  stroke-width: 2;
}

.usage-hover-card {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 168px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 10px 11px;
  background: rgba(8, 11, 17, 0.94);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
  pointer-events: none;
}

.usage-hover-card[hidden] {
  display: none;
}

.usage-hover-date {
  color: rgba(231, 237, 248, 0.58);
  font-size: 11px;
  font-weight: 700;
}

.usage-hover-value {
  margin-top: 3px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 760;
  line-height: 1.15;
}

.usage-hover-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.usage-hover-grid span {
  color: rgba(231, 237, 248, 0.5);
  font-size: 11px;
}

.usage-hover-grid strong {
  overflow: hidden;
  color: rgba(231, 237, 248, 0.82);
  font-size: 11px;
  font-weight: 760;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-empty {
  grid-column: 1 / -1;
  align-self: center;
  color: var(--muted);
  text-align: center;
}

.asset-modal[hidden] {
  display: none;
}

.asset-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(2, 4, 8, 0.74);
  backdrop-filter: blur(18px);
}

.asset-modal-panel,
.asset-detail-panel {
  position: relative;
  z-index: 1;
  width: min(760px, 94vw);
  max-height: 90vh;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(21, 25, 35, 0.96), rgba(10, 12, 18, 0.98));
  box-shadow: var(--shadow);
}

.asset-detail-panel {
  width: min(1040px, 94vw);
}

.asset-modal-head,
.asset-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.asset-modal-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.asset-modal-body {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.asset-drop {
  display: grid;
  place-items: center;
  min-height: 150px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
}

.asset-drop input {
  display: none;
}

.asset-drop strong {
  color: var(--ink);
  font-size: 16px;
}

.asset-drop span {
  margin-top: 6px;
  font-size: 13px;
}

.asset-preview-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.asset-preview {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.asset-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
  padding: 18px;
}

.asset-detail-images {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

.asset-detail-image {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  aspect-ratio: 2 / 3;
  background: rgba(255, 255, 255, 0.04);
}

.asset-detail-image.is-cover {
  border-color: rgba(184, 255, 77, 0.52);
}

.asset-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-detail-image div {
  position: absolute;
  inset: auto 8px 8px 8px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.asset-detail-image:hover div {
  opacity: 1;
}

.asset-detail-info {
  display: grid;
  gap: 14px;
  align-content: start;
}

.asset-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.record-search,
.record-filter {
  display: grid;
  gap: 8px;
}

.record-search span,
.record-filter span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.record-search input,
.record-filter select {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--ink);
  background-color: rgba(255, 255, 255, 0.055);
  outline: none;
}

.record-search input:focus,
.record-filter select:focus {
  border-color: rgba(70, 217, 255, 0.5);
}

.record-filter select {
  padding-right: 38px;
}

.record-batch {
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.032);
}

.record-batch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.035);
}

.record-batch-head strong,
.record-batch-head span {
  display: block;
}

.record-batch-head strong {
  font-size: 15px;
}

.record-batch-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.batch-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid rgba(184, 255, 77, 0.28);
  border-radius: 999px;
  padding: 0 11px;
  color: var(--green);
  background: rgba(184, 255, 77, 0.08);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

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

.batch-delete {
  min-height: 30px;
  font-size: 12px;
}

.batch-download:disabled {
  cursor: not-allowed;
  color: var(--muted);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.035);
  opacity: 0.6;
}

.batch-download.is-loading,
.compact-action.is-loading {
  min-width: 112px;
  color: #08100b;
  border-color: rgba(184, 255, 77, 0.55);
  background: var(--green);
  opacity: 1;
}

.record-batch-list {
  display: grid;
  gap: 1px;
}

.record-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 0;
  border-radius: 0;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
}

.record-row + .record-row {
  border-top: 1px solid var(--line);
}

.record-row-main {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.record-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 5px rgba(70, 217, 255, 0.08);
}

.record-status-dot.completed {
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(184, 255, 77, 0.08);
}

.record-status-dot.failed {
  background: var(--danger);
  box-shadow: 0 0 0 5px rgba(255, 107, 122, 0.1);
}

.record-status-dot.partial_failed {
  background: var(--orange);
  box-shadow: 0 0 0 5px rgba(255, 181, 77, 0.1);
}

.record-copy {
  min-width: 0;
}

.record-titleline {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.record-titleline strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.records-page .task-state {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.record-copy p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.record-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.record-meta-line span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-source {
  max-width: min(320px, 42vw);
}

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

.record-actions .outline-link {
  min-height: 34px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 13px;
}

.danger-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid rgba(255, 107, 122, 0.28);
  border-radius: 999px;
  padding: 0 12px;
  color: #ffc8ce;
  background: rgba(255, 107, 122, 0.08);
  font-size: 13px;
  font-weight: 850;
}

.danger-link:hover {
  border-color: rgba(255, 107, 122, 0.55);
  background: rgba(255, 107, 122, 0.14);
}

.retry-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid rgba(70, 217, 255, 0.28);
  border-radius: 999px;
  padding: 0 12px;
  color: #b9efff;
  background: rgba(70, 217, 255, 0.08);
  font-size: 13px;
  font-weight: 850;
}

.retry-link:disabled {
  cursor: progress;
  opacity: 0.62;
}

.retry-link.is-cautioned {
  color: #ffe1ab;
  border-color: rgba(255, 181, 77, 0.32);
  background: rgba(255, 181, 77, 0.1);
}

.record-empty {
  display: grid;
  justify-items: start;
  gap: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 22px;
  padding: 28px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}

.record-empty strong {
  color: var(--ink);
}

.detail-page {
  margin-top: 22px;
}

.detail-head,
.detail-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(21, 25, 35, 0.94), rgba(12, 14, 20, 0.96));
  box-shadow: var(--shadow);
}

.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  padding: var(--panel-pad);
}

.detail-grid {
  display: grid;
  gap: var(--gap);
  margin-top: 20px;
}

.detail-card {
  padding: var(--panel-pad);
}

.detail-card h2 {
  margin-bottom: 18px;
}

.detail-meta {
  margin-top: 16px;
}

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

.credit-settlement div {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.credit-settlement span,
.credit-settlement strong {
  display: block;
}

.credit-settlement span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.credit-settlement strong {
  margin-top: 6px;
  color: var(--ink);
  font-size: 20px;
}

.credit-settlement p {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.task-list {
  display: grid;
  gap: var(--gap);
  margin-top: 18px;
}

.task-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.recent-task-header {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 112px 84px 92px;
  align-items: center;
  gap: 18px;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 16px;
  padding: 0 18px 0 20px;
  color: rgba(154, 164, 181, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.018)),
    rgba(8, 10, 15, 0.34);
  backdrop-filter: blur(14px);
  font-size: 11px;
  font-weight: 860;
  line-height: 1;
}

.recent-task-header span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-task-header span:nth-child(3) {
  text-align: center;
}

.recent-task-header span:nth-child(4),
.recent-task-header span:nth-child(5) {
  text-align: center;
}

.recent-task-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 16px;
  padding: 10px 14px 10px 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.028)),
    rgba(12, 15, 22, 0.72);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(18px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.recent-task-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(70, 217, 255, 0.12), transparent 34%, rgba(184, 255, 77, 0.07));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.recent-task-card:hover {
  border-color: rgba(70, 217, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.035)),
    rgba(13, 17, 26, 0.82);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.24),
    0 0 34px rgba(70, 217, 255, 0.08);
  transform: translateY(-1px);
}

.recent-task-card:hover::before {
  opacity: 1;
}

.recent-task-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 112px 84px 92px;
  align-items: center;
  gap: 18px;
  min-height: 42px;
}

.recent-task-rail {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.recent-task-rail::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: inherit;
  background: rgba(220, 227, 238, 0.58);
  box-shadow: 0 0 18px rgba(220, 227, 238, 0.1);
}

.recent-task-rail.completed::before {
  background: rgba(184, 255, 77, 0.72);
  box-shadow: 0 0 20px rgba(184, 255, 77, 0.16);
}

.recent-task-rail.running::before,
.recent-task-rail.uploaded::before {
  background: rgba(70, 217, 255, 0.72);
  box-shadow: 0 0 20px rgba(70, 217, 255, 0.16);
}

.recent-task-rail.partial_failed::before {
  background: rgba(255, 181, 77, 0.72);
  box-shadow: 0 0 20px rgba(255, 181, 77, 0.14);
}

.recent-task-rail.failed::before {
  background: rgba(255, 95, 138, 0.74);
  box-shadow: 0 0 20px rgba(255, 95, 138, 0.15);
}

.recent-task-copy {
  min-width: 0;
}

.recent-task-copy span {
  display: block;
}

.recent-task-copy span {
  color: rgba(220, 227, 238, 0.76);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-task-credit {
  display: grid;
  gap: 2px;
  color: #ff9aa9;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
}

.recent-task-credit .credit-main,
.recent-task-credit .credit-note {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-task-credit .credit-main {
  color: #ffd2d8;
  font-size: 12px;
  font-weight: 820;
}

.recent-task-credit .credit-note {
  color: rgba(154, 164, 181, 0.72);
  font-size: 10px;
  font-weight: 700;
}

.recent-task-card .task-state {
  justify-self: center;
  min-height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0 10px;
  color: rgba(220, 227, 238, 0.74);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  font-weight: 780;
}

.recent-task-card .task-state.completed {
  color: rgba(184, 255, 77, 0.76);
  background: rgba(184, 255, 77, 0.07);
}

.recent-task-card .task-state.running,
.recent-task-card .task-state.uploaded {
  color: rgba(70, 217, 255, 0.76);
  background: rgba(70, 217, 255, 0.07);
}

.recent-task-card .task-state.partial_failed {
  color: rgba(255, 181, 77, 0.78);
  background: rgba(255, 181, 77, 0.075);
}

.recent-task-card .task-state.failed {
  color: rgba(255, 154, 169, 0.82);
  background: rgba(255, 95, 138, 0.08);
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  min-height: 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 11px;
  color: rgba(247, 249, 255, 0.86);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.ghost-link:hover {
  border-color: rgba(255, 255, 255, 0.12);
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.compact-task-card {
  border-radius: 999px;
  padding: 10px 12px 10px 16px;
  background: rgba(255, 255, 255, 0.04);
}

.task-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.compact-task-copy {
  min-width: 0;
}

.task-main strong,
.task-main span,
.task-main em {
  display: block;
}

.task-main span,
.task-main em {
  color: var(--muted);
  font-size: 13px;
}

.task-main span {
  margin-top: 5px;
}

.compact-task-card .task-main span {
  margin-top: 0;
  color: #dce3ee;
  font-weight: 850;
}

.task-main em {
  margin-top: 8px;
  line-height: 1.45;
  font-style: normal;
}

.task-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.compact-task-card .task-state {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.compact-task-card .outline-link {
  min-height: 32px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 13px;
}

.task-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 900;
}

.task-state.running {
  color: var(--green);
  background: rgba(184, 255, 77, 0.1);
}

.task-state.uploaded {
  color: var(--cyan);
  background: rgba(70, 217, 255, 0.1);
}

.task-state.completed {
  color: #06110b;
  background: var(--green);
}

.task-state.partial_failed {
  color: #101006;
  background: var(--orange);
}

.task-state.failed {
  color: #fff;
  background: rgba(255, 107, 122, 0.22);
}

.output-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: 18px;
}

.output-grid.is-hidden {
  display: none;
}

.output-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
}

.output-thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 9 / 12;
  border: 0;
  padding: 0;
  overflow: hidden;
  color: white;
  cursor: pointer;
  font-weight: 900;
  background:
    linear-gradient(180deg, rgba(4, 6, 10, 0.08), rgba(4, 6, 10, 0.72)),
    linear-gradient(135deg, #0ea5c5, #2448d8 45%, #e7567a);
}

.output-card:nth-child(2n) .output-thumb {
  background:
    linear-gradient(180deg, rgba(4, 6, 10, 0.08), rgba(4, 6, 10, 0.72)),
    linear-gradient(135deg, #0f9f6e, #d99118 52%, #2448d8);
}

.output-thumb:disabled {
  cursor: default;
}

.output-thumb::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(180deg, transparent, rgba(3, 5, 9, 0.64));
  opacity: 0.72;
  transition: opacity 0.18s ease;
}

.output-thumb:hover::after {
  opacity: 0.96;
}

.output-thumb img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.24s ease;
}

.output-thumb:hover img {
  transform: scale(1.025);
}

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background: rgba(6, 8, 12, 0.62);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(12px);
  color: transparent;
  font-size: 0;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.play-badge::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid white;
}

.output-thumb:hover .play-badge {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(6, 8, 12, 0.8);
  transform: translateY(-2px) scale(1.04);
}

.output-meta {
  padding: 12px;
}

.output-meta strong,
.output-meta span {
  display: block;
}

.output-meta span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.output-actions {
  margin-top: 10px;
}

.output-actions .outline-link {
  width: 100%;
  min-height: 38px;
  border-radius: 12px;
  font-size: 13px;
}

.video-modal[hidden] {
  display: none;
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(2, 4, 8, 0.72);
  backdrop-filter: blur(18px);
}

.video-modal-panel {
  position: relative;
  z-index: 1;
  width: min(460px, 92vw);
}

.video-modal-panel video {
  display: block;
  width: 100%;
  max-height: 82vh;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #000;
  box-shadow: var(--shadow);
}

.video-modal-close {
  position: absolute;
  top: -48px;
  right: 0;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--ink);
  background: rgba(10, 12, 18, 0.82);
  font-weight: 850;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 1080px) {
  .nav {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
  }

  .nav-menu {
    order: 3;
  }

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

  .live-panel {
    position: static;
  }

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

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

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

  .asset-detail-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page {
    padding: 14px;
  }

  .composer,
  .outputs,
  .detail-head,
  .detail-card {
    padding: 18px;
  }

  .live-panel {
    padding: 18px;
  }

  .composer-head,
  .job-head,
  .outputs-head,
  .detail-head,
  .records-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .upload-grid,
  .settings-strip,
  .record-toolbar,
  .asset-toolbar,
  .task-main,
  .output-grid,
  .linked-video-list {
    grid-template-columns: 1fr;
  }

  .asset-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .asset-toolbar-main {
    grid-template-columns: 1fr;
  }

  .asset-refresh {
    width: 100%;
  }

  .auth-panel {
    width: 100%;
    margin-top: 28px;
    padding: 18px;
  }

  .auth-code-row {
    grid-template-columns: 1fr;
  }

  .asset-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .usage-chart-head {
    align-items: stretch;
    flex-direction: column;
  }

  .usage-controls {
    justify-content: flex-start;
  }

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

  .billing-preview,
  .billing-settings-panel,
  .billing-settings-form,
  .storage-actions {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .billing-settings-form label,
  .billing-settings-form input {
    width: 100%;
  }

  .credit-settlement {
    grid-template-columns: 1fr;
  }

  .asset-pagination div,
  .asset-pagination button {
    width: 100%;
  }

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

  .asset-preview-grid,
  .asset-detail-images {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recent-task-header {
    display: none;
  }

  .recent-task-layout {
    grid-template-columns: 26px minmax(0, 1fr) auto;
    gap: 12px;
  }

  .recent-task-card {
    padding: 12px;
  }

  .recent-task-copy {
    grid-column: 2 / -1;
  }

  .recent-task-credit {
    grid-column: 2 / 3;
    text-align: left;
  }

  .recent-task-card .task-state {
    grid-column: 2 / 3;
    justify-self: start;
  }

  .ghost-link {
    grid-column: 3 / 4;
    grid-row: 3 / 5;
    align-self: center;
  }

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

  .record-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

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

  .task-main {
    align-items: stretch;
    flex-direction: column;
  }

  .task-side {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 36px;
  }

  .upload-zone {
    min-height: 188px;
  }

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

/* Workbench polish */
:root {
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
  --panel-pad: 22px;
  --gap: 14px;
}

body {
  background:
    radial-gradient(circle at 16% 0%, rgba(70, 217, 255, 0.055), transparent 28%),
    linear-gradient(180deg, #090b10 0%, #07080c 52%, #080a0f 100%);
}

.page {
  padding-top: 16px;
}

.nav {
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 60px;
  border-radius: var(--radius-lg);
  padding: 0 14px;
  background: rgba(10, 12, 18, 0.9);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.24);
}

.brand {
  gap: 10px;
  font-size: 17px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
}

.brand-mark::before {
  inset: 8px;
  border-width: 4px;
}

.brand-mark::after {
  right: 7px;
  border-top-width: 5px;
  border-bottom-width: 5px;
  border-left-width: 8px;
}

.nav-menu a {
  margin-right: 22px;
  color: rgba(220, 227, 238, 0.72);
}

.nav-menu a.active {
  color: var(--ink);
}

.nav-account {
  display: grid;
  justify-items: end;
  gap: 2px;
  min-width: 112px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.15;
  white-space: nowrap;
}

.nav-account strong {
  color: var(--green);
  font-size: 13px;
}

.composer,
.live-panel,
.outputs,
.asset-hero,
.asset-toolbar,
.records-hero,
.detail-head,
.detail-card,
.billing-settings-panel,
.usage-chart-card,
.admin-table-wrap,
.record-empty {
  border-radius: var(--radius-lg);
  background: rgba(14, 17, 24, 0.9);
  box-shadow: var(--shadow);
}

.composer,
.live-panel,
.outputs,
.detail-card {
  padding: 22px;
}

.composer-head {
  padding-bottom: 16px;
}

h1 {
  font-size: clamp(24px, 2.2vw, 30px);
}

h2 {
  font-size: 20px;
}

.form-subtitle {
  font-size: 14px;
}

.outline-button,
.outline-link,
.primary-action,
.asset-refresh,
.primary-button {
  border-radius: var(--radius-sm);
}

.primary-button {
  min-height: 52px;
  box-shadow: 0 10px 28px rgba(184, 255, 77, 0.14);
}

.upload-grid {
  margin-top: 16px;
}

.upload-zone {
  min-height: 168px;
  border-radius: var(--radius-lg);
  padding: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.upload-zone::before {
  display: none;
}

.upload-zone:hover,
.upload-zone.has-files {
  transform: none;
}

.upload-symbol {
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  font-size: 22px;
}

.upload-zone strong {
  font-size: 17px;
}

.field input,
.asset-picker select,
.asset-search input,
.asset-filter select,
.asset-modal .field input,
.asset-modal .field select,
.asset-detail-info .field input,
.asset-detail-info .field select {
  min-height: 42px;
  border-radius: var(--radius-sm);
}

.settings-strip {
  margin-top: 16px;
}

.billing-preview,
.linked-video-picker,
.credit-settlement div,
.record-stat,
.task-card,
.recent-task-card,
.asset-card,
.output-card,
.asset-empty {
  border-radius: var(--radius-sm);
}

.asset-page,
.detail-page,
.studio {
  margin-top: 16px;
}

.asset-hero,
.records-hero,
.detail-head {
  padding: 20px 22px;
}

.asset-toolbar {
  padding: 12px;
}

.asset-grid {
  gap: 12px;
}

.asset-card {
  background: rgba(14, 17, 24, 0.88);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.asset-card:hover {
  transform: none;
}

.asset-card-title {
  align-items: flex-start;
  flex-direction: column;
  gap: 7px;
}

.asset-card-title span,
.task-state,
.records-page .task-state,
.recent-task-card .task-state {
  border-radius: 999px;
}

.asset-card-meta {
  align-items: flex-start;
  flex-direction: column;
  gap: 5px;
  margin-top: 10px;
}

.admin-page {
  margin-top: 16px;
}

.record-stats {
  gap: 12px;
}

.record-stat {
  padding: 15px;
  background: rgba(255, 255, 255, 0.045);
}

.admin-table {
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  padding: 11px 12px;
}

.admin-table th {
  color: rgba(154, 164, 181, 0.88);
  background: rgba(255, 255, 255, 0.035);
}

.admin-table td:nth-child(3),
.admin-table td:nth-child(4),
.admin-table td:nth-child(5) {
  white-space: nowrap;
}

.record-row,
.recent-task-card {
  background: rgba(255, 255, 255, 0.038);
}

.recent-task-header,
.recent-task-layout {
  grid-template-columns: 40px minmax(0, 1fr) 112px 88px 92px;
}

.recent-task-header {
  border-radius: var(--radius-sm);
  padding-left: 14px;
}

.recent-task-card {
  padding: 9px 12px;
}

.recent-task-rail {
  width: 20px;
  height: 20px;
}

.recent-task-rail::before {
  inset: 7px;
}

.task-state.running,
.task-state.uploaded {
  color: #9befff;
  background: rgba(70, 217, 255, 0.1);
}

.task-state.completed {
  color: #d9ff95;
  background: rgba(184, 255, 77, 0.12);
}

.task-state.partial_failed {
  color: #ffd99b;
  background: rgba(255, 181, 77, 0.12);
}

.task-state.failed {
  color: #ffc4cd;
  background: rgba(255, 107, 122, 0.14);
}

.danger-link,
.retry-link,
.record-actions .outline-link,
.ghost-link,
.compact-task-card,
.compact-task-card .outline-link {
  border-radius: var(--radius-sm);
}

@media (max-width: 1080px) {
  .nav {
    grid-template-columns: auto 1fr;
  }

  .nav-account {
    justify-self: end;
  }

  .nav-menu {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .nav {
    min-height: auto;
  }

  .nav-account {
    min-width: auto;
  }

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

@media (max-width: 480px) {
  h1 {
    font-size: 28px;
  }

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