@charset "UTF-8";
:root {
  color-scheme: light;
  --canvas: #f3f5f0;
  --paper: #fff;
  --text: #1b2923;
  --muted: #5d7067;
  --line: #dce5db;
  --rail: #15372d;
  --dark: #173d31;
  --accent: #e9f080;
  --green: #176847;
  --red: #a52c2b;
  font: 15px/1.55 "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--canvas); color: var(--text); }
body:not(.login-page) { display: grid; grid-template-columns: 210px minmax(0,1fr); min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; min-height: 39px; padding: 6px 13px; color: var(--text); white-space: nowrap; }
button:hover:not(:disabled) { border-color: #7a9988; background: #f5f9f4; }
button:disabled { opacity: .44; cursor: default; }
button.primary { background: var(--dark); color: #fff; border-color: var(--dark); font-weight: 650; }
button.primary:hover:not(:disabled) { background: #245641; }
button.danger { color: var(--red); }
button.danger.solid { background: #9f2c2b; color: #fff; border-color: #9f2c2b; }
button.danger.solid:hover:not(:disabled) { background: #842525; }
button.small { min-height: 32px; padding: 3px 9px; font-size: 13px; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .dropzone:focus-visible { outline: 2px solid #36795e; outline-offset: 2px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(27px,4vw,36px); line-height: 1.2; letter-spacing: -.035em; }
h2 { font-size: 17px; line-height: 1.35; }
p, .muted { color: var(--muted); }
.rail { position: sticky; top: 0; min-height: 100vh; height: 100vh; display: flex; flex-direction: column; background: var(--rail); color: #dce9df; padding: 27px 14px; }
.brand { display: flex; gap: 9px; align-items: center; font-size: 15px; padding: 0 7px; color: #fff; white-space: nowrap; }
.brand-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 9px; color: #263622; background: var(--accent); font-weight: 800; }
.rail nav { display: grid; gap: 5px; margin-top: 30px; }
.rail button { border: 0; color: inherit; text-align: left; background: transparent; padding: 9px 13px; }
.rail nav button span { display: inline-block; width: 25px; color: #a9cbb8; }
.rail nav button[aria-current] { background: #2c5546; color: #fff; }
.rail button:hover:not(:disabled) { background: #21493a; }
.rail .logout { margin-top: auto; color: #c1d5ca; }
main { width: min(1440px,100%); padding: 21px clamp(18px,3.2vw,48px) 43px; }
.top-bar { display: flex; align-items: center; justify-content: space-between; min-height: 32px; margin-bottom: 22px; color: var(--muted); font-size: 13px; }
.shop-label strong { color: var(--text); margin-left: 6px; }
.pill { border-radius: 15px; background: #e5eee4; color: #30624a; padding: 3px 10px; font-size: 12px; font-weight: 650; }
.pill[data-state="失败"], .pill[data-state="部分失败"], .pill[data-state="中断"] { color: #8e2b2b; background: #fae8e4; }
.pill[data-state="待核对"], .pill[data-state="运行中"], .pill[data-state="正在停止"] { color: #674b15; background: #f4ecce; }
.title-row { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin: 0 0 20px; }
.title-row p { margin-top: 7px; font-size: 13px; }
.actions, .input-action, .card-heading, .media-actions, .selection-footer, .dialog-heading, .dialog-actions, .pagination { display: flex; align-items: center; gap: 9px; }
.capacity { display: grid; grid-template-columns: minmax(124px,1.3fr) minmax(90px,1fr) minmax(90px,1fr) auto; align-items: center; gap: 16px; background: var(--dark); color: #d6eadc; border-radius: 13px; padding: 16px 22px; }
.capacity > div > span { display: block; font-size: 13px; }
.capacity strong { font: 750 31px/1.2 system-ui, sans-serif; color: #fff; font-variant-numeric: tabular-nums; }
.capacity-main strong { color: var(--accent); font-size: 40px; }
button.on-dark { color: #f2f9ee; border-color: #7f9e89; background: transparent; }
button.on-dark:hover:not(:disabled) { background: #295a47; }
.capacity-hint { margin: 6px 0 13px; font-size: 12px; }
.columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; align-items: start; }
.columns:has(.categories) { grid-template-columns: minmax(325px,1fr) minmax(285px,1fr); align-items: stretch; }
.card { min-width: 0; padding: 17px 19px; border: 1px solid var(--line); background: var(--paper); border-radius: 12px; }
.card-heading, .dialog-heading { justify-content: space-between; margin-bottom: 13px; }
.field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 13px; }
.wide { grid-column: 1/-1; }
label { display: grid; gap: 4px; color: #496056; font-size: 13px; }
input:not([type=checkbox]), select, textarea { display: block; width: 100%; min-width: 0; background: #fcfdfa; border: 1px solid #cad8cd; border-radius: 7px; color: var(--text); padding: 7px 9px; }
input[type=checkbox] { margin: 0; width: 16px; height: 16px; accent-color: var(--green); }
textarea { resize: vertical; min-height: 75px; }
.check { display: flex; align-items: center; gap: 6px; }
.input-action input { flex: 1; }
.input-action .check { white-space: nowrap; }
.field-note { background: #edf3ea; padding: 6px 8px; border-radius: 6px; font-size: 12px; }
.categories { display: flex; flex-direction: column; }
.category-list { margin: 10px 0 12px; min-height: 210px; max-height: 385px; flex: 1; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.category-list button { display: flex; justify-content: space-between; align-items: center; text-align: left; gap: 12px; width: 100%; border: 0; border-bottom: 1px solid #edf1eb; border-radius: 0; white-space: normal; }
.category-list button[aria-selected="true"] { background: #e6f1e5; font-weight: 700; }
.category-industry { color: var(--muted); margin-right: 8px; font-size: 12px; }
.selection-footer span { flex: 1; color: var(--muted); }
.progress { margin-top: 17px; }
.table-wrap { overflow: auto; max-height: 510px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
th, td { padding: 9px 8px; border-bottom: 1px solid #edf1ea; vertical-align: middle; }
th { color: var(--muted); background: #f5f8f2; position: sticky; top: 0; white-space: nowrap; }
td:first-child { min-width: 50px; }
.table-wrap td:last-child { min-width: 90px; overflow-wrap: anywhere; }
.time { white-space: nowrap; font-variant-numeric: tabular-nums; }
summary { cursor: pointer; margin-top: 10px; color: var(--muted); font-size: 13px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 56vh; overflow: auto; background: #f6f9f4; padding: 13px; border-radius: 7px; font: 12px/1.55 ui-monospace, Consolas, monospace; }
.notice { padding: 9px 13px; border: 1px solid var(--line); border-radius: 8px; color: #29593f; background: #e9f3e8; margin-bottom: 15px; overflow-wrap: anywhere; }
.notice.error, .error { color: var(--red); }
.notice.error { background: #fdf0ec; border-color: #f0ccc6; }
.empty { padding: 16px; text-align: center; color: var(--muted); }
.dropzone { cursor: pointer; text-align: center; display: grid; gap: 2px; padding: 22px 8px; border: 1.5px dashed #91aa99; border-radius: 9px; background: #f5f9f2; color: var(--green); }
.dropzone span { font-size: 12px; color: var(--muted); }
.dropzone.is-over { border-color: var(--green); background: #dfefdc; }
.media-actions { justify-content: space-between; margin-top: 9px; }
.media-count { font-weight: 500; color: var(--muted); margin-left: 4px; font-size: 12px; }
.upload-status { min-height: 19px; overflow-wrap: anywhere; margin-top: 5px; font-size: 12px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill,minmax(94px,1fr)); gap: 8px; }
.gallery .empty { grid-column: 1/-1; }
.tile { position: relative; min-width: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #f7f9f5; }
.tile button { padding: 0; border: 0; border-radius: 0; width: 100%; display: grid; min-width: 0; }
.tile img { width: 100%; height: 95px; object-fit: cover; background: #e7ece5; }
.tile-name { display: block; padding: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.tile input { position: absolute; top: 7px; left: 7px; }
.pagination { justify-content: center; margin-top: 10px; font-size: 12px; color: var(--muted); }
dialog { border: 1px solid var(--line); border-radius: 12px; max-width: min(740px,calc(100vw - 28px)); width: 100%; padding: 17px; }
dialog::backdrop { background: #13271f90; }
.dialog-heading h2 { overflow-wrap: anywhere; }
.dialog-actions { justify-content: flex-end; margin-top: 13px; }
#preview-image { display: block; max-width: 100%; max-height: 66vh; margin: auto; object-fit: contain; }
#delete-dialog { max-width: min(420px,calc(100vw - 28px)); }
.login-page { min-height: 100vh; display: grid; place-items: center; }
.login-card { width: min(420px,calc(100% - 30px)); padding: 34px; border-radius: 15px; border: 1px solid var(--line); background: #fff; }
.login-card h1 { margin: 12px 0 21px; font-size: 26px; }
.login-card form { display: grid; gap: 14px; }
@media (max-width: 960px) {
  body:not(.login-page) { grid-template-columns: 164px minmax(0,1fr); }
  .columns:has(.categories) { grid-template-columns: 1fr; }
  .capacity { gap: 10px; padding: 12px; }
}
@media (max-width: 700px) {
  body:not(.login-page) { display: block; }
  .rail { position: static; height: auto; min-height: 0; padding: 12px 14px 8px; }
  .rail nav { display: flex; overflow: auto; margin: 8px 0 0; }
  .rail nav button { flex: 0 0 auto; padding: 6px 10px; }
  .rail nav button span { display: none; }
  .rail .logout { position: absolute; top: 10px; right: 9px; }
  .columns, .columns:has(.categories) { grid-template-columns: 1fr; }
  .title-row, .top-bar { align-items: start; }
  .title-row { flex-wrap: wrap; }
  .capacity { grid-template-columns: 1.2fr 1fr 1fr; }
  .capacity button { grid-column: 1/-1; justify-self: start; }
  main { padding: 12px 13px 24px; }
}
