/* Личный кабинет PROMIX. Светлая тема, крупный шрифт, одно главное действие на экране.
   Сначала телефон (375 px), потом компьютер (1280 px). */
:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #1a1d21;
  --muted: #555c66;
  --line: #d5dae0;
  --primary: #1456b8;
  --primary-dark: #0e428f;
  --primary-soft: #e6eefa;
  --ok: #1b7a3a;
  --ok-soft: #e5f4ea;
  --wait: #8a5a00;
  --wait-soft: #fff3d6;
  --bad: #b3261e;
  --bad-soft: #fde8e6;
  --radius: 14px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.45 -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
[hidden] { display: none !important; }

a { color: var(--primary); }
h1 { font-size: 28px; line-height: 1.2; margin: 8px 0 8px; }
h2 { font-size: 22px; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }

/* ---------- Шапка ---------- */
.top {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand { font-weight: 800; font-size: 20px; letter-spacing: .5px; color: var(--primary); }
.who { flex: 1; min-width: 0; font-size: 16px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .btn { min-height: 44px; font-size: 16px; padding: 0 14px; width: auto; }

.wrap { max-width: 980px; margin: 0 auto; padding: 12px 16px 170px; }
.narrow { max-width: 520px; margin: 0 auto; padding: 24px 16px 48px; }

/* ---------- Кнопки ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 60px;
  padding: 0 20px;
  border-radius: var(--radius);
  border: 2px solid var(--primary);
  background: var(--card);
  color: var(--primary);
  font: inherit;
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:active { background: var(--primary-dark); }
.btn.quiet { border-color: var(--line); color: var(--text); font-weight: 600; }
.btn:disabled { opacity: .55; cursor: default; }
.btn:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #f0a500; outline-offset: 2px; }
.stack { display: grid; gap: 12px; margin-top: 16px; }

/* ---------- Поля ---------- */
label.field { display: block; margin: 16px 0 6px; font-weight: 700; }
input[type=email], input[type=password], input[type=text], input[type=search], input[type=date], textarea {
  width: 100%;
  min-height: 58px;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 20px;
}
textarea { min-height: 110px; resize: vertical; }
/* Код из письма: крупно, по центру, цифры с промежутками */
input.code-input { font-size: 34px; font-weight: 700; letter-spacing: 10px; text-align: center; min-height: 72px; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 16px 0; font-size: 18px; }
.check input { width: 28px; height: 28px; flex: none; margin: 2px 0 0; }
.check label { cursor: pointer; }

/* ---------- Сообщения ---------- */
.msg { border-radius: var(--radius); padding: 14px 16px; margin: 12px 0; font-size: 18px; }
.msg.bad { background: var(--bad-soft); color: var(--bad); border: 2px solid var(--bad); }
.msg.ok { background: var(--ok-soft); color: var(--ok); border: 2px solid var(--ok); }
.msg.info { background: var(--primary-soft); color: var(--primary-dark); border: 2px solid var(--primary); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

/* ---------- Нижнее меню (телефон) ---------- */
.tabs {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--card);
  border-top: 1px solid var(--line);
  z-index: 10;
}
.tab {
  min-height: 64px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.tab[aria-current=page] { color: var(--primary); box-shadow: inset 0 4px 0 var(--primary); }
.badge { display: inline-block; min-width: 26px; padding: 0 6px; border-radius: 13px; background: var(--primary); color: #fff; font-size: 15px; line-height: 26px; }

/* Кнопка «Перейти в корзину» над нижним меню */
.cartbar { position: fixed; left: 0; right: 0; bottom: 64px; padding: 10px 16px; background: rgba(244, 246, 248, .96); border-top: 1px solid var(--line); z-index: 9; }
.cartbar .btn { max-width: 948px; margin: 0 auto; }

/* ---------- Товары ---------- */
.tools { display: grid; gap: 10px; margin: 8px 0 14px; }
.list { display: grid; gap: 12px; }
.item-name { font-size: 20px; font-weight: 700; line-height: 1.3; margin-bottom: 4px; overflow-wrap: anywhere; }
.item-meta { color: var(--muted); font-size: 16px; overflow-wrap: anywhere; }
.item-ctrl { margin-top: 12px; }

.stepper { display: grid; grid-template-columns: 60px 1fr 60px; gap: 8px; align-items: center; }
.stepper button {
  height: 60px;
  border-radius: var(--radius);
  border: 2px solid var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.stepper input { text-align: center; font-size: 24px; font-weight: 700; min-height: 60px; padding: 8px 4px; }
.stepper-note { text-align: center; color: var(--muted); font-size: 16px; margin-top: 4px; }
.remove { margin-top: 8px; min-height: 48px; font-size: 17px; }

/* ---------- Заказы ---------- */
.status { display: inline-block; border-radius: 10px; padding: 6px 12px; font-weight: 700; margin: 6px 0 8px; }
.status.wait { background: var(--wait-soft); color: var(--wait); }
.status.ok { background: var(--primary-soft); color: var(--primary-dark); }
.status.done { background: var(--ok-soft); color: var(--ok); }
.status.bad { background: var(--bad-soft); color: var(--bad); }
.lines { margin: 8px 0 0; padding: 0; list-style: none; }
.lines li { padding: 6px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.lines li span:first-child { overflow-wrap: anywhere; }
.lines li span:last-child { white-space: nowrap; font-weight: 700; }
.lines li.off { color: var(--muted); }

/* ---------- Подтверждение и «что дальше» ---------- */
.big-ok { font-size: 64px; line-height: 1; color: var(--ok); text-align: center; margin: 12px 0; }
.next { margin: 8px 0 0; padding-left: 24px; }
.next li { margin: 6px 0; }
.question { font-size: 22px; font-weight: 700; margin: 16px 0 4px; }

.empty { text-align: center; padding: 24px 8px; }

/* ---------- Компьютер ---------- */
@media (min-width: 900px) {
  body { font-size: 19px; }
  .tabs { position: static; max-width: 980px; margin: 0 auto; border: 0; background: none; padding: 12px 16px 0; gap: 12px; }
  .tab { border: 2px solid var(--line); border-radius: var(--radius); background: var(--card); min-height: 58px; }
  .tab[aria-current=page] { border-color: var(--primary); box-shadow: none; background: var(--primary-soft); }
  .wrap { padding-bottom: 120px; }
  .cartbar { bottom: 0; }
  .list.items { grid-template-columns: 1fr 1fr; }
  .tools { grid-template-columns: 1fr auto; align-items: center; }
  .tools .btn { width: auto; }
  .stack.row { grid-template-columns: 1fr 1fr; }
  .top { padding: 12px max(16px, calc((100% - 948px) / 2)); }
}
