:root {
  --paper: #09111a;
  --paper-deep: #0e1925;
  --ink: #f2f6fb;
  --muted: #9aaabd;
  --line: #223143;
  --panel: #101c29;
  --green: #176df2;
  --green-dark: #0750bc;
  --red: #ff4b55;
  --amber: #f3a44a;
  --blue: #2d83ff;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.26);
  --radius: 7px;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 34% -18%, rgba(26, 105, 224, 0.16), transparent 31%),
    linear-gradient(90deg, rgba(111, 154, 204, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

[hidden] {
  display: none !important;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 17% 18%, rgba(34, 119, 255, 0.2), transparent 24%),
    radial-gradient(circle at 86% 79%, rgba(29, 90, 189, 0.16), transparent 28%),
    #070d14;
}

.login-card {
  display: grid;
  width: min(420px, 100%);
  gap: 18px;
  padding: 34px;
  border: 1px solid #28425e;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(18, 37, 57, 0.98), rgba(10, 19, 29, 0.98));
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.42);
}

.login-card h1 {
  margin-bottom: 8px;
  font-size: 30px;
}

.login-card p:not(.eyebrow):not(.login-error) {
  margin-bottom: 0;
  color: #9bb0c6;
  line-height: 1.65;
}

.login-brand {
  margin-bottom: 4px;
}

.login-error {
  min-height: 19px;
  margin: -7px 0 -3px;
  color: #ff9ca3;
  font-size: 13px;
}

.login-hint {
  padding-top: 15px;
  border-top: 1px solid #26384c;
  color: #8498ad !important;
  font-size: 12px;
}

.login-hint strong {
  color: #c4d9f0;
}

.session-user {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  color: #9eb3c9;
  font-size: 13px;
  font-weight: 700;
}

.store-session #newStoreButton,
.store-session [data-jump="create"],
.store-session .submission-footer-actions {
  display: none;
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 280px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 26px;
  padding: 24px;
  color: #f9f3e7;
  background: #060a0f;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 12px;
  background: linear-gradient(135deg, #2f86ff, #0951be);
  font-family: "STKaiti", "Kaiti SC", serif;
  font-size: 22px;
  font-weight: 700;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 3px;
  color: rgba(238, 245, 255, 0.58);
  font-size: 13px;
}

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

.nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: rgba(238, 245, 255, 0.62);
  background: transparent;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  border-color: rgba(64, 137, 255, 0.66);
  color: #f7fbff;
  background: linear-gradient(90deg, rgba(21, 99, 224, 0.78), rgba(18, 72, 164, 0.75));
}

.nav-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 250, 241, 0.12);
}

.sidebar-note {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 250, 241, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.06);
}

.sidebar-note span {
  color: #d6b16b;
  font-size: 12px;
  letter-spacing: 0;
}

.sidebar-note p {
  margin: 8px 0 0;
  color: rgba(249, 243, 231, 0.72);
  font-size: 13px;
  line-height: 1.65;
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  margin-bottom: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1;
}

h2 {
  margin-bottom: 8px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 28px;
}

h3 {
  margin-bottom: 5px;
  font-size: 18px;
}

.topbar-actions,
.form-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.ghost-button,
.danger-button,
.success-button,
.icon-button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
}

.primary-button {
  padding: 0 16px;
  color: #fffaf1;
  background: var(--green);
}

.primary-button:hover {
  background: var(--green-dark);
}

.ghost-button {
  padding: 0 14px;
  border-color: var(--line);
  color: var(--ink);
  background: rgba(255, 250, 241, 0.68);
}

.danger-button {
  padding: 0 14px;
  color: #fffaf1;
  background: var(--red);
}

.success-button {
  padding: 0 14px;
  color: #fffaf1;
  background: var(--blue);
}

