/* Дизайн-система numi.plus: Onest, светлый фон #ECECEE, акцент #755BED,
   мелкие радиусы 6px, начертание заголовков — Medium, а не Bold. */

:root {
  --bg: #ececee;
  --surface: #ffffff;
  --ink: #242424;
  --ink-strong: #101010;
  --muted: rgba(36, 36, 36, 0.5);
  --faint: rgba(36, 36, 36, 0.18);
  --accent: #755bed;
  --accent-light: #9078ff;
  --accent-soft: rgba(117, 91, 237, 0.08);
  --green: #64c563;
  --danger: #d24545;
  --radius: 6px;
  --radius-lg: 11px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Onest, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* Шапка */
.head { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.head img { display: block; height: 22px; width: auto; }
.head__label {
  font-size: 13px;
  color: var(--muted);
  padding-left: 10px;
  border-left: 1px solid var(--faint);
}

h1 { font-size: 26px; line-height: 1.18; font-weight: 500; margin: 0 0 10px; color: var(--ink); }
h2 { font-size: 17px; font-weight: 500; margin: 0 0 12px; }
p { margin: 0 0 12px; }
.lead { color: var(--muted); margin-bottom: 22px; }
.accent { color: var(--accent); }

.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 7px 11px;
  font-size: 13px;
  color: var(--ink);
}
.chip--accent { background: var(--accent-soft); color: var(--accent); }

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
}

/* Форма */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 13px 12px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.field input:focus { border-color: var(--accent); background: var(--surface); }
.field input::placeholder { color: rgba(36, 36, 36, 0.32); }
.field--bad input { border-color: var(--danger); }
.field__err { display: none; font-size: 12px; color: var(--danger); margin-top: 5px; }
.field--bad .field__err { display: block; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  font: inherit;
  font-weight: 500;
  padding: 17px 18px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.btn:hover { background: #6a4fe4; }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn--ghost { background: var(--surface); color: var(--accent); }
.btn--ghost:hover { background: #f6f4ff; }
.btn--small { width: auto; padding: 9px 13px; font-size: 13px; }
.btn--link {
  width: auto; background: none; color: var(--accent);
  padding: 0; font-size: 13px;
}
.btn--link:hover { background: none; text-decoration: underline; }
.btn--danger { color: var(--danger); }

/* Итог заявки */
.done { text-align: center; padding: 28px 18px; }
.done__mark {
  width: 46px; height: 46px; margin: 0 auto 14px;
  border-radius: 50%; background: rgba(100, 197, 99, 0.14);
  display: grid; place-items: center;
}
.done__mark svg { width: 24px; height: 24px; color: var(--green); }

.rows { display: grid; gap: 9px; }
.row { display: flex; justify-content: space-between; gap: 14px; font-size: 14px; }
.row__k { color: var(--muted); flex: none; }
.row__v { text-align: right; word-break: break-word; }

/* Админка */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.stat { background: var(--surface); border-radius: var(--radius-lg); padding: 14px; }
.stat__n { font-size: 24px; font-weight: 500; line-height: 1.1; }
.stat__l { font-size: 12px; color: var(--muted); margin-top: 3px; }

.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tab {
  font: inherit; font-size: 13px; border: 0; cursor: pointer;
  background: var(--surface); color: var(--ink);
  padding: 8px 13px; border-radius: var(--radius);
}
.tab[aria-selected="true"] { background: var(--accent); color: #fff; }

.person { background: var(--surface); border-radius: var(--radius-lg); padding: 14px; margin-bottom: 8px; }
.person__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.person__name { font-weight: 500; }
.person__sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.person__contacts { margin-top: 10px; display: grid; gap: 5px; font-size: 13px; }
.person__contacts a { color: var(--ink); text-decoration: none; }
.person__actions { margin-top: 11px; display: flex; gap: 14px; align-items: center; }

.tag {
  font-size: 11px; padding: 3px 7px; border-radius: 4px; flex: none;
  background: var(--bg); color: var(--muted);
}
.tag--reg { background: rgba(100, 197, 99, 0.14); color: #3f9b3e; }
.tag--admin { background: var(--accent-soft); color: var(--accent); }

.add { display: flex; gap: 8px; margin-top: 12px; }
.add input {
  flex: 1; font: inherit; background: var(--bg); border: 1px solid transparent;
  border-radius: var(--radius); padding: 11px 12px; outline: none;
}
.add input:focus { border-color: var(--accent); background: var(--surface); }

.empty { color: var(--muted); font-size: 14px; padding: 18px 0; text-align: center; }
.note { font-size: 12px; color: var(--muted); margin-top: 10px; }
.hidden { display: none !important; }

.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  background: var(--ink-strong); color: #fff; font-size: 13px;
  padding: 11px 16px; border-radius: var(--radius);
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.toast.show { opacity: 1; }
