:root {
  color-scheme: light;
  --ink: #17201c;
  --muted: #69756f;
  --line: #dfe6e1;
  --paper: #fbfcf9;
  --green: #16865b;
  --green-dark: #0c6542;
  --soft: #edf6f0;
  --danger: #b3261e;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 5%, rgba(22,134,91,.12), transparent 32rem),
    radial-gradient(circle at 95% 90%, rgba(204,176,113,.14), transparent 30rem),
    #f3f6f1;
}
button, input { font: inherit; }
.hidden { display: none !important; }
.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 56px 0 80px; }
.login-card {
  width: min(440px, 100%); margin: 8vh auto 0; padding: 42px;
  border: 1px solid rgba(255,255,255,.8); border-radius: 28px; background: rgba(251,252,249,.9);
  box-shadow: 0 28px 80px rgba(38,58,47,.12); backdrop-filter: blur(18px);
}
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; color: white; background: var(--green); font: 700 24px/1 serif; }
.eyebrow { margin: 18px 0 7px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
h1, h2 { margin: 0; letter-spacing: -.03em; }
h1 { font-size: clamp(28px, 4vw, 42px); }
h2 { font-size: 22px; }
.muted { color: var(--muted); line-height: 1.65; }
form { margin-top: 28px; }
label { display: grid; gap: 8px; margin: 0 0 18px; font-size: 13px; font-weight: 700; }
input {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  color: var(--ink); background: white; outline: none; transition: border .2s, box-shadow .2s;
}
input:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(22,134,91,.1); }
button {
  border: 0; border-radius: 12px; padding: 12px 17px; color: white; background: var(--green);
  font-weight: 750; cursor: pointer; transition: transform .15s, background .15s, opacity .15s;
}
button:hover { background: var(--green-dark); transform: translateY(-1px); }
button:disabled { cursor: not-allowed; opacity: .5; transform: none; }
form > button { width: 100%; }
.ghost { width: auto; color: var(--ink); background: transparent; border: 1px solid var(--line); }
.ghost:hover { background: white; }
.secondary { width: auto; color: var(--green-dark); background: var(--soft); }
.secondary:hover { color: white; background: var(--green); }
.error { min-height: 20px; color: var(--danger); font-size: 13px; }
.topbar { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.topbar .eyebrow, .card-head .eyebrow { margin-top: 0; }
.grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 22px; }
.card { padding: 28px; border: 1px solid rgba(255,255,255,.9); border-radius: 22px; background: rgba(251,252,249,.94); box-shadow: 0 14px 45px rgba(38,58,47,.07); }
.card-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.badge { padding: 7px 10px; border-radius: 999px; color: #795d13; background: #fff2c6; font-size: 12px; font-weight: 800; }
.badge.valid { color: #09613e; background: #d9f5e5; }
.badge.expired, .badge.missing { color: #922c25; background: #fee5e2; }
.qr-wrap { margin-top: 22px; padding: 18px; text-align: center; border-radius: 16px; background: white; border: 1px solid var(--line); }
.qr-wrap img { display: block; width: min(240px, 100%); min-height: 180px; object-fit: contain; margin: 0 auto; }
.qr-wrap p { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
fieldset { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; padding: 0; border: 0; }
legend { margin-bottom: 10px; font-size: 13px; font-weight: 700; }
.check { display: flex; align-items: center; gap: 7px; margin: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.check input { width: auto; margin: 0; accent-color: var(--green); }
.history-card { margin-top: 22px; }
.jobs { display: grid; gap: 12px; margin-top: 22px; }
.job { display: grid; grid-template-columns: 1.4fr .8fr 1fr; gap: 16px; align-items: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.job-id { overflow-wrap: anywhere; font-weight: 750; }
.job-meta, .job-time { color: var(--muted); font-size: 12px; }
.job-status { font-size: 13px; font-weight: 800; }
.job-status.completed { color: var(--green); }
.job-status.failed { color: var(--danger); }
.downloads { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.downloads a { padding: 8px 10px; border-radius: 9px; color: var(--green-dark); background: var(--soft); font-size: 12px; font-weight: 750; text-decoration: none; }
.empty { margin-top: 22px; padding: 34px; color: var(--muted); text-align: center; border: 1px dashed var(--line); border-radius: 14px; }
@media (max-width: 760px) {
  .shell { padding-top: 28px; }
  .grid { grid-template-columns: 1fr; }
  .job { grid-template-columns: 1fr; }
  .downloads { justify-content: flex-start; }
  .login-card, .card { padding: 23px; }
}