.icon-button {
  width: 34px;
  min-height: 34px;
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: rise 220ms ease-out;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-heading,
.inline-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-heading p,
.inline-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.section-heading.compact {
  margin-bottom: 22px;
}

.search-box {
  display: grid;
  min-width: min(320px, 100%);
  gap: 6px;
}

label,
fieldset {
  display: grid;
  gap: 7px;
  min-width: 0;
}

label span,
legend {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.required-hint {
  margin: -8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.required-mark {
  color: #e24c63;
  font-weight: 900;
}

.form-panel label.has-error > span,
.form-panel label.has-error .required-mark {
  color: #ff6b7d;
}

.form-panel input[aria-invalid="true"],
.form-panel textarea[aria-invalid="true"] {
  border-color: #e24c63;
  box-shadow: 0 0 0 3px rgba(226, 76, 99, 0.16);
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fffdf7;
  outline: none;
}

input,
select {
  height: 42px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 12px;
  line-height: 1.6;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 111, 82, 0.12);
}

.task-list,
.store-list {
  display: grid;
  gap: 12px;
}

.task-card,
.store-card {
  display: grid;
  grid-template-columns: 1.05fr 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.84);
  box-shadow: 0 8px 24px rgba(49, 40, 24, 0.07);
}

.task-card h3,
.store-card h3 {
  margin-bottom: 7px;
}

.task-card p,
.store-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.task-card {
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.task-card:hover {
  border-color: rgba(31, 111, 82, 0.48);
  background: #fffdf7;
  transform: translateY(-1px);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(31, 39, 35, 0.12);
  border-radius: 999px;
  color: var(--ink);
  background: #fffdf7;
  font-size: 12px;
  font-weight: 800;
}

.badge.green {
  color: var(--green-dark);
  background: rgba(31, 111, 82, 0.1);
}

.badge.red {
  color: var(--red);
  background: rgba(184, 75, 62, 0.09);
}

.badge.amber {
  color: #7a531d;
  background: rgba(185, 128, 44, 0.12);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}

.form-panel,
.guide-panel,
.execution-panel,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.92);
  box-shadow: var(--shadow);
}

.form-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.form-panel.compact-form {
  margin-bottom: 18px;
  box-shadow: 0 10px 28px rgba(49, 40, 24, 0.08);
}

.hidden {
  display: none !important;
}

.guide-panel {
  position: sticky;
  top: 28px;
  padding: 20px;
}

.guide-panel ol {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.75;
}

.field-grid {
  display: grid;
  gap: 14px;
}

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

.store-picker {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check-line input {
  width: 16px;
  height: 16px;
}

.check-line.strong {
  color: var(--ink);
  font-weight: 800;
}

.store-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  opacity: 0.5;
}

.store-picker.custom .store-options {
  opacity: 1;
}

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

.shot-row {
  display: grid;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf7;
}

.shot-row header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.92);
  box-shadow: var(--shadow);
}

.detail-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.detail-metrics {
  margin-bottom: 18px;
}

.detail-section {
  margin-top: 18px;
}

.store-submission-list {
  display: grid;
  gap: 14px;
}

.submission-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.9);
  box-shadow: 0 10px 28px rgba(49, 40, 24, 0.08);
}

.submission-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.submission-card h3 {
  margin-bottom: 5px;
}

.submission-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.submission-note {
  padding: 12px;
  border-left: 4px solid var(--red);
  background: rgba(184, 75, 62, 0.08);
}

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

.submission-shot {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf7;
}

.submission-shot div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

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

.task-rail {
  display: grid;
  gap: 10px;
}

.rail-item {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 250, 241, 0.84);
  text-align: left;
}

.rail-item.active,
.rail-item:hover {
  border-color: rgba(31, 111, 82, 0.6);
  background: #fffdf7;
}

.rail-item strong {
  font-size: 14px;
}

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

.execution-panel {
  min-height: 360px;
  padding: 22px;
}

.script-block {
  margin: 16px 0;
  padding: 16px;
  border-left: 4px solid var(--green);
  background: #fffdf7;
  line-height: 1.75;
  white-space: pre-wrap;
}

.shot-list {
  display: grid;
  gap: 12px;
}

.shot-task {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf7;
}

.shot-task header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.shot-task p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

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

.meta-box {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf7;
}

