/* All styles are scoped to the authenticated creative view. */
#zeusCreativeRoot {
  --zc-accent: var(--accent-cyan, #a3e635);
  color: var(--text-primary, #f4f4f5);
}
#zeusCreativeRoot * {
  box-sizing: border-box;
}
#zeusCreativeRoot [hidden] {
  display: none !important;
}
.zc-shell h2 {
  font-size: 1.05rem;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}
.zc-library {
  margin: 18px 0 22px;
}
.zc-library .zc-field {
  margin-bottom: 0;
}
.zc-grid2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 12px;
}
.zc-library .zc-grid2 {
  max-width: 900px;
}
.zc-brief-detail {
  margin: 16px 0;
  padding: 12px 0;
  border-top: 1px solid var(--border, #333);
}
.zc-brief-detail > summary,
.zc-motion-controls > summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.6;
  margin-bottom: 14px;
}
.zc-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0;
  padding: 14px;
  background: var(--bg-deep, #101214);
  border: 1px solid var(--border, #333);
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.65;
}
#zeusCreativeRoot .zc-consent input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--zc-accent);
}
.zc-sampling {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.zc-sampling .zc-field {
  max-width: 160px;
  margin-bottom: 0;
}
.zc-sampling button {
  margin-bottom: 0;
}
.zc-asset-id {
  display: block;
  font-size: 0.58rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
  color: var(--text-secondary, #a1a1aa);
  margin: 5px 0;
}
.zc-assets .zc-field {
  font-size: 0.64rem;
  margin: 8px 0;
}
#zeusCreativeRoot .zc-assets input {
  padding: 5px 6px;
}
.zc-analysis {
  margin-top: 20px;
  font-size: 0.8rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.zc-analysis h3,
.zc-proposal h3 {
  font-size: 0.95rem;
  margin: 20px 0 8px;
}
.zc-analysis ul {
  padding-left: 20px;
}
.zc-evidence-scroll {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border, #333);
  border-radius: 8px;
  margin-top: 15px;
}
.zc-evidence {
  border-collapse: collapse;
  width: 100%;
  min-width: 540px;
  font-size: 0.72rem;
  line-height: 1.55;
  text-align: left;
}
.zc-evidence th,
.zc-evidence td {
  padding: 10px;
  vertical-align: top;
  border-bottom: 1px solid var(--border, #333);
}
.zc-evidence th {
  background: var(--bg-deep, #101214);
}
.zc-evidence td:first-child {
  min-width: 140px;
}
.zc-evidence td small {
  display: block;
  font-size: 0.6rem;
  overflow-wrap: anywhere;
  color: var(--text-secondary, #a1a1aa);
  max-width: 180px;
}
.zc-certainty {
  white-space: nowrap;
  font-size: 0.66rem;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--bg-deep, #101214);
  border: 1px solid var(--border, #333);
}
.zc-observed {
  color: var(--accent-cyan, #43c8df);
}
.zc-inferred {
  color: var(--warning, #d9aa48);
}
.zc-unknown {
  color: var(--text-secondary, #a1a1aa);
}
.zc-proposal {
  margin-top: 20px;
  padding: 16px;
  border: 2px solid var(--zc-accent);
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.65;
}
.zc-proposal pre {
  max-height: 300px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.7rem;
  background: var(--bg-deep, #101214);
  padding: 10px;
  border-radius: 6px;
}
.zc-proposal ol {
  padding-left: 20px;
}
.zc-proposal button {
  margin: 6px 8px 0 0;
}
.zc-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-style: normal;
  color: var(--text-secondary, #a1a1aa);
  border: 1px solid var(--border, #333);
  border-radius: 4px;
  padding: 3px 6px;
  margin-left: 6px;
}
.zc-motion-controls {
  padding: 14px;
  border: 1px solid var(--border, #333);
  border-radius: 8px;
  background: var(--bg-deep, #101214);
  margin: 8px 0;
}
.zc-timeline {
  display: flex;
  gap: 4px;
  margin: 18px 0 12px;
  overflow: auto;
  padding-bottom: 6px;
  max-width: 100%;
}
.zc-timeline button {
  flex-basis: 0;
  min-width: 80px;
  max-width: 100%;
  border: 1px solid var(--border, #333);
  border-top: 3px solid var(--zc-accent);
  background: var(--bg-deep, #101214);
  color: var(--text-primary, #f4f4f5);
  border-radius: 6px;
  padding: 9px 8px;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.zc-timeline button strong {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
}
.zc-timeline button small {
  display: block;
  font-size: 0.62rem;
  margin-top: 5px;
  color: var(--text-secondary, #a1a1aa);
}
.zc-shell {
  max-width: 1600px;
  margin: 0 auto;
  padding: 8px 0 48px;
}
.zc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0 24px;
  border-bottom: 1px solid var(--border, #333);
}
.zc-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--zc-accent);
}
.zc-header h1 {
  font-size: clamp(1.8rem, 3vw, 3rem);
  letter-spacing: -0.045em;
  line-height: 1.1;
  margin: 12px 0;
}
.zc-header p,
.zc-muted {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-secondary, #a1a1aa);
}
.zc-pill {
  font-size: 0.68rem;
  white-space: nowrap;
  border: 1px solid var(--border, #333);
  border-radius: 99px;
  padding: 8px 12px;
  color: var(--zc-accent);
}
.zc-notice {
  padding: 14px 16px;
  margin: 20px 0;
  font-size: 0.8rem;
  line-height: 1.65;
  border-left: 3px solid var(--zc-accent);
  background: var(--bg-card, var(--bg-deep, #161719));
}
.zc-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.35fr);
  gap: 20px;
  align-items: start;
}
.zc-panel {
  background: var(--bg-card, var(--bg-deep, #161719));
  border: 1px solid var(--border, #333);
  border-radius: 16px;
  padding: 22px;
  min-width: 0;
}
.zc-output {
  display: grid;
  gap: 20px;
  min-width: 0;
}
.zc-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.zc-heading > span {
  font-size: 0.7rem;
  font-family: monospace;
  color: var(--zc-accent);
  border: 1px solid var(--border, #333);
  padding: 8px;
  border-radius: 8px;
}
.zc-heading h2 {
  font-size: 1rem;
  margin: 0;
  letter-spacing: -0.02em;
}
.zc-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
  font-size: 0.76rem;
  font-weight: 600;
  min-width: 0;
}
#zeusCreativeRoot input:not([type="range"]),
#zeusCreativeRoot select,
#zeusCreativeRoot textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--border, #444);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--bg-deep, #0c0d0e);
  color: var(--text-primary, #f4f4f5);
  font: inherit;
  font-weight: 400;
  line-height: 1.55;
}
#zeusCreativeRoot textarea {
  resize: vertical;
}
#zeusCreativeRoot textarea[readonly] {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.75rem;
}
#zeusCreativeRoot :focus-visible {
  outline: 2px solid var(--zc-accent);
  outline-offset: 3px;
}
.zc-row {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr;
  gap: 10px;
}
.zc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
#zeusCreativeRoot .btn {
  white-space: normal;
  max-width: 100%;
  min-height: 38px;
}
.zc-upload {
  padding: 12px;
  border: 1px dashed var(--border, #444);
  border-radius: 10px;
}
.zc-assets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.zc-assets figure {
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid var(--border, #333);
  border-radius: 8px;
  max-width: 145px;
  min-width: 110px;
  flex: 1 1 115px;
}
.zc-assets img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 8px;
  background: #222;
}
.zc-assets figcaption {
  font-size: 0.62rem;
  overflow-wrap: anywhere;
  line-height: 1.4;
}
#zc-video-preview video {
  max-width: 100%;
  max-height: 240px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.zc-stage {
  max-height: 420px;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  aspect-ratio: 16/9;
  display: grid;
  place-items: center;
  background: #142236;
  border: 1px solid var(--border, #30404a);
  border-radius: 12px;
  overflow: hidden;
  color: #fafaf9;
}
#zc-stage-inner {
  height: 100%;
  width: 100%;
  padding: 8%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  overflow: hidden;
}
#zc-stage-tag {
  color: inherit;
  opacity: 0.75;
  font:
    600 0.6rem ui-monospace,
    monospace;
}
#zc-stage-text {
  font:
    700 clamp(1rem, 2vw, 1.8rem) / 1.2 system-ui,
    sans-serif;
  overflow-wrap: anywhere;
  max-width: 100%;
}
#zc-stage-caption {
  font:
    0.65rem/1.5 system-ui,
    sans-serif;
  color: inherit;
  opacity: 0.75;
  max-height: 3em;
  overflow: hidden;
}
#zc-stage-image {
  max-width: 65%;
  max-height: 40%;
  object-fit: contain;
  min-height: 0;
}
#zc-stage-logo {
  max-width: 30%;
  max-height: 12%;
  object-fit: contain;
  min-height: 0;
}
.zc-playback {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.zc-playback input {
  flex: 1;
  min-width: 90px;
  accent-color: var(--zc-accent);
}
.zc-playback output {
  font: 0.7rem monospace;
  white-space: nowrap;
}
.zc-scene {
  border-top: 1px solid var(--border, #333);
  padding: 12px 0;
}
.zc-scene summary {
  cursor: pointer;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}
.zc-scene > summary > span:first-child {
  font: 0.6rem monospace;
  color: var(--zc-accent);
  margin-right: 8px;
}
.zc-scene summary b {
  font-size: 0.7rem;
  white-space: nowrap;
}
.zc-scene-fields {
  padding-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}
.zc-scene-fields .zc-field:has([data-field="imagePrompt"]),
.zc-scene-fields .zc-field:has([data-field="videoPrompt"]) {
  grid-column: 1/-1;
}
.zc-qa {
  padding: 12px;
  font-size: 0.75rem;
  line-height: 1.7;
  background: var(--bg-deep, #101214);
  border-radius: 8px;
}
.zc-audio-clips {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}
.zc-audio-clip {
  min-width: 0;
  border: 1px solid var(--border, #333);
  border-radius: 10px;
  padding: 16px;
  background: var(--bg-deep, #101214);
}
.zc-audio-clip h3 {
  margin: 0 0 8px;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}
.zc-audio-clip audio {
  display: block;
  width: 100%;
  height: 40px;
  margin: 12px 0 18px;
}
.zc-audio-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
  align-items: end;
}
.zc-audio-enabled {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  min-height: 44px;
  margin-bottom: 14px;
}
#zeusCreativeRoot .zc-audio-enabled input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--zc-accent);
}
.zc-production-canvas {
  max-width: 680px;
  max-height: 70vh;
  width: fit-content;
  margin: 16px auto;
  overflow: hidden;
  background: #101419;
}
.zc-production-canvas canvas {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  width: auto;
  height: auto;
  object-fit: contain;
}
.zc-production video {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  margin: 16px auto;
}
.zc-production progress {
  display: block;
  width: 100%;
  height: 12px;
  accent-color: var(--zc-accent);
  margin-top: 16px;
}
.zc-import-file {
  position: relative;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#zeusCreativeRoot .zc-import-file input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
#zc-status {
  position: sticky;
  bottom: 12px;
  z-index: 2;
  background: var(--bg-card, #172029);
  border: 1px solid var(--border, #444);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.8rem;
  line-height: 1.5;
  box-shadow: 0 8px 30px #0002;
}
#zc-status:empty {
  display: none;
}
@media (max-width: 1100px) {
  .zc-workspace {
    grid-template-columns: 1fr;
  }
  .zc-header {
    flex-direction: column;
    gap: 8px;
  }
  .zc-header h1 {
    font-size: 2rem;
  }
}
@media (max-width: 520px) {
  .zc-panel {
    padding: 15px;
  }
  .zc-grid2 {
    grid-template-columns: 1fr;
  }
  .zc-row {
    grid-template-columns: 1fr 1fr;
  }
  .zc-row > :first-child {
    grid-column: 1/-1;
  }
  .zc-scene-fields {
    grid-template-columns: 1fr;
  }
  .zc-audio-controls {
    grid-template-columns: 1fr;
  }
  .zc-audio-clip {
    padding: 12px;
  }
  .zc-pill {
    white-space: normal;
  }
  .zc-header h1 {
    font-size: 1.8rem;
  }
  .zc-actions > .btn {
    flex: 1 1 130px;
  }
  .zc-consent {
    padding: 10px;
  }
  .zc-timeline {
    flex-wrap: wrap;
  }
  .zc-timeline button {
    flex: 1 1 90px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #zeusCreativeRoot * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* Generación explícita: coste, estado y revisión separados del render local. */
.zc-generation-quote{padding:16px;margin:16px 0;border:2px solid var(--accent,#3279ca);border-radius:12px;background:var(--bg-card,transparent)}
.zc-generation-job{padding:12px 0;border-top:1px solid var(--border,rgba(127,127,127,.3));overflow-wrap:anywhere}
.zc-generation-job video{display:block;width:100%;max-height:360px;background:#111;border-radius:8px;margin:12px 0}
#zc-generation progress{width:100%;height:12px}
#zc-generation button{min-height:38px}
#zc-generation .zc-check{display:flex;align-items:flex-start;gap:10px;line-height:1.6}
#zc-generation .zc-check input{margin-top:6px;flex-shrink:0}
#zc-generation hr{border:0;border-top:1px solid var(--border,rgba(127,127,127,.3));margin:20px 0}
