@import url("/enot-theme.css?v=1");
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap");

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

html {
  scroll-behavior: smooth;
}

body.studio {
  margin: 0;
  min-height: 100vh;
  font-family: var(--enot-font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--enot-text);
  background:
    radial-gradient(ellipse 120% 80% at 100% -20%, rgba(232, 169, 72, 0.07), transparent 50%),
    radial-gradient(ellipse 80% 60% at -10% 100%, rgba(107, 201, 168, 0.05), transparent 45%),
    var(--enot-bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--enot-amber);
  text-decoration: none;
}

a:hover {
  color: var(--enot-amber-hover);
}

.studio-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.studio-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 16px;
  background: var(--enot-bg-elevated);
  border-right: 1px solid var(--enot-border);
}

.studio-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 20px;
  color: var(--enot-text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.studio-brand:hover {
  color: var(--enot-text);
}

.studio-mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.studio-brand-accent {
  color: var(--enot-amber);
}

.studio-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.studio-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--enot-radius-sm);
  color: var(--enot-text-muted);
  font-weight: 500;
  border: 1px solid transparent;
}

.studio-nav a:hover {
  color: var(--enot-text);
  background: var(--enot-surface);
}

.studio-nav a.is-active {
  color: var(--enot-text);
  background: var(--enot-amber-soft);
  border-color: rgba(232, 169, 72, 0.22);
}

.studio-nav-icon {
  font-size: 1.1rem;
  opacity: 0.9;
}

.studio-sidebar-foot {
  margin-top: auto;
  padding: 16px 10px 8px;
  font-size: 0.8rem;
  color: var(--enot-text-muted);
}

.studio-sidebar-foot a {
  display: block;
  margin-top: 6px;
  font-weight: 500;
}

.studio-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.studio-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--enot-border);
  background: color-mix(in srgb, var(--enot-bg-elevated) 70%, transparent);
  backdrop-filter: blur(8px);
}

.studio-topbar h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.studio-user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  background: var(--enot-surface);
  border: 1px solid var(--enot-border);
  font-size: 0.85rem;
  color: var(--enot-text-muted);
}

.studio-user-pill strong {
  color: var(--enot-text);
  font-weight: 600;
}

.studio-user-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--enot-text-muted);
}

.studio-user-dot.ok {
  background: var(--enot-ok);
  box-shadow: 0 0 0 3px var(--enot-mint-soft);
}

.studio-user-dot.warn {
  background: var(--enot-amber);
}

.studio-content {
  flex: 1;
  padding: 24px 28px 40px;
  max-width: 1120px;
}

.studio-view[hidden] {
  display: none !important;
}

.studio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.studio-card {
  padding: 18px;
  border-radius: var(--enot-radius);
  background: var(--enot-surface);
  border: 1px solid var(--enot-border);
  box-shadow: var(--enot-shadow);
}

.studio-card h3 {
  margin: 0 0 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--enot-text-muted);
}

.studio-card .studio-metric {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--enot-text);
}

.studio-card .studio-metric-sub {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--enot-text-muted);
}

.studio-card.ok {
  border-color: color-mix(in srgb, var(--enot-mint) 35%, var(--enot-border));
}

.studio-card.warn {
  border-color: color-mix(in srgb, var(--enot-amber) 40%, var(--enot-border));
}

.studio-panel {
  margin-top: 22px;
  padding: 20px;
  border-radius: var(--enot-radius);
  background: var(--enot-surface);
  border: 1px solid var(--enot-border);
}

.studio-panel h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 600;
}

.studio-muted {
  color: var(--enot-text-muted);
  font-size: 0.9rem;
  margin: 0 0 14px;
}

.studio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.btn-enot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--enot-radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.btn-enot:active {
  transform: scale(0.98);
}

.btn-enot-primary {
  background: var(--enot-amber);
  color: #1a1408;
}

.btn-enot-primary:hover {
  background: var(--enot-amber-hover);
}

.btn-enot-ghost {
  background: transparent;
  color: var(--enot-text);
  border-color: var(--enot-border-strong);
}

.btn-enot-ghost:hover {
  background: var(--enot-surface-2);
}

.studio-table-wrap {
  overflow-x: auto;
}

.studio-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.studio-table th,
.studio-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--enot-border);
}

.studio-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--enot-text-muted);
  font-weight: 600;
}

.studio-table tr:hover td {
  background: var(--enot-surface-2);
}

.studio-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--enot-surface-3);
  color: var(--enot-text-muted);
}

.studio-badge.bubble {
  background: var(--enot-amber-soft);
  color: var(--enot-amber);
}

.studio-badge.legacy {
  background: var(--enot-surface-3);
}

.studio-badge.health-ok {
  background: var(--enot-mint-soft);
  color: var(--enot-mint);
}

.studio-badge.health-low {
  background: var(--enot-amber-soft);
  color: var(--enot-amber);
}

