:root {
  --ink: #14211f;
  --muted: #687572;
  --paper: #f5f7f2;
  --panel: #ffffff;
  --line: #dce4dd;
  --teal: #0e766e;
  --teal-dark: #07564f;
  --coral: #e86e4b;
  --soft-teal: #e5f2ed;
  --soft-coral: #fff0ea;
  --shadow: 0 14px 40px rgba(22, 48, 43, .08);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--paper); color: var(--ink); font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif; font-size: 14px; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 7px; background: #fbfcfa; color: var(--ink); padding: 10px 11px; outline: 0; margin-top: 6px; }
input:focus, textarea:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14, 118, 110, .1); }
textarea { line-height: 1.55; resize: vertical; }
.topbar { min-height: 74px; padding: 16px clamp(18px, 4vw, 58px); display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.86); }
.eyebrow { color: var(--teal); font-size: 10px; font-weight: 750; letter-spacing: 1.6px; margin: 0 0 5px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 20px; letter-spacing: -.2px; }
.subtitle { color: var(--muted); font-size: 12px; margin-top: 4px; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.key-state, .mode-tag { border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 11px; padding: 5px 9px; white-space: nowrap; }
.mode-tag.accent { color: var(--coral); border-color: #f2c7b9; background: var(--soft-coral); }
.page { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0 60px; }
.auth-gate { min-height: calc(100vh - 90px); display: grid; place-items: center; padding: 28px 16px 60px; }
.auth-card { width: min(430px, 100%); padding: 26px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.auth-card h2 { font-size: 25px; margin: 5px 0 10px; }
.auth-card > p:not(.eyebrow):not(.status-line) { color: var(--muted); line-height: 1.6; font-size: 13px; margin-bottom: 20px; }
.auth-card > a { display: inline-block; color: var(--teal); font-size: 12px; margin-top: 8px; }
.auth-form { display: grid; gap: 14px; }
.auth-form .btn { width: 100%; }
.hero-band { display: flex; justify-content: space-between; align-items: end; gap: 30px; padding: 14px 0 30px; }
.hero-band h2 { font-size: clamp(25px, 4vw, 39px); letter-spacing: -1.5px; line-height: 1.08; max-width: 610px; }
.hero-band p:not(.eyebrow) { color: var(--muted); line-height: 1.65; max-width: 650px; margin-top: 12px; }
.hero-note { width: 270px; padding: 13px 15px; border-left: 3px solid var(--coral); background: var(--soft-coral); color: #7c4434; font-size: 12px; line-height: 1.55; }
.hero-note strong, .hero-note span { display: block; }
.hero-note span { margin-top: 4px; }
.workspace-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.tool-panel, .history-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.tool-panel { padding: 20px; }
.history-panel { margin-top: 18px; padding: 18px 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 18px; }
.panel-head > div { display: flex; align-items: center; gap: 10px; }
.panel-head h3 { font-size: 17px; }
.step { font-size: 11px; color: var(--teal); font-weight: 800; letter-spacing: 1px; }
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.form-stack label { color: var(--muted); font-size: 12px; font-weight: 600; }
.form-row { display: grid; grid-template-columns: 1.3fr .7fr; gap: 12px; }
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }
.optional { color: #9ca8a4; font-weight: 400; }
.upload-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.file-field { min-width: 0; }
.file-field input[type="file"] { padding: 8px; font-size: 11px; }
.upload-btn { white-space: nowrap; padding-inline: 11px; }
.upload-status { min-height: 18px; color: var(--muted); font-size: 11px; margin-top: -8px; }
.upload-status.ok { color: var(--teal); }
.upload-status.error { color: #bb4930; }
.field-note { color: #9ca8a4; font-size: 11px; display: block; text-align: right; margin-top: 4px; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 7px; padding: 9px 13px; color: var(--ink); background: var(--panel); text-decoration: none; cursor: pointer; font-weight: 650; font-size: 12px; }
.btn:hover { border-color: var(--teal); color: var(--teal-dark); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; margin-top: 2px; }
.btn.primary:hover { background: var(--teal-dark); color: #fff; }
.btn.ghost { background: transparent; }
.btn-arrow { font-size: 16px; line-height: 10px; }
.status-line { min-height: 22px; color: var(--muted); font-size: 12px; margin-top: 12px; }
.status-line.ok { color: var(--teal); }
.status-line.error { color: #bb4930; }
.empty-state { color: #899690; font-size: 12px; border: 1px dashed var(--line); border-radius: 7px; padding: 19px; text-align: center; }
.image-results, .video-result { margin-top: 3px; min-height: 112px; }
.image-results:not(.empty-state), .video-result:not(.empty-state) { border: 0; padding: 0; text-align: left; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.image-card { border: 1px solid var(--line); background: #fafcf9; border-radius: 7px; overflow: hidden; }
.image-card img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #eff3ef; }
.result-links { display: flex; gap: 10px; padding: 8px 9px; font-size: 11px; }
.result-links a, .text-btn { color: var(--teal); text-decoration: none; }
.text-btn { border: 0; background: none; cursor: pointer; font-size: 11px; padding: 4px; }
.video-result video { display: block; max-width: 100%; width: 100%; max-height: 440px; background: #101917; border-radius: 7px; }
.video-links { display: flex; gap: 12px; margin-top: 9px; font-size: 12px; }
.task-history { display: grid; gap: 8px; }
.task-history.empty-state { display: block; }
.task-row { display: grid; grid-template-columns: minmax(120px, 1fr) 100px 90px minmax(90px, 160px) auto; align-items: center; gap: 12px; border-bottom: 1px solid #edf1ed; padding: 10px 0; font-size: 12px; }
.task-row:last-child { border-bottom: 0; }
.task-id { color: var(--muted); font-family: Consolas, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-status { color: var(--teal); font-weight: 650; }
.task-status.failed { color: #bb4930; }
.task-time { color: #899690; }
.task-row button { border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--teal); padding: 5px 8px; cursor: pointer; font-size: 11px; }
@media (max-width: 860px) { .workspace-grid { grid-template-columns: 1fr; } .hero-band { align-items: start; flex-direction: column; } .hero-note { width: 100%; } }
@media (max-width: 600px) { .topbar { align-items: start; flex-direction: column; } .nav-actions { width: 100%; justify-content: space-between; } .page { width: min(100% - 22px, 1180px); padding-top: 20px; } .tool-panel, .history-panel { padding: 15px; } .form-row, .form-row.three { grid-template-columns: 1fr; } .task-row { grid-template-columns: 1fr 1fr; gap: 7px 10px; } .task-row button { justify-self: start; } }
