:root {
  color-scheme: light;
  --ink: #182235;
  --muted: #697386;
  --line: #dfe5ed;
  --soft: #f5f7fa;
  --paper: #ffffff;
  --brand: #2457d6;
  --brand-dark: #173fa8;
  --brand-soft: #edf3ff;
  --green: #16794b;
  --green-bg: #eaf8f1;
  --yellow: #8a5a08;
  --yellow-bg: #fff6dc;
  --red: #b32929;
  --red-bg: #fff0f0;
  --gray: #5e6776;
  --gray-bg: #eef1f5;
  --shadow: 0 18px 60px rgba(24, 34, 53, .09);
  --radius: 18px;
}

[hidden] { display: none !important; }

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--soft); }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% -5%, rgba(36, 87, 214, .09), transparent 34rem),
    var(--soft);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--brand); }

.site-header {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-weight: 760; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  color: #fff; background: var(--brand); border-radius: 10px;
  box-shadow: 0 7px 18px rgba(36,87,214,.24);
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.user-label { max-width: 260px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.page { width: min(1180px, calc(100% - 36px)); margin: 34px auto 54px; }
.page-narrow { width: min(1040px, calc(100% - 36px)); }
.eyebrow { margin: 0 0 8px; color: var(--brand); font-size: 12px; font-weight: 760; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(27px, 4vw, 39px); line-height: 1.12; letter-spacing: -.035em; }
h2 { margin-bottom: 6px; font-size: 19px; }
.lead { max-width: 760px; margin-bottom: 0; color: var(--muted); font-size: 16px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 24px; }

.card { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { min-width: 0; padding: 24px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.section-head p { margin: 0; color: var(--muted); }
.section-stack { min-width: 0; display: grid; gap: 18px; }
.section-stack > * { min-width: 0; }

.button {
  min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 17px; border: 1px solid transparent; border-radius: 11px;
  font-weight: 700; text-decoration: none; cursor: pointer; transition: .18s ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .55; }
.button-primary { color: #fff; background: var(--brand); box-shadow: 0 8px 20px rgba(36,87,214,.20); }
.button-primary:hover:not(:disabled) { background: var(--brand-dark); }
.button-secondary { color: var(--ink); background: #fff; border-color: var(--line); }
.button-quiet { min-height: 36px; padding: 0 12px; color: var(--muted); background: transparent; border-color: transparent; }
.button-link { min-height: auto; padding: 0; color: var(--brand); background: transparent; }

.field { display: grid; gap: 7px; }
.field label, .field-label { color: #303b4e; font-size: 13px; font-weight: 720; }
.field small { color: var(--muted); }
.input {
  width: 100%; height: 46px; padding: 0 13px; color: var(--ink); background: #fff;
  border: 1px solid #cfd7e3; border-radius: 11px; outline: none; transition: .16s ease;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(36,87,214,.12); }
.input[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 3px rgba(179,41,41,.09); }
.field-error { min-height: 20px; margin: 0; color: var(--red); font-size: 13px; }

.notice { padding: 12px 14px; border-radius: 11px; border: 1px solid; }
.notice[hidden] { display: none; }
.notice-info { color: #244b8d; background: #eff5ff; border-color: #cbdcff; }
.notice-success { color: var(--green); background: var(--green-bg); border-color: #bfe8d2; }
.notice-warning { color: var(--yellow); background: var(--yellow-bg); border-color: #eed99a; }
.notice-error { color: var(--red); background: var(--red-bg); border-color: #efc0c0; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, .88fr) minmax(420px, 1.12fr); }
.auth-panel { display: grid; align-content: center; padding: clamp(28px, 7vw, 90px); background: #fff; }
.auth-copy { display: grid; align-content: center; padding: clamp(28px, 7vw, 96px); color: #fff; background: linear-gradient(145deg, #17367f 0%, #2457d6 58%, #4382ef 100%); }
.auth-copy h1 { max-width: 620px; font-size: clamp(38px, 5vw, 68px); }
.auth-copy p { max-width: 590px; color: rgba(255,255,255,.78); font-size: 17px; }
.proof-list { display: grid; gap: 13px; margin: 34px 0 0; padding: 0; list-style: none; }
.proof-list li { display: flex; align-items: center; gap: 11px; }
.proof-list li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9bc2ff; box-shadow: 0 0 0 6px rgba(255,255,255,.1); }
.auth-card { width: min(440px, 100%); margin: 0 auto; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; margin: 24px 0; background: var(--soft); border-radius: 12px; }
.auth-tab { height: 39px; color: var(--muted); background: transparent; border: 0; border-radius: 9px; cursor: pointer; font-weight: 720; }
.auth-tab[aria-selected="true"] { color: var(--ink); background: #fff; box-shadow: 0 3px 12px rgba(24,34,53,.09); }
.auth-form { display: grid; gap: 15px; }
.auth-form .button { width: 100%; margin-top: 4px; }

.submit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.submit-grid > .field:first-child { grid-column: 1 / -1; }
.file-box { min-height: 116px; display: grid; align-content: center; gap: 5px; padding: 14px; background: var(--soft); border: 1px dashed #bdc7d6; border-radius: 13px; }
.file-box input { width: 100%; color: var(--muted); font-size: 13px; }
.file-box strong { font-size: 13px; }
.submit-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; }
.submit-note { margin: 0; color: var(--muted); font-size: 13px; }

.table-shell { overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; }
.task-table { width: 100%; min-width: 860px; border-collapse: collapse; }
.task-table th, .task-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.task-table th { color: var(--muted); background: var(--soft); font-size: 12px; letter-spacing: .02em; }
.task-table tr:last-child td { border-bottom: 0; }
.task-table td:first-child { width: 185px; }
.empty-state { padding: 46px 20px; text-align: center; color: var(--muted); }
.status { display: inline-flex; align-items: center; min-height: 27px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 760; white-space: nowrap; }
.status-pending { color: #725009; background: #fff2c8; }
.status-running { color: #24509a; background: #e9f1ff; }
.status-done { color: var(--green); background: var(--green-bg); }
.status-failed { color: var(--red); background: var(--red-bg); }
.failure-reason { max-width: 340px; color: var(--red); font-size: 13px; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 14px; }
.pager span { min-width: 86px; color: var(--muted); text-align: center; }

.report-status { display: grid; place-items: center; min-height: 340px; padding: 30px; text-align: center; }
.report-status-inner { max-width: 520px; }
.spinner { width: 38px; height: 38px; margin: 0 auto 18px; border: 3px solid #dfe7f4; border-top-color: var(--brand); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.report-frame { width: 100%; min-height: 900px; background: #fff; border: 0; border-radius: 15px; }
.report-wrap { padding: 10px; }

.legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.decision { padding: 5px 9px; border-radius: 8px; font-size: 12px; font-weight: 720; }
.decision-green { color: var(--green); background: var(--green-bg); }
.decision-yellow { color: var(--yellow); background: var(--yellow-bg); }
.decision-red { color: var(--red); background: var(--red-bg); }
.decision-gray { color: var(--gray); background: var(--gray-bg); }

.site-footer { padding: 25px 18px 34px; color: var(--muted); text-align: center; font-size: 13px; }
.site-footer a { color: inherit; }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-copy { min-height: 360px; order: -1; }
  .auth-panel { padding-block: 46px; }
  .submit-grid { grid-template-columns: 1fr 1fr; }
  .submit-grid .field:first-child { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .site-header { padding: 0 16px; }
  .brand-name { display: none; }
  .user-label { display: none; }
  .page { width: min(100% - 24px, 1180px); margin-top: 24px; }
  .page-heading, .section-head, .submit-actions { align-items: stretch; flex-direction: column; }
  .submit-grid { grid-template-columns: 1fr; }
  .submit-grid .field:first-child { grid-column: auto; }
  .card-body { padding: 18px; }
  .auth-copy { min-height: 315px; }
  .auth-copy h1 { font-size: 38px; }
  .report-wrap { padding: 4px; }
}
