:root {
  color-scheme: light;
  --bg: #f7f7f5;
  --panel: #ffffff;
  --text: #1f1f1f;
  --muted: #6f6f6f;
  --line: #dededb;
  --primary: #111111;
  --primary-hover: #2b2b2b;
  --danger: #b42318;
  --success: #067647;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

.landing-page {
  --bg: #0d0d0e;
  --panel: rgba(18, 18, 18, 0.82);
  --text: #f4f1ea;
  --muted: rgba(244, 241, 234, 0.68);
  --line: rgba(244, 241, 234, 0.16);
  --primary: #f4f1ea;
  --primary-hover: #ffffff;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(9, 9, 10, 0.82), rgba(9, 9, 10, 0.42) 45%, rgba(9, 9, 10, 0.78)),
    linear-gradient(180deg, rgba(9, 9, 10, 0.1), rgba(9, 9, 10, 0.82)),
    url("/assets/sms-bg.jpg") center top / 860px auto fixed;
}

.landing-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 72% 16%, rgba(255, 255, 255, 0.08), transparent 24%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.shell--wide {
  place-items: start center;
}

.panel {
  width: min(100%, 760px);
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.app-panel {
  position: relative;
  width: min(100%, 440px);
  padding: 36px;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.38);
}

.landing-page .app-panel {
  border-color: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
}

.shell--wide .panel {
  width: min(100%, 1120px);
}

.brand-mark {
  margin-bottom: 44px;
  font-size: 15px;
  font-weight: 650;
}

.step {
  display: grid;
  gap: 22px;
}

.panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.eyebrow,
.label,
.muted,
.summary-row span,
.result-line span {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 13px;
}

h1,
h2 {
  margin: 0;
  line-height: 1.2;
}

h1 {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: 0;
}

h2 {
  margin-top: 28px;
  margin-bottom: 12px;
  font-size: 18px;
}

.link {
  color: var(--muted);
  text-decoration: none;
}

.message {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.preset {
  margin-bottom: 20px;
  padding: 12px 14px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.export-box {
  display: grid;
  gap: 10px;
  margin: 20px 0 8px;
}

.export-box textarea {
  min-height: 120px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.form {
  display: grid;
  gap: 14px;
}

.product-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.product-option {
  display: grid;
  gap: 4px;
  min-height: 64px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  text-align: left;
}

.landing-page .product-option {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.product-option:hover {
  background: #f7f7f5;
}

.landing-page .product-option:hover {
  background: rgba(255, 255, 255, 0.1);
}

.product-option--active {
  border-color: #111;
  box-shadow: 0 0 0 1px #111 inset;
}

.landing-page .product-option--active {
  border-color: rgba(255, 255, 255, 0.76);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.76) inset;
}

.product-option small {
  color: var(--muted);
  font-size: 12px;
}

.form--inline {
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) auto;
  align-items: end;
  margin-bottom: 20px;
}

.form label {
  display: grid;
  gap: 8px;
}

.form span,
.label {
  font-size: 13px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 13px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.landing-page input,
.landing-page textarea {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.landing-page input::placeholder,
.landing-page textarea::placeholder {
  color: rgba(244, 241, 234, 0.46);
}

input:focus,
textarea:focus {
  border-color: #8c8c89;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 11px 16px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

.landing-page button {
  color: #101010;
}

button:hover {
  background: var(--primary-hover);
}

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

button.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.landing-page button.secondary,
.landing-page .copy-button {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

button.secondary:hover {
  background: #f2f2ef;
}

.hidden {
  display: none !important;
}

.clean-box {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.meta-line:last-child {
  border-bottom: 0;
}

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

.country-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.flag {
  display: inline-block;
  width: 24px;
  height: 16px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 3px;
}

.flag-fr {
  background: linear-gradient(90deg, #002654 0 33.33%, #fff 33.33% 66.66%, #ce1126 66.66% 100%);
}

.flag-uk {
  background:
    linear-gradient(27deg, transparent 44%, #fff 44% 50%, #c8102e 50% 56%, transparent 56%),
    linear-gradient(153deg, transparent 44%, #fff 44% 50%, #c8102e 50% 56%, transparent 56%),
    linear-gradient(90deg, transparent 42%, #fff 42% 58%, transparent 58%),
    linear-gradient(0deg, transparent 36%, #fff 36% 64%, transparent 64%),
    linear-gradient(90deg, transparent 45%, #c8102e 45% 55%, transparent 55%),
    linear-gradient(0deg, transparent 42%, #c8102e 42% 58%, transparent 58%),
    #012169;
}

.meta-line strong {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 18px;
  text-align: right;
  word-break: break-all;
}

.copy-value {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.copy-button {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

.copy-button:hover {
  background: #f2f2ef;
}

.landing-page button.secondary:hover,
.landing-page .copy-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.status-row,
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.badge {
  display: inline-flex;
  min-width: 92px;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: #efefec;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.badge--success {
  background: #dcfce7;
  color: var(--success);
}

.badge--danger {
  background: #fee4e2;
  color: var(--danger);
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.result-grid > div {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.result-grid strong {
  font-size: 24px;
  word-break: break-all;
}

.table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  background: #f7f7f5;
  color: var(--muted);
  font-weight: 600;
}

tr:last-child td {
  border-bottom: 0;
}

.code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 700;
}

@media (max-width: 720px) {
  .shell {
    padding: 16px;
  }

  .panel,
  .app-panel {
    padding: 24px;
  }

  .panel__header,
  .status-row,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .button-row {
    display: grid;
    width: 100%;
  }

  .form--inline,
  .result-grid {
    grid-template-columns: 1fr;
  }
}
