.creation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 24px;
}
.creation-card {
  border: 1px solid #ded9ce;
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.creation-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px #30292112;
}
.creation-cover {
  height: 150px;
  background: #ede9df;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.creation-cover > span {
  font-size: 64px;
  color: #666c5c;
}
.creation-cover > b {
  position: absolute;
  right: 14px;
  top: 14px;
  background: #fff9;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
}
.creation-info {
  padding: 22px;
}
.creation-info h2 {
  font-size: 25px;
  margin: 12px 0;
}
.creation-info small {
  color: #6b6b65;
}
.creation-feedback {
  border-left: 3px solid #ff959a;
  padding-left: 10px;
}
.pill.ready {
  background: #fff4b8;
}
.pill.changes {
  background: #ffe0d6;
}
.pill.approved {
  background: #e0efdb;
}
.video-subnav {
  display: flex;
  gap: 12px;
  margin: 16px 0;
}
.video-subnav a {
  padding: 10px 14px;
  text-decoration: none;
  border-radius: 8px;
}
.video-subnav a[aria-current="page"] {
  background: #ffff99;
  color: #242922;
}
.video-subnav span {
  font-size: 12px;
  margin-left: 6px;
}
#nav .video-subnav {
  display: block;
  margin: 0 0 12px 20px;
}
#nav .video-subnav a {
  display: block;
  font-size: 13px;
}
.workspace-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
}
.workspace-heading h1 {
  font-size: 36px;
  margin: 6px 0 14px;
}
.workspace-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  max-width: 440px;
}
.workspace-layout {
  display: grid;
  grid-template-columns: 215px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.workspace-layout > aside.workspace-files {
  position: static;
  width: auto;
  height: auto;
  background: #fff;
  border: 1px solid #ded9ce;
  border-radius: 12px;
  padding: 16px;
  display: block;
  overflow: auto;
  max-height: 850px;
  color: #242922;
}
.workspace-files h2 {
  font-size: 20px;
}
.workspace-file {
  display: flex;
  gap: 4px;
  margin: 6px 0;
}
.workspace-file > button:first-child {
  min-width: 0;
  flex: 1;
  display: block;
  text-align: left;
  border: 1px solid transparent;
  background: #f7f5ef;
  padding: 10px;
}
.workspace-file > button.active {
  border-color: #7e855f;
  background: #f2f4d9;
}
.workspace-file small,
.workspace-file b {
  display: block;
  overflow-wrap: anywhere;
}
.workspace-file b {
  font-size: 12px;
  margin-top: 5px;
}
.workspace-file > button:last-child:not(:first-child) {
  padding: 3px;
}
#workspace-upload {
  border-top: 1px solid #ddd;
  margin-top: 16px;
  padding-top: 16px;
}
#workspace-upload input {
  max-width: 100%;
  font-size: 12px;
}
.workspace-history {
  grid-column: 1 / -1;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 20px;
  background: #fff;
}
.workspace-history article {
  display: inline-block;
  vertical-align: top;
  border-left: 2px solid #bed9b6;
  padding: 0 20px;
  margin: 10px 0;
  max-width: 350px;
}
.workspace-history p {
  font-size: 13px;
}
.workspace-tabs {
  display: none;
}
.workspace-decision {
  margin-top: 20px;
}
.workspace-decision textarea {
  width: 100%;
}
#workspace-discussion,
.standalone-discussion {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 0;
  background: #171c1a;
  border: 1px solid #343c36;
  border-radius: 12px;
  overflow: hidden;
  min-width: 0;
}
.review-player {
  padding: 16px;
  color: #f5f3e9;
  min-width: 0;
}
.annotation-stage {
  position: relative;
  background: #080c0a;
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 6px;
}
.annotation-stage video,
.annotation-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.annotation-stage audio {
  max-width: 100%;
}
.annotation-overlay {
  position: absolute;
  pointer-events: none;
  touch-action: none;
}
.review-player .source {
  color: #b2b9ad;
  font-size: 12px;
}
.review-player a {
  color: #ffff99;
}
.review-player button {
  background: #2e3830;
  color: #f2f3e9;
  border: 1px solid #51594e;
  font-size: 12px;
  padding: 7px 9px;
}
.review-player button[aria-pressed="true"] {
  background: #ffff99;
  color: #242922;
}
.review-player-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  margin: 10px 0;
}
.review-player-tools > span {
  flex: 1;
  overflow-wrap: anywhere;
}
.annotation-tools {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.review-timeline {
  position: relative;
  height: 30px;
  border-bottom: 3px solid #58604e;
  margin: 4px 8px 15px 0;
}
.review-timeline .timeline-marker {
  position: absolute;
  top: 8px;
  padding: 0;
  height: 17px;
  min-width: 7px;
  max-width: 100%;
  border: 0;
  background: #ffff99;
  border-radius: 4px;
}
.review-timeline .timeline-marker.resolved {
  background: #7e9a80;
}
.review-comments {
  padding: 16px;
  background: #f7f6f0;
  min-width: 0;
}
.review-comments h2 {
  font-size: 20px;
  margin: 0;
}
.review-comments .sectionhead {
  gap: 8px;
}
.review-comments label {
  font-size: 12px;
}
.review-messages {
  height: 330px;
  overflow: auto;
  overscroll-behavior: contain;
  margin: 14px -4px;
  padding: 4px;
}
.review-comment {
  background: #fff;
  border: 1px solid #deded4;
  padding: 12px;
  border-radius: 9px;
  margin: 0 0 8px;
}
.review-comment.selected {
  border-color: #8a8b45;
  box-shadow: 0 0 0 2px #ffff99;
}
.review-comment.reply {
  margin-left: 18px;
}
.review-comment.resolved {
  opacity: 0.7;
}
.review-comment small {
  display: block;
  font-size: 10px;
  color: #73766b;
  margin: 4px 0;
}
.review-comment b {
  font-size: 12px;
}
.review-comment p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.5;
  margin: 8px 0;
}
.review-comment button {
  border: 0;
  padding: 3px;
  background: transparent;
  font-size: 11px;
}
.review-comment .timecode {
  background: #fff3b8;
  color: #665a14;
  border-radius: 4px;
  padding: 3px 5px;
}
.comment-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.review-composer {
  border-top: 1px solid #dadbd0;
  padding-top: 12px;
}
.review-composer .toolbar {
  gap: 4px;
  margin: 6px 0;
}
.review-composer button {
  font-size: 11px;
  padding: 6px;
}
.review-composer textarea {
  width: 100%;
  box-sizing: border-box;
}
.comment-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.comment-range input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.playback-error {
  color: #ffd5ba;
}
.guidelines-copy {
  max-width: 850px;
  font-size: 17px;
  line-height: 1.8;
}
.guidelines-editor {
  margin-top: 25px;
  border-top: 1px solid #ddd;
  padding-top: 20px;
}
.guidelines-editor textarea {
  width: 100%;
  box-sizing: border-box;
}
.file-discussion {
  max-width: 1200px;
  width: 95vw;
}
.file-discussion .close {
  float: right;
}
.standalone-discussion {
  clear: both;
}
#workspace-error,
[data-error] {
  color: #9b3028;
  white-space: pre-wrap;
}
@media (min-width: 1450px) {
  .annotation-stage {
    height: 580px;
  }
  #workspace-discussion {
    grid-template-columns: minmax(0, 1fr) 350px;
  }
  .review-messages {
    height: 420px;
  }
}
@media (max-width: 1150px) {
  .workspace-layout {
    grid-template-columns: 170px minmax(0, 1fr);
  }
  #workspace-discussion {
    grid-template-columns: 1fr;
  }
  .review-messages {
    height: 260px;
  }
  .annotation-stage {
    height: 420px;
  }
}
@media (max-width: 750px) {
  .workspace-heading {
    display: block;
  }
  .workspace-heading h1 {
    font-size: 30px;
  }
  .workspace-actions {
    margin-top: 20px;
  }
  .workspace-layout {
    display: block;
  }
  .workspace-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
  }
  .workspace-layout[data-mobile-tab="comments"] .workspace-files,
  .workspace-layout[data-mobile-tab="history"] .workspace-files {
    display: none;
  }
  .workspace-layout:not([data-mobile-tab="history"]) .workspace-history {
    display: none;
  }
  .workspace-layout[data-mobile-tab="history"] #workspace-discussion {
    display: none;
  }
  .workspace-layout[data-mobile-tab="files"] .review-comments {
    display: none;
  }
  .workspace-layout > aside.workspace-files {
    max-height: 300px;
    margin-bottom: 12px;
  }
  .annotation-stage {
    height: 390px;
  }
  .standalone-discussion {
    grid-template-columns: 1fr;
  }
  .review-messages {
    height: 300px;
  }
  .creation-grid {
    grid-template-columns: 1fr;
  }
  .video-workspace {
    margin: 0 -8px;
  }
  .workspace-actions label {
    width: 100%;
  }
}
.review-timeline {
  touch-action: none;
  cursor: crosshair;
}