.studio-badge.health-critical {
  background: var(--enot-danger-soft);
  color: var(--enot-danger);
}

.studio-select {
  padding: 8px 10px;
  border-radius: var(--enot-radius-xs);
  border: 1px solid var(--enot-border-strong);
  background: var(--enot-surface-2);
  color: var(--enot-text);
  font-family: inherit;
  font-size: 0.85rem;
}

.studio-gate[hidden],
.studio-shell[hidden] {
  display: none !important;
}

.studio-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.studio-gate-card {
  max-width: 420px;
  width: 100%;
  padding: 32px 28px;
  border-radius: var(--enot-radius);
  background: var(--enot-surface);
  border: 1px solid var(--enot-border);
  box-shadow: var(--enot-shadow);
  text-align: center;
}

.studio-gate-card h1 {
  margin: 16px 0 8px;
  font-size: 1.5rem;
  font-weight: 700;
}

.studio-gate-card p {
  margin: 0 0 20px;
  color: var(--enot-text-muted);
  font-size: 0.95rem;
}

.studio-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 360px;
  padding: 12px 16px;
  border-radius: var(--enot-radius-sm);
  background: var(--enot-surface-2);
  border: 1px solid var(--enot-border-strong);
  font-size: 0.9rem;
  box-shadow: var(--enot-shadow);
  z-index: 100;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.25s, opacity 0.25s;
}

.studio-toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.studio-toast.error {
  border-color: color-mix(in srgb, var(--enot-danger) 50%, var(--enot-border));
}

.studio-browser-login {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.studio-token-input {
  width: 100%;
}

.btn-block {
  width: 100%;
}

.studio-account-detail[hidden] {
  display: none !important;
}

.studio-account-back {
  margin: 0 0 12px;
}

.studio-account-back a {
  font-weight: 600;
}

.studio-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.studio-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.studio-field-full {
  grid-column: 1 / -1;
}

.studio-field-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--enot-text-muted);
}

.studio-input,
.studio-textarea {
  padding: 10px 12px;
  border-radius: var(--enot-radius-xs);
  border: 1px solid var(--enot-border-strong);
  background: var(--enot-surface-2);
  color: var(--enot-text);
  font-family: inherit;
  font-size: 0.9rem;
}

.studio-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.45;
}

.studio-field-check {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding-top: 22px;
}

.studio-field-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--enot-amber);
}

.studio-account-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.studio-account-head h2 {
  margin: 0;
  font-size: 1.2rem;
}

.studio-queue-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.studio-queue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.studio-queue-card {
  border-radius: var(--enot-radius-sm);
  border: 1px solid var(--enot-border);
  background: var(--enot-surface-2);
  overflow: hidden;
}

.studio-queue-card video {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  background: #000;
  display: block;
}

.studio-queue-card-meta {
  padding: 10px 12px;
}

.studio-queue-card-meta p {
  margin: 0 0 8px;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--enot-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.studio-queue-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.studio-queue-status {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--enot-mint);
}

.studio-queue-status.issued {
  color: var(--enot-amber);
}

.btn-enot-sm {
  padding: 6px 10px;
  font-size: 0.8rem;
}

.studio-bubble-field[hidden] {
  display: none !important;
}

.studio-legacy-only[hidden],
.studio-bubble-only[hidden] {
  display: none !important;
}

.studio-pipeline-panel {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: var(--enot-radius-sm);
  border: 1px solid var(--enot-border);
  background: var(--enot-surface-2);
}

.studio-subsection-title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 600;
}

.studio-subsection-tip {
  margin: 0 0 12px;
  font-size: 0.82rem;
}

.studio-open-link {
  font-weight: 600;
  white-space: nowrap;
}

.studio-autofill-banner {
  margin: 0 28px 0;
  padding: 16px 18px;
  border-radius: var(--enot-radius);
  border: 1px solid var(--enot-border);
  background: var(--enot-surface);
}

.studio-autofill-banner.is-running {
  border-color: color-mix(in srgb, var(--enot-amber) 45%, var(--enot-border));
  background: color-mix(in srgb, var(--enot-amber-soft) 40%, var(--enot-surface));
}

.studio-autofill-banner.is-error {
  border-color: color-mix(in srgb, var(--enot-danger) 45%, var(--enot-border));
}

.studio-autofill-banner.is-idle-ok {
  border-color: color-mix(in srgb, var(--enot-mint) 35%, var(--enot-border));
}

.studio-autofill-banner-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.studio-autofill-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--enot-text-muted);
}

.studio-autofill-dot.running {
  background: var(--enot-amber);
  box-shadow: 0 0 0 4px var(--enot-amber-soft);
  animation: studio-pulse 1.2s ease-in-out infinite;
}

.studio-autofill-dot.ok {
  background: var(--enot-mint);
}

.studio-autofill-dot.error {
  background: var(--enot-danger);
}

