/* AI Video Editor Phase 0 — additive styles that preserve the existing Gandev theme. */

.video-tool-area-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(16, 24, 40, 0.045);
}

.video-tool-identity {
  display: flex;
  align-items: center;
  gap: 15px;
}

.video-tool-identity > a {
  padding-right: 15px;
  border-right: 1px solid var(--border);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.video-tool-identity div { display: grid; gap: 2px; }
.video-tool-identity span { color: #8a5d12; font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.video-tool-identity strong { color: var(--navy); font-size: 16px; }

.video-tool-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 9px;
  background: #f2f4f7;
}

.video-tool-tabs a {
  min-height: 34px;
  padding: 8px 13px;
  border-radius: 7px;
  color: #667085;
  font-size: 11px;
  font-weight: 900;
}

.video-tool-tabs a.active {
  color: #fff;
  background: var(--navy);
  box-shadow: 0 5px 12px rgba(11,31,58,.18);
}

.video-editor-hero,
.projects-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 40px;
  align-items: center;
  min-height: 420px;
  padding: 54px;
  border: 1px solid rgba(214, 168, 79, 0.28);
  border-radius: 16px;
  color: #fff;
  background:
    radial-gradient(circle at 86% 24%, rgba(255, 225, 122, 0.18), transparent 25%),
    linear-gradient(135deg, #061426 0%, #0b1f3a 54%, #123b7a 150%);
  box-shadow: 0 28px 70px rgba(6, 20, 38, 0.24);
}

.video-editor-hero::before,
.projects-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  pointer-events: none;
}

.video-editor-hero > *,
.projects-hero > * {
  position: relative;
  z-index: 1;
}

.video-editor-hero h2,
.projects-hero h2 {
  max-width: 760px;
  margin: 16px 0;
  font-size: clamp(38px, 4.4vw, 66px);
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.video-editor-hero p,
.projects-hero p {
  max-width: 700px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  line-height: 1.75;
}

.video-kicker,
.video-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.video-kicker > span:first-child {
  color: var(--gold-bright);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.phase-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 25px;
  padding: 4px 9px;
  border: 1px solid rgba(214, 168, 79, 0.38);
  border-radius: 999px;
  color: #8a5d12;
  background: #fff8e7;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.video-kicker .phase-pill {
  color: var(--gold-bright);
  background: rgba(214, 168, 79, 0.1);
}

.video-trust-row {
  margin-top: 24px;
}

.video-trust-row span {
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.05);
  font-size: 11px;
  font-weight: 800;
}

.editor-orbit {
  position: relative;
  display: grid;
  min-height: 300px;
  place-items: center;
}

.editor-orbit::before,
.editor-orbit::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(255, 225, 122, 0.18);
  border-radius: 50%;
}

.editor-orbit::after {
  width: 220px;
  height: 220px;
  border-color: rgba(47, 128, 237, 0.32);
}

.editor-phone {
  position: relative;
  z-index: 2;
  width: 132px;
  height: 248px;
  padding: 8px;
  border: 1px solid rgba(255, 225, 122, 0.55);
  border-radius: 25px;
  background: #07101d;
  box-shadow: 0 0 55px rgba(214, 168, 79, 0.2), 0 24px 50px rgba(0, 0, 0, 0.45);
  transform: rotate(4deg);
}

.phone-frame {
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 20px;
  border-radius: 19px;
  background:
    linear-gradient(180deg, transparent 45%, rgba(6, 20, 38, 0.92)),
    radial-gradient(circle at 45% 28%, #d6a84f, #123b7a 34%, #07182c 70%);
}

.phone-frame span {
  color: var(--gold-bright);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.phone-frame strong {
  margin-top: 5px;
  font-size: 25px;
}

.orbit-chip {
  position: absolute;
  z-index: 3;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  color: #fff;
  background: rgba(8, 25, 46, 0.92);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.chip-one { top: 40px; left: 0; }
.chip-two { top: 110px; right: 0; }
.chip-three { bottom: 36px; left: 10px; }

.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 28px 0 16px;
  padding: 17px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.editor-toolbar div {
  display: grid;
  gap: 3px;
}

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

.video-wizard {
  display: grid;
  gap: 18px;
}

.wizard-step,
.wizard-submit,
.detail-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.055);
}

.detail-panel.needs-attention {
  border-color: #fda29b;
  box-shadow: 0 12px 34px rgba(217, 45, 32, .10);
}

.step-attention-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -4px 0 14px;
  padding: 10px 12px;
  border: 1px solid #fecdca;
  border-radius: 12px;
  background: #fff4f3;
  color: #912018;
}

.step-attention-notice strong {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
}

.step-attention-notice span {
  color: #b42318;
  font-size: 12px;
  line-height: 1.45;
}

.wizard-step {
  padding: 30px;
}

.step-heading {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 25px;
}

.step-heading > span {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(214, 168, 79, 0.48);
  border-radius: 12px;
  color: var(--gold);
  background: var(--navy);
  font-size: 18px;
  font-weight: 900;
}

.step-heading h2 {
  margin: 4px 0 5px;
  font-size: 24px;
}

