:root {
  color-scheme: light;
  --ink: #18201c;
  --muted: #66706a;
  --soft: #f4f1e9;
  --panel: rgba(255, 255, 255, 0.84);
  --line: rgba(24, 32, 28, 0.12);
  --brand: #215b45;
  --brand-strong: #174634;
  --brand-soft: #e4efe9;
  --warn: #9a5d16;
  --danger: #9b3434;
  --shadow: 0 24px 70px rgba(25, 42, 33, 0.09);
  --radius: 28px;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    'SF Pro Display',
    'PingFang SC',
    'Microsoft YaHei',
    sans-serif;
  background: var(--soft);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(
      circle at 12% 8%,
      rgba(255, 255, 255, 0.92),
      transparent 28rem
    ),
    radial-gradient(
      circle at 88% 14%,
      rgba(208, 227, 216, 0.72),
      transparent 30rem
    ),
    var(--soft);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: transparent;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: inherit;
}

.boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: none;
  padding: 0;
  color: var(--ink);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px 14px 18px 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.45), transparent 38%),
    var(--brand);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.brand-copy strong {
  display: block;
  font-size: 17px;
  letter-spacing: 0.08em;
}

.brand-copy span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav button {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: transparent;
  color: var(--muted);
}

.nav button.active {
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  box-shadow: 0 6px 22px rgba(25, 42, 33, 0.06);
}

.credit-pill {
  padding: 9px 13px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 13px;
  white-space: nowrap;
}

main {
  flex: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 70px;
}

.login-wrap {
  min-height: calc(100vh - 190px);
  display: grid;
  place-items: center;
}

.login-card,
.panel {
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: var(--panel);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.login-card {
  width: min(520px, 100%);
  border-radius: 34px;
  padding: 36px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.login-card h1,
.hero h1 {
  font-weight: 620;
  letter-spacing: -0.035em;
}

.login-card h1 {
  font-size: clamp(34px, 7vw, 52px);
  margin-bottom: 14px;
}

.muted {
  color: var(--muted);
  line-height: 1.75;
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.field label {
  font-size: 13px;
  font-weight: 650;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
  border-radius: 16px;
  padding: 14px 15px;
  outline: none;
  color: var(--ink);
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(33, 91, 69, 0.5);
  box-shadow: 0 0 0 4px rgba(33, 91, 69, 0.08);
}

.field textarea {
  min-height: 126px;
  resize: vertical;
  line-height: 1.65;
}

.primary,
.secondary,
.ghost {
  border-radius: 999px;
  min-height: 46px;
  padding: 0 20px;
  font-weight: 650;
  border: 0;
}

.danger-link {
  border: 0;
  background: transparent;
  color: var(--brand);
  padding: 0;
  min-height: 0;
  font-size: inherit;
  text-decoration: underline;
}

.primary {
  background: var(--brand);
  color: white;
  box-shadow: 0 10px 26px rgba(33, 91, 69, 0.18);
}

.primary:hover:not(:disabled) {
  background: var(--brand-strong);
}

.secondary {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.ghost {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  border: 1px solid var(--line);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.button-row .primary {
  flex: 1 1 220px;
}

.notice {
  margin-top: 18px;
  padding: 13px 15px;
  border-radius: 15px;
  font-size: 13px;
  line-height: 1.55;
}

.notice.error {
  color: var(--danger);
  background: rgba(155, 52, 52, 0.08);
}

.notice.info {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 34px;
  align-items: center;
  min-height: 610px;
}

.hero {
  padding: 28px 4vw 28px 0;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(48px, 6vw, 86px);
  line-height: 0.98;
  margin-bottom: 24px;
}

.hero h1 span {
  color: var(--brand);
}

.hero .lead {
  max-width: 650px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--muted);
}

.trust-row {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.trust-row span,
.tag {
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 12px;
}

.trust-row span {
  background: rgba(255, 255, 255, 0.67);
  border: 1px solid rgba(255, 255, 255, 0.72);
  color: #4b5750;
}

.panel {
  border-radius: var(--radius);
  padding: 26px;
}

.step-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.step-kicker {
  color: var(--brand);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.step-head h2 {
  margin: 5px 0 0;
  font-size: 27px;
  letter-spacing: -0.025em;
}

.step-count {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.dropzone {
  min-height: 320px;
  border: 1.5px dashed rgba(33, 91, 69, 0.32);
  border-radius: 22px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.78),
    rgba(243, 247, 244, 0.72)
  );
  display: grid;
  place-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.dropzone.has-photo {
  border-style: solid;
  background: #e9ece9;
}

.dropzone input[type='file'] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin: 0 auto 15px;
  border-radius: 18px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 24px;
}

.dropzone strong {
  display: block;
  margin-bottom: 8px;
}

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

.photo-preview {
  width: 100%;
  height: 100%;
  min-height: 320px;
  max-height: 530px;
  object-fit: contain;
  display: block;
}

.replace-photo {
  position: absolute;
  right: 14px;
  bottom: 14px;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 12px;
  box-shadow: 0 8px 26px rgba(20, 34, 27, 0.12);
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.consent input {
  margin-top: 3px;
}

.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mode-card {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 19px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink);
}

.mode-card.selected {
  border-color: rgba(33, 91, 69, 0.48);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(33, 91, 69, 0.08);
}

.mode-card strong,
.mode-card span {
  display: block;
}

.mode-card span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
  color: #4f5a54;
}

.summary {
  display: grid;
  gap: 12px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.summary-row:last-child {
  border-bottom: 0;
}

.summary-row span {
  color: var(--muted);
  font-size: 13px;
}

.summary-row strong {
  text-align: right;
  max-width: 66%;
}

.processing {
  width: min(760px, 100%);
  margin: 70px auto 0;
  text-align: center;
}

.orbit {
  width: 110px;
  height: 110px;
  margin: 12px auto 30px;
  border-radius: 50%;
  position: relative;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.96) 0 42%,
    transparent 43%
  );
  box-shadow: inset 0 0 0 1px var(--line);
}

.orbit::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 3px solid transparent;
  border-top-color: var(--brand);
  border-right-color: rgba(33, 91, 69, 0.25);
  animation: spin 1.3s linear infinite;
}

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

.progress-meta {
  width: min(500px, 100%);
  margin: 26px auto 0;
  text-align: left;
  border-top: 1px solid var(--line);
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.7fr);
  gap: 24px;
  align-items: start;
}

.result-media {
  min-height: 560px;
  display: grid;
  place-items: center;
  background: #e7e9e6;
  border-radius: 25px;
  overflow: hidden;
}

.result-media img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  display: block;
}

