:root {
  color-scheme: light;
  font-family: "Microsoft YaHei UI", "Segoe UI", sans-serif;
  color: #1f2937;
  background: #eef2f4;
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px max(24px, calc((100vw - 1180px) / 2));
  background: #18353c;
  color: #f8fafc;
}

h1, h2, p { margin: 0; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 18px; }
.eyebrow { margin-bottom: 4px; color: #b8d7c2; font-size: 12px; letter-spacing: 0; }
.service-state, .template-state { border: 1px solid #8ab3a1; padding: 7px 10px; font-size: 13px; white-space: nowrap; }

main { max-width: 1180px; margin: 0 auto; padding: 24px; }
.notice { margin-bottom: 16px; border-left: 4px solid #0e7490; background: #e0f2fe; padding: 12px 14px; color: #164e63; font-size: 14px; }
.workspace { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.panel { border: 1px solid #cbd5df; background: #fff; padding: 20px; }
.convert-panel { margin-top: 16px; }
.panel-heading { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-heading p { margin-top: 6px; color: #64748b; font-size: 13px; line-height: 1.5; }

.form-grid, .convert-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
label { display: grid; gap: 6px; color: #475569; font-size: 13px; }
input, select { min-width: 0; height: 38px; border: 1px solid #94a3b8; border-radius: 4px; padding: 8px 10px; color: #0f172a; background: #fff; font: inherit; }
input:focus, select:focus { outline: 2px solid #0ea5a5; outline-offset: 1px; border-color: #0ea5a5; }
.span-2 { grid-column: span 2; }
.form-actions { display: flex; align-items: end; gap: 8px; }
button { min-height: 38px; border: 1px solid #0f766e; border-radius: 4px; padding: 8px 13px; background: #0f766e; color: #fff; cursor: pointer; font: inherit; }
button:hover { background: #115e59; }
button:disabled { cursor: not-allowed; opacity: .55; }
button.secondary { border-color: #64748b; background: #fff; color: #334155; }
button.secondary:hover { background: #f1f5f9; }

.upload-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; margin-bottom: 12px; }
.meta, .result { margin: 16px 0 0; overflow: auto; max-height: 230px; border: 1px solid #d7e0e7; background: #f8fafc; padding: 12px; color: #334155; font: 12px/1.5 Consolas, monospace; white-space: pre-wrap; }
.account-list { margin-top: 16px; border-top: 1px solid #e2e8f0; }
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e2e8f0; padding: 10px 0; }
.account-row strong { display: block; font-size: 14px; }
.account-row span { display: block; margin-top: 3px; color: #64748b; font-size: 12px; overflow-wrap: anywhere; }
.account-row button { min-height: 32px; border-color: #b91c1c; background: #fff; color: #b91c1c; padding: 5px 8px; font-size: 12px; }
.job-status { margin-top: 16px; border-left: 4px solid #0f766e; background: #ecfdf5; padding: 11px 12px; color: #14532d; font-size: 14px; }

@media (max-width: 760px) {
  .topbar { align-items: flex-start; flex-direction: column; padding: 18px; }
  main { padding: 16px; }
  .workspace, .form-grid, .convert-form { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .upload-row { grid-template-columns: 1fr; }
}
