:root {
  color-scheme: light;
  --ink: #19211d;
  --muted: #69736d;
  --paper: #f5f2e9;
  --panel: rgba(255, 255, 255, 0.86);
  --green: #245c45;
  --green-2: #dceadf;
  --orange: #dc6b2f;
  --red: #b73d35;
  --line: #d8ddd7;
  --shadow: 0 18px 50px rgba(45, 60, 51, 0.10);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(220, 107, 47, .16), transparent 34rem),
    radial-gradient(circle at 100% 18%, rgba(36, 92, 69, .16), transparent 28rem),
    var(--paper);
}
.shell { width: min(1080px, calc(100% - 32px)); margin: 38px auto 80px; }
.hero { display: flex; justify-content: space-between; gap: 30px; align-items: flex-start; padding: 10px 4px 30px; }
.eyebrow { letter-spacing: .22em; font-weight: 800; font-size: 12px; color: var(--orange); margin: 0 0 8px; }
h1 { font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(38px, 6vw, 68px); line-height: .98; margin: 0 0 18px; }
.hero p { color: var(--muted); max-width: 660px; }
.badge { padding: 9px 14px; border-radius: 999px; background: var(--green-2); color: var(--green); font-size: 13px; font-weight: 700; white-space: nowrap; }
.badge.muted { background: #e7e4dc; color: #716f68; }
.panel { display: grid; grid-template-columns: 54px 1fr; gap: 18px; padding: 26px; margin: 16px 0; background: var(--panel); border: 1px solid rgba(255,255,255,.85); border-radius: 22px; box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.step-number { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--green); color: white; font-weight: 800; }
.panel h2 { margin: 5px 0 8px; font-size: 21px; }
.panel p, .helper { color: var(--muted); line-height: 1.65; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.button { appearance: none; border: 0; border-radius: 12px; padding: 11px 17px; font: inherit; font-weight: 750; cursor: pointer; transition: .18s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.03); }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button.primary { background: var(--green); color: #fff; }
.button.secondary { background: var(--green-2); color: var(--green); }
.button.danger { background: var(--orange); color: white; }
.button.stop { background: var(--red); color: white; }
.button.ghost { background: #eceeea; color: #4d5751; }
.form-grid, .upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.login-platform-grid { grid-template-columns: minmax(260px, 420px); }
.operation-options { max-width: 760px; margin: 14px 0 2px; padding: 14px; border: 1px solid #b8d2c0; border-radius: 14px; background: #f4faf5; }
.operation-option-grid { display: grid; grid-template-columns: minmax(240px, 360px) minmax(0, 1fr); gap: 14px; align-items: end; }
.operation-option-title { margin-bottom: 9px; font-size: 13px; font-weight: 700; color: #4e5a53; }
.channel-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.channel-check { display: flex; grid-template-columns: none; align-items: center; gap: 7px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: white; cursor: pointer; }
.channel-check.disabled { color: #919892; background: #f1f2ef; cursor: not-allowed; }
.channel-check input { margin: 0; }
.operation-option-note { margin: 10px 0 0 !important; font-size: 13px; }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; color: #4e5a53; }
select, input[type=file], input[type=text], input[type=number], input[type=time], input[type=datetime-local] { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--ink); font: inherit; }
.file-card { padding: 15px; border: 1px dashed #aeb9b1; border-radius: 14px; background: rgba(255,255,255,.65); }
.file-card small { color: var(--muted); font-weight: 500; }
.file-card > span { font-weight: 800; }
.connected-file { border-style: solid; border-color: #b8d2c0; background: #f4faf5; }
.sheet-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.sheet-chips span { padding: 5px 9px; border-radius: 999px; color: var(--green); background: var(--green-2); font-size: 12px; font-weight: 750; }
.compact-actions { margin-top: 9px; }
.upload-grid.compact { grid-template-columns: minmax(320px, 620px); }
.status-text { color: var(--muted); font-size: 14px; }
.status-text.ok { color: var(--green); font-weight: 700; }
.status-text.warning { color: #a85d18; font-weight: 700; }
.status-text.error { color: var(--red); font-weight: 700; }
.summary { margin-top: 18px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.summary-card { padding: 13px; background: #f3f6f2; border: 1px solid var(--line); border-radius: 13px; }
.summary-card strong { display: block; font-size: 22px; margin-bottom: 4px; }
.summary-card-platforms strong { font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.summary-card span { color: var(--muted); font-size: 12px; }
.hidden { display: none !important; }
.section-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.section-heading p { margin-bottom: 0; }
.heading-actions { justify-content: flex-end; margin-top: 0; }
.wide-content { min-width: 0; }
.tab-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 12px; }
.tab-button { border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; color: var(--muted); background: #fff; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; }
.tab-button.active { color: #fff; background: var(--green); border-color: var(--green); }
.preview-content { min-height: 180px; }
.table-caption { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.table-scroll { overflow: auto; max-height: 520px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
th, td { max-width: 320px; padding: 10px 12px; text-align: left; vertical-align: top; border-right: 1px solid #e8ebe8; border-bottom: 1px solid #e8ebe8; white-space: pre-wrap; word-break: break-word; }
th { position: sticky; top: 0; z-index: 1; color: #fff; background: var(--green); white-space: nowrap; }
tbody tr:nth-child(even) td { background: #f7f9f6; }
.editable-cell { padding: 5px; background: #fafffb !important; }
.cell-editor { width: min(240px, 24vw); min-width: 120px; padding: 7px 8px; border: 1px solid #cbd5ce; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
.cell-editor:focus { outline: 2px solid rgba(36, 92, 69, .22); border-color: var(--green); }
.cell-editor.changed { background: #fff8dc; border-color: #d89a2b; }
.image-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.image-gallery figure { margin: 0; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.image-gallery img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 9px; background: #f3f3f0; }
.image-gallery figcaption { margin-top: 8px; font-size: 13px; font-weight: 700; word-break: break-word; }
.empty-state { padding: 34px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; background: rgba(255,255,255,.55); }
.empty-state.success { color: var(--green); }
.issue-list { display: grid; gap: 9px; }
.issue { display: grid; grid-template-columns: minmax(150px, 230px) 1fr; gap: 14px; padding: 12px 14px; border-radius: 12px; background: #fff7ee; border: 1px solid #f0d2b4; }
.issue.error { background: #fff0ef; border-color: #efc2be; }
.issue.warning { background: #fff9e9; border-color: #ead9a5; }
.progress-track { width: 100%; height: 12px; border-radius: 999px; background: #e5e7e3; overflow: hidden; margin-top: 18px; }
.progress-bar { width: 0; height: 100%; background: linear-gradient(90deg, var(--green), #4f9472); transition: width .3s ease; }
.monitor-row { display: flex; justify-content: space-between; gap: 20px; margin: 12px 0; }
.log-history-controls { display: grid; grid-template-columns: minmax(280px, 1fr) auto minmax(180px, auto); gap: 10px; align-items: end; margin: 14px 0 10px; }
.log-history-controls .button { white-space: nowrap; }
.log-box { min-height: 220px; max-height: 420px; overflow: auto; padding: 16px; color: #d9f4e2; background: #17221c; border-radius: 14px; line-height: 1.6; white-space: pre-wrap; }
.schedule-badge { align-self: flex-start; }
.cron-builder { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: #f7faf7; }
.cron-builder .form-grid { margin-top: 0; }
.cron-fields { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.cron-expression { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: #e9f2eb; color: var(--green); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 750; }
.schedule-list { display: grid; gap: 10px; margin-top: 20px; }
.schedule-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.8); }
.schedule-card h3 { margin: 0 0 6px; font-size: 16px; }
.schedule-card p { margin: 3px 0; font-size: 13px; }
.schedule-card .actions { margin-top: 0; align-self: center; justify-content: flex-end; }
.schedule-status { display: inline-block; margin-right: 8px; padding: 4px 8px; border-radius: 999px; background: #e9ece8; color: #5d665f; font-size: 12px; font-weight: 750; }
.schedule-status.running, .schedule-status.queued { background: #fff1df; color: #9b571a; }
.schedule-status.completed { background: var(--green-2); color: var(--green); }
.schedule-status.failed, .schedule-status.validation_failed, .schedule-status.needs_attention, .schedule-status.needs_login, .schedule-status.missed { background: #f8dedb; color: var(--red); }
.button.small { padding: 8px 11px; border-radius: 9px; font-size: 13px; }
@media (max-width: 760px) {
  .hero { flex-direction: column; }
  .panel { grid-template-columns: 1fr; }
  .form-grid, .upload-grid { grid-template-columns: 1fr; }
  .operation-option-grid { grid-template-columns: 1fr; }
  .summary { grid-template-columns: repeat(2, 1fr); }
  .section-heading { flex-direction: column; }
  .issue { grid-template-columns: 1fr; }
  .cron-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule-card { grid-template-columns: 1fr; }
  .schedule-card .actions { justify-content: flex-start; }
  .log-history-controls { grid-template-columns: 1fr; align-items: stretch; }
}
