:root {
  --ink: #20241f;
  --muted: #686d67;
  --paper: #f5f2eb;
  --surface: #ffffff;
  --line: #d8d4cb;
  --green: #284e3f;
  --green-hover: #1f4033;
  --green-soft: #e9f0ec;
  --rust: #9a432c;
  --rust-soft: #fff1e9;
  --gold: #ad8a53;
  --shadow: 0 18px 60px rgba(38, 42, 37, 0.07);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, .dropzone:focus-visible {
  outline: 3px solid rgba(40, 78, 63, 0.28);
  outline-offset: 3px;
}

.app { min-height: 100vh; background: var(--paper); }
.header {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4.3vw;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 242, 235, 0.96);
}
.brand { display: flex; align-items: baseline; gap: 18px; min-width: 0; }
.wordmark {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  letter-spacing: 0.095em;
  font-weight: 600;
  white-space: nowrap;
}
.portal-label { color: var(--muted); font-size: 13px; white-space: nowrap; }
.account { display: flex; align-items: center; gap: 20px; color: var(--muted); font-size: 13px; }
.account strong { color: var(--ink); font-weight: 600; }
.help { color: var(--green); font-weight: 700; text-decoration: none; }
.initials {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #faf8f4;
  font-weight: 700;
  color: var(--green);
}

.stepbar {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  background: #faf8f4;
}
.step { display: flex; align-items: center; gap: 10px; color: #8d908b; font-size: 13px; font-weight: 650; }
.step + .step::before {
  content: "";
  display: block;
  width: clamp(40px, 7.8vw, 112px);
  height: 1px;
  background: #cbc7bf;
  margin: 0 16px;
}
.dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid #bbb8b1;
  background: white;
  color: #868984;
  font-size: 12px;
}
.step.done { color: var(--green); }
.step.done .dot { background: var(--green); border-color: var(--green); color: white; }
.step.active { color: var(--ink); }
.step.active .dot { border: 2px solid var(--green); color: var(--green); font-weight: 750; }

