:root {
  --ink: #162033;
  --muted: #667085;
  --line: #e5e7eb;
  --paper: #ffffff;
  --soft: #f6f8fb;
  --green: #2f8f46;
  --green-soft: #ecf8e7;
  --blue: #225cc7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.site-shell {
  min-height: 100vh;
}

.site-nav {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--green);
  background: var(--green-soft);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a {
  text-decoration: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
  gap: 48px;
  align-items: center;
  max-width: 1120px;
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: 56px 28px;
}

.eyebrow {
  color: var(--green);
  font-weight: 700;
  margin-bottom: 14px;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: 54px;
  line-height: 1.04;
  letter-spacing: 0;
}

.hero p {
  max-width: 640px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
  margin: 22px 0 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--ink) !important;
  text-decoration: none;
  font-weight: 700;
  background: var(--paper);
}

.button:hover,
.button:focus {
  color: var(--ink) !important;
  border-color: var(--green);
  background: var(--green-soft);
}

.button.primary {
  color: #fff !important;
  border-color: var(--green);
  background: var(--green);
}

.button.primary:hover,
.button.primary:focus {
  color: #fff !important;
  border-color: #287d3d;
  background: #287d3d;
}

.phone-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--soft);
  padding: 16px;
  box-shadow: 0 18px 50px rgba(22, 32, 51, 0.12);
}

.phone-screen {
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
}

.notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 20px;
  font-weight: 700;
}

.upload-visual {
  padding: 34px 24px;
  text-align: center;
}

.upload-box {
  border: 2px dashed #cfd8dc;
  border-radius: 14px;
  padding: 34px 20px;
  background: #fbfcfd;
}

.upload-box strong {
  display: block;
  margin-bottom: 8px;
  font-size: 19px;
}

.upload-box span {
  color: var(--muted);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px 64px;
}

.step {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.step-number {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.step h3 {
  margin: 10px 0 8px;
  font-size: 18px;
}

.step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.print-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 18px 48px;
}

.print-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.print-card-header {
  background: var(--green-soft);
  color: var(--green);
  text-align: center;
  padding: 18px;
  font-size: 22px;
  font-weight: 800;
}

.print-card-body {
  padding: 28px;
}

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

.file-input {
  width: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.field input,
.field select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}

.full-width {
  width: 100%;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero h1 {
    font-size: 40px;
  }

  .steps,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }
}

.status-row {
  margin-bottom: 18px;
}

.status-pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}

.pill-queued {
  background: #eff6ff;
  color: #1d4ed8;
}

.pill-printing {
  background: #fffbeb;
  color: #b45309;
}

.pill-done {
  background: #ecfdf5;
  color: #047857;
}

.pill-failed {
  background: #fef2f2;
  color: #b91c1c;
}

.job-meta {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.job-meta div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.job-meta dt {
  color: var(--muted);
  font-size: 14px;
}

.job-meta dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

.refresh-note {
  text-align: center;
  font-size: 13px;
}

.preview-frame {
  margin: 0 0 18px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  text-align: center;
}

.preview-frame img {
  max-width: 100%;
  max-height: 360px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.preview-missing {
  padding: 40px 10px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.price-row strong {
  font-size: 20px;
}

.back-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 14px;
  text-decoration: none;
}

.qpay-box {
  text-align: center;
}

.qpay-box .qpay-qr {
  width: 220px;
  height: 220px;
  margin: 0 auto 12px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.qpay-box .button {
  margin-bottom: 10px;
}

.receipt-card {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.receipt-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-weight: 800;
}

.receipt-card-heading small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.receipt-card .job-meta {
  margin-bottom: 12px;
  background: #fff;
}
