:root {
  --bg: #f6f1ea;
  --card: #ffffff;
  --ink: #2b2118;
  --muted: #6f6254;
  --wood: #8a5a2b;
  --wood-dark: #6b4220;
  --line: #e2d6c6;
  --ok: #2e7d32;
  --bad: #b3261e;
  --warn: #9a6700;
}
* { box-sizing: border-box; }
html { font-size: 18px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: Vazirmatn, Tahoma, "Segoe UI", sans-serif; line-height: 1.8;
}
a { color: var(--wood-dark); }
.wrap { max-width: 640px; margin: 0 auto; padding: 16px; }

.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: var(--wood-dark); color: #fff; padding: 10px 16px;
}
.topbar a, .link-btn { color: #fff; text-decoration: none; font-weight: bold; }
.brand { font-size: 1.1rem; }
.topbar nav { display: flex; align-items: center; gap: 16px; font-size: 0.95rem; }
.inline { display: inline; margin: 0; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 18px; }
.card h2 { font-size: 1.2rem; margin: 0 0 12px; }
.hero { text-align: center; }
.hero h1 { font-size: 1.4rem; line-height: 1.7; color: var(--wood-dark); margin: 4px 0 14px; }
.how { text-align: right; margin: 0 0 16px; padding-right: 1.4em; }
.hello { font-size: 1.15rem; font-weight: bold; margin: 6px 0 4px; }
.section-title { font-size: 1.1rem; margin: 22px 0 10px; }
.center { text-align: center; }
.empty { text-align: center; color: var(--muted); }

.flash { border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-weight: bold; }
.flash.ok { background: #e8f5e9; color: var(--ok); border: 2px solid var(--ok); }
.alert { background: #fdecea; color: var(--bad); border: 2px solid var(--bad); border-radius: 12px; padding: 14px; margin-bottom: 16px; font-weight: bold; }

.step { margin-bottom: 26px; }
.step h2 { font-size: 1.15rem; margin: 0 0 10px; }
.num {
  display: inline-block; width: 1.8em; height: 1.8em; line-height: 1.8em; text-align: center;
  border-radius: 50%; background: var(--wood); color: #fff; margin-left: 8px; font-size: 0.95rem;
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.filebox {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 26px 12px; text-align: center; cursor: pointer;
  border: 3px dashed var(--wood); border-radius: 16px; background: #fbf7f1;
  font-size: 1.1rem; font-weight: bold; word-break: break-all;
}
.filebox small { font-weight: normal; color: var(--muted); }
.filebox-icon { font-size: 2.2rem; }
.filebox:hover { background: #f3e9db; }

.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { flex: 1 1 45%; }
.choice.small { flex: 1 1 22%; }
.choice input { position: absolute; opacity: 0; }
.choice span {
  display: block; text-align: center; padding: 14px 8px; border: 2px solid var(--line);
  border-radius: 12px; background: #fff; font-size: 1.1rem; cursor: pointer; min-height: 52px;
}
.choice input:checked + span { background: var(--wood); border-color: var(--wood-dark); color: #fff; font-weight: bold; }
.choice input:focus-visible + span { outline: 3px solid #1a73e8; outline-offset: 2px; }

.field { display: block; margin-bottom: 14px; font-weight: bold; }
.input {
  display: block; width: 100%; margin-top: 6px; padding: 14px; font: inherit; font-weight: normal;
  color: var(--ink); border: 2px solid var(--line); border-radius: 12px; background: #fff;
}
.input:focus { outline: 3px solid #1a73e8; border-color: transparent; }
.check { display: block; margin: -4px 0 12px; color: var(--muted); }
.check input { width: 1.2em; height: 1.2em; vertical-align: middle; margin-left: 6px; }

.btn {
  display: block; width: 100%; padding: 16px; margin-top: 10px; font: inherit; font-size: 1.2rem;
  font-weight: bold; text-align: center; text-decoration: none; color: #fff; background: var(--wood);
  border: 0; border-radius: 14px; cursor: pointer;
}
.btn:hover { background: var(--wood-dark); }
.btn:disabled { opacity: 0.7; cursor: wait; }
.btn.secondary { background: #fff; color: var(--wood-dark); border: 2px solid var(--wood); }
.btn.secondary:hover { background: #f3e9db; }

.order-card { display: block; text-decoration: none; color: inherit; }
.order-card:hover { border-color: var(--wood); }
.order-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.order-top strong { font-size: 1.2rem; letter-spacing: 2px; }
.order-meta { margin: 4px 0; }
.order-card small { color: var(--muted); }

.chip { display: inline-block; padding: 2px 12px; border-radius: 999px; font-size: 0.9rem; font-weight: bold; background: #f3e9db; color: var(--wood-dark); }
.chip.ready { background: #e8f5e9; color: var(--ok); }
.chip.rejected { background: #fdecea; color: var(--bad); }
.chip.review { background: #fff4d6; color: var(--warn); }

.status { text-align: center; }
.status-icon { font-size: 3.5rem; }
.status h2 { margin: 4px 0; }
.status.ready h2 { color: var(--ok); }
.status.rejected h2 { color: var(--bad); }
.status-text { margin: 6px 0 14px; }

.steps { list-style: none; display: flex; justify-content: space-between; padding: 0; margin: 14px 0; }
.steps li { flex: 1; text-align: center; color: var(--muted); font-size: 0.9rem; }
.steps li span {
  display: block; width: 2em; height: 2em; line-height: 2em; margin: 0 auto 2px;
  border-radius: 50%; border: 2px solid var(--line); background: #fff;
}
.steps li.done span { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li.current span { background: var(--wood); border-color: var(--wood-dark); color: #fff; }
.steps li.current, .steps li.done { color: var(--ink); font-weight: bold; }

.code-box { background: #fbf7f1; border: 2px dashed var(--wood); border-radius: 12px; padding: 10px; margin: 16px 0; }
.code-box small { display: block; color: var(--muted); }
.code-box strong { font-size: 2rem; letter-spacing: 4px; }
.summary { list-style: none; padding: 0; margin: 0; text-align: right; }
.summary li { padding: 8px 0; border-top: 1px solid var(--line); word-break: break-word; }
.summary span { display: inline-block; min-width: 5em; color: var(--muted); }
.hint, .contact { text-align: center; color: var(--muted); font-size: 0.9rem; }
.contact a { font-weight: bold; }
