:root {
  color-scheme: dark;
  --bg: #101110;
  --panel: #1a1b19;
  --line: #30312c;
  --muted: #a6a89e;
  --gold: #dfba75;
  --text: #f2f0e8;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 14px;
}
a {
  color: inherit;
  text-decoration: none;
}
aside {
  position: fixed;
  inset: 0 auto 0 0;
  width: 244px;
  padding: 36px 22px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -1px;
}
.monogram {
  display: grid;
  place-items: center;
  background: var(--gold);
  color: #17150e;
  width: 32px;
  height: 36px;
  border-radius: 9px;
  font-size: 25px;
}
.brand-sub {
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--gold);
  margin-top: 7px;
}
nav {
  margin-top: 56px;
  display: grid;
  gap: 8px;
}
nav a {
  padding: 14px;
  color: var(--muted);
  border-radius: 9px;
}
nav a span {
  margin-right: 12px;
}
nav .active {
  background: #2b281e;
  color: var(--gold);
}
.preset-aside {
  margin-top: auto;
  padding: 20px 12px;
}
.tiny,
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 600;
  color: var(--muted);
}
h3 {
  font-size: 16px;
  margin: 12px 0;
}
.preset-aside p {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}
.pill {
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid #3b3c35;
  border-radius: 6px;
  color: #cdcfc3;
  white-space: nowrap;
}
.aside-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 24px;
}
.aside-foot > span:last-child {
  margin-left: auto;
}
.local-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}
main {
  margin-left: 244px;
  padding: 0 60px;
  max-width: 1600px;
}
header {
  height: 86px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}