.meta-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.meta-box strong {
  display: block;
  margin-top: 5px;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  line-height: 1.7;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: var(--radius);
  color: #fffaf1;
  background: var(--ink);
  box-shadow: var(--shadow);
  transform: translateY(14px);
  opacity: 0;
  transition: 180ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

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

  .sidebar {
    position: static;
    height: auto;
  }

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

  .sidebar-note {
    display: none;
  }

  .split-layout,
  .execution-layout,
  .review-layout {
    grid-template-columns: 1fr;
  }

  .guide-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .main,
  .sidebar {
    padding: 18px;
  }

  .topbar,
  .section-heading,
  .inline-heading {
    display: grid;
  }

  .nav-list,
  .field-grid.two,
  .store-options,
  .meta-grid {
    grid-template-columns: 1fr;
  }

  .task-card,
  .store-card {
    grid-template-columns: 1fr;
  }

  .detail-hero,
  .submission-card header,
  .submission-shot div {
    display: grid;
  }

  .submission-shot-grid {
    grid-template-columns: 1fr;
  }
}

/* Dark production-console pass: task actions stay visually primary, while
   detailed store work is revealed only after opening a task. */
.sidebar-note {
  border-color: #1c2b3b;
  background: #0b121b;
}

.sidebar-note span {
  color: #78aaff;
}

.sidebar-note p {
  color: #8999ab;
}

h1,
h2 {
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-weight: 760;
  letter-spacing: -0.04em;
}

h1 {
  font-size: 34px;
}

h2 {
  font-size: 26px;
}

.primary-button {
  border-color: #3488ff;
  background: #176df2;
  box-shadow: 0 10px 22px rgba(11, 87, 210, 0.24);
}

.primary-button:hover {
  background: #2b7df5;
}

.ghost-button,
.icon-button {
  color: #dce7f6;
  border-color: #2a3a4e;
  background: #111d2a;
}

.ghost-button:hover,
.icon-button:hover {
  border-color: #4978b5;
  background: #16263a;
}

input,
select,
textarea,
.meta-box,
.shot-row,
.submission-shot,
.shot-task,
.script-block {
  color: #edf4ff;
  border-color: #26384c;
  background: #0b1520;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #3b88ff;
  box-shadow: 0 0 0 3px rgba(41, 124, 255, 0.18);
}

.task-card,
.store-card,
.form-panel,
.guide-panel,
.execution-panel,
.empty-state,
.detail-hero,
.submission-card,
.rail-item {
  border-color: #203146;
  background: linear-gradient(110deg, rgba(18, 31, 45, 0.98), rgba(13, 24, 36, 0.98));
  box-shadow: none;
}

.task-card {
  position: relative;
  min-height: 114px;
  grid-template-columns: minmax(280px, 1.1fr) minmax(380px, 1fr) auto;
  padding: 20px;
}

.task-card::before {
  position: absolute;
  top: 30px;
  left: 20px;
  width: 5px;
  height: 54px;
  border-radius: 4px;
  background: #2b7df5;
  content: "";
  box-shadow: 0 0 18px rgba(43, 125, 245, 0.48);
}

.task-card > div:first-child {
  padding-left: 20px;
}

.task-card:hover {
  border-color: #3977c5;
  background: linear-gradient(105deg, #152b43, #102033);
  transform: translateY(-2px);
}

.task-card h3,
.store-card h3,
.submission-card h3 {
  color: #f6f9fe;
}

.task-card p,
.store-card p,
.detail-hero p,
.submission-card p,
.shot-task p {
  color: #8fa2b7;
}

.badge {
  border-color: #2b4058;
  color: #b9c8d9;
  background: #0b1520;
}

.badge.green {
  color: #80d9b4;
  background: rgba(34, 152, 102, 0.12);
}

.badge.amber {
  color: #ffc46c;
  background: rgba(215, 145, 38, 0.13);
}

.badge.red {
  color: #ff9ba0;
  background: rgba(255, 75, 85, 0.12);
}

.detail-hero {
  margin-bottom: 12px;
  background:
    linear-gradient(105deg, rgba(27, 59, 98, 0.35), transparent 42%),
    #101c29;
}

.reference-video {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 108px;
  padding: 18px;
  margin: 14px 0 20px;
  overflow: hidden;
  border: 1px solid #21344b;
  border-radius: var(--radius);
  background: #0d1823;
}

.reference-video h3 {
  margin: 0 0 8px;
  color: #edf4ff;
}

.reference-video p {
  max-width: 600px;
  margin: 0;
  color: #8fa2b7;
  line-height: 1.6;
}

.reference-shot-list,
.reference-asset-list {
  display: grid;
  gap: 10px;
}

.reference-shot-card {
  padding: 16px;
  border: 1px solid #26384c;
  border-radius: var(--radius);
  background: #0b1520;
}

.reference-shot-card header > div,
.reference-asset-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reference-shot-card header strong,
.reference-asset-info strong {
  color: #edf4ff;
}

.reference-shot-card header span,
.reference-asset-info span,
.shot-requirement {
  color: #8fa2b7;
  font-size: 12px;
}

.reference-shot-card > p {
  margin: 10px 0;
  color: #c1cfdf;
  line-height: 1.65;
}

.reference-asset-list {
  margin-top: 12px;
}

.reference-asset-item {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr) auto;
  padding: 10px 12px;
  border: 1px solid #21344b;
  border-radius: 4px;
  background: #101d2b;
}