/* Single drop zone, order editing and printable brief */
.upload-drop {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
  padding: 22px 14px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  background: var(--cream);
}
.upload-drop.over {
  border-color: var(--ink);
  background: var(--sage);
}
.upload-drop span {
  color: var(--muted);
  font-size: 13px;
}
.upload-drop .toolbar {
  margin: 8px 0 0;
  justify-content: center;
}
.upload-names {
  list-style: none;
  padding: 0;
  margin: 14px 0;
  max-height: 40vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.upload-names li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.upload-names li:last-child {
  border-bottom: 0;
}
.upload-names b {
  overflow-wrap: anywhere;
}
.upload-names small {
  color: var(--muted);
  white-space: nowrap;
}
.order-quantity {
  display: grid;
  gap: 4px;
  font-size: 12px;
}
.order-quantity input {
  width: 72px;
}
.order-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 12px 0 4px;
}
.order-add select {
  flex: 1;
  min-width: 180px;
}
.brief-export {
  margin: 0 0 16px;
}
@media print {
  aside,
  header,
  footer,
  dialog,
  #toast,
  .cloud-tools,
  .toolbar,
  .brief-subnav,
  button,
  video,
  audio,
  .bench-grid,
  .production-asset {
    display: none !important;
  }
  body,
  .shell,
  main {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    overflow: visible !important;
    height: auto !important;
  }
  .brief-section,
  .production-scene {
    break-inside: avoid;
    border-color: #ccc;
  }
}