header b {
  font-weight: 400;
  color: var(--text);
  margin-left: 8px;
}
.connection {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 8px 12px;
  color: var(--gold);
  font-size: 10px;
}
#create {
  padding-top: 58px;
}
.eyebrow {
  color: var(--gold);
}
h1 {
  font-size: clamp(38px, 4.5vw, 66px);
  line-height: 1.06;
  font-weight: 450;
  letter-spacing: -2.8px;
  margin: 20px 0;
}
h1 span {
  color: var(--gold);
}
.intro {
  color: var(--muted);
  line-height: 1.8;
  font-size: 13px;
  max-width: 510px;
}
#create-form {
  background: var(--panel);
  border: 1px solid #414036;
  border-radius: 13px;
  margin-top: 32px;
  padding: 24px;
}
label {
  display: block;
  font-size: 12px;
  color: #d8d9d0;
  margin-bottom: 12px;
}
textarea {
  width: 100%;
  resize: vertical;
  min-height: 95px;
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
  line-height: 1.9;
}
textarea:focus {
  outline: 1px solid var(--gold);
  border-radius: 4px;
}
.form-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
}
.form-options {
  display: flex;
  align-items: center;
  gap: 7px;
}
.quantity {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  font-size: 10px;
  color: var(--muted);
}
input[type="number"] {
  width: 43px;
  background: #24251f;
  border: 1px solid #3b3c35;
  border-radius: 5px;
  padding: 6px;
  color: var(--text);
}
button {
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #211c11;
  border-radius: 7px;
  padding: 12px 18px;
  font-weight: 650;
  white-space: nowrap;
}
button:hover {
  filter: brightness(1.1);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
button span {
  margin-left: 18px;
}
.secondary {
  color: var(--text);
  background: transparent;
  border-color: #494a40;
}
.form-hint {
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
  margin: 18px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.workflow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 24px 0 52px;
  padding: 0 4px;
  gap: 16px;
}
.workflow > div {
  position: relative;
  padding-left: 32px;
}
.workflow span {
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 10px;
  color: var(--gold);
}
.workflow b {
  font-weight: 500;
  font-size: 11px;
}
.workflow p {
  font-size: 10px;
  color: var(--muted);
  margin: 7px 0;
  line-height: 1.7;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-heading .eyebrow {
  font-size: 9px;
}
h2 {
  font-size: 24px;
  font-weight: 450;
  letter-spacing: -0.5px;
  margin: 10px 0 22px;
}
#total {
  font-size: 12px;
  color: var(--muted);
  margin-left: 8px;
}
.batch {
  border-top: 1px solid var(--line);
  padding: 24px 0;
}
.batch-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.batch-heading h3 {
  margin: 0 0 6px;
  font-size: 13px;
}
.batch-heading small {
  font-size: 10px;
  color: var(--muted);
}
.jobs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.job {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.preview {
  aspect-ratio: 9/11;
  background: linear-gradient(145deg, #2f2b21, #1c1d19);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.preview > span {
  font-size: 40px;
  color: #b59b65;
  opacity: 0.6;
}
.preview small {
  position: absolute;
  bottom: 12px;
  left: 12px;
  color: #ded5bb;
  font-size: 9px;
}
.preview video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
}
.job-info {
  padding: 13px;
}
.job-info h4 {
  font-size: 12px;
  margin: 0 0 6px;
}
.job-info p {
  font-size: 10px;
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.6;
}
.state {
  color: var(--gold);
  font-size: 9px;
}
.job button {
  padding: 7px 10px;
  font-size: 10px;
  width: 100%;
  margin-top: 12px;
}
.empty {
  padding: 45px 16px;
  text-align: center;
  border: 1px dashed #3c3d35;
  border-radius: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 22px 0;
  margin-top: 36px;
  font-size: 10px;
  color: var(--muted);
}
#notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 440px;
  background: #332c1f;
  border: 1px solid #8c774c;
  border-radius: 10px;
  box-shadow: 0 8px 40px #0006;
  padding: 16px;
  color: var(--text);
  line-height: 1.7;
  display: none;
}
dialog {
  max-width: 530px;
  width: 90%;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 28px;
  border-radius: 16px;
}
dialog::backdrop {
  background: #000b;
}
dialog p {
  font-size: 12px;
  color: var(--muted);
}
#checks {
  display: grid;
  gap: 10px;
  margin: 24px 0;
}
#checks label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
input[type="checkbox"] {
  accent-color: var(--gold);
}
dialog textarea {
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: 7px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}
@media (min-width: 1500px) {
  main {
    padding: 0 90px;
  }
}
@media (max-width: 1050px) {
  aside {
    width: 190px;
    padding: 28px 16px;
  }
  main {
    margin-left: 190px;
    padding: 0 30px;
  }
  .jobs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .brand {
    font-size: 20px;
  }
  .brand-sub {
    display: none;
  }
}
@media (max-width: 650px) {
  aside {
    position: static;
    width: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 18px 22px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  nav {
    margin: 0;
    display: flex;
    gap: 0;
  }
  nav a {
    font-size: 10px;
    padding: 10px;
  }
  nav a span {
    display: none;
  }
  .preset-aside,
  .aside-foot {
    display: none;
  }
  main {
    margin: 0;
    padding: 0 22px;
  }
  header {
    height: 65px;
    font-size: 9px;
  }
  .connection {
    font-size: 8px;
    padding: 6px;
  }
  #create {
    padding-top: 35px;
  }
  h1 {
    font-size: 48px;
  }
  .intro {
    font-size: 12px;
  }
  #create-form {
    padding: 18px;
  }
  .form-bottom {
    align-items: stretch;
    flex-direction: column;
  }
  .form-options {
    flex-wrap: wrap;
  }
  .form-bottom button {
    width: 100%;
  }
  .workflow {
    margin-bottom: 32px;
    gap: 10px;
  }
  .workflow > div {
    padding-left: 0;
    padding-top: 22px;
  }
  .workflow p {
    font-size: 9px;
  }
  .workflow span {
    top: 0;
  }
  .section-heading .eyebrow {
    font-size: 8px;
    letter-spacing: 1px;
  }
  h2 {
    font-size: 20px;
  }
  .jobs {
    gap: 10px;
  }
  footer {
    font-size: 8px;
  }
  .dialog-actions {
    flex-wrap: wrap;
  }
}
.reference-section {
  margin: 20px 0 24px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.reference-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.reference-heading h3 {
  font-size: 13px;
  margin: 0 0 7px;
  font-weight: 500;
}
.reference-heading p,
.reference-drop p {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}
.reference-drop {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px dashed #64604d;
  border-radius: 9px;
  padding: 20px 16px;
  margin-top: 16px;
  background: #22221c;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.reference-drop.dragging {
  border-color: var(--gold);
  background: #332d20;
}
.upload-symbol {
  display: grid;
  place-items: center;
  color: var(--gold);
  font-size: 24px;
  min-width: 36px;
  height: 40px;
  border: 1px solid #4e4633;
  border-radius: 8px;
}
.reference-drop strong {
  font-size: 12px;
  font-weight: 500;
}
.reference-drop button {
  margin-left: auto;
}
.upload-status {
  font-size: 11px;
  color: var(--gold);
  line-height: 1.7;
  margin: 10px 0 0;
}
.upload-status:empty {
  display: none;
}
.reference-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.reference-list:empty {
  display: none;
}
.reference-card {
  position: relative;
  display: flex;
  gap: 12px;
  background: #22231e;
  border: 1px solid #3d3e35;
  border-radius: 9px;
  padding: 12px;
}
.reference-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 62px;
  height: 78px;
  background: #343126;
  border-radius: 6px;
  color: var(--gold);
  font-size: 10px;
  overflow: hidden;
}
.reference-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.reference-detail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.reference-detail strong {
  font-size: 11px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 14px;
}
.reference-detail select,
.reference-detail input {
  font: inherit;
  font-size: 10px;
  border: 1px solid #4b4c40;
  border-radius: 5px;
  padding: 7px;
  background: #1a1b17;
  color: var(--text);
  width: 100%;
  min-width: 0;
}
.remove-reference {
  position: absolute;
  right: 8px;
  top: 5px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
}
.batch-references {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 11px;
}
.batch-references summary {
  cursor: pointer;
  color: var(--gold);
  padding: 4px 0;
}
.batch-reference-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}
.batch-reference-links a {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.batch-reference-links a:hover {
  border-color: var(--gold);
}
@media (max-width: 1050px) {
  .reference-list {
    grid-template-columns: 1fr;
  }
  .reference-drop {
    flex-wrap: wrap;
  }
  .reference-drop button {
    margin-left: 50px;
  }
}
@media (max-width: 650px) {
  .reference-drop {
    gap: 10px;
    padding: 14px;
  }
  .reference-drop > div {
    flex: 1;
  }
  .reference-drop button {
    width: 100%;
    margin-left: 0;
  }
  .reference-heading p {
    max-width: 240px;
  }
  .reference-card {
    padding: 10px;
  }
  .reference-detail input {
    font-size: 11px;
  }
  .reference-heading p,
  .reference-drop p {
    font-size: 10px;
  }
}
.batch-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.generation-progress {
  padding: 12px 14px;
  margin-bottom: 16px;
  background: #25241c;
  border: 1px solid #48412e;
  border-radius: 8px;
  font-size: 11px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.generation-progress strong {
  font-weight: 500;
  color: var(--gold);
}
.generation-progress span {
  color: var(--muted);
}
.generation-progress p {
  margin: 0;
  width: 100%;
  line-height: 1.7;
  color: #e1c6a0;
}
.download-video {
  display: block;
  text-align: center;
  font-size: 10px;
  padding: 9px;
  color: var(--gold);
  margin-top: 6px;
}
.generation-fields {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
  margin-top: 24px;
}
.generation-fields label {
  line-height: 1.8;
}
dialog select,
dialog input[type="number"] {
  display: block;
  width: 100%;
  background: #24251f;
  color: var(--text);
  border: 1px solid #494a40;
  border-radius: 6px;
  padding: 10px;
  font: inherit;
  margin-top: 8px;
}
dialog select {
  font-size: 11px;
}
.quote-result {
  border: 1px solid #4d4430;
  border-radius: 8px;
  padding: 12px;
  line-height: 1.8;
  color: var(--gold);
  margin: 16px 0;
}
.budget-help {
  font-size: 10px !important;
  line-height: 1.7;
}
.setup-help {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  color: var(--muted);
  font-size: 12px;
}
.setup-help summary {
  cursor: pointer;
  color: var(--gold);
}
.setup-help pre {
  overflow-x: auto;
  font-size: 10px;
  background: #11120f;
  padding: 12px;
  line-height: 2;
  border-radius: 7px;
}
#provider-message {
  line-height: 1.8;
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 8px;
}
#workspace-controls {
  margin-top: 20px;
}
#workspace-controls select {
  margin-bottom: 12px;
}
header button.connection {
  background: transparent;
  font-weight: 400;
}
.generation-fields select:focus-visible,
dialog input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
@media (max-width: 650px) {
  .batch-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .batch-actions {
    justify-content: flex-start;
  }
  .batch-actions button {
    padding: 10px 12px;
    font-size: 10px;
  }
  .generation-fields {
    grid-template-columns: 1fr;
  }
  dialog {
    padding: 22px;
  }
  .aside-foot {
    display: none;
  }
  aside nav a {
    padding: 8px;
    font-size: 9px;
  }
  .brand {
    font-size: 18px;
  }
}

.login-page {display:flex;min-height:100vh;align-items:center;justify-content:center;padding:24px;}
.login-page main {margin:0;width:min(100%,560px);padding:32px;}
.login-page h1 {font-size:clamp(32px,6vw,52px);}
.login-page input {display:block;width:100%;margin:12px 0;padding:16px;background:#161616;border:1px solid #444;color:#fff;border-radius:10px;box-sizing:border-box;}