.reference-asset-info {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.reference-asset-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-empty {
  margin: 12px 0 0;
}

.video-preview {
  position: relative;
  display: grid;
  width: 124px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid #29435f;
  border-radius: 4px;
  background: #08121e;
  padding: 0;
}

.video-preview video {
  width: 100%;
  height: 100%;
}

.video-preview video {
  display: block;
  object-fit: cover;
  opacity: 0;
  transition: opacity 140ms ease;
}

.video-preview.ready video {
  opacity: 1;
}

.video-preview.interactive {
  cursor: pointer;
}

.reference-film-preview {
  width: 168px;
}

.submission-review-heading {
  margin-top: 4px;
}

.submission-review-heading h4 {
  margin: 3px 0 5px;
  color: #edf4ff;
  font-size: 17px;
}

.submission-review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 12px;
}

.submission-review-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #28415d;
  border-radius: var(--radius);
  background: #0b1520;
}

.submission-review-card header > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.submission-review-card header strong {
  color: #f4f8ff;
}

.submission-review-card header span,
.material-group-label {
  color: #8fa2b7;
  font-size: 12px;
  font-weight: 800;
}

.submission-shot-brief {
  color: #bdcad9 !important;
  font-size: 13px;
}

.material-pair-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.material-pair-grid > section {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.material-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(94px, 1fr));
  gap: 8px;
}

.material-tile {
  position: relative;
  display: grid;
  min-width: 0;
  aspect-ratio: 9 / 12;
  overflow: hidden;
  padding: 0;
  border: 1px solid #27425e;
  border-radius: 5px;
  background: #07111c;
  cursor: pointer;
}

.material-tile video,
.material-tile img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 140ms ease;
}

.material-tile.ready video,
.material-tile.ready img {
  opacity: 1;
}

.material-tile:hover {
  border-color: #4b8fdf;
}

.material-tile-empty {
  display: grid;
  place-items: center;
  border-style: dashed;
  color: #72869e;
  cursor: default;
}

.material-tile-empty span {
  font-size: 12px;
}

.material-empty-state {
  min-height: 74px;
  padding: 12px;
  border: 1px dashed #2c435c;
  border-radius: 5px;
  color: #71869f;
  font-size: 12px;
}

.media-preview-dialog {
  width: min(960px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  padding: 0;
  border: 1px solid #31506e;
  border-radius: 8px;
  background: #07111c;
}

.media-preview-dialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
}

.media-preview-dialog-panel {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(560px, calc(100vh - 72px));
  padding: 46px 22px 22px;
}

.media-preview-dialog-panel > .icon-button {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
}

.media-preview-dialog video,
.media-preview-dialog img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 120px);
  background: #000;
}

.media-preview-dialog video {
  width: min(880px, 100%);
}

.media-preview-dialog img {
  object-fit: contain;
}