.result-side {
  position: sticky;
  top: 20px;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  gap: 4px;
  border-radius: 999px;
  background: rgba(24, 32, 28, 0.06);
  margin: 18px 0;
}

.segmented button {
  border: 0;
  border-radius: 999px;
  padding: 10px;
  color: var(--muted);
  background: transparent;
}

.segmented button.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 4px 16px rgba(20, 34, 27, 0.08);
}

.orders-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.orders-head h1 {
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.order-list {
  display: grid;
  gap: 12px;
}

.order-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  padding: 17px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 34px rgba(25, 42, 33, 0.045);
}

.order-icon {
  width: 56px;
  height: 56px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 22px;
}

.order-main strong {
  display: block;
  margin-bottom: 5px;
}

.order-main small {
  color: var(--muted);
}

.status {
  display: inline-flex;
  margin-top: 8px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(24, 32, 28, 0.06);
  color: var(--muted);
}

.status.completed {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.status.failed {
  background: rgba(155, 52, 52, 0.08);
  color: var(--danger);
}

.empty {
  text-align: center;
  padding: 70px 20px;
}

.empty .upload-icon {
  margin-bottom: 18px;
}

.footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 34px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(24, 32, 28, 0.08);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.footer button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--brand);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(11, 18, 14, 0.42);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal {
  width: min(620px, 100%);
  max-height: min(720px, 88vh);
  overflow: auto;
  background: white;
  border-radius: 26px;
  padding: 28px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.18);
}

.modal h2 {
  margin-bottom: 14px;
}

.modal p,
.modal li {
  color: var(--muted);
  line-height: 1.75;
  font-size: 13px;
}

@media (max-width: 860px) {
  .topbar,
  main,
  .footer {
    width: min(100% - 28px, 760px);
  }

  .topbar {
    min-height: 72px;
  }

  .brand-copy span,
  .nav .credit-pill {
    display: none;
  }

  main {
    padding-top: 14px;
  }

  .hero-grid,
  .result-layout {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    min-height: auto;
    gap: 14px;
  }

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

  .hero h1 {
    font-size: clamp(45px, 13vw, 70px);
  }

  .result-side {
    position: static;
  }

  .result-media {
    min-height: 420px;
  }
}

@media (max-width: 560px) {
  .nav button {
    padding: 9px 10px;
  }

  .panel,
  .login-card {
    border-radius: 23px;
    padding: 19px;
  }

  .mode-grid {
    grid-template-columns: 1fr;
  }

  .dropzone,
  .photo-preview {
    min-height: 290px;
  }

  .order-card {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .order-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .order-card .ghost {
    grid-column: 1 / -1;
    width: 100%;
  }

  .footer {
    flex-direction: column;
  }
}