.main { padding: 44px clamp(24px, 5vw, 72px) 56px; }
.frame { width: min(1080px, 100%); margin: 0 auto; }
.eyebrow { color: var(--green); font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 4vw, 48px); line-height: 1.08; margin: 12px 0; font-weight: 500; letter-spacing: -0.025em; }
h2 { font-family: Georgia, "Times New Roman", serif; font-size: 28px; margin: 0 0 8px; font-weight: 500; }
h3 { margin: 0; font-size: 18px; font-weight: 700; }
p { margin: 0; line-height: 1.55; }
.lede { color: var(--muted); font-size: 18px; max-width: 720px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.primary, .secondary {
  border-radius: 10px;
  font-weight: 700;
  padding: 14px 22px;
  min-height: 50px;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.primary { border: 0; background: var(--green); color: white; min-width: 180px; }
.primary:hover { background: var(--green-hover); }
.primary:active, .secondary:active { transform: translateY(1px); }
.primary:disabled { opacity: 0.55; cursor: not-allowed; }
.secondary { border: 1px solid var(--green); background: white; color: var(--green); }
.quiet-link { color: var(--green); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.footer-note { color: var(--muted); font-size: 13px; }
.pill { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 7px 11px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pill.warn { background: var(--rust-soft); color: var(--rust); }
.pill.ok { background: var(--green-soft); color: var(--green); }
.check { color: var(--green); font-weight: 800; }
.error-banner { margin: 0 auto 20px; width: min(1080px, 100%); padding: 14px 18px; border-radius: 12px; background: var(--rust-soft); color: #713b2a; }

.signin {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 24px;
  background: var(--paper);
  position: relative;
  overflow: hidden;
}
.signin::before, .signin::after { content: ""; position: absolute; background: var(--gold); opacity: 0.6; }
.signin::before { width: 1px; height: 75vh; left: 10.7vw; top: 12vh; }
.signin::after { height: 1px; width: 48vw; left: 26vw; bottom: 9.5vh; }
.signin-wrap { width: min(520px, 100%); text-align: center; position: relative; z-index: 2; }
.signin .wordmark { font-size: 27px; display: block; margin-bottom: 13px; }
.signin-title { font-family: Georgia, "Times New Roman", serif; font-size: 38px; margin: 32px 0 8px; font-weight: 500; }
.signin-sub { color: var(--muted); margin-bottom: 30px; }
.signin-card { padding: 30px; text-align: left; }
label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
input[type="email"], input[type="text"] {
  width: 100%;
  height: 52px;
  border: 1px solid #bbb8b0;
  border-radius: 10px;
  background: white;
  padding: 0 15px;
  color: var(--ink);
  margin-bottom: 16px;
}
.signin-card .primary { width: 100%; }
.auth-reset {
  display: block;
  width: 100%;
  margin-top: 14px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.secure-note { color: var(--muted); font-size: 13px; margin-top: 16px; text-align: center; }
.signin-help { margin-top: 24px; color: var(--muted); font-size: 14px; }

.welcome-grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 26px; margin-top: 34px; }
.batch-card { padding: 28px; min-height: 310px; }
.batch-top { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.batch-meta { color: var(--muted); font-size: 14px; margin-top: 5px; }
.batch-status { margin: 28px 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.status-line { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.status-line strong { font-size: 20px; text-align: right; }
.side-note { padding: 28px; min-height: 310px; background: #ede9df; border-color: #ded8ca; box-shadow: none; }
.side-note p { color: #5f625d; margin-top: 16px; }
.side-note .help-call { border-top: 1px solid #d2ccbf; margin-top: 42px; padding-top: 18px; font-weight: 700; color: var(--green); }

.upload-card { margin-top: 30px; padding: 30px; }
.dropzone {
  height: 210px;
  border: 1.5px dashed #aaa69e;
  border-radius: 16px;
  background: #fbfaf7;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
}
.dropzone.dragging { border-color: var(--green); background: var(--green-soft); }
.dropzone.selected { border-style: solid; border-color: var(--green); }
.upload-symbol { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; margin: 0 auto 13px; color: var(--green); font-size: 24px; }
.dropzone strong { color: var(--ink); font-size: 18px; display: block; margin-bottom: 5px; }
.action-row { margin-top: 23px; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.checking-card { margin-top: 34px; padding: 34px 40px; }
.checking-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.progress-number { font-family: Georgia, "Times New Roman", serif; font-size: 58px; color: var(--green); }
.progress-track { height: 8px; border-radius: 8px; background: #e1dfd9; margin: 26px 0 28px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--green); animation: checking 1.2s ease-in-out infinite alternate; }
@keyframes checking { from { width: 52%; } to { width: 84%; } }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 36px; }
.check-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid #ece9e2; }
.check-item .state { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); font-weight: 800; }
.check-item.pending .state { background: #f0eee8; color: #858983; }
.receipt { margin-top: 24px; padding: 15px 18px; background: #f1f4f2; border-left: 3px solid var(--green); color: #525952; font-size: 14px; }

.correction-layout { display: grid; grid-template-columns: 330px 1fr; gap: 26px; margin-top: 28px; }
.issue-list { padding: 18px; box-shadow: none; }
.issue-item { width: 100%; padding: 16px; border-radius: 12px; margin-bottom: 8px; border: 1px solid transparent; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.issue-item.active { background: var(--rust-soft); border-color: #e5b9a5; }
.issue-item .num { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.issue-item strong { display: block; margin-top: 5px; font-size: 15px; }
.issue-item span { color: var(--rust); font-size: 13px; }
.fix-card { padding: 30px; }
.fix-card .product { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.field-box { margin: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; display: grid; grid-template-columns: 180px 1fr; gap: 12px 18px; }
.field-box dt { color: var(--muted); font-size: 13px; }
.field-box dd { margin: 0; font-weight: 650; }
.fix-guidance { background: var(--rust-soft); padding: 16px 18px; border-radius: 12px; color: #713b2a; line-height: 1.5; }
.fix-actions { margin-top: 24px; display: flex; justify-content: space-between; align-items: center; gap: 18px; }

.review-grid { display: grid; grid-template-columns: 1fr 330px; gap: 26px; margin-top: 28px; }
.products { padding: 22px 26px; box-shadow: none; }
.product-row { display: grid; grid-template-columns: 52px 1fr 150px 90px; align-items: center; gap: 16px; padding: 15px 0; border-bottom: 1px solid #ece9e2; }
.product-row:last-child { border-bottom: 0; }
.thumb { width: 48px; height: 48px; border-radius: 10px; background: #ded9cf; display: grid; place-items: center; font-family: Georgia, serif; color: #6d665c; }
.product-name strong { display: block; font-size: 15px; }
.product-name span, .product-row .sub { color: var(--muted); font-size: 13px; }
.summary-card { padding: 26px; align-self: start; }
.summary-stat { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
.summary-stat span { color: var(--muted); }
.summary-stat strong { font-size: 18px; }
.summary-card .primary { width: 100%; margin-top: 26px; }
.terms { margin-top: 12px; font-size: 12px; color: var(--muted); line-height: 1.45; }

.submitted-wrap { width: min(870px, 100%); margin: 0 auto; text-align: center; }
.success-mark { width: 70px; height: 70px; border-radius: 50%; background: var(--green); color: white; display: grid; place-items: center; font-size: 32px; margin: 0 auto 20px; }
.confirmation { margin-top: 28px; padding: 25px 30px; text-align: left; }
.confirmation-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 24px; text-align: center; }
.milestone { position: relative; padding-top: 28px; color: var(--muted); font-size: 13px; }
.milestone::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 1px; background: #c9c6bf; }
.milestone:first-child::before { left: 50%; }
.milestone:last-child::before { right: 50%; }
.milestone .m-dot { position: absolute; top: 2px; left: calc(50% - 8px); width: 16px; height: 16px; border-radius: 50%; background: white; border: 2px solid #aaa79f; }
.milestone.done .m-dot { background: var(--green); border-color: var(--green); }
.milestone.active .m-dot { background: white; border-color: var(--green); box-shadow: 0 0 0 4px #e4ece8; }
.milestone strong { display: block; color: var(--ink); font-size: 14px; margin-bottom: 4px; }
.confirmation-actions { margin-top: 26px; display: flex; justify-content: center; gap: 12px; }

@media (max-width: 800px) {
  .header { height: auto; min-height: 72px; padding: 16px 20px; }
  .portal-label, .account strong, .help { display: none; }
  .wordmark { font-size: 17px; }
  .stepbar { height: 62px; padding: 0 16px; }
  .step { gap: 6px; font-size: 0; }
  .step + .step::before { width: clamp(26px, 9vw, 64px); margin: 0 8px; }
  .main { padding: 30px 20px 44px; }
  h1 { font-size: 38px; }
  .welcome-grid, .correction-layout, .review-grid { grid-template-columns: 1fr; }
  .side-note { min-height: 0; }
  .checks { grid-template-columns: 1fr; }
  .action-row, .fix-actions, .confirmation-head { align-items: stretch; flex-direction: column; }
  .action-row .primary, .fix-actions .primary { width: 100%; }
  .products { padding: 12px 18px; }
  .product-row { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 7px 10px; padding: 14px 0; }
  .product-row .thumb { width: 40px; height: 40px; grid-column: 1; grid-row: 1 / 3; }
  .product-row .product-name { grid-column: 2; grid-row: 1; min-width: 0; }
  .product-row .pill { grid-column: 3; grid-row: 1; }
  .product-row .sub { grid-column: 2 / 4; grid-row: 2; }
  .field-box { grid-template-columns: 1fr; gap: 5px; }
  .field-box dd { margin-bottom: 10px; }
  .confirmation-actions { flex-direction: column; }
  .confirmation-actions button, .confirmation-actions a { width: 100%; }
}

@media (max-width: 360px) {
  .primary, .secondary { min-width: 0; padding-left: 12px; padding-right: 12px; font-size: 15px; }
  .review-grid { gap: 18px; }
  .summary-card { padding: 22px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; }
}