@keyframes studio-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

.studio-autofill-msg {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
}

.studio-autofill-sub {
  margin: 8px 0 0;
  font-size: 0.82rem;
}

.studio-tools-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.studio-tools-head-actions {
  margin-top: 0;
}

.studio-tools-lead {
  margin: 0;
}

.studio-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.studio-tools-card {
  padding: 20px;
  border-radius: var(--enot-radius);
  background: var(--enot-surface);
  border: 1px solid var(--enot-border);
  box-shadow: var(--enot-shadow);
}

.studio-tools-card-wide {
  grid-column: 1 / -1;
}

.studio-tools-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.studio-tools-card-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.studio-tools-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 0.95rem;
  color: var(--enot-amber);
  background: color-mix(in srgb, var(--enot-amber) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--enot-amber) 25%, var(--enot-border));
}

.studio-tools-metrics {
  display: grid;
  gap: 12px;
}

.studio-tools-metric {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--enot-radius-sm);
  background: var(--enot-surface-2);
  border: 1px solid var(--enot-border);
}

.studio-tools-metric strong {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.studio-tools-metric span {
  font-size: 0.82rem;
  color: var(--enot-text-muted);
  text-align: right;
}

.studio-tools-foot {
  margin: 12px 0 0;
  font-size: 0.85rem;
}

.studio-tools-inline-field {
  margin: 0;
  min-width: 140px;
}

.studio-tools-preview-wrap {
  margin: 12px 0 16px;
}

.studio-tools-preview-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 16px;
  border-radius: var(--enot-radius-sm);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.03), transparent),
    var(--enot-bg-elevated);
  border: 1px dashed color-mix(in srgb, var(--enot-border-strong) 80%, transparent);
}

.studio-tools-preview-stage img {
  max-width: 100%;
  max-height: 420px;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.studio-tools-metric-line {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.studio-tools-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.studio-tools-chip-list li {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--enot-text-muted);
  background: var(--enot-surface-2);
  border: 1px solid var(--enot-border);
}

.studio-tools-disk {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.studio-tools-disk-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 8px;
  align-items: center;
  font-size: 0.88rem;
}

.studio-tools-disk-row label {
  color: var(--enot-text-muted);
}

.studio-tools-disk-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--enot-surface-2);
  overflow: hidden;
  margin-top: 4px;
}

.studio-tools-disk-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--enot-mint), var(--enot-amber));
}

.studio-tools-runtime {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.studio-tools-runtime-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--enot-radius-sm);
  border: 1px solid var(--enot-border);
  background: var(--enot-surface-2);
}

.studio-tools-runtime-row.ok {
  border-color: color-mix(in srgb, var(--enot-mint) 40%, var(--enot-border));
}

.studio-tools-runtime-row.bad {
  border-color: color-mix(in srgb, #e86a6a 45%, var(--enot-border));
}

.studio-tools-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.studio-tools-status-pill.ok {
  color: var(--enot-mint);
  background: color-mix(in srgb, var(--enot-mint) 15%, transparent);
}

.studio-tools-status-pill.bad {
  color: #f0a0a0;
  background: color-mix(in srgb, #e86a6a 18%, transparent);
}

.studio-tools-journal {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.studio-tools-journal-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  padding: 10px 12px;
  border-radius: var(--enot-radius-sm);
  background: var(--enot-surface-2);
  border: 1px solid var(--enot-border);
  font-size: 0.85rem;
}

.studio-tools-journal-item time {
  grid-column: 1 / -1;
  font-size: 0.75rem;
  color: var(--enot-text-muted);
}

.studio-tools-journal-item strong {
  color: var(--enot-amber);
  font-weight: 600;
}

.studio-tools-log-src {
  margin: 0 0 8px;
  font-size: 0.8rem;
}

.studio-tools-log {
  margin: 0;
  max-height: 320px;
  overflow: auto;
  padding: 14px;
  border-radius: var(--enot-radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  line-height: 1.45;
  color: color-mix(in srgb, var(--enot-text) 88%, var(--enot-mint));
  background: #0a0b0e;
  border: 1px solid var(--enot-border);
}

.studio-tools-links {
  margin-top: 20px;
}

.studio-tools-link-list {
  margin: 0 0 12px;
  padding-left: 1.2rem;
  color: var(--enot-text-muted);
}

.studio-tools-link-list li {
  margin-bottom: 8px;
}

@media (max-width: 860px) {
  .studio-shell {
    grid-template-columns: 1fr;
  }

  .studio-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--enot-border);
    padding: 12px;
  }

  .studio-brand {
    padding-bottom: 0;
    flex: 1;
  }

  .studio-nav {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }

  .studio-sidebar-foot {
    width: 100%;
    margin-top: 0;
  }

  .studio-content {
    padding: 18px 16px 32px;
  }

  .studio-topbar {
    padding: 14px 16px;
  }

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