.step-heading p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.choice-grid,
.compact-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.video-choice {
  position: relative;
  display: grid;
  min-height: 108px;
  align-content: center;
  padding: 18px 18px 18px 48px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  background: #fff;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.video-choice:hover {
  border-color: rgba(47, 128, 237, 0.42);
  transform: translateY(-1px);
}

.video-choice:has(input:checked) {
  border-color: var(--gold);
  background: linear-gradient(135deg, #fffdf7, #fff8e7);
  box-shadow: inset 0 0 0 1px rgba(214, 168, 79, 0.18), 0 8px 20px rgba(214, 168, 79, 0.1);
}

.video-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-check {
  position: absolute;
  top: 20px;
  left: 18px;
  width: 18px;
  height: 18px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
}

.video-choice input:checked + .choice-check {
  border: 5px solid var(--gold);
  background: #fff;
}

.video-choice strong {
  font-size: 14px;
}

.video-choice small {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.45;
}

.compact-choice-grid .video-choice {
  min-height: 75px;
}

.compact-choice-grid.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.upload-dropzone {
  display: grid;
  min-height: 260px;
  place-items: center;
  align-content: center;
  padding: 28px;
  border: 1.5px dashed #aab5c4;
  border-radius: 12px;
  outline: none;
  background: linear-gradient(145deg, #fbfcfe, #f5f8fc);
  text-align: center;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.upload-dropzone:hover,
.upload-dropzone:focus,
.upload-dropzone.dragging {
  border-color: var(--gold);
  background: #fffaf0;
}

.upload-dropzone > strong {
  margin-top: 12px;
  font-size: 18px;
}

.upload-dropzone > p {
  margin: 7px 0 16px;
  color: var(--muted);
  font-size: 12px;
}

.media-upload-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin: 26px 0 12px;
}

.media-upload-heading > div {
  display: grid;
  gap: 3px;
}

.media-upload-heading span {
  color: #8a5d12;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
}

.media-upload-heading strong { font-size: 17px; }
.media-upload-heading small { color: var(--muted); font-size: 11px; }
.media-upload-divider { height: 1px; margin: 30px 0 0; background: var(--border); }

.image-dropzone {
  min-height: 210px;
  border-color: rgba(47, 128, 237, .38);
  background: linear-gradient(145deg, #f8fbff, #f3f7fd);
}

.image-upload-icon {
  color: #fff;
  border-color: rgba(47,128,237,.35);
  background: linear-gradient(145deg, var(--navy), #175fae);
}

.upload-icon {
  display: grid;
  width: 55px;
  height: 55px;
  place-items: center;
  border: 1px solid rgba(214, 168, 79, 0.38);
  border-radius: 50%;
  color: var(--gold);
  background: var(--navy);
  font-size: 28px;
}

.upload-list-head,
.projects-section-head,
.detail-panel-head,
.editor-save-row,
.project-card-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.upload-list-head {
  margin: 22px 0 10px;
}

.upload-list-head span,
.projects-section-head > span,
.detail-panel-head > span,
.editor-save-row > span {
  color: var(--muted);
  font-size: 12px;
}

.upload-file-list {
  display: grid;
  gap: 9px;
}

.upload-file-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 36px;
  gap: 13px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 9px;
}

.upload-thumb {
  position: relative;
  overflow: hidden;
  height: 58px;
  border-radius: 6px;
  background: var(--navy);
}

.upload-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-thumb span {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 2px 4px;
  border-radius: 3px;
  color: #fff;
  background: rgba(0, 0, 0, 0.65);
  font-size: 8px;
  font-weight: 900;
}

.upload-file-meta {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.upload-file-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-file-meta small {
  color: var(--muted);
}

.image-upload-card {
  grid-template-columns: 110px minmax(0, 1fr) 36px;
}

.image-upload-card .upload-thumb { height: 86px; }

.image-purpose-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  color: #667085;
  font-size: 10px;
  font-weight: 800;
}

.image-purpose-label select {
  min-height: 31px;
  max-width: 220px;
  padding: 5px 28px 5px 8px;
  border: 1px solid #d0d5dd;
  border-radius: 7px;
  background: #fff;
  font-size: 10px;
}

.file-remove,
.icon-action {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
}

.file-remove:hover,
.icon-action.danger:hover {
  color: var(--error);
  border-color: #fecdca;
  background: #fef3f2;
}

.video-empty-inline,
.empty-projects {
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: 9px;
  color: var(--muted);
  background: #fafcff;
  text-align: center;
}

.video-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.video-form-grid .field-wide {
  grid-column: 1 / -1;
}

.video-form-grid input,
.video-form-grid select,
.video-form-grid textarea,
.creative-notes textarea,
.detail-panel textarea {
  border-radius: 9px;
  background: #fbfcfe;
}

.video-form-grid input:focus,
.video-form-grid select:focus,
.video-form-grid textarea:focus,
.creative-notes textarea:focus,
.detail-panel textarea:focus {
  border-color: var(--gold);
  outline: 3px solid rgba(214, 168, 79, 0.12);
}

.setting-block {
  display: grid;
  gap: 11px;
  margin-bottom: 22px;
}

.creative-choice-grid {
  margin-bottom: 16px;
}

.creative-notes textarea {
  min-height: 120px;
}

.ai-editor-prompt-field {
  display: grid;
  gap: 7px;
}

.ai-editor-prompt-field > span {
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.ai-editor-prompt-field > small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.wizard-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 25px 30px;
  border-color: rgba(214, 168, 79, 0.3);
  background: linear-gradient(135deg, #fff, #fffaf0);
}

.wizard-submit > div {
  display: grid;
  gap: 5px;
}

.wizard-submit strong {
  margin-top: 4px;
}

.wizard-submit p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.wizard-submit .btn {
  min-width: 200px;
}

.projects-hero {
  grid-template-columns: 1fr auto;
  min-height: 240px;
  padding: 40px;
}

.projects-hero h2 {
  margin: 5px 0 8px;
  font-size: 42px;
}

.project-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 28px;
}

.project-stats article {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
}

.project-stats span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.09em;
}

.project-stats strong {
  color: var(--navy);
  font-size: 28px;
}

.projects-section-head {
  margin-bottom: 13px;
}

.projects-section-head h2 {
  margin: 4px 0 0;
}

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

.video-project-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 260px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.06);
}

