/* Friendly guided create dashboard. Keep this final. */
@import url("https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Space+Grotesk:wght@400;500;600;700&display=swap");

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

html,
body {
  margin: 0;
  min-width: 320px;
  padding: 0;
}

body {
  background: #f5f7f8;
  color: #111827;
  font-family: "Space Grotesk", "Inter", "Segoe UI", sans-serif;
  line-height: 1.45;
}

body.opencash-v2 {
  background:
    radial-gradient(circle at 12% -8%, rgba(37, 99, 235, 0.18), transparent 30%),
    radial-gradient(circle at 86% -12%, rgba(15, 159, 122, 0.12), transparent 28%),
    #f5f7f8;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: "Instrument Serif", "Times New Roman", serif;
  font-weight: 400;
}

a {
  color: #2563eb;
}

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

button {
  align-items: center;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  transition:
    box-shadow 160ms ease,
    transform 160ms ease,
    filter 160ms ease;
}

button:hover {
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.34);
  filter: brightness(1.03);
  transform: translateY(-1px);
}

button:disabled {
  background: #cbd5e1;
  box-shadow: none;
  color: #64748b;
  cursor: not-allowed;
  transform: none;
}

input,
textarea,
select {
  background: #ffffff;
  border: 1px solid #d3dce8;
  border-radius: 14px;
  color: #111827;
  min-height: 42px;
  outline: none;
  padding: 10px 12px;
  width: 100%;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

textarea {
  min-height: 84px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #8fa0b7;
}

[hidden], .dashboard-view[hidden], .auth-form[hidden], .create-tab-panel[hidden], .login-screen[hidden], .agent-technical-settings:not([open]) > :not(summary) { display: none !important; }

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

.sidebar {
  background: linear-gradient(180deg, #172036 0%, #111827 52%, #0b1220 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 10px;
  position: sticky;
  top: 0;
}

.brand {
  align-items: center;
  display: flex;
  justify-content: center;
}

.brand-mark {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  color: #ffffff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  height: 44px;
  justify-content: center;
  letter-spacing: 0.08em;
  width: 44px;
}

.nav-section-label {
  color: rgba(255, 255, 255, 0.46);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin: 6px 0 0;
  text-align: center;
  text-transform: uppercase;
}

nav {
  align-content: start;
  display: grid;
  gap: 8px;
}

nav a {
  align-items: center;
  background: transparent;
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.74);
  display: inline-flex;
  height: 46px;
  justify-content: center;
  text-decoration: none;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

nav a:hover,
nav a.active {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  transform: translateY(-1px);
}

.nav-icon {
  align-items: center;
  display: inline-flex;
  height: 20px;
  justify-content: center;
  width: 20px;
}

.nav-icon svg {
  fill: none;
  height: 100%;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 100%;
}

.sidebar-footer {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.operator-card,
.system-status-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  color: #dbe8ff;
  min-height: 40px;
}

.operator-card {
  align-items: center;
  display: flex;
  justify-content: center;
  padding: 8px;
}

.operator-card small,
.system-status-card span,
.system-status-card strong {
  display: none;
}

.operator-avatar {
  align-items: center;
  background: linear-gradient(180deg, #f8cf78, #de9c24);
  border-radius: 999px;
  color: #1f2937;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.system-status-card {
  align-items: center;
  display: flex;
  justify-content: center;
  padding: 8px;
}

.system-status-card i {
  background: #0f9f7a;
  border-radius: 999px;
  height: 10px;
  width: 10px;
}

.workspace {
  background-color: #f5f7f8;
  background-image:
    radial-gradient(rgba(17, 24, 39, 0.08) 1px, transparent 1px),
    radial-gradient(rgba(17, 24, 39, 0.04) 1px, transparent 1px);
  background-position: 0 0, 12px 12px;
  background-size: 24px 24px;
  min-width: 0;
  padding: 22px clamp(16px, 2.5vw, 28px) 30px;
}

.topbar {
  align-items: center;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 18px;
  padding: 16px 18px;
  position: sticky;
  top: 12px;
  z-index: 7;
}

.topbar::after {
  background: linear-gradient(90deg, #2563eb, #4f46e5, #0f9f7a);
  border-radius: 999px;
  bottom: -2px;
  content: "";
  height: 3px;
  left: 14px;
  position: absolute;
  right: 14px;
}

.topbar h1 {
  color: #0f172a;
  font-size: clamp(34px, 4.2vw, 52px);
  letter-spacing: -0.02em;
  line-height: 0.95;
}

.topbar p {
  color: #5c6f87;
  font-size: 14px;
  margin-top: 6px;
  max-width: 72ch;
}

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

.session-pill {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #d7dfeb;
  border-radius: 999px;
  color: #556780;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  min-height: 38px;
  padding: 0 14px;
  white-space: nowrap;
}

.dashboard-view {
  display: none;
}

.dashboard-view.active {
  display: grid;
  gap: 16px;
}

.panel,
.dashboard-view.panel,
.channel-start-panel,
.video-brief-panel,
.agent-factory-panel,
.agent-workbench,
.create-library-panel,
.settings-panel,
.media-library-panel,
.production-studio-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(202, 214, 230, 0.9);
  border-radius: 20px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
  min-width: 0;
}

.panel-head {
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 16px 18px;
}

.panel-head h2 {
  color: #0f172a;
  font-size: 22px;
}

.panel-head span {
  color: #64758c;
  font-size: 13px;
}

.jobs {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.job {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8e1ee;
  border-radius: 16px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto minmax(260px, 0.9fr);
  padding: 12px;
}

.job-title {
  color: #111827;
  font-weight: 700;
}

.job-meta,
.empty,
.compact-empty {
  color: #6d7f97;
  font-size: 13px;
}

.job-actions,
.pipeline-head-actions,
.retry-controls,
.source-form-actions,
.factory-actions,
.agent-run-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-panel {
  overflow: hidden;
}

.settings-summary {
  border-bottom: 1px solid #d9e3ef;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 16px;
}

.settings-summary .metric {
  background: #f8fbff;
  border: 1px solid #d8e3f1;
  border-radius: 14px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.settings-summary strong {
  color: #0f172a;
  font-size: 24px;
}

.settings-summary span {
  color: #677a92;
  font-size: 12px;
}

.settings-group {
  border-bottom: 1px solid #dfe7f1;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.settings-group:last-child {
  border-bottom: 0;
}

.settings-group-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.settings-group-head h3 {
  color: #111827;
  font-size: 18px;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 700;
}

.settings-field-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.setting-field {
  background: #f8fbff;
  border: 1px solid #d8e3f1;
  border-radius: 14px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.setting-field > span {
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.create-workspace-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-rows: auto minmax(0, 1fr);
}

.create-workspace-tabs {
  background: #eef3fb;
  border: 1px solid #d0dced;
  border-radius: 999px;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 6px;
  width: 100%;
}

.create-workspace-tabs button {
  background: transparent;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  color: #66788f;
  min-height: 42px;
  padding: 0 12px;
}

.create-workspace-tabs button.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
  color: #ffffff;
}

.create-workspace-panels {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.create-tab-panel.active {
  display: grid;
  gap: 14px;
}

.create-tab-panel[hidden] {
  display: none !important;
}

.quick-start-card {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(15, 159, 122, 0.08)),
    #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 20px;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.12);
  display: grid;
  gap: 8px;
  padding: 14px 16px;
}

.quick-start-card strong {
  color: #0f172a;
  font-size: 18px;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 700;
}

.quick-start-card p {
  color: #60728b;
  font-size: 13px;
}

.channel-start-panel,
.video-brief-panel,
.agent-factory-panel,
.agent-workbench,
.create-media-showcase {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.channel-list {
  display: grid;
  gap: 12px;
  grid-auto-columns: minmax(220px, 240px);
  grid-auto-flow: column;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
}

.channel-card {
  background: #ffffff;
  border: 1px solid #d8e2ef;
  border-radius: 20px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  color: #111827;
  display: grid;
  gap: 12px;
  min-height: 190px;
  padding: 14px 12px;
  position: relative;
  scroll-snap-align: start;
  text-align: left;
}

.channel-card::before {
  background: linear-gradient(90deg, #2563eb, #0f9f7a);
  border-radius: 16px 16px 0 0;
  content: "";
  height: 8px;
  left: 10px;
  position: absolute;
  right: 10px;
  top: 10px;
}

.channel-card:hover {
  transform: translateY(-2px);
}

.channel-card-main {
  display: grid;
  gap: 10px;
  grid-template-columns: 40px minmax(0, 1fr);
  margin-top: 10px;
}

.channel-orb {
  align-items: center;
  background: rgba(37, 99, 235, 0.12);
  border-radius: 999px;
  color: #2563eb;
  display: flex;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.channel-orb svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
}

.channel-card strong {
  font-size: 17px;
  line-height: 1.18;
}

.channel-card em,
.channel-card span {
  color: #60728b;
  display: block;
  font-size: 12px;
  font-style: normal;
}

.channel-create-tile {
  align-content: center;
  border: 1px dashed #a9b8cb;
  justify-items: center;
  text-align: center;
}

.channel-create-plus {
  align-items: center;
  border: 2px solid #97a9bf;
  border-radius: 999px;
  color: #6d8097;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.channel-create-plus svg {
  fill: none;
  height: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 16px;
}

.simple-flow-strip {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.simple-flow-strip article {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8e2ef;
  border-radius: 16px;
  display: grid;
  gap: 6px;
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 74px;
  padding: 10px;
  position: relative;
}

.simple-flow-strip article:not(:last-child)::after {
  background: linear-gradient(90deg, #93c5fd, #bfdbfe);
  content: "";
  height: 2px;
  position: absolute;
  right: -9px;
  top: 50%;
  width: 18px;
}

.simple-flow-strip article > span {
  align-items: center;
  background: #ebf2ff;
  border-radius: 999px;
  color: #2563eb;
  display: flex;
  font-size: 12px;
  font-weight: 700;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.simple-flow-strip strong,
.simple-flow-strip small {
  display: block;
}

.simple-flow-strip small {
  color: #67809b;
  font-size: 11px;
}

.brief-control-grid,
.brief-reference-grid,
.factory-controls {
  display: grid;
  gap: 12px;
}

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

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

.character-lock-card {
  background: #f8fbff;
  border: 1px solid #dbe7f4;
  border-radius: 16px;
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  padding: 12px;
}

.brief-topic-field,
.brief-control-grid label,
.brief-reference-grid label,
.agent-job-picker,
.factory-controls label,
.source-grid label {
  color: #637891;
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
}

.brief-advanced-drawer,
.step-editor-drawer,
.factory-options-drawer {
  background: #f8fbff;
  border: 1px solid #d8e3f1;
  border-radius: 16px;
  padding: 12px;
}

.brief-advanced-drawer summary,
.step-editor-drawer summary,
.factory-options-drawer summary,
.agent-provider-blockers summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.brief-advanced-drawer summary::-webkit-details-marker,
.step-editor-drawer summary::-webkit-details-marker,
.factory-options-drawer summary::-webkit-details-marker,
.agent-provider-blockers summary::-webkit-details-marker {
  display: none;
}

.step-editor-panel {
  display: grid;
  gap: 12px;
}

.workflow-meta-row {
  color: #6a7c93;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 8px;
}

.workflow-meta-row span {
  background: #f6f9fe;
  border: 1px solid #dbe6f4;
  border-radius: 999px;
  padding: 6px 10px;
}

.workflow-edit-button {
  min-height: 34px;
  padding: 0 12px;
}

.script-output-panel {
  background: #f8fbff;
  border: 1px solid #d9e5f3;
  border-radius: 16px;
  color: #4f6480;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.script-output-head,
.script-package-preview,
.script-section-list {
  display: grid;
  gap: 10px;
}

.script-output-head {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
}

.script-section-card {
  background: #ffffff;
  border: 1px solid #d8e3f0;
  border-radius: 14px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.script-section-card > span {
  color: #6d7f96;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.script-section-card p {
  color: #243347;
  font-size: 14px;
  line-height: 1.55;
}

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

.create-media-strip {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.create-placeholder-card,
.create-thumb-frame,
.create-image-card {
  aspect-ratio: 1.04;
  background: #e7eef8;
  border: 1px solid #d2deed;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.create-placeholder-card > span {
  background:
    radial-gradient(circle at 40% 25%, rgba(255, 255, 255, 0.75), transparent 18%),
    linear-gradient(145deg, #dbe7f5, #9fb5cf 45%, #5f7896);
  display: block;
  height: 100%;
  width: 100%;
}

.create-placeholder-card strong {
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.75));
  bottom: 0;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  left: 0;
  padding: 20px 8px 8px;
  position: absolute;
  right: 0;
}

.agent-command-strip {
  background: #ffffff;
  border: 1px solid #d9e4f2;
  border-radius: 20px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 0;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  overflow: hidden;
}

.agent-command-metric {
  border-right: 1px solid #dce7f3;
  display: grid;
  gap: 4px;
  padding: 14px;
}

.agent-command-metric:last-child {
  border-right: 0;
}

.agent-command-metric span,
.agent-command-metric small {
  color: #687f99;
  font-size: 11px;
}

.agent-command-metric strong {
  color: #0f172a;
  font-size: 17px;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.agent-progress-panel {
  background: #ffffff;
  border: 1px solid #d9e3ef;
  border-radius: 18px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.agent-progress-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.agent-progress-track {
  background: #dbe5f2;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.agent-progress-fill {
  background: linear-gradient(90deg, #2563eb, #0f9f7a);
  display: block;
  height: 100%;
  transition: width 220ms ease;
  width: 0%;
}

.agent-progress-steps {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.progress-step {
  align-items: center;
  background: #f6faff;
  border: 1px solid #d7e2ef;
  border-radius: 12px;
  color: #68809a;
  display: flex;
  gap: 8px;
  min-height: 36px;
  padding: 6px 8px;
}

.progress-step span {
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 20px;
  font-size: 10px;
  font-weight: 700;
  height: 20px;
  justify-content: center;
}

.progress-step strong {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-step-blocked {
  border-color: #ef4444;
  color: #ef4444;
}

.agent-workflow-board {
  display: grid;
  gap: 10px;
}

.workflow-phase {
  background: #ffffff;
  border: 1px solid #d9e4f2;
  border-radius: 16px;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  padding: 12px;
}

.workflow-phase:hover {
  border-color: #aac0da;
}

.workflow-step-number {
  align-items: center;
  background: #ecf3ff;
  border-radius: 999px;
  color: #2563eb;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.workflow-agent {
  align-items: center;
  background: #f7fbff;
  border: 1px solid #d9e4f2;
  border-radius: 12px;
  color: #1f2b3f;
  display: grid;
  gap: 6px;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 38px;
  padding: 8px 10px;
}

.workflow-agent-pulse {
  animation: pulse-beacon 2s infinite;
  background: #0f9f7a;
  border-radius: 999px;
  height: 9px;
  width: 9px;
}

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

.provider-check {
  background: #f7fbff;
  border: 1px solid #dce6f4;
  border-radius: 12px;
  padding: 10px;
}

.agent-job-picker select,
.factory-controls input,
.factory-controls select,
.factory-controls textarea {
  width: 100%;
}

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

.factory-primary-action {
  background: linear-gradient(135deg, #0f9f7a, #0b8768);
  box-shadow: 0 12px 24px rgba(15, 159, 122, 0.28);
}

.factory-options-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.factory-options-head h4 {
  color: #0f172a;
  font-size: 17px;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 700;
}

.factory-options-head p,
.factory-options-head span {
  color: #6a7f95;
  font-size: 12px;
}

.agent-provider-blockers {
  border: 1px solid #d8e4f2;
  border-radius: 14px;
  padding: 10px;
}

.agent-provider-blockers[open] {
  display: grid;
  gap: 10px;
}

.agent-provider-blocker {
  background: #fff4f4;
  border: 1px solid #fecaca;
  border-radius: 12px;
  color: #991b1b;
  padding: 10px;
}

.agent-timeline,
.agent-version-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.agent-timeline li,
.agent-version-list li {
  background: #f7fbff;
  border: 1px solid #d8e5f2;
  border-radius: 12px;
  color: #26415d;
  display: grid;
  gap: 4px;
  padding: 9px 10px;
}

.agent-flow-map,
.agent-pipeline {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.agent-flow-node,
.agent-card {
  animation: card-drift 5s ease-in-out infinite;
  background: #ffffff;
  border: 1px solid #d8e3f0;
  border-radius: 16px;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  position: relative;
}

.agent-orbit-ring,
.agent-card-orbit {
  animation: star-drift 20s linear infinite;
  border: 1px dashed rgba(37, 99, 235, 0.24);
  border-radius: 999px;
  height: 70px;
  position: absolute;
  right: 8px;
  top: 8px;
  width: 70px;
}

.agent-card-orbit {
  height: 40px;
  right: 22px;
  top: 22px;
  width: 40px;
}

.agent-card-sigil {
  align-items: center;
  animation: badge-drift 4s ease-in-out infinite;
  background: #ebf2ff;
  border-radius: 999px;
  color: #2563eb;
  display: inline-flex;
  font-size: 10px;
  font-weight: 700;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.agent-badge-core {
  align-items: center;
  background: #2563eb;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.agent-status-offline {
  border-left: 4px solid #94a3b8;
}

.agent-selected-brief {
  background: #ffffff;
  border: 1px solid #d7e2ef;
  border-radius: 16px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.agent-editor-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
}

.agent-editor-tabs {
  border-bottom: 1px solid #d6e2ef;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-bottom: 8px;
}

.agent-editor-tabs button {
  background: transparent;
  border: 1px solid #d8e4f1;
  border-radius: 999px;
  box-shadow: none;
  color: #67809b;
  min-height: 34px;
}

.agent-editor-tabs button.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.agent-form {
  background: #ffffff;
  border: 1px solid #d8e3f0;
  border-radius: 14px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 12px;
}

.agent-technical-settings {
  background: #f7fbff;
  border: 1px solid #d8e4f2;
  border-radius: 12px;
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  padding: 10px;
}

.agent-technical-settings summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.agent-technical-settings summary::-webkit-details-marker {
  display: none;
}

.agent-technical-settings:not([open]) > :not(summary) {
  display: none !important;
}

.media-library-panel {
  display: grid;
}

.library-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding: 14px 16px 0;
}

.video-library-grid,
.image-library-grid {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.video-library-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

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

.library-card {
  background: #ffffff;
  border: 1px solid #d9e4f1;
  border-radius: 16px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.source-doctor {
  align-items: center;
  border-bottom: 1px solid #dce6f3;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 14px 16px;
}

.source-doctor-issues {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0 16px 16px;
}

.source-doctor-issues li {
  background: #fff4f4;
  border: 1px solid #fecaca;
  border-radius: 12px;
  color: #991b1b;
  padding: 10px;
}

.source-validation-report {
  display: grid;
  gap: 10px;
}

.source-validation-report ul {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.source-validation-report li {
  background: #f8fbff;
  border: 1px solid #d9e4f2;
  border-radius: 12px;
  display: grid;
  gap: 3px;
  padding: 9px 10px;
}

.source-validation-report p,
.source-validation-report li span,
.source-validation-report li code {
  color: #687e98;
  font-size: 12px;
}

.production-studio-panel {
  background:
    linear-gradient(140deg, rgba(37, 99, 235, 0.06), rgba(15, 159, 122, 0.06)),
    #ffffff;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.production-agent-strip {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.production-agent-card {
  background: #ffffff;
  border: 1px solid #d8e3ef;
  border-left: 4px solid #93c5fd;
  border-radius: 14px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.production-agent-card.agent-status-blocked {
  border-left-color: #ef4444;
}

.production-agent-card.agent-status-complete {
  border-left-color: #0f9f7a;
}

.production-media-layout {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
}

.production-video-slot,
.production-scene-strip-wrap {
  background: #f8fbff;
  border: 1px solid #d8e3ef;
  border-radius: 14px;
  padding: 10px;
}

.production-retry-bar {
  background: #fff6eb;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  color: #9a3412;
  padding: 10px;
}

.production-quality-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quality-chip {
  background: #ecfdf5;
  border: 1px solid #b7f7de;
  border-radius: 999px;
  color: #0f766e;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
}

.readiness-summary,
.analytics-stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 16px;
}

.metric {
  background: #f8fbff;
  border: 1px solid #d8e3ef;
  border-radius: 14px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.metric strong {
  color: #0f172a;
  font-size: 22px;
}

.metric span {
  color: #657a93;
  font-size: 12px;
}

.status,
.metric-chip {
  align-items: center;
  background: #eef2ff;
  border: 1px solid #cad7ff;
  border-radius: 999px;
  color: #1e3a8a;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  padding: 5px 9px;
}

.metric-chip.success {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #166534;
}

.metric-chip.warn {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.login-screen {
  align-items: stretch;
  display: grid;
  gap: 0;
  grid-template-columns: 1.2fr 0.8fr;
  min-height: 100vh;
}

.login-intro {
  background:
    radial-gradient(circle at 16% 18%, rgba(37, 99, 235, 0.34), transparent 30%),
    radial-gradient(circle at 82% 20%, rgba(15, 159, 122, 0.16), transparent 30%),
    #111827;
  color: #ffffff;
  display: grid;
  gap: 18px;
  padding: clamp(26px, 6vw, 72px);
}

.login-kicker {
  color: #93c5fd;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-intro h1 {
  font-size: clamp(48px, 7vw, 88px);
  letter-spacing: -0.03em;
  line-height: 0.88;
  max-width: 9ch;
}

.login-intro p {
  color: rgba(255, 255, 255, 0.84);
  font-size: 17px;
  max-width: 34ch;
}

.login-feature-list,
.feature-list {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 18px 0 0;
  max-width: 38ch;
  padding: 0;
}

.login-feature-list li,
.feature-list li {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
}

.login-feature-list strong,
.feature-list strong {
  color: #ffffff;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.login-feature-list span,
.feature-list span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.45;
}

.brand-copy,
.nav-label {
  display: none;
}

.studio-workspace {
  background-color: #f5f7f8;
  background-image: radial-gradient(#c5d0df 0.8px, transparent 0.8px);
  background-size: 18px 18px;
}

.studio-topbar {
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(208, 220, 237, 0.9);
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  margin-bottom: 20px;
  padding: 18px 20px 16px;
  position: relative;
}

.studio-topbar::after {
  background: linear-gradient(90deg, #2563eb, #0f9f7a);
  border-radius: 999px;
  bottom: 0;
  content: "";
  height: 3px;
  left: 20px;
  position: absolute;
  right: 20px;
}

.topbar-eyebrow {
  color: #2563eb;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.topbar-button {
  background: #ffffff;
  border: 1px solid #d0dced;
  box-shadow: none;
  color: #111827;
}

.topbar-button:hover {
  background: #f8fafc;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.topbar-button-muted {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
}

.login-panel-wrap {
  align-items: center;
  background: #ffffff;
  display: grid;
  justify-items: center;
  padding: 20px;
}

.login-panel {
  background: #ffffff;
  border: 1px solid #d7e2ef;
  border-radius: 20px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
  display: grid;
  gap: 14px;
  padding: 22px;
  width: min(100%, 430px);
}

.auth-tabs {
  background: #eef3fb;
  border: 1px solid #d4deec;
  border-radius: 999px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 4px;
}

.auth-tabs button {
  background: transparent;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  color: #637a94;
  min-height: 34px;
}

.auth-tabs button.active {
  background: #ffffff;
  color: #111827;
}

.auth-form,
.auth-subform {
  display: grid;
  gap: 12px;
}

.auth-form h2,
.auth-subform h2 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 26px;
  font-weight: 700;
}

.auth-form p,
.auth-subform p,
.login-panel label,
.login-status {
  color: #64778f;
  font-size: 13px;
}

.login-panel label {
  display: grid;
  font-weight: 700;
  gap: 6px;
}

.login-panel input,
.login-panel button {
  width: 100%;
}

.login-status {
  background: #f7fbff;
  border: 1px solid #d9e5f2;
  border-radius: 12px;
  padding: 10px;
}

.login-status[data-tone="error"] {
  background: #fff4f4;
  border-color: #fecaca;
  color: #b91c1c;
}

.workflow-state-dot,
.editor-live-dot {
  border-radius: 999px;
  display: inline-block;
  height: 8px;
  width: 8px;
}

.workflow-state-dot {
  background: #60a5fa;
}

.editor-live-dot {
  background: #0f9f7a;
}

.reference-prompt-preview {
  background: #ffffff;
  border: 1px solid #d8e3ef;
  border-radius: 12px;
  padding: 10px;
}

.reference-prompt-preview pre {
  background: #111827;
  border-radius: 10px;
  color: #f8fafc;
  font-size: 12px;
  margin-top: 8px;
  max-height: 260px;
  overflow: auto;
  padding: 10px;
  white-space: pre-wrap;
}

.artifact-content {
  background: #f8fbff;
  border: 1px solid #d8e3ef;
  border-radius: 12px;
  display: grid;
  gap: 10px;
  padding: 10px;
}

.media-preview video,
.media-preview img {
  background: #0f172a;
  border-radius: 12px;
  max-height: 520px;
  object-fit: contain;
  width: 100%;
}

.media-preview audio {
  width: 100%;
}

/* Advanced simplified create tabs. Keep this after the friendly dashboard overrides. */

.agent-console.active {
  background: transparent;
  border: 0;
  box-shadow: none;
  display: grid;
  gap: 14px;
  overflow: visible;
}

.agent-workbench.active {
  display: grid;
}

.workbench-main {
  display: grid;
  gap: 12px;
}

.steps-workbench .workbench-main {
  background: #ffffff;
  border: 1px solid #d9e4f2;
  border-radius: 16px;
  padding: 12px;
}

.readiness-checks,
.monitoring-reports,
.sources-list,
.evidence-results {
  display: grid;
}

.readiness-check,
.monitoring-report,
.source,
.evidence {
  border-bottom: 1px solid #dce6f3;
  display: grid;
  gap: 8px;
  padding: 12px 16px;
}

.readiness-check:last-child,
.monitoring-report:last-child,
.source:last-child,
.evidence:last-child {
  border-bottom: 0;
}

.readiness-check pre {
  background: #f8fbff;
  border: 1px solid #d8e3ef;
  border-radius: 10px;
  color: #4b617d;
  font-size: 12px;
  margin: 0;
  overflow: auto;
  padding: 10px;
}

.library-preview {
  background: #f8fbff;
  border-bottom: 1px solid #dce7f4;
  padding: 12px 16px;
}

.library-grid {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.library-meta-grid,
.report-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inline-form {
  align-items: end;
  border-bottom: 1px solid #dce6f3;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 12px 16px;
}

.source-grid,
.detail-grid,
.report-lists {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 12px 16px;
}

.report-lists ul,
.monitoring-report ul,
.readiness-check ul,
.job-detail ul {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.report-lists li,
.monitoring-report li,
.job-detail li {
  background: #f8fbff;
  border: 1px solid #d8e3ef;
  border-radius: 12px;
  display: grid;
  gap: 4px;
  padding: 8px 10px;
}

.publish-controls {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(120px, 1fr) auto;
}

.retry-controls {
  display: flex;
}

.production-status-strip {
  display: grid;
  gap: 8px;
}

.production-blocker-banner,
.production-run-hint {
  align-items: center;
  border-radius: 14px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 12px;
}

.production-blocker-banner {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-left: 4px solid #f97316;
}

.production-run-hint {
  background: #eef4ff;
  border: 1px solid #c7dbff;
  border-left: 4px solid #2563eb;
}

.source-form-actions {
  justify-content: flex-end;
}

.source-validation-blocked,
.provider-blocked,
.readiness-blocked {
  border-left: 4px solid #ef4444;
}

.provider-ready,
.readiness-ready {
  border-left: 4px solid #0f9f7a;
}

.provider-warn,
.readiness-warn {
  border-left: 4px solid #f59e0b;
}

@keyframes badge-drift {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

@keyframes card-drift {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }
}

@keyframes star-drift {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 220px 160px;
  }
}

@keyframes pulse-beacon {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.18);
  }

  50% {
    box-shadow: 0 0 0 7px rgba(37, 99, 235, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 1180px) {
  .create-workspace-layout,
  .create-media-showcase,
  .agent-editor-grid,
  .production-media-layout,
  .settings-summary,
  .settings-field-grid,
  .source-grid,
  .detail-grid,
  .report-lists,
  .inline-form,
  .factory-controls,
  .brief-control-grid,
  .brief-reference-grid {
    grid-template-columns: 1fr;
  }

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

  .agent-command-strip {
    grid-template-columns: 1fr;
  }

  .agent-command-metric {
    border-bottom: 1px solid #dce7f3;
    border-right: 0;
  }

  .agent-command-metric:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 900px) {
  .shell,
  .login-screen,
  .jobs,
  .job,
  .simple-flow-strip,
  .agent-progress-steps,
  .create-media-strip,
  .analytics-stats,
  .readiness-summary,
  .library-meta-grid,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    height: auto;
    position: static;
    width: 100%;
  }

  .brand,
  .sidebar-footer {
    grid-column: 1 / -1;
  }

  nav {
    display: contents;
  }

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

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

  .create-workspace-tabs {
    grid-template-columns: 1fr;
  }

  .channel-list,
  .production-agent-strip {
    grid-auto-columns: minmax(220px, 1fr);
  }
}

:root {
  color-scheme: light;
  --friendly-bg: #f5f7f8;
  --friendly-rail: #111827;
  --friendly-blue: #2563eb;
  --friendly-green: #0f9f7a;
  --radius: 8px;
  --bg: #f5f7f8;
}