.media-dropzone {
  display: grid;
  min-height: 118px;
  place-content: center;
  gap: 6px;
  margin-top: 7px;
  padding: 16px;
  border: 1px dashed #42698f;
  border-radius: 6px;
  color: #dceaff;
  background: #0a1724;
  text-align: center;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.media-dropzone:hover,
.media-dropzone.is-dragover {
  border-color: #55a1ff;
  background: #112b45;
}

.media-dropzone strong {
  font-size: 14px;
}

.media-dropzone span {
  color: #91a7bf;
  font-size: 12px;
}

.media-dropzone.has-file {
  border-color: #2f9d73;
  background: #0b231f;
}

.media-dropzone.has-file [data-dropzone-status] {
  position: relative;
  padding-left: 22px;
  color: #74d8aa;
}

.media-dropzone.has-file [data-dropzone-status]::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #2aab78;
  content: "";
  transform: translateY(-50%);
}

.media-dropzone.has-file [data-dropzone-status]::after {
  position: absolute;
  top: 50%;
  left: 5px;
  width: 4px;
  height: 7px;
  border-right: 1.5px solid #f2fff9;
  border-bottom: 1.5px solid #f2fff9;
  content: "";
  transform: translateY(-62%) rotate(42deg);
}

.media-dropzone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.compact-dropzone {
  min-height: 92px;
}

.final-video-dropzone {
  min-height: 172px;
}

.detail-section > .inline-heading {
  margin-bottom: 12px;
}

.store-dialog {
  width: min(680px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  padding: 0;
  overflow: auto;
  border: 1px solid #2d4865;
  border-radius: 12px;
  color: var(--ink);
  background: #0d1823;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
}

.store-dialog::backdrop {
  background: rgba(1, 7, 14, 0.74);
  backdrop-filter: blur(6px);
}

.store-dialog-panel {
  border: 0;
  border-radius: 0;
  background: linear-gradient(140deg, #14283c, #0d1823 48%);
}

.span-two {
  grid-column: span 2;
}

.field-hint {
  display: block;
  margin-top: -2px;
  color: #7f94ad;
  font-size: 11px;
  line-height: 1.55;
}

.store-form-error {
  margin: -2px 0 0;
  padding: 11px 13px;
  border: 1px solid rgba(255, 107, 125, 0.42);
  border-radius: 8px;
  color: #ffc0c9;
  background: rgba(226, 76, 99, 0.1);
  font-size: 13px;
  line-height: 1.55;
}

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

.account-note {
  margin: -2px 0 0;
  padding: 12px 14px;
  border-left: 3px solid #2d83ff;
  color: #a8b9ce;
  background: rgba(45, 131, 255, 0.08);
  font-size: 13px;
  line-height: 1.65;
}

.dialog-actions {
  justify-content: flex-end;
}

.detail-tabs {
  display: flex;
  gap: 22px;
  margin: 0 0 18px;
  border-bottom: 1px solid #21344b;
}

.detail-tab {
  position: relative;
  padding: 0 2px 13px;
  border: 0;
  color: #8193a8;
  background: transparent;
  font-weight: 700;
}

.detail-tab span {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  margin-left: 5px;
  border-radius: 10px;
  color: #9bbde8;
  background: #162942;
  font-size: 12px;
}

.detail-tab.active {
  color: #f4f8ff;
}

.detail-tab.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: #2d83ff;
  content: "";
}

.submission-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
  gap: 16px;
  min-height: 420px;
}

.submission-rail,
.submission-inspector {
  border: 1px solid #203146;
  border-radius: var(--radius);
  background: #0e1925;
}

.submission-rail {
  align-self: start;
  overflow: hidden;
}

.submission-rail-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #203146;
}

.submission-rail-heading h3 {
  margin: 0;
  font-size: 15px;
}

.submission-rail-heading span {
  color: #8da0b7;
  font-size: 12px;
}

.submission-list-item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid #1c2d40;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.submission-list-item:last-child {
  border-bottom: 0;
}

.submission-list-item:hover,
.submission-list-item.active {
  background: #142a42;
}

.submission-list-item.active {
  box-shadow: inset 3px 0 0 #2d83ff;
}

.submission-list-item strong,
.submission-list-item span {
  display: block;
}

.submission-list-item strong {
  margin-bottom: 5px;
  color: #edf4ff;
  font-size: 14px;
}

.submission-list-item span {
  color: #879bb0;
  font-size: 12px;
  line-height: 1.45;
}

.submission-inspector {
  padding: 16px;
}