/* Whitelisting page */
.whitelisting-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 18px;
}
.whitelisting-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
}
.whitelisting-step.done .step-number {
  background: var(--ink);
  color: #fff;
}
.whitelisting-step h3 {
  margin: 4px 0 8px;
}
.loom-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  max-width: 640px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.loom-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
#whitelisting-form,
#wl-settings {
  display: grid;
  gap: 10px;
  max-width: 560px;
}
#wl-settings {
  margin-top: 22px;
}
#whitelisting-admin td input {
  width: 220px;
  margin-right: 6px;
}

/* Contracts */
.contract-reader {
  max-width: 760px;
}
.contract-body {
  max-height: 55vh;
  overflow: auto;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  margin: 12px 0;
}
.contract-body h2 {
  font-size: 20px;
  margin: 0 0 12px;
}
.contract-body h3 {
  font-size: 15px;
  margin: 18px 0 6px;
}
.contract-body p {
  margin: 0 0 8px;
  line-height: 1.5;
}
#contract-sign,
#contract-send,
#contract-settings,
.contract-template form {
  display: grid;
  gap: 10px;
}
.contract-template {
  border-top: 1px solid var(--line);
  padding: 10px 0;
}
.contract-template summary {
  cursor: pointer;
  font-weight: 700;
}
.contract-template textarea {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12.5px;
}
.signature-preview {
  max-height: 70px;
  max-width: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 6px;
}

/* Custom PDF contracts, vigilance certificate */
.contract-pdf iframe {
  width: 100%;
  height: 55vh;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.contract-custom {
  margin: 4px 0 8px;
}
.contract-custom summary {
  cursor: pointer;
  font-weight: 700;
  margin-bottom: 8px;
}
.vigilance {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 16px;
}
#vigilance-form,
#bonus-form,
#workspace-weight {
  display: grid;
  gap: 10px;
  max-width: 640px;
}
#workspace-weight {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
