:root {
  --ink: #111;
  --paper: #fff;
  --soft: #f5f5f4;
  --line: #e3e3e1;
  --mute: #6b6b68;
  --ok: #1f6f43;
  --bad: #b3261e;
  --r: 14px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  background: var(--soft);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}

button, input, select, textarea { font: inherit; color: inherit; }

.fake-banner { background: #fff4d6; color: #6b4a00; border-bottom: 1px solid #e8c766; text-align: center; padding: 8px 16px; font-weight: 700; font-size: 14px; }
.top { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-in { max-width: 1040px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 20px; }
.logo { height: 34px; display: block; }
.logo.big { height: 44px; margin: 0 auto 28px; }
.nav { display: flex; gap: 4px; }
.nav button { background: none; border: 0; padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 500; color: var(--mute); }
.nav button.on { background: var(--ink); color: #fff; }
.who { margin-inline-start: auto; font-size: 14px; color: var(--mute); }

.app { max-width: 1040px; margin: 0 auto; padding: 0 16px 64px; }
h1 { font-size: 28px; font-weight: 800; margin: 36px 0 16px; }
h2 { font-size: 20px; margin: 0 0 12px; }
.sub { color: var(--mute); margin: 0 0 20px; }
.loading { color: var(--mute); margin-top: 40px; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.center { max-width: 420px; margin: 72px auto 0; text-align: center; }
.center .card { text-align: start; }

.field { margin-bottom: 18px; }
label { display: block; font-weight: 500; font-size: 14px; margin-bottom: 6px; }
label i { color: var(--mute); font-style: normal; font-weight: 400; }
input, select, textarea {
  width: 100%;
  height: 52px;
  border: 1.5px solid #d4d4d1;
  border-radius: 12px;
  padding: 0 14px;
  background: #fff;
  outline: none;
}
textarea { height: 110px; padding: 12px 14px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); }
.err input, .err select, .err textarea { border-color: var(--bad); }
.msg { color: var(--bad); font-size: 13px; margin-top: 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hint { color: var(--mute); font-size: 13px; margin: 0 0 14px; }

.customer-info { font-size: 14px; color: var(--mute); margin-top: 8px; }
.customer-info.found { color: var(--ok); font-weight: 500; }

.btn { background: var(--ink); color: #fff; border: 0; border-radius: 12px; height: 54px; padding: 0 28px; font-weight: 700; cursor: pointer; font-size: 17px; }
.btn.full { width: 100%; }
.btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.sm { height: 42px; font-size: 15px; padding: 0 18px; }
.btn:disabled { opacity: .35; cursor: default; }
.back { background: none; border: 0; cursor: pointer; color: var(--mute); padding: 0; margin-top: 24px; font-size: 15px; }
.row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.status-line { margin: 14px 0 0; font-size: 15px; }
.status-line.error { color: var(--bad); }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 24px; }
.tile {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 22px;
  padding: 32px 24px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  cursor: pointer;
  text-align: start;
}
.tile:hover, .tile:focus-visible { border-color: var(--ink); }
.tile strong { font-size: 22px; font-weight: 800; }
.tile span { color: var(--mute); font-size: 14px; }

.form { max-width: 640px; margin: 32px auto 0; }

.done { max-width: 480px; margin: 72px auto 0; text-align: center; }
.tick { width: 72px; height: 72px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; margin: 0 auto 22px; font-size: 34px; }
.bignum { font-size: 52px; font-weight: 800; line-height: 1.1; margin: 0 0 24px; }

.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
table.list { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
th { text-align: start; font-size: 13px; color: var(--mute); font-weight: 500; padding: 12px 16px; background: #fafaf9; border-bottom: 1px solid var(--line); }
td { padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 15px; }
tbody tr { cursor: pointer; }
tbody tr:hover td, tbody tr:focus td { background: #fafaf9; }
tr:last-child td { border-bottom: 0; }
.num { font-weight: 700; }
.muted { color: var(--mute); font-size: 13px; }
.chip { display: inline-block; border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 500; border: 1.5px solid var(--ink); white-space: nowrap; }

.detail { max-width: 640px; margin: 32px auto 0; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; font-size: 15px; margin: 18px 0; }
.kv dt { color: var(--mute); }
.kv dd { margin: 0; font-weight: 500; white-space: pre-wrap; overflow-wrap: anywhere; }
.status-box { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 8px; }

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 30px);
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  padding: 14px 22px;
  opacity: 0;
  transition: all .25s;
  z-index: 40;
  pointer-events: none;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.foot { text-align: center; color: var(--mute); font-size: 12px; padding: 16px; }

@media (max-width: 760px) {
  .tiles { grid-template-columns: 1fr; }
  .tile { min-height: 110px; }
  .grid2 { grid-template-columns: 1fr; }
  .top-in { flex-wrap: wrap; gap: 8px; }
  h1 { font-size: 24px; }
  table.list thead { display: none; }
  table.list, table.list tbody, table.list tr, table.list td { display: block; width: 100%; }
  table.list tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.list td { border: 0; padding: 4px 16px; }
  table.list td::before { content: attr(data-label) ": "; color: var(--mute); font-size: 13px; }
  .kv { grid-template-columns: 1fr; }
}