.submission-inspector .submission-card {
  min-height: 100%;
  border: 0;
  border-left: 3px solid #2d83ff;
  border-radius: 0;
  background: transparent;
}

.compact-heading {
  margin-bottom: 10px;
}

.compact-heading h4 {
  margin: 0 0 4px;
  color: #dfeaff;
  font-size: 14px;
}

.uploaded-video-section {
  margin: 2px 0 18px;
}

.uploaded-video-list {
  display: grid;
  gap: 8px;
}

.uploaded-video-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid #263a50;
  border-radius: 6px;
  background: #0a1420;
}

.uploaded-video-item strong,
.uploaded-video-item span {
  display: block;
}

.uploaded-video-item strong {
  margin-bottom: 3px;
  color: #eaf2ff;
  font-size: 13px;
}

.uploaded-video-item div > span,
.empty-inline {
  color: #8498af;
  font-size: 12px;
}

.video-tag {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid #31557b;
  border-radius: 4px;
  color: #8cc1ff;
  background: #10233a;
  font-size: 11px;
  font-weight: 700;
}

.script-material-heading {
  margin-top: 4px;
}

.submission-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #203146;
}

.archive-video-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.final-delivery-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: center;
  gap: 20px;
  margin-top: 22px;
  padding: 20px 0;
  border-top: 1px solid #203146;
}

.final-delivery-heading h4 {
  margin: 4px 0 0;
  color: #e9f2ff;
  font-size: 18px;
}

.final-video-title {
  margin: 7px 0 0;
  color: #9ab0c8;
  font-size: 14px;
}

.upload-success-icon {
  position: relative;
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-left: 6px;
  border-radius: 50%;
  vertical-align: -1px;
  background: #2aab78;
}

.upload-success-icon::after {
  position: absolute;
  top: 3px;
  left: 5px;
  width: 4px;
  height: 7px;
  border-right: 1.5px solid #f2fff9;
  border-bottom: 1.5px solid #f2fff9;
  content: "";
  transform: rotate(42deg);
}

.final-video-preview {
  width: min(100%, 360px);
  justify-self: end;
}

.final-video-preview .material-tile {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.upload-complete-video {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid #2c4968;
  border-radius: var(--radius);
  color: #d7e6f7;
  background: #101f30;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.upload-final-video-button {
  min-width: 132px;
  box-shadow: 0 10px 24px rgba(34, 124, 255, 0.28);
}

.upload-complete-video:hover {
  border-color: #5085bd;
  background: #162c45;
}

.upload-complete-video input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.reject-dialog textarea {
  min-height: 132px;
}

.submission-card {
  border-left: 3px solid #2d83ff;
}

.submission-card:has(.badge.amber) {
  border-left-color: #f3a44a;
}

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

.submission-shot p {
  color: #93a5ba;
}

.rail-item.active,
.rail-item:hover {
  border-color: #3d79c2;
  background: #142a42;
}

.script-block {
  border-left-color: #2d83ff;
}

.toast {
  color: #f7fbff;
  background: #14243a;
}

.operator-entry {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  color: #89c779;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.operator-entry:hover {
  color: #b4e3a8;
}

.operator-entry span {
  font-size: 16px;
  line-height: 1;
}

@media (max-width: 900px) {
  .task-card,
  .submission-shot-grid,
  .reference-video,
  .submission-workspace {
    grid-template-columns: 1fr;
  }

  .reference-asset-item {
    grid-template-columns: 108px minmax(0, 1fr) auto;
  }

  .video-preview {
    width: 108px;
  }

  .reference-film-preview {
    width: 100%;
    max-width: 320px;
  }

  .submission-review-grid,
  .material-pair-grid {
    grid-template-columns: 1fr;
  }

  .task-card::before {
    display: none;
  }

  .task-card > div:first-child {
    padding-left: 0;
  }

  .span-two {
    grid-column: span 1;
  }

  .submission-footer-actions,
  .archive-video-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .archive-video-actions,
  .archive-video-actions > * {
    width: 100%;
  }

  .final-delivery-section {
    grid-template-columns: 1fr;
  }

  .final-video-preview {
    justify-self: stretch;
  }
}