.project-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  min-height: 220px;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 70% 25%, rgba(255, 225, 122, 0.45), transparent 24%),
    linear-gradient(145deg, #0b1f3a, #123b7a);
}

.project-visual.tone-cafe { background: radial-gradient(circle at 65% 25%, #e9b86b, transparent 26%), linear-gradient(145deg, #301d17, #9b6a18); }
.project-visual.tone-food { background: radial-gradient(circle at 65% 25%, #f99b45, transparent 26%), linear-gradient(145deg, #32110d, #8d2e17); }
.project-visual.tone-travel { background: radial-gradient(circle at 65% 25%, #7fe3e8, transparent 26%), linear-gradient(145deg, #092735, #175c67); }
.project-visual.tone-service { background: radial-gradient(circle at 65% 25%, #bf9df5, transparent 26%), linear-gradient(145deg, #191638, #463184); }

.visual-grid {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 25px 25px;
  transform: perspective(250px) rotateX(56deg) scale(1.5);
}

.project-visual > span,
.project-visual > strong,
.project-visual > i {
  position: relative;
  z-index: 1;
}

.project-visual > span {
  max-width: 120px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.project-visual > strong {
  font-size: 54px;
  line-height: 0.9;
}

.project-visual > strong small {
  display: block;
  margin-top: 8px;
  color: var(--gold-bright);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.project-visual > i {
  width: fit-content;
  padding: 4px 7px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.project-card-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 18px;
}

.project-card-status > span:last-child {
  color: var(--muted);
  font-size: 10px;
}

.video-project-card h3 {
  margin: 18px 0 5px;
  font-size: 19px;
}

.video-project-card p {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #475467;
  background: #f8fafc;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.video-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #98a2b3;
}

.video-status.status-completed { color: #087443; border-color: #abefc6; background: #ecfdf3; }
.video-status.status-completed i { background: #12b76a; }
.video-status.status-failed { color: #b42318; border-color: #fecdca; background: #fef3f2; }
.video-status.status-failed i { background: #f04438; }
.video-status.status-analyzing,
.video-status.status-rendering_preview,
.video-status.status-rendering_final { color: #175cd3; border-color: #b2ddff; background: #eff8ff; }
.video-status.status-analyzing i,
.video-status.status-rendering_preview i,
.video-status.status-rendering_final i { background: #2f80ed; }
.video-status.status-preview_ready,
.video-status.status-script_ready { color: #6941c6; border-color: #d9d6fe; background: #f4f3ff; }
.video-status.status-preview_ready i,
.video-status.status-script_ready i { background: #7f56d9; }
.video-status.status-waiting_for_approval { color: #93370d; border-color: #fedf89; background: #fffaeb; }
.video-status.status-waiting_for_approval i { background: #f79009; }

.analysis-action-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.voice-profile-controls {
  display: grid;
  grid-template-columns: minmax(190px, .8fr) minmax(160px, .55fr) minmax(260px, 1.4fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #e3c978;
  border-radius: 14px;
  background: linear-gradient(135deg, #fffaf0, #f7fbff);
}

.voice-profile-controls label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #50627a;
  font-size: 12px;
  font-weight: 700;
}

.voice-profile-controls select {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid #cad7e5;
  border-radius: 10px;
  background: #fff;
  color: #0a2342;
  font: inherit;
}

.voice-profile-description {
  display: flex;
  min-height: 42px;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.voice-profile-description strong { color: #0a2342; }
.voice-profile-description small { color: #64748b; line-height: 1.45; }

.no-voiceover-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #b2ddff;
  border-radius: 12px;
  background: #eff8ff;
  color: #175cd3;
}

.no-voiceover-notice span {
  color: #475467;
  font-size: 12px;
}

.fish-clone-bubble {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.2fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #d7b05b;
  border-radius: 16px;
  background: linear-gradient(135deg, #07192f, #123e75);
  box-shadow: 0 16px 34px rgba(10, 35, 66, .14);
  color: #fff;
}

.fish-clone-bubble .eyebrow { color: #f8d778; }
.fish-clone-bubble h3 { margin: 4px 0; color: #fff; }
.fish-clone-bubble small { color: rgba(255, 255, 255, .78); line-height: 1.45; }

.fish-clone-upload,
.fish-clone-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

.fish-clone-recorder {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(248, 215, 120, .28);
  border-radius: 12px;
  background: rgba(255, 255, 255, .08);
}

.fish-clone-record-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fish-clone-recorder audio {
  width: 100%;
  max-width: 560px;
}

.fish-recording-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fee4e2;
  font-size: 13px;
}

.fish-recording-live::before {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #f04438;
  box-shadow: 0 0 0 6px rgba(240, 68, 56, .18);
  content: "";
}

.fish-clone-upload input[type="text"],
.fish-clone-upload input[type="file"] {
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 10px;
  background: rgba(255, 255, 255, .95);
  color: #0a2342;
}

.fish-clone-upload input[type="text"] { min-width: 220px; }

.media-order-lock-control {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 12px 0 14px;
  padding: 12px 14px;
  border: 1px solid #d7e5f5;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fbff, #fffaf0);
  color: #0a2342;
  cursor: pointer;
}

.media-order-lock-control input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #d7a642;
}

.media-order-lock-control span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.media-order-lock-control strong {
  font-size: 14px;
}

.media-order-lock-control small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.generated-audio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.generated-audio-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid #dce5ef;
  border-radius: 14px;
  background: #f8fbff;
}

.generated-audio-card.audio-card-warning {
  border-color: #f4b0a5;
  background: #fff7f5;
}

.generated-audio-card > span {
  color: #d79e20;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.generated-audio-card audio {
  width: 100%;
}

.voiceover-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid #dce5ef;
}

.voiceover-card-action small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.subtitle-srt-block {
  margin-top: 12px;
}

.subtitle-srt-card {
  min-height: 112px;
}

.subtitle-extract-card {
  border-color: #c7d8f2;
  background: linear-gradient(145deg, #f8fbff, #ffffff);
}

.subtitle-srt-actions {
  margin-top: 10px;
}

.subtitle-srt-actions .btn,
.subtitle-extract-card .btn {
  width: fit-content;
}

.subtitle-style-editor {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(217, 166, 46, .45);
  border-radius: 16px;
  background: linear-gradient(145deg, #fffaf0, #ffffff);
}

.subtitle-style-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-weight: 900;
}

.subtitle-style-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.subtitle-style-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.subtitle-style-grid input,
.subtitle-style-grid select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #cbd8e8;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.subtitle-checkbox-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid #cbd8e8;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-transform: none;
  letter-spacing: 0;
}

.subtitle-checkbox-control input {
  width: auto;
  min-height: auto;
  accent-color: var(--gold);
}

.subtitle-live-preview {
  display: grid;
  place-items: center;
  min-height: 90px;
  border-radius: 16px;
  background: linear-gradient(180deg, #143b68, #071b35);
  color: var(--sub-color);
  text-shadow:
    -2px -2px 0 var(--sub-outline),
    2px -2px 0 var(--sub-outline),
    -2px 2px 0 var(--sub-outline),
    2px 2px 0 var(--sub-outline);
  font-weight: 900;
}

.subtitle-live-preview span {
  border-radius: 8px;
  line-height: 1.25;
}

.subtitle-style-note {
  color: var(--muted);
  font-weight: 800;
}

.script-panel .subtitle-srt-card {
  border-color: #dce5ef;
  background: #f8fbff;
}

.audio-duration-ok,
.audio-duration-warning {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.audio-duration-ok {
  background: #ecfdf3;
  color: #067647;
}

.audio-duration-warning {
  background: #fff1f0;
  color: #b42318;
}

.generated-audio-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.generated-audio-actions small { color: #64748b; }

.generated-audio-workflow-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #dce5ef;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}

.generated-audio-workflow-actions > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 210px;
}

.generated-audio-workflow-actions strong {
  color: #0a2342;
}

.generated-audio-workflow-actions span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.generated-audio-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.generated-audio-action-buttons .analysis-action-group {
  display: inline-flex;
  gap: 10px;
}

.generated-audio-action-buttons .btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.rendered-preview-video {
  display: block;
  width: 100%;
  max-height: 610px;
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  background: #061a35;
  object-fit: contain;
}

.preview-render-progress {
  overflow: hidden;
  height: 8px;
  margin: 12px 0;
  border-radius: 999px;
  background: #e4ebf3;
}

.preview-render-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d9a62e, #2f80ed);
  transition: width .3s ease;
}

.preview-render-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.preview-render-meta span {
  padding: 5px 8px;
  border: 1px solid #dce5ef;
  border-radius: 999px;
  background: #f8fbff;
  color: #52657c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
}

.ai-decision-panel {
  border-color: rgba(217, 166, 46, .45);
  background: linear-gradient(145deg, #ffffff, #fffaf0);
}

.ai-decision-list {
  display: grid;
  gap: 8px;
}

.ai-decision-approval-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid rgba(214, 168, 79, .36);
  border-radius: 14px;
  background: linear-gradient(135deg, #fffdf6, #f8fbff);
}

.ai-decision-approval-row span {
  color: #52657c;
  font-size: 12px;
  line-height: 1.5;
}

.ai-decision-card {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid #dce5ef;
  border-radius: 14px;
  background: rgba(255, 255, 255, .82);
}

.ai-decision-card > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #071b35;
  color: #ffd66b;
  font-size: 12px;
  font-weight: 900;
}

.ai-decision-card div {
  display: grid;
  gap: 4px;
}

.ai-decision-card strong {
  color: var(--ink);
  font-size: 13px;
}

.ai-decision-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.ai-decision-card .ai-decision-thai {
  margin: 2px 0;
  padding: 8px 10px;
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  background: #fff8e7;
  color: #513b12;
  font-size: 12px;
  line-height: 1.55;
}

.ai-decision-card em {
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #16427c;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.shot-score-card > span {
  background: #102a49;
  color: #fff;
}

.shot-score-card.is-strong > span {
  background: linear-gradient(135deg, #0f7a4f, #13b981);
}

.shot-score-card.is-ok > span {
  background: linear-gradient(135deg, #b98210, #f2bd3e);
}

.shot-score-card.is-low > span {
  background: linear-gradient(135deg, #9f2630, #ef5350);
}

.final-output-panel {
  border-color: #e3c978;
  background: linear-gradient(145deg, #ffffff, #fffbef);
}

.final-output-video {
  display: block;
  width: min(100%, 420px);
  max-height: 720px;
  margin: 0 auto 14px;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  background: #061a35;
  object-fit: contain;
}

.final-render-state {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 1px solid #dce5ef;
  border-radius: 14px;
  background: #f8fbff;
}

.final-render-state strong { color: #0a2342; }
.final-render-state > span { color: #64748b; font-size: 12px; }

.danger-outline {
  color: #b42318;
  border-color: #fecdca;
  background: #fff;
}

.danger-outline:hover { background: #fef3f2; }

.audio-job-progress {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 14px;
}

.audio-job-progress > div {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #e4ebf3;
}

.audio-job-progress > div span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d9a62e, #2f80ed);
  transition: width .25s ease;
}

.audio-job-progress small {
  grid-column: 1 / -1;
  color: #64748b;
}

@media (max-width: 720px) {
  .generated-audio-grid { grid-template-columns: 1fr; }
  .voice-profile-controls { grid-template-columns: 1fr; }
  .fish-clone-bubble { grid-template-columns: 1fr; }
  .fish-clone-upload,
  .fish-clone-actions { justify-content: stretch; }
  .fish-clone-upload .btn,
  .fish-clone-actions .btn,
  .fish-clone-upload input { width: 100%; }
  .generated-audio-actions { align-items: stretch; flex-direction: column; }
  .generated-audio-workflow-actions { align-items: stretch; flex-direction: column; }
  .generated-audio-action-buttons { justify-content: stretch; }
  .generated-audio-action-buttons .btn,
  .generated-audio-action-buttons .analysis-action-group { width: 100%; }
  .generated-audio-action-buttons .analysis-action-group { flex-direction: column; }
  .detail-step-head { grid-template-columns: 42px minmax(0, 1fr); }
  .detail-step-head > span:not(.detail-step-number) { grid-column: 2; }
  .ai-prompt-flow-actions { align-items: stretch; flex-direction: column; }
  .ai-prompt-flow-buttons,
  .ai-prompt-flow-buttons .analysis-action-group { flex-direction: column; }
  .ai-prompt-flow-buttons .btn,
  .ai-prompt-flow-buttons .analysis-action-group { width: 100%; }
  .no-voiceover-notice { align-items: flex-start; flex-direction: column; }
}

.project-meta-row {
  display: flex;
  gap: 18px;
  margin: 17px 0;
}

.project-meta-row span {
  font-size: 12px;
  font-weight: 850;
}

.project-meta-row small {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-top: auto;
}

.project-actions .btn {
  min-height: 34px;
  padding: 0 10px;
  font-size: 11px;
}

button:disabled,
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.project-detail-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.detail-back {
  color: var(--deep-blue);
  font-size: 12px;
  font-weight: 800;
}

.detail-title-line {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 13px 0 4px;
}

.detail-title-line h2 {
  margin: 0;
  font-size: 30px;
}

.project-detail-top p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.detail-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.analysis-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.analysis-button > span,
.analysis-notice > span {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: proxy-spin .9s linear infinite;
}

.analysis-notice {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
  padding: 15px 18px;
  border: 1px solid rgba(214,168,79,.45);
  border-left: 4px solid var(--gold);
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(120deg, var(--navy), #123b7a);
}

.analysis-notice > span { flex: 0 0 auto; color: var(--gold-bright); }
.analysis-notice strong { font-size: 12px; }
.analysis-notice p { margin: 3px 0 0; color: #cbd5e1; font-size: 10px; }
.analysis-notice.is-ready { color: #175c3a; background: #ecfdf3; border-color: #75e0a7; }
.analysis-notice.is-ready p { color: #3b7657; }

.phaya-dry-run-panel {
  margin-bottom: 18px;
  border: 1px solid rgba(47,111,237,.22);
  background: linear-gradient(145deg, #fff, #f7faff);
}

.phaya-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 14px;
  padding: 11px 13px;
  border-radius: 8px;
  color: var(--muted);
  background: #edf4ff;
  font-size: 10px;
}

.phaya-summary strong { margin-right: auto; color: var(--navy); }

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

.phaya-task-card {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
}

.phaya-task-card > span {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  color: #8a5d12;
  background: #fff6df;
  font-size: 8px;
  font-weight: 900;
}

.phaya-task-card.is-ready > span { color: #067647; background: #dcfae6; }
.phaya-task-card strong { font-size: 12px; }
.phaya-task-card small { min-height: 30px; color: var(--muted); font-size: 9px; }
.phaya-task-card p { margin: 0; color: #b54708; font-size: 9px; font-weight: 800; }
.phaya-task-card.is-ready p { color: #067647; }

.phaya-warning {
  margin-top: 13px;
  padding: 12px 14px;
  border-left: 3px solid var(--gold);
  color: #7a4d0b;
  background: #fffaf0;
  font-size: 9px;
}

.phaya-warning ul { margin: 7px 0 0; padding-left: 17px; }
.phaya-warning li + li { margin-top: 4px; }

.provider-pipeline-panel {
  margin-bottom: 18px;
  border: 1px solid rgba(214,168,79,.35);
  background: linear-gradient(145deg, #fff, #fbfcff);
}

.pipeline-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-bottom: 13px;
  padding: 12px 14px;
  border-radius: 8px;
  color: var(--muted);
  background: #f3f6fa;
  font-size: 10px;
}

.pipeline-overview strong { margin-right: auto; color: var(--navy); }

.provider-stage-list { display: grid; gap: 8px; }

.provider-stage {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.provider-stage > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 7px;
  color: var(--gold-bright);
  background: var(--navy);
  font-size: 10px;
  font-weight: 900;
}

.provider-stage > div { display: grid; gap: 2px; }
.provider-stage strong { text-transform: uppercase; font-size: 11px; }
.provider-stage small { color: var(--muted); font-size: 9px; }
.provider-stage em { color: #b54708; font-size: 9px; font-style: normal; font-weight: 900; }
.provider-stage.is-ready em { color: #067647; }

.pipeline-security-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.pipeline-security-row span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #067647;
  background: #ecfdf3;
  font-size: 8px;
  font-weight: 850;
}

.project-error {
  margin-bottom: 18px;
  padding: 17px 20px;
  border: 1px solid #fecdca;
  border-left: 4px solid var(--error);
  border-radius: 9px;
  color: #7a271a;
  background: #fef3f2;
}

.project-error p {
  margin: 5px 0;
}

.project-error span {
  color: #b42318;
  font-size: 10px;
}

.project-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.project-detail-main,
.project-detail-side {
  display: grid;
  gap: 16px;
}

.project-detail-side {
  position: sticky;
  top: 20px;
}

.detail-panel {
  padding: 22px;
}

.detail-panel-head {
  margin-bottom: 17px;
}

.detail-step-head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
}

.detail-step-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: #061a35;
  color: var(--gold);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .04em;
  box-shadow: inset 0 0 0 1px rgba(214, 168, 79, .22);
}

.detail-panel-head.detail-step-head > .detail-step-number {
  color: var(--gold);
  font-size: 15px;
}

.detail-panel-head h2 {
  margin: 4px 0 0;
  font-size: 19px;
}

.ai-prompt-flow-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff, #eef6ff);
}

.ai-prompt-flow-actions > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 260px;
}

.ai-prompt-flow-actions strong {
  color: #0a2342;
}

.ai-prompt-flow-actions span {
  color: #53657d;
  font-size: 12px;
  line-height: 1.45;
}

.ai-prompt-flow-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.ai-prompt-flow-buttons .analysis-action-group {
  display: inline-flex;
  gap: 10px;
}

.project-info-grid {
  display: grid;
  grid-template-columns: 185px minmax(0, 1fr);
  gap: 20px;
}

.project-visual.visual-large {
  min-height: 280px;
  border-radius: 10px;
}

.project-info-grid dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--border);
  overflow: hidden;
}

.project-info-grid dl div {
  padding: 13px;
  background: #fff;
}

.project-info-grid dt {
  color: var(--muted);
  font-size: 10px;
}

.project-info-grid dd {
  margin: 5px 0 0;
  font-size: 12px;
  font-weight: 850;
}

.detail-clip-list {
  display: grid;
  gap: 8px;
}

.detail-clip-list article {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.mini-clip {
  display: grid;
  height: 44px;
  place-items: center;
  border-radius: 6px;
  color: var(--gold-bright);
  background: linear-gradient(145deg, var(--navy), var(--deep-blue));
  font-size: 10px;
  font-weight: 900;
}

.detail-clip-list article > div:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.detail-clip-list article strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-clip-list article small,
.detail-clip-list article > span {
  color: var(--muted);
  font-size: 10px;
}

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

.detail-image-grid > .video-empty-inline { grid-column: 1 / -1; }

.detail-image-grid article {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fbfcfe;
}

.detail-image-placeholder {
  display: grid;
  height: 62px;
  place-content: center;
  border-radius: 6px;
  color: #fff;
  text-align: center;
  background: radial-gradient(circle at 70% 20%, rgba(255,225,122,.35), transparent 26%), linear-gradient(145deg, var(--navy), #175fae);
}

.detail-image-placeholder span { color: var(--gold-bright); font-size: 7px; font-weight: 900; letter-spacing: .12em; }
.detail-image-placeholder strong { font-size: 18px; }
.detail-image-grid article > div:nth-child(2) { display: grid; min-width: 0; gap: 4px; }
.detail-image-grid article > div:nth-child(2) strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.detail-image-grid article small { color: var(--muted); font-size: 9px; }
.detail-image-grid article > span { color: #8a5d12; font-size: 10px; font-weight: 900; }

.detail-clip-list article > span {
  color: var(--success);
  font-weight: 900;
}

.asset-state.asset-pending_upload { color: #b54708; }
.asset-state.asset-uploaded,
.asset-state.asset-ready { color: var(--success); }
.asset-state.asset-failed { color: var(--error); }

.asset-management-note {
  margin: -8px 0 14px;
  color: var(--muted);
  font-size: 10px;
}

.managed-asset-list {
  display: grid;
  gap: 10px;
}

.managed-asset-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfcfe;
}

.managed-asset-preview {
  overflow: hidden;
  display: grid;
  min-height: 92px;
  place-items: center;
  border-radius: 8px;
  background: var(--navy);
}

.managed-asset-preview video,
.managed-asset-preview img {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: cover;
  background: #061426;
}

.managed-asset-preview .mini-clip,
.managed-asset-preview .detail-image-placeholder {
  width: 100%;
  height: 110px;
  border-radius: 0;
}

.proxy-preparing {
  display: grid;
  min-height: 110px;
  padding: 12px;
  place-content: center;
  gap: 5px;
  color: #fff;
  text-align: center;
  background: radial-gradient(circle at 50% 20%, rgba(255,225,122,.18), transparent 38%);
}

.proxy-preparing > span {
  width: 22px;
  height: 22px;
  margin: 0 auto 3px;
  border: 2px solid rgba(255,255,255,.25);
  border-top-color: var(--gold-bright);
  border-radius: 50%;
  animation: proxy-spin .9s linear infinite;
}

.proxy-preparing strong { font-size: 11px; }
.proxy-preparing small { color: #cbd5e1; font-size: 8px; }
.proxy-preparing.proxy-failed strong { color: #fda29b; }

@keyframes proxy-spin { to { transform: rotate(360deg); } }

.image-managed-card {
  grid-template-columns: 110px minmax(0, 1fr) auto;
}

.image-managed-card .managed-asset-preview img {
  height: 110px;
}

.managed-asset-meta {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.managed-asset-meta > strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.managed-asset-meta small,
.managed-asset-meta .asset-state {
  color: var(--muted);
  font-size: 10px;
}

.managed-asset-meta .asset-uploaded,
.managed-asset-meta .asset-ready { color: var(--success); }

.asset-purpose-control {
  display: flex;
  max-width: 410px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.asset-purpose-control select {
  min-width: 190px;
  padding: 7px 28px 7px 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--navy);
  background: #fff;
  font: inherit;
}

.asset-order-actions {
  display: grid;
  grid-template-columns: repeat(3, 34px);
  gap: 5px;
}

.asset-order-actions button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--navy);
  background: #fff;
  font-weight: 900;
  cursor: pointer;
}

.asset-order-actions button:hover:not(:disabled) {
  border-color: var(--gold);
  color: #8a5d12;
}

.asset-order-actions button:disabled { opacity: .35; cursor: not-allowed; }
.asset-order-actions button.danger { color: var(--error); }

.detail-panel textarea {
  min-height: 130px;
}

.script-panel textarea {
  min-height: 190px;
  line-height: 1.75;
}

.editor-helper-note {
  margin: -4px 0 10px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
}

.script-duration-estimate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #f0fdf4;
}

.script-duration-estimate.is-warning {
  border-color: #fecdca;
  background: #fff4f3;
}

.script-duration-estimate strong {
  color: #067647;
  font-size: 13px;
}

.script-duration-estimate strong.estimate-warning,
.script-duration-estimate.is-warning strong {
  color: #b42318;
}

.script-duration-estimate span {
  color: #52705e;
  font-size: 12px;
  line-height: 1.45;
  text-align: right;
}

.script-duration-estimate.is-warning span {
  color: #b42318;
}

.editor-toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: -2px 0 10px;
  padding: 10px 12px;
  border: 1px solid #dce5ef;
  border-radius: 12px;
  background: #f8fbff;
  color: #0a2342;
  cursor: pointer;
}

.editor-toggle-row input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #2f80ed;
}

.editor-toggle-row span {
  display: grid;
  gap: 2px;
}

.editor-toggle-row small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

.editor-toggle-row:has(input:disabled) {
  opacity: .62;
  cursor: not-allowed;
}

.detail-panel textarea:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.script-ai-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #dce5ef;
  border-radius: 12px;
  background: #f8fbff;
}

.script-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.script-ai-action-row span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.script-ai-action-row .btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.editor-save-row {
  margin-top: 12px;
}

.preview-placeholder {
  position: relative;
  overflow: hidden;
  display: flex;
  min-height: 360px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(214, 168, 79, 0.28);
  border-radius: 12px;
  color: #fff;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 225, 122, 0.24), transparent 25%),
    linear-gradient(145deg, #061426, #123b7a);
}

.preview-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image: linear-gradient(rgba(255,255,255,.14) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 30px 30px;
}

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

.preview-play {
  display: grid;
  width: 62px;
  height: 62px;
  margin-bottom: 15px;
  padding-left: 4px;
  place-items: center;
  border: 1px solid rgba(255, 225, 122, 0.5);
  border-radius: 50%;
  color: var(--gold-bright);
  background: rgba(255, 255, 255, 0.08);
}

.preview-placeholder span {
  margin-top: 5px;
  color: rgba(255,255,255,.6);
  font-size: 10px;
}

.preview-panel .btn {
  margin-top: 12px;
}

.preview-render-notice {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #f4b0a5;
  border-radius: 12px;
  background: #fff7f5;
  color: #b42318;
  font-size: 12px;
  line-height: 1.45;
}

.preview-render-notice strong {
  color: #912018;
}

.preview-render-notice span {
  color: #7a271a;
}

.render-timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.render-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  min-height: 52px;
}

.render-timeline li::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: -2px;
  left: 7px;
  width: 1px;
  background: #dfe4ea;
}

.render-timeline li:last-child::before {
  display: none;
}

.render-timeline li > span {
  position: relative;
  z-index: 1;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  border: 3px solid #e4e7ec;
  border-radius: 50%;
  background: #fff;
}

.render-timeline li.done > span {
  border-color: var(--success);
  background: var(--success);
}

.render-timeline li.current > span {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(214, 168, 79, 0.14);
}

.render-timeline li.failed > span {
  border-color: var(--error);
}

.render-timeline li div {
  display: grid;
  align-content: start;
  gap: 2px;
}

.render-timeline li strong {
  color: #667085;
  font-size: 11px;
}

.render-timeline li.done strong,
.render-timeline li.current strong {
  color: var(--text);
}

.render-timeline li small {
  color: #98a2b3;
  font-size: 9px;
}

@media (max-width: 1200px) {
  .project-card-grid { grid-template-columns: 1fr; }
  .project-detail-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .compact-choice-grid.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .video-editor-hero,
  .projects-hero,
  .project-detail-layout { grid-template-columns: 1fr; }
  .editor-orbit { display: none; }
  .project-detail-side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-image-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .video-tool-area-head { align-items: stretch; flex-direction: column; }
  .video-tool-tabs { display: grid; grid-template-columns: 1fr 1fr; text-align: center; }
  .video-editor-hero,
  .projects-hero { padding: 28px; }
  .video-editor-hero { min-height: 360px; }
  .video-editor-hero h2 { font-size: 38px; }
  .wizard-step { padding: 20px; }
  .choice-grid,
  .compact-choice-grid,
  .compact-choice-grid.five,
  .video-form-grid,
  .project-detail-side,
  .project-info-grid { grid-template-columns: 1fr; }
  .video-project-card { grid-template-columns: 130px minmax(0, 1fr); }
  .project-visual { min-height: 100%; }
  .project-visual > strong { font-size: 42px; }
  .project-detail-top,
  .wizard-submit,
  .editor-toolbar { align-items: stretch; flex-direction: column; }
  .wizard-submit .btn { width: 100%; }
  .media-upload-heading { align-items: flex-start; flex-direction: column; }
  .phaya-task-grid { grid-template-columns: 1fr; }
  .managed-asset-card,
  .image-managed-card { grid-template-columns: 110px minmax(0, 1fr); }
  .asset-order-actions { grid-column: 1 / -1; justify-content: end; }
  .detail-step-head { grid-template-columns: 42px minmax(0, 1fr); }
  .detail-step-head > span:not(.detail-step-number) { grid-column: 2; }
  .ai-prompt-flow-actions { align-items: stretch; flex-direction: column; }
  .ai-prompt-flow-buttons,
  .ai-prompt-flow-buttons .analysis-action-group { flex-direction: column; }
  .ai-prompt-flow-buttons .btn,
  .ai-prompt-flow-buttons .analysis-action-group { width: 100%; }
  .ai-decision-approval-row { align-items: stretch; flex-direction: column; }
  .ai-decision-approval-row .btn { width: 100%; }
  .step-attention-notice,
  .script-duration-estimate { align-items: flex-start; flex-direction: column; }
  .script-duration-estimate span { text-align: left; }
}

@media (max-width: 520px) {
  .project-stats { grid-template-columns: 1fr 1fr; }
  .video-project-card { grid-template-columns: 1fr; }
  .project-visual { min-height: 180px; }
  .project-meta-row { gap: 10px; }
  .step-heading { grid-template-columns: 42px minmax(0, 1fr); }
  .step-heading > span { width: 42px; height: 42px; }
  .upload-file-card { grid-template-columns: 64px minmax(0, 1fr) 34px; }
  .image-upload-card { grid-template-columns: 76px minmax(0, 1fr) 34px; }
  .image-purpose-label { align-items: stretch; flex-direction: column; }
  .managed-asset-card,
  .image-managed-card { grid-template-columns: 1fr; }
  .managed-asset-preview video,
  .managed-asset-preview img,
  .managed-asset-preview .mini-clip,
  .managed-asset-preview .detail-image-placeholder { height: 190px; }
  .asset-purpose-control { align-items: stretch; flex-direction: column; }
  .asset-purpose-control select { width: 100%; }
}
