:root {
  color-scheme: light;
  --ink: #181d26;
  --body: #333840;
  --muted: #41454d;
  --hairline: #dddddd;
  --border-strong: #9297a0;
  --canvas: #ffffff;
  --soft: #f8fafc;
  --strong: #e0e2e6;
  --dark: #181d26;
  --dark-active: #0d1218;
  --coral: #aa2d00;
  --forest: #0a2e0e;
  --cream: #f5e9d4;
  --peach: #fcab79;
  --mint: #a8d8c4;
  --yellow: #f4d35e;
  --link: #1b61c9;
  --success: #006400;
  --success-bg: #edf8ef;
  --danger: #9e2632;
  --danger-bg: #fff0f1;
  --warning: #8a5400;
  --warning-bg: #fff7df;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--body);
  background: var(--canvas);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.muted {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.auth-page {
  background: var(--canvas);
}

.auth-shell {
  width: min(1280px, calc(100% - 96px));
  min-height: calc(100vh - 92px);
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  align-items: center;
  gap: 80px;
  padding: 96px 0 64px;
}

.brand-panel {
  position: relative;
  max-width: 680px;
}

.brand-panel::after {
  content: "";
  display: block;
  width: min(520px, 100%);
  height: 178px;
  margin-top: 48px;
  border-radius: 12px;
  background: var(--coral);
}

.brand-mark,
.logo span {
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  font-weight: 500;
}

.brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  margin-bottom: 32px;
}

.brand-panel h1 {
  max-width: 760px;
  margin: 0 0 24px;
  color: var(--ink);
  font-size: 48px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0;
}

.brand-panel > p:not(.eyebrow) {
  max-width: 580px;
  margin: 0;
  color: var(--body);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
}

.feature-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 32px 0 0;
}

.feature-list li {
  min-height: 112px;
  padding: 16px;
  border-radius: 10px;
  color: var(--ink);
  background: var(--cream);
  font-size: 14px;
  line-height: 1.4;
}

.feature-list li:nth-child(2) {
  background: var(--mint);
}

.feature-list li:nth-child(3) {
  background: var(--yellow);
}

.feature-list li::before {
  content: "";
  display: block;
  width: 28px;
  height: 4px;
  margin-bottom: 24px;
  border-radius: 999px;
  background: var(--ink);
}

.auth-card,
.panel {
  border: 1px solid var(--hairline);
  background: var(--canvas);
  border-radius: 12px;
}

.auth-card {
  padding: 32px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--canvas);
}

.tab {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.tab.is-active {
  background: var(--dark);
  color: #fff;
  font-weight: 500;
}

.auth-card h2 {
  margin: 32px 0 8px;
  color: var(--ink);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
}

.auth-card form {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 12px 16px;
  background: var(--canvas);
  color: var(--ink);
  font-size: 14px;
  outline: 0;
}

input:focus {
  border-color: #458fff;
  box-shadow: 0 0 0 2px rgba(69, 143, 255, 0.16);
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 24px;
  color: var(--ink);
  background: var(--canvas);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
}

.button:disabled {
  color: var(--border-strong);
  cursor: not-allowed;
}

.button.primary {
  background: var(--dark);
  color: #fff;
}

.button.primary:hover:not(:disabled),
.button.primary:active:not(:disabled) {
  background: var(--dark-active);
}

.button.ghost {
  border-color: var(--hairline);
  background: var(--canvas);
}

.full {
  width: 100%;
  margin-top: 12px;
}

.message {
  display: none;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.55;
}

.message.show {
  display: block;
}

.message.error {
  background: var(--danger-bg);
  color: var(--danger);
}

.message.success {
  background: var(--success-bg);
  color: var(--success);
}

.fine-print {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: center;
  padding: 24px 48px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.site-footer a {
  color: var(--link);
}

.site-header {
  position: sticky;
  z-index: 5;
  top: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(48px, calc((100vw - 1280px) / 2));
  border-bottom: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.logo span {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 12px;
}

.header-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.page-wrap {
  width: min(1280px, calc(100% - 96px));
  margin: 0 auto 96px;
}

.hero {
  padding: 96px 0 48px;
}

.hero.compact {
  position: relative;
  min-height: 330px;
  padding-right: min(46vw, 560px);
}

.hero.compact::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 48px;
  width: min(38vw, 460px);
  min-height: 210px;
  border-radius: 12px;
  background: var(--forest);
}

.hero.compact h1 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
}

.hero p:last-child {
  max-width: 580px;
  margin: 0;
  color: var(--body);
  font-size: 16px;
  line-height: 1.5;
}

.panel {
  padding: 32px;
}

.submit-panel {
  background: var(--soft);
}

.task-form {
  display: grid;
  grid-template-columns: 1fr 1.6fr auto;
  gap: 18px;
  align-items: end;
}

.field {
  display: grid;
  gap: 8px;
}

.field small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 64px 0 16px;
}

.section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
}

.table-panel {
  padding: 0;
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
  line-height: 1.35;
}

th {
  color: var(--ink);
  background: var(--cream);
  font-size: 13px;
  font-weight: 500;
}

tr:last-child td {
  border-bottom: 0;
}

.status {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--strong);
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
}

.status.done {
  background: var(--success-bg);
  color: var(--success);
}

.status.failed {
  background: var(--danger-bg);
  color: var(--danger);
}

.status.working {
  background: var(--warning-bg);
  color: var(--warning);
}

.empty {
  padding: 45px !important;
  color: var(--muted);
  text-align: center !important;
}

.refresh-note {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--muted);
  font-size: 13px;
}

.report-page {
  background: var(--soft);
}

.report-wrap {
  height: calc(100vh - 113px);
  background: var(--soft);
}

.report-state {
  height: 100%;
  display: grid;
  place-content: center;
  padding: 30px;
  color: var(--ink);
  text-align: center;
}

.report-state h1 {
  margin: 18px 0 8px;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
}

.report-state p {
  margin: 0;
  color: var(--muted);
}

.spinner {
  width: 34px;
  height: 34px;
  margin: auto;
  border: 3px solid var(--hairline);
  border-top-color: var(--dark);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.report-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

@media (max-width: 900px) {
  .auth-shell,
  .page-wrap {
    width: min(100% - 32px, 1280px);
  }

  .auth-shell,
  .hero.compact {
    min-height: 0;
    padding-right: 0;
  }

  .hero.compact::after {
    position: static;
    display: block;
    width: 100%;
    min-height: 150px;
    margin-top: 32px;
  }

  .task-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .auth-shell {
    min-height: calc(100vh - 85px);
    padding: 48px 0 32px;
  }

  .brand-panel h1 {
    font-size: 40px;
  }

  .brand-panel::after {
    height: 128px;
    margin-top: 32px;
  }

  .feature-list {
    grid-template-columns: 1fr;
  }

  .feature-list li {
    min-height: 84px;
  }

  .auth-card,
  .panel {
    padding: 24px;
  }

  .site-header {
    padding: 0 16px;
  }

  .header-actions .muted {
    display: none;
  }

  .page-wrap {
    margin-bottom: 64px;
  }

  .hero {
    padding: 56px 0 32px;
  }

  .hero.compact h1 {
    font-size: 32px;
  }

  .section-heading {
    margin-top: 48px;
  }

  .table-panel {
    padding: 0;
  }

  .report-wrap {
    height: calc(100vh - 113px);
  }
}
