:root {
  --bg: #f6f8fc;
  --card: #ffffff;
  --text: #151c2b;
  --muted: #6b7280;
  --line: #e5eaf3;
  --blue: #2477ff;
  --blue-soft: #eaf2ff;
  --red: #dc2626;
  --red-soft: #fff1f2;
  --green: #12a15d;
  --green-soft: #eafaf1;
  --yellow: #b7791f;
  --yellow-soft: #fff8e6;
  --shadow: 0 20px 60px rgba(28, 48, 86, 0.08);
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #ffffff 0, var(--bg) 42%, #eef3fb 100%);
}

.topbar {
  width: min(1120px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
}

.brand-logo {
  display: block;
  height: 52px;
  width: auto;
}

.lang {
  display: flex;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 6px 24px rgba(0,0,0,.04);
}

.lang-btn {
  border: 0;
  padding: 8px 13px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.lang-btn.active {
  background: var(--blue);
  color: #fff;
}

.page {
  width: min(620px, calc(100% - 32px));
  margin: 76px auto 48px;
}

.hero { text-align: center; }

.stepper {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 26px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.step {
  padding: 6px 10px;
  border-radius: 999px;
}

.step.active {
  background: var(--blue-soft);
  color: var(--blue);
}

.line {
  width: 18px;
  height: 1px;
  background: #cfd7e6;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 7vw, 54px);
  line-height: .98;
  letter-spacing: -0.04em;
}

h2 {
  margin: 0 0 18px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 18px auto 26px;
  max-width: 520px;
  color: var(--muted);
  line-height: 1.5;
}

.card, .alert {
  text-align: left;
  border-radius: var(--radius);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 26px;
  margin-top: 18px;
}

.label {
  display: block;
  margin-bottom: 9px;
  font-size: 14px;
  font-weight: 700;
}

.input, .textarea {
  width: 100%;
  border: 1px solid #d8deea;
  background: #fbfcff;
  color: var(--text);
  border-radius: 10px;
  padding: 15px 16px;
  font: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.input { height: 54px; }
.textarea { min-height: 126px; resize: vertical; }

.input:focus, .textarea:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(36,119,255,.12);
}

.btn {
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 400;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: transform .12s, opacity .12s, box-shadow .12s;
}

.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .62; cursor: not-allowed; transform: none; }

.primary {
  width: 100%;
  margin-top: 14px;
  color: #fff;
  background: linear-gradient(180deg, #3486ff, #1468f3);
  box-shadow: 0 14px 32px rgba(36,119,255,.24);
}

.soft {
  flex: 1;
  color: var(--blue);
  background: var(--blue-soft);
}

.quick-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.alert {
  padding: 15px 16px;
  margin-top: 14px;
  line-height: 1.45;
  font-size: 14px;
}

.alert strong { display: block; margin-bottom: 3px; }
.info {
  border: 1px solid #bfd8ff;
  background: var(--blue-soft);
  color: #1754b7;
}
.error {
  border: 1px solid #fecdd3;
  background: var(--red-soft);
  color: var(--red);
}
.warn {
  border: 1px solid #fde68a;
  background: var(--yellow-soft);
  color: var(--yellow);
}

.stock-box {
  width: fit-content;
  max-width: 100%;
  margin: 12px 0 0;
  padding: 9px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}
.stock-high { color: var(--green); border-color: #bbf7d0; background: var(--green-soft); }
.stock-low { color: var(--yellow); border-color: #fde68a; background: var(--yellow-soft); }
.stock-none { color: var(--red); border-color: #fecdd3; background: var(--red-soft); }

.micro {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.checkline {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #4b5563;
  font-size: 14px;
  cursor: pointer;
}

.checkline input { width: 16px; height: 16px; margin: 0; flex: 0 0 16px; }

.success-card { text-align: center; }
.success-icon {
  width: 74px;
  height: 74px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  font-size: 42px;
  font-weight: 700;
  box-shadow: 0 18px 36px rgba(18, 161, 93, .22);
}

.summary {
  margin: 18px 0 22px;
  padding: 16px;
  border-radius: 12px;
  background: var(--green-soft);
  color: #11643f;
  text-align: left;
  font-size: 14px;
  line-height: 1.6;
}

.summary .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(18,161,93,.14);
  padding: 8px 0;
}
.summary .row:last-child { border-bottom: 0; }
.summary b { color: #0f5133; }

.hidden { display: none !important; }
.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: #fff;
  animation: spin .8s linear infinite;
}

.cancel-link {
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}

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

@media (max-width: 560px) {
  .topbar { margin-top: 16px; }
  .page { width: min(100% - 24px, 620px); margin-top: 54px; }
  .card { padding: 20px; }
  .quick-actions { flex-direction: column; }
  .soft { width: 100%; }
  .stepper { font-size: 12px; gap: 4px; }
  .line { width: 10px; }
  .brand-logo { height: 40px; }
}

.flow-card {
  padding: 24px;
}

.instruction {
  margin-bottom: 18px;
}

.instruction p {
  margin: 0 0 7px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.text-link {
  color: var(--blue);
  font-size: 14px;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-action {
  font-size: 14px;
  font-weight: 700;
}

.inline-link {
  font-size: 14px;
  font-weight: 400;
}

.step-label {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.step-label strong {
  font-weight: 700;
}

.step-label span {
  font-weight: 400;
}

.hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}

.action-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  margin-top: 18px;
}

.action-row .primary {
  margin-top: 0;
}

.back {
  width: 48px;
  min-width: 48px;
  padding: 0;
  border: 1px solid #cfe0ff;
  color: var(--blue);
  background: #fff;
  box-shadow: 0 10px 22px rgba(36,119,255,.08);
}

.flow-card .textarea {
  min-height: 154px;
}

.flow-card .checkline {
  align-items: center;
  margin-top: 4px;
}

.flow-card .checkline span {
  font-weight: 400;
}
