:root {
  color-scheme: light;
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  background: #f3f0ea;
  color: #252c29;
  --paper: #fbf9f5;
  --green: #335649;
  --green-dark: #223f35;
  --muted: #665f56;
  --line: #e0d9ce;
  --peach: #e8ddd0;
}
.login-page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #243b31 0%, #334a3f 52%, #626a57 100%);
}
.login-card {
  width: min(100%, 420px);
  padding: clamp(24px, 6vw, 42px);
  border: 1px solid #e5ded2;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 24px 65px #14241c55;
}
.login-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 25px; color: var(--green-dark); font-weight: 650; }
.login-brand .monogram { color: #f2e6d1; background: var(--green-dark); border-color: transparent; }
.login-card h1 { margin-bottom: 21px; }
.login-form { display: grid; gap: 13px; }
.login-form button { margin-top: 5px; }
* { box-sizing: border-box; }
[v-cloak] { display: none; }
body { margin: 0; font-size: 14px; line-height: 1.55; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button {
  border: 1px solid var(--green);
  border-radius: 7px;
  padding: 8px 14px;
  color: #fff;
  background: var(--green);
  font-weight: 650;
}
button:hover:not(:disabled) { background: var(--green-dark); }
button:disabled { opacity: .48; cursor: default; }
button.light { color: var(--green-dark); background: var(--paper); border-color: var(--line); }
button.light:hover:not(:disabled) { background: #ece8df; }
button.small { padding: 4px 9px; font-size: 12px; }
input:not([type="checkbox"], [type="range"]), select {
  min-width: 0;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cfc8bc;
  border-radius: 7px;
  color: #262e29;
  background: #fffdf9;
}
input[type="range"] { width: 100%; margin: 0; }
input[type="range"], input[type="checkbox"] { accent-color: var(--green); }
:is(button,input,select,a):focus-visible { outline: 2px solid #698d78; outline-offset: 2px; }
a { color: var(--green-dark); text-underline-offset: 3px; }
p, h1, h2, figure { margin: 0; }
h1, h2 { font-family: "Instrument Serif", "Songti SC", "SimSun", Georgia, serif; }
h1 { font-size: clamp(25px, 4vw, 38px); line-height: 1.25; }
h2 { font-size: 24px; line-height: 1.25; }
.masthead {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 75px; padding: 12px max(24px, calc((100vw - 1360px) / 2));
  background: #253a31; color: #faf3e6;
}
.brand, .order-switch, .actions, .split { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.split { justify-content: space-between; }
.brand { gap: 13px; }
.brand strong, .brand div span { display: block; }
.brand strong { font-size: 16px; }
.brand div span { color: #d8d2bf; font-size: 12px; }
.monogram {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid #afad91; border-radius: 50%;
  font: 24px Georgia, serif; color: #ebe0c8;
}
.order-switch button { white-space: nowrap; }
.order-switch form { flex: none; }
.workspace-shell { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: 20px; width: min(1500px, calc(100% - 48px)); margin: 26px auto 80px; align-items: start; }
.workspace-sidebar { position: sticky; top: 20px; padding: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 11px; }
.workspace-sidebar nav { display: grid; gap: 4px; }
.workspace-sidebar nav button { text-align: left; background: transparent; color: var(--muted); border-color: transparent; }
.workspace-sidebar nav button:hover:not(:disabled) { color: var(--green-dark); background: #ece8df; }
.workspace-sidebar nav button.active { color: var(--green-dark); background: #e3ebe1; border-color: #d5e1d3; }
.sidebar-order { color: var(--muted); border-top: 1px solid var(--line); margin-top: 9px; padding: 11px 5px 3px; }
.sidebar-order span, .sidebar-order strong { display: block; font-size: 12px; overflow-wrap: anywhere; }
.sidebar-order strong { color: var(--green-dark); margin-top: 3px; }
.page { min-width: 0; }
.box { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 11px; padding: 22px; }
.setup { max-width: 860px; margin: 0 auto 22px; }
.order-heading, .section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.order-heading { margin: 0 0 17px; }
.section-head { margin-bottom: 16px; }
.section-head p, .order-heading p, .muted, .review p { font-size: 13px; color: var(--muted); margin-top: 5px; }
.history-filters { display: grid; grid-template-columns: minmax(0, 320px) minmax(130px, 165px) auto; gap: 12px; align-items: end; }
.history-filters > span { align-self: center; }
.history-orders { display: grid; gap: 10px; padding: 0; margin: 18px 0 0; list-style: none; }
.history-row { display: grid; grid-template-columns: 90px minmax(110px, 1fr) minmax(115px, 165px) auto; align-items: center; gap: 14px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fffdf9; }
.order-cover { overflow: hidden; height: 64px; border-radius: 5px; background: #ece6db; }
.order-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.history-info p, .history-status > span:last-child { color: var(--muted); font-size: 12px; }
button.order-link { display: inline; padding: 0; text-align: left; color: var(--green-dark); border: 0; background: transparent; font-size: 15px; }
button.order-link:hover:not(:disabled) { background: transparent; text-decoration: underline; }
.history-status { display: grid; justify-items: start; gap: 5px; }
.stage-pill { padding: 2px 8px; border-radius: 4px; background: #eee9df; color: #514a40; font-size: 12px; }
.stage-pill.delivered, .stage-pill.preview { background: #e3ebe1; color: var(--green-dark); }
.history-actions { white-space: nowrap; }
.work-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, 360px); gap: 16px; align-items: start; }
.project-form { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.project-form .actions { justify-content: flex-end; }
label { display: grid; gap: 5px; min-width: 0; font-size: 13px; }
.check { display: flex; align-items: center; gap: 6px; }
.import-form { display: grid; grid-template-columns: minmax(120px, 3fr) minmax(90px, 1fr) auto; gap: 9px; align-items: end; }
.notice, .job-banner, .issue { margin: 0 0 14px; padding: 9px 12px; background: #e3ebe1; border-radius: 6px; overflow-wrap: anywhere; }
.notice.error, .issue { color: #813c28; background: #f4e5e0; }
.issue { margin: 12px 0; font-size: 13px; }
.issue ul { padding-left: 18px; margin: 4px 0; }
.job-banner { display: flex; align-items: center; gap: 10px; }
.job-banner span { width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.empty {
  display: grid; justify-items: center; align-content: center; gap: 5px; text-align: center;
  min-height: 252px; margin-top: 14px; border: 1px dashed #ccc2b2; border-radius: 8px; background: #f4f0e8; padding: 25px;
}
.empty .empty-mark { font-size: 34px; color: #637368; line-height: 1.25; }
.empty strong { font-size: 16px; }
.empty p { font-size: 13px; color: var(--muted); }
.album-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 16px 0 10px; }
.album-toolbar select { width: auto; }
.album-toolbar span { margin: 0; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.photo-card { overflow: hidden; background: #f3eee5; border: 1px solid var(--line); border-radius: 8px; }
.photo-card.selected { outline: 2px solid var(--green); outline-offset: -2px; }
.photo-open { width: 100%; display: block; padding: 0; border: 0; border-radius: 0; background: #201c18; }
.photo-open img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: contain; }
.card-meta { display: flex; align-items: start; gap: 5px; min-width: 0; padding: 7px; }
.card-meta div { min-width: 0; }
.card-meta strong, .card-meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta strong { font-size: 13px; }
.card-meta span, .metadata-row { font-size: 12px; color: var(--muted); }
.photo-actions { padding: 0 7px 7px; }
.photo-preview-trigger { display: block; width: 100%; padding: 0; border: 0; background: #201c18; cursor: zoom-in; }
.image-viewer { width: min(1100px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 0; border: 1px solid var(--line); border-radius: 11px; color: #252c29; background: var(--paper); }
.image-viewer::backdrop { background: #171c19c9; }
.viewer-content { padding: 12px; }
.viewer-heading { margin: 0 0 10px; padding: 1px 3px; }
.viewer-heading h2 { font-size: 18px; overflow-wrap: anywhere; }
.viewer-image { display: block; margin: auto; width: 100%; height: min(72vh, 760px); object-fit: contain; background: #211e1a; border-radius: 6px; }
.viewer-controls { margin: 10px 0 0; }
.inspector figure { background: #201c18; border-radius: 7px; overflow: hidden; }
.inspector figure img { display: block; width: 100%; height: 235px; object-fit: contain; }
.metadata-row { margin: 9px 0; }
.slider { margin: 10px 0; }
.slider span { display: flex; justify-content: space-between; }
.slider output { font-variant-numeric: tabular-nums; color: var(--muted); }
.review { margin: 17px 0 0; padding-top: 15px; border-top: 1px solid var(--line); }
.review p { margin-bottom: 7px; }
.inline-form { display: flex; gap: 7px; align-items: center; margin: 9px 0; }
.inline-form button { flex: none; }
.music-form { display: grid; justify-items: start; gap: 8px; margin: 9px 0; }
.music-form label { width: 100%; }
.board-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 11px; }
.board-controls input[type="number"] { width: 115px; }
.board-controls .check { align-self: center; }
.time { font: 24px Georgia, serif; font-variant-numeric: tabular-nums; color: var(--green-dark); white-space: nowrap; }
.shot-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 12px; margin-top: 16px; }
.shot { padding: 11px; border: 1px solid var(--line); border-radius: 8px; display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 10px; }
.shot-frame { position: relative; align-self: start; height: 100px; background: #201c18; border-radius: 5px; }
.shot-frame img { width: 100%; height: 100%; object-fit: contain; }
.shot-frame span { position: absolute; bottom: 4px; left: 4px; padding: 0 6px; color: #fff; background: #301f19; border-radius: 3px; font-variant-numeric: tabular-nums; }
.shot-fields { display: grid; gap: 6px; }
.shot-fields p { color: var(--muted); font-size: 12px; }
.shot-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.shot-tools { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; }
.shot-tools .check { margin-right: auto; }
.story-save, .video-buttons { margin-top: 14px; }
video { display: block; width: 100%; border-radius: 7px; background: #201c18; max-height: 480px; }
.outputs, .jobs ul { margin: 12px 0 0; padding: 0; list-style: none; }
.outputs li { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.outputs li, .jobs li { font-size: 13px; border-top: 1px solid var(--line); padding: 7px 0; }
.jobs summary { cursor: pointer; }
.folder { overflow-wrap: anywhere; }
@media (max-width: 850px) {
  .work-grid { grid-template-columns: 1fr; }
  .workspace-shell { width: calc(100% - 24px); grid-template-columns: 1fr; gap: 11px; margin-top: 14px; }
  .workspace-sidebar { position: static; }
  .workspace-sidebar nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .workspace-sidebar nav button { text-align: center; padding-inline: 4px; }
  .sidebar-order { display: none; }
  .masthead { padding-inline: 12px; }
}
@media (max-width: 520px) {
  .masthead { flex-wrap: wrap; }
  .box { padding: 14px; }
  .project-form, .import-form { grid-template-columns: 1fr; }
  .history-filters { grid-template-columns: 1fr 108px; }
  .history-filters > span { grid-column: 1 / -1; }
  .history-row { grid-template-columns: 66px minmax(0, 1fr); gap: 8px; }
  .order-cover { height: 54px; }
  .history-actions { justify-self: start; }
  .shot { grid-template-columns: 1fr; }
}
