@font-face { font-family: "TT Uzum"; font-weight: 400; font-display: swap; src: url("fonts/TT_Uzum_Regular.woff2") format("woff2"); }
@font-face { font-family: "TT Uzum"; font-weight: 500; font-display: swap; src: url("fonts/TT_Uzum_Medium.woff2") format("woff2"); }
@font-face { font-family: "TT Uzum"; font-weight: 700; font-display: swap; src: url("fonts/TT_Uzum_Bold.woff2") format("woff2"); }

:root {
  --brand: #6A3FE7;
  --brand-600: #5A2FD6;
  --brand-50: #F3EFFE;
  --brand-100: #E6DDFC;
  --bg: #F5F4F9;
  --surface: #FFFFFF;
  --text: #1F1D2B;
  --muted: #6E6B7B;
  --border: #E7E5EF;
  --ok: #12945D;   --ok-bg: #E4F6EC;
  --warn: #B86E00; --warn-bg: #FDF1DE;
  --bad: #D93A3F;  --bad-bg: #FDE9EA;
  --info: #5A2FD6; --info-bg: #EEE8FD;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(31, 29, 43, .04), 0 4px 16px rgba(31, 29, 43, .04);
  --font: "TT Uzum", "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 15px; line-height: 1.45; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 28px; }
h2 { font-size: 18px; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
h3 { font-size: 16px; }
code { background: var(--brand-50); color: var(--brand-600); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.ic { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.hint { color: var(--muted); font-size: 13px; font-weight: 400; }
.t-ok { color: var(--ok); } .t-bad { color: var(--bad); }
[hidden] { display: none !important; }

/* ---------- каркас ---------- */
.layout { display: flex; min-height: 100vh; }
.side { width: 248px; flex: none; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 20px 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); padding: 0 8px 22px; }
.brand b { display: block; font-size: 17px; }
.brand small { display: block; color: var(--muted); font-size: 12px; }
.brand.small { padding: 0; gap: 8px; }
.logo { flex: none; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--muted); font-weight: 500; }
.nav a:hover { background: var(--bg); color: var(--text); }
.nav a.active { background: var(--brand-50); color: var(--brand); }
.nav-sep { height: 1px; background: var(--border); margin: 10px 8px; }
.side-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 8px 0; border-top: 1px solid var(--border); }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.who small { color: var(--muted); font-size: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.main { flex: 1; min-width: 0; padding: 28px 32px 48px; max-width: 1360px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.sub { color: var(--muted); margin: 6px 0 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.head-actions { display: flex; gap: 10px; }
.mobile-bar { display: none; }
.scrim { display: none; }

/* ---------- карточки и сетки ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 20px; min-width: 0; }
.card.narrow { max-width: 640px; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-h h2, .card-h h3 { margin: 0; }
.send-grid { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 20px; align-items: start; }
.send-grid > .card { margin-bottom: 0; }
.send-grid + .card, .send-grid + .send-grid { margin-top: 20px; }
.contacts-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.side-col .card { margin-bottom: 20px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack + .stack, .stack + .inline-form, .inline-form + .stack { margin-top: 14px; }
.inline-form { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.inline-form.wrap { flex-wrap: wrap; }
.inline-form input, .inline-form select { flex: 1; min-width: 160px; }
.row-gap { display: flex; gap: 8px; align-items: center; }
.step { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 14px; display: inline-grid; place-items: center; }
.empty { color: var(--muted); padding: 22px; text-align: center; background: var(--bg); border-radius: 12px; }
.card.empty { background: var(--surface); }

/* ---------- формы ---------- */
.lbl { font-size: 13px; font-weight: 500; color: var(--muted); margin-top: 6px; display: block; }
input, select, textarea { font: inherit; color: var(--text); width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; min-height: 44px; }
::placeholder { color: #A9A6B5; opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
input:disabled { background: var(--bg); color: var(--muted); }
input[type=checkbox] { width: 18px; height: 18px; padding: 0; accent-color: var(--brand); cursor: pointer; flex: none; }
input[type=file] { padding: 8px; }
.w-auto { width: auto; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; padding: 12px; background: var(--bg); border-radius: 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.copy-field { display: flex; gap: 8px; }
.copy-field input { background: var(--bg); font-size: 14px; }
details.more { margin-top: 14px; }
details.more summary { cursor: pointer; color: var(--brand); font-weight: 500; }
details.more[open] summary { margin-bottom: 10px; }

/* ---------- кнопки ---------- */
.btn { font: inherit; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 12px; border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; text-decoration: none; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-600); color: #fff; }
.btn.secondary { background: var(--brand-50); color: var(--brand); }
.btn.secondary:hover { background: var(--brand-100); }
.btn.ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.btn.ghost:hover { color: var(--text); background: var(--bg); }
.btn.danger, .btn.ghost.danger { color: var(--bad); }
.btn.ghost.danger:hover { background: var(--bad-bg); border-color: transparent; }
.btn.sm { padding: 7px 12px; font-size: 14px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font: inherit; }
.icon-btn:hover { background: var(--bg); color: var(--text); }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn.sm .ic { width: 16px; height: 16px; }
.icon-btn.danger:hover { background: var(--bad-bg); color: var(--bad); }
.link { color: var(--brand); font-weight: 500; }
.link-btn { border: 0; background: none; color: var(--brand); font: inherit; font-size: 13px; cursor: pointer; padding: 0; }

/* ---------- чипы, пилюли, плитки ---------- */
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--bg); color: var(--muted); white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.info { background: var(--info-bg); color: var(--info); }
.tag { display: inline-block; padding: 2px 8px; margin: 2px 4px 2px 0; border-radius: 6px; font-size: 12px; background: var(--brand-50); color: var(--brand-600); }
.summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 10px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; background: var(--bg); color: var(--muted); }
.pill .ic { width: 14px; height: 14px; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 20px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; color: var(--text); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; border-top: 3px solid var(--brand-100); }
.tile b { font-size: 28px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile b small { font-size: 16px; color: var(--muted); font-weight: 500; }
.tile span { color: var(--muted); font-size: 13px; }
.tile.ok { border-top-color: var(--ok); } .tile.ok b { color: var(--ok); }
.tile.warn { border-top-color: #E79A1A; } .tile.warn b { color: var(--warn); }
.tile.bad { border-top-color: var(--bad); } .tile.bad b { color: var(--bad); }
a.tile:hover { border-color: var(--brand-100); color: var(--text); }
a.tile.on { outline: 2px solid var(--brand); outline-offset: -1px; }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--bg); margin: 12px 0; font-size: 14px; }
.notice.ok { background: var(--ok-bg); } .notice.warn { background: var(--warn-bg); } .notice.bad { background: var(--bad-bg); }
.notice .hint { margin-top: 4px; }

/* ---------- таблицы ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table-wrap.tall { max-height: 420px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; margin: 0 0 12px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; background: var(--surface); }
.table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table.hover tr[data-href] { cursor: pointer; }
.table.hover tr[data-href]:hover td { background: var(--bg); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.w-check { width: 34px; }
.w-act { width: 1%; text-align: right; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 460px; white-space: pre-line; }
.mini-bar { display: flex; width: 120px; height: 6px; border-radius: 3px; background: var(--bg); overflow: hidden; margin-bottom: 4px; }
.mini-bar .ok { background: var(--ok); } .mini-bar .bad { background: var(--bad); }

/* ---------- контакты ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters select { width: auto; }
.search { flex: 1; min-width: 220px; position: relative; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 38px; }
.bulk-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; background: var(--bg); border-radius: 12px; margin-bottom: 8px; }
.bulk-bar .check { margin-right: auto; }
.bulk-bar select { width: auto; background: #fff; }
.invite { display: flex; justify-content: space-between; gap: 20px; align-items: center; flex-wrap: wrap; background: linear-gradient(135deg, var(--brand-50), #fff 70%); border-color: var(--brand-100); }
.invite h2 { margin-bottom: 4px; }
.invite p { margin: 0; max-width: 520px; }
.invite-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.invite-actions .copy-field input { width: 280px; }
.group-list { list-style: none; padding: 0; margin: 12px 0 0; }
.group-list li { display: flex; align-items: center; gap: 8px; padding: 4px 0 4px 10px; border-radius: 10px; }
.group-list li:hover { background: var(--bg); }
.group-list a { flex: 1; color: var(--text); font-weight: 500; }
.group-list a.active { color: var(--brand); }
.list-head { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 8px; }

/* ---------- редактор и превью ---------- */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 20px; align-items: start; }
.editor-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ed-tools { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.tool { font: inherit; font-size: 14px; min-width: 34px; height: 32px; padding: 0 8px; border: 1px solid var(--border); background: #fff; border-radius: 8px; cursor: pointer; color: var(--text); display: inline-grid; place-items: center; }
.tool:hover { border-color: var(--brand); color: var(--brand); }
.tool .ic { width: 16px; height: 16px; }
.tool.tag { color: var(--brand); background: var(--brand-50); border-color: transparent; font-size: 13px; }
.tool-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.counter { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.over { color: var(--bad); font-weight: 500; }
.file-pick { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px dashed var(--brand-100); border-radius: 12px; color: var(--brand); cursor: pointer; font-weight: 500; margin-top: 6px; background: var(--brand-50); }
.file-pick:hover { border-color: var(--brand); }
.file-pick input { display: none; }
.file-pick span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-preview { position: sticky; top: 16px; }
.tg { background: #CBD9C4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='20' cy='20' r='1.5' fill='%23ffffff' fill-opacity='.35'/%3E%3C/svg%3E"); border-radius: 14px; padding: 18px 14px; margin-top: 6px; min-height: 160px; }
.tg-msg { max-width: 300px; }
.bubble { background: #fff; border-radius: 14px 14px 14px 4px; padding: 8px 12px 6px; box-shadow: 0 1px 1px rgba(0,0,0,.12); font-size: 14px; line-height: 1.4; overflow: hidden; }
.bubble-text { white-space: pre-wrap; word-wrap: break-word; }
.bubble-text a { color: #2A7BC4; }
.bubble-text code { background: #EEF1F4; color: #C2185B; }
.bubble-media { margin: -8px -12px 8px; }
.bubble-media img { display: block; width: 100%; max-height: 260px; object-fit: cover; }
.bubble-media .doc { display: flex; align-items: center; gap: 10px; padding: 10px 12px 0; color: var(--text); font-size: 13px; }
.bubble-media .doc i { width: 40px; height: 40px; border-radius: 50%; background: #3E9BDB; display: grid; place-items: center; color: #fff; font-style: normal; }
.bubble-time { text-align: right; font-size: 11px; color: #8CA08A; margin-top: 2px; }
.tg-buttons { display: grid; gap: 4px; margin-top: 4px; }
.tg-buttons > * { display: block; text-align: center; padding: 8px; border-radius: 10px; background: rgba(46, 70, 50, .32); color: #fff; font-size: 13px; font-weight: 500; }

/* ---------- бот в Telegram ---------- */
.tg-phone { padding: 0; overflow: hidden; display: flex; flex-direction: column; min-height: 340px; }
.tg-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; }
.tg-head b { display: block; font-size: 14px; }
.tg-head small { color: var(--muted); font-size: 12px; }
.tg-ava { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; object-position: center; transform: scale(1); }
.tg-about { flex: 1; display: grid; place-items: center; padding: 18px; }
.tg-about .bubble { border-radius: 14px; max-width: 280px; text-align: center; }
.tg-about .bubble b { display: block; margin-bottom: 6px; }
.tg-start { background: #fff; text-align: center; padding: 12px; font-weight: 700; color: #2A7BC4; letter-spacing: .04em; font-size: 14px; }
.bot-form .card .editor { margin-top: 4px; }
.save-bar { position: sticky; bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 8px 30px rgba(31, 29, 43, .12); z-index: 5; flex-wrap: wrap; }
.avatar-card { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.avatar-prev { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar-card > div { flex: 1; min-width: 240px; }
.avatar-card h2 { margin-bottom: 6px; }
.avatar-card p { margin: 0 0 8px; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.check.small { font-size: 13px; font-weight: 400; color: var(--muted); }
.lang-tag { display: inline-block; padding: 1px 6px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .03em; background: #EAF1FB; color: #2A5DA8; vertical-align: 2px; }
.uz-block { margin-top: 14px; border: 1px dashed var(--brand-100); border-radius: 14px; padding: 10px 14px; background: #FCFBFF; }
.uz-block > summary { cursor: pointer; font-weight: 500; color: var(--brand); list-style: none; }
.uz-block > summary::-webkit-details-marker { display: none; }
.uz-block > summary::before { content: "＋ "; }
.uz-block[open] > summary::before { content: "－ "; }
.uz-block[open] > summary { margin-bottom: 10px; }
.lang-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); position: sticky; top: 10px; z-index: 6; box-shadow: var(--shadow); margin-bottom: 16px; }
.lang-tabs button { font: inherit; font-weight: 500; border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; cursor: pointer; color: var(--muted); }
.lang-tabs button.on { background: var(--brand); color: #fff; }
.sub-h { margin: 22px 0 6px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; align-items: baseline; }
.menu-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-width: 420px; padding: 8px; background: #E9EEF2; border-radius: 12px; }
.menu-preview .wide { grid-column: 1 / -1; }
.lang-note { margin: -6px 0 16px; }
.menu-preview span { background: #fff; border-radius: 8px; padding: 10px; text-align: center; font-size: 14px; font-weight: 500; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.kv { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.kv li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; background: var(--bg); border-radius: 10px; font-size: 14px; }
.kv span { color: var(--muted); }

/* ---------- прогресс ---------- */
.progress-card { margin-top: 18px; padding: 16px; border-radius: 14px; background: var(--brand-50); }
.progress-top { display: flex; justify-content: space-between; margin-bottom: 10px; }
.bar { display: flex; height: 10px; border-radius: 5px; background: #fff; overflow: hidden; }
.bar-ok { background: var(--ok); width: 0; transition: width .3s; }
.bar-fail { background: var(--bad); width: 0; transition: width .3s; }
.progress-bottom { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.progress-bottom .link { margin-left: auto; }

/* ---------- шаблоны ---------- */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.tpl-grid .card { margin: 0; }
.tpl-text { white-space: pre-wrap; font-size: 14px; color: var(--text); max-height: 180px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 75%, transparent); mask-image: linear-gradient(#000 75%, transparent); }
.tpl-buttons { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tpl-buttons span { font-size: 12px; padding: 4px 10px; border-radius: 8px; background: var(--brand-50); color: var(--brand); }

/* ---------- график ---------- */
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); }
.chart { display: flex; align-items: flex-end; gap: 8px; height: 220px; padding-top: 10px; overflow-x: auto; }
.chart .col { flex: 1; min-width: 34px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.chart .val { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chart .lab { font-size: 11px; color: var(--muted); }
.stack-bar { width: 100%; max-width: 40px; min-height: 3px; display: flex; flex-direction: column; border-radius: 6px 6px 2px 2px; overflow: hidden; }
.seg.ok { background: var(--ok); } .seg.bad { background: var(--bad); }
.danger-zone { border-color: var(--bad-bg); }

/* ---------- вход ---------- */
.login-body { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(1000px 500px at 20% -10%, var(--brand-100), transparent), var(--bg); padding: 16px; }
.login-card { width: 100%; max-width: 380px; background: var(--surface); padding: 32px; border-radius: 20px; box-shadow: 0 10px 40px rgba(106, 63, 231, .12); display: flex; flex-direction: column; gap: 6px; }
.login-card h1 { text-align: center; font-size: 24px; }
.login-card > p { text-align: center; margin: 0 0 12px; }
.login-logo { display: grid; place-items: center; margin-bottom: 8px; }
.login-card .btn { margin-top: 14px; }

/* ---------- всплывашки ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 50; max-width: calc(100vw - 40px); }
.toast { background: var(--text); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.18); font-size: 14px; max-width: 380px; animation: tin .2s ease-out; display: flex; gap: 10px; align-items: flex-start; }
.toast.ok::before { content: "✓"; color: #6EE7A8; font-weight: 700; }
.toast.err { background: var(--bad); }
.toast.err::before { content: "!"; font-weight: 700; }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }

/* ---------- адаптив ---------- */
@media (max-width: 1180px) {
  .editor { grid-template-columns: 1fr; }
  .editor-preview { position: static; }
  .tg-msg { max-width: 340px; }
}
@media (max-width: 1100px) {
  .send-grid, .contacts-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .side { position: fixed; z-index: 40; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.15); }
  body.menu-open .side { transform: none; }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(31,29,43,.35); z-index: 30; }
  .main { padding: 12px 16px 40px; }
  .mobile-bar { display: flex; align-items: center; gap: 8px; margin: 0 -6px 12px; }
  h1 { font-size: 23px; }
  .card { padding: 16px; }
  .invite-actions .copy-field input { width: 100%; }
  .copy-field { width: 100%; }
  .bulk-bar .check { width: 100%; }
  .inline-form { flex-wrap: wrap; }
  .save-bar span { display: none; }
  .save-bar .btn { flex: 1; }
  .inline-form .btn { flex: 1 1 auto; }
  .toasts { left: 16px; right: 16px; bottom: 16px; }
}

/* ---------- отчётность ---------- */
.switch-list { display: grid; gap: 14px; margin-bottom: 14px; }
.switch-list .check { align-items: flex-start; font-weight: 400; }
.switch-list .check input { margin-top: 3px; }
.send-grid.two-eq { grid-template-columns: 1fr 1fr; margin-top: 10px; }
@media (max-width: 760px) { .send-grid.two-eq { grid-template-columns: 1fr; } }
.test-card.on { border-color: #F2C46D; background: linear-gradient(180deg, #FFF8EA, #fff 60%); }
.banner-prev { width: 100%; border-radius: 12px; margin: 6px 0; display: block; }
.wrap-gap { flex-wrap: wrap; gap: 10px; }
.send-grid.three-eq { grid-template-columns: repeat(3, 1fr); margin-top: 10px; }
@media (max-width: 900px) { .send-grid.three-eq { grid-template-columns: 1fr; } }
