/* Новости партнёрам — «стол отправки»: бумага с защитным оттенком, петроль, бирюза.
   Шрифты: Golos Text — текст, Unbounded — заголовки страниц, JetBrains Mono — даты, счётчики, коды. */

:root {
  --paper: #ebf0ee;
  --surface: #ffffff;
  --fill: #f4f7f6;
  --ink: #13232a;
  --ink-2: #384a51;
  --muted: #66767b;
  --rule: #d6dfdc;
  --rule-strong: #b8c6c2;

  --teal: #0b6170;
  --teal-ink: #084955;
  --teal-wash: #e0eeee;
  --teal-bright: #46c4c9; /* на тёмной шапке */
  --signal: #2aabee; /* только Telegram */

  --ok: #1c7c53;
  --ok-wash: #e1f1e8;
  --warn: #93600f;
  --warn-wash: #fbf0d9;
  --bad: #b5381f;
  --bad-wash: #fbe7e1;

  --radius: 12px;
  --radius-sm: 8px;
  --f-body: "Golos Text", "Segoe UI", system-ui, sans-serif;
  --f-display: "Unbounded", "Golos Text", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --shadow: 0 1px 0 rgba(19, 35, 42, .04), 0 1px 3px rgba(19, 35, 42, .05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.55 var(--f-body);
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "tnum" 0;
}
body.busy { cursor: progress; }
a { color: var(--teal); text-decoration: none; text-underline-offset: 2px; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
::selection { background: #bfe3e3; }

h1 {
  font: 600 24px/1.2 var(--f-display);
  letter-spacing: -.015em;
  margin: 0;
}
h2 {
  font-size: 16px; font-weight: 650; margin: 0 0 16px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
h3 { font-size: 15px; font-weight: 650; margin: 0 0 8px; }
code {
  font: 12.5px var(--f-mono);
  background: var(--fill); border: 1px solid var(--rule);
  padding: 1px 5px; border-radius: 5px;
}
code.copy { user-select: all; word-break: break-all; }

/* ---------- шапка ---------- */
.top {
  display: flex; align-items: center; gap: 28px;
  padding: 0 28px; height: 60px;
  background: var(--ink); color: #dfe8e6;
  position: sticky; top: 0; z-index: 10;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 14px var(--f-display); letter-spacing: .01em;
  color: #fff; white-space: nowrap;
}
.brand:hover { text-decoration: none; }
/* знак — «отметка о прочтении»: квадрат с галочкой */
.brand-mark {
  width: 20px; height: 20px; border: 2px solid var(--teal-bright); border-radius: 5px;
  position: relative; flex: none;
}
.brand-mark::after {
  content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
  border: solid var(--teal-bright); border-width: 0 2px 2px 0; transform: rotate(40deg);
}
.top nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.top nav a, .top .me a {
  padding: 19px 12px 17px; color: #a9bab7; font-weight: 500;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.top nav a:hover, .top .me a:hover { color: #fff; text-decoration: none; }
.top nav a.on, .top .me a.on { color: #fff; border-bottom-color: var(--teal-bright); }
.top .me { display: flex; align-items: center; gap: 4px; }
.top .me form { margin: 0; }
.top button.link { color: #a9bab7; }
.top button.link:hover { color: #fff; }
.badge {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px;
  font: 600 11px/18px var(--f-mono); text-align: center;
  background: var(--bad); color: #fff; border-radius: 9px;
}

/* ---------- раскладка ---------- */
main { max-width: 1280px; margin: 0 auto; padding: 28px; }
.page-head {
  display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap;
  margin-bottom: 22px;
}
.page-head h1 { margin-right: auto; }
.page-head .back { margin-right: 6px; }
.back { color: var(--muted); font-weight: 500; }

.card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 22px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.card.flush { padding: 0; overflow: auto; }
.card.highlight { border-color: #e9c77a; background: #fffcf3; }
.card.empty { text-align: center; color: var(--muted); padding: 56px 24px; }
.pad { padding: 14px 22px; }

.editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.editor .col { min-width: 0; }
@media (min-width: 1000px) { .editor:has(.col.narrow) { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
@media (max-width: 920px) { .editor { grid-template-columns: minmax(0, 1fr); } }

/* шаги редактора — это настоящая последовательность */
.step {
  display: inline-grid; place-items: center; width: 24px; height: 24px; flex: none;
  font: 600 12px var(--f-mono); color: var(--teal);
  border: 1.5px solid var(--teal); border-radius: 6px;
}

/* ---------- формы ---------- */
label { display: block; font-weight: 600; font-size: 13.5px; color: var(--ink-2); margin-bottom: 16px; }
input, textarea, select {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  font: inherit; font-size: 15px; font-weight: 400; color: var(--ink);
  border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #93a19f; }
input:hover, textarea:hover, select:hover { border-color: #9fb0ab; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(11, 97, 112, .16);
}
input[type="checkbox"] {
  display: inline-block; width: 17px; height: 17px; margin: 0; flex: none;
  accent-color: var(--teal); box-shadow: none;
}
input[type="file"] { padding: 7px; font-size: 14px; background: var(--fill); }
input[type="datetime-local"] { font-family: var(--f-mono); font-size: 14px; }
textarea { resize: vertical; line-height: 1.5; }
textarea[readonly] { background: var(--fill); color: var(--muted); }
select { appearance: none; padding-right: 34px; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2366767b' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center; }
label.check {
  display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 14.5px; color: var(--ink);
  cursor: pointer;
}
.row { display: flex; gap: 8px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.row input { margin-top: 0; flex: 1 1 220px; min-width: 0; }
.row select { margin-top: 0; width: auto; }
.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.inline select { margin: 0; width: auto; max-width: 280px; }

button, a.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
  padding: 9px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink);
  transition: background .15s, border-color .15s, color .15s;
}
button:hover, a.button:hover { background: var(--fill); border-color: #9fb0ab; text-decoration: none; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.primary, a.button.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
button.primary:hover, a.button.primary:hover { background: var(--teal-ink); border-color: var(--teal-ink); }
button.accent { background: var(--teal-wash); border-color: #b9d8d8; color: var(--teal-ink); }
button.accent:hover { background: #d0e6e6; }
button.wide { width: 100%; padding: 11px 16px; }
button.link {
  border: none; background: none; padding: 4px 2px; color: var(--teal); font-weight: 500;
}
button.link:hover { text-decoration: underline; background: none; }
.danger, button.link.danger { color: var(--bad); }
button.danger-btn { color: var(--bad); border-color: #ecc0b5; }
button.danger-btn:hover { background: var(--bad-wash); border-color: var(--bad); }

/* ---------- сообщения ---------- */
.flash {
  padding: 11px 14px 11px 16px; margin-bottom: 16px;
  border-radius: var(--radius-sm); border: 1px solid #bfe0cf; border-left: 3px solid var(--ok);
  background: var(--ok-wash); color: #12513a;
}
.flash.error { background: var(--bad-wash); color: #7f2614; border-color: #efc6bb; border-left-color: var(--bad); }
.flash.warn { background: var(--warn-wash); color: #6b4608; border-color: #efd9a8; border-left-color: #c48a1d; }
.flash.small { padding: 6px 10px; font-size: 13.5px; margin: 8px 0 0; }
.flash form.inline { margin-left: 8px; }
.hint { color: var(--muted); font-size: 13.5px; margin: 10px 0 16px; }
label + .hint { margin-top: -10px; }
.card > .hint:first-child, h2 + .hint { margin-top: -6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; font-weight: 400; }
.ok { color: var(--ok); }
.err { color: var(--bad); }
.nowrap { white-space: nowrap; }
td.nowrap, .meta, .mono { font-family: var(--f-mono); font-size: 12.5px; }
.meta { color: var(--muted); margin: 12px 0 0; }

/* ---------- метки ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; margin: 1px 4px 1px 0;
  padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500;
  background: var(--fill); color: var(--ink-2); border: 1px solid var(--rule);
  white-space: nowrap;
}
.pill.green, .pill.red, .pill.blue, .pill.amber { border-color: transparent; }
.pill.green::before, .pill.red::before, .pill.blue::before, .pill.amber::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.pill.green { background: var(--ok-wash); color: var(--ok); }
.pill.red { background: var(--bad-wash); color: var(--bad); }
.pill.blue { background: var(--teal-wash); color: var(--teal); }
.pill.amber { background: var(--warn-wash); color: var(--warn); }
.tag {
  display: inline-block; padding: 1px 8px; margin: 1px 3px 1px 0;
  border-radius: 5px; font-size: 12.5px; background: var(--fill); color: var(--ink-2);
  border: 1px solid var(--rule);
}
.lang {
  display: inline-block; padding: 0 5px; border-radius: 4px; vertical-align: 1px;
  font: 600 10.5px/17px var(--f-mono); letter-spacing: .04em;
  background: var(--teal-wash); color: var(--teal-ink);
}
.lang.missing { background: var(--bad-wash); color: var(--bad); }

/* ---------- лента доставки: одна клетка — один чат ---------- */
.strip {
  display: inline-flex; flex-wrap: wrap; gap: 3px; align-items: center;
  vertical-align: middle; max-width: 280px;
}
.strip i {
  display: block; width: 8px; height: 16px; border-radius: 2px;
  background: var(--rule-strong);
}
.strip i.s-sent { background: var(--teal); }
.strip i.s-sent.ack { background: #23a36d; box-shadow: inset 0 3px 0 #b6ecd0; }
.strip i.s-failed { background: var(--bad); }
.strip i.s-pending { background: #d49a2a; }
.strip i.s-deleted { background: repeating-linear-gradient(135deg, #c3cecb 0 2px, #e6ecea 2px 4px); }
.strip b { font: 500 11px var(--f-mono); color: var(--muted); margin-left: 3px; }
.running .strip i.s-pending { animation: waiting 1.1s ease-in-out infinite alternate; }
@keyframes waiting { from { opacity: 1; } to { opacity: .35; } }
.strip-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.strip-legend span { display: inline-flex; align-items: center; gap: 6px; }
.strip-legend .strip i { height: 12px; }
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.result-head .strip { max-width: none; }
.figures { display: flex; gap: 22px; flex-wrap: wrap; margin: 8px 0 14px; }
.figure { display: flex; flex-direction: column; }
.figure b { font: 600 22px/1.1 var(--f-mono); }
.figure span { font-size: 12.5px; color: var(--muted); }

/* ---------- таблицы ---------- */
table.list { width: 100%; border-collapse: collapse; }
table.list th {
  text-align: left; padding: 11px 22px; border-bottom: 1px solid var(--rule);
  font: 500 11px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  background: var(--fill);
}
table.list td { padding: 14px 22px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.list tr:last-child td { border-bottom: none; }
table.list td a { font-weight: 600; color: var(--ink); }
table.list td a:hover { color: var(--teal); }
table.list.compact th { padding: 8px 10px; }
table.list.compact td { padding: 9px 10px; font-size: 14px; }
.card:not(.flush) table.list.compact { border: 1px solid var(--rule); border-radius: var(--radius-sm); overflow: hidden; border-collapse: separate; border-spacing: 0; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #f7faf9; }
tr.muted td { color: var(--muted); }
table.list td:first-child { min-width: 170px; }
td .sub { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); font-weight: 400; }

/* ---------- предпросмотр в стиле Telegram ---------- */
.tg {
  border-radius: var(--radius-sm); padding: 22px 18px;
  background-color: #cfe0c6;
  background-image:
    radial-gradient(circle at 20% 15%, rgba(255,255,255,.35) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,.3) 0 2px, transparent 3px),
    linear-gradient(160deg, #d8e7cf, #b6cfa9);
  background-size: 46px 46px, 62px 62px, auto;
}
.bubble {
  position: relative; background: #fff; border-radius: 14px 14px 14px 4px; max-width: 420px;
  overflow: hidden; box-shadow: 0 1px 1px rgba(0,0,0,.13);
  font: 15px/1.4 -apple-system, "Segoe UI", Roboto, var(--f-body), sans-serif;
}
.bubble img { display: block; width: 100%; }
.bubble .tg-text, .bubble .muted { padding: 9px 12px 4px; white-space: pre-wrap; word-wrap: break-word; }
.bubble .tg-time { display: block; text-align: right; padding: 0 10px 6px; font-size: 11.5px; color: #8b9a8f; }
.tg-text a { color: var(--signal); }
.tg-text blockquote { margin: 4px 0; padding-left: 8px; border-left: 3px solid var(--signal); }
.tg-text tg-spoiler { background: #ccc; color: transparent; border-radius: 3px; }
.tg-button {
  max-width: 420px; margin-top: 4px; padding: 8px; border-radius: 8px; text-align: center;
  background: rgba(36, 64, 45, .26); color: #fff; font: 500 14px -apple-system, "Segoe UI", Roboto, sans-serif;
}
.tg-button[hidden] { display: none; }

/* ---------- картинки ---------- */
.gallery { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.gallery form { margin: 0; }
.thumb {
  padding: 0; width: 124px; height: 82px; border: 2px solid var(--rule); border-radius: var(--radius-sm);
  overflow: hidden; background: var(--fill);
}
.thumb:hover { border-color: #9fb0ab; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.none { font-weight: 500; color: var(--muted); font-size: 13px; white-space: normal; }
.thumb.selected { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(11, 97, 112, .18); }

/* ---------- получатели ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chips.pad { padding: 14px 22px; border-bottom: 1px solid var(--rule); margin: 0; }
.chip {
  padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 500;
  border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink);
}
a.chip:hover { text-decoration: none; background: var(--fill); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.recipients {
  max-height: 380px; overflow-y: auto; margin-bottom: 14px;
  border: 1px solid var(--rule); border-radius: var(--radius-sm);
}
.recipient {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "box name state" "box tags state";
  column-gap: 12px; align-items: center; margin: 0; padding: 10px 14px;
  font-weight: 400; color: var(--ink); border-bottom: 1px solid var(--rule); cursor: pointer;
}
.recipient:last-child { border-bottom: none; }
.recipient:hover { background: #f7faf9; }
.recipient:has(input:checked) { background: var(--teal-wash); }
.recipient input { grid-area: box; }
.recipient .name { grid-area: name; font-weight: 600; }
.recipient .tags { grid-area: tags; }
.recipient .tags:empty { display: none; }
.recipient .state { grid-area: state; font-size: 13px; text-align: right; }
.recipient.disabled { cursor: default; opacity: .6; }
.send-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--rule);
}
#send-count { font-size: 13.5px; }
.ack-options { margin: 4px 0 0; }
.ack-options label.check { margin-bottom: 8px; }
.ack-options label.sub { padding-left: 27px; color: var(--muted); font-size: 13.5px; }
.schedule { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 0; }
.schedule label.check { margin: 0; }
.schedule input[type="datetime-local"] { width: auto; margin: 0; padding: 7px 10px; }
.test-send { border-top: 1px solid var(--rule); margin-top: 16px; padding-top: 16px; }
.test-send .row { margin-bottom: 0; }
.result-actions { margin: 16px 0 0; justify-content: space-between; }
.result-actions form { margin: 0; }

/* ---------- переводы ---------- */
.lang-block { border-top: 1px solid var(--rule); padding-top: 18px; margin-top: 18px; }
.lang-block:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.lang-block textarea { margin: 0 0 10px; }

/* ---------- партнёры и чаты ---------- */
.chat-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.chat-row:last-child { border-bottom: none; }
.chat-row .chat-info { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.chat-row.inactive .chat-info b { color: var(--muted); }
.chat-chip { display: inline-block; padding: 1px 8px; margin: 1px 3px 1px 0; border-radius: 5px; font-size: 12.5px; }
.chat-chip.on { background: var(--ok-wash); color: #12513a; }
.chat-chip.off { background: var(--fill); color: #98a5a2; text-decoration: line-through; }
.steps { padding-left: 20px; margin: 0 0 14px; }
.steps li { margin-bottom: 10px; }
.steps li::marker { font-family: var(--f-mono); color: var(--teal); }
ul.status { padding-left: 18px; margin: 0 0 12px; }
ul.status li { margin-bottom: 6px; }

/* ---------- команда, профиль, настройки ---------- */
details summary { cursor: pointer; color: var(--teal); font-weight: 500; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "▸ "; font-family: var(--f-mono); }
details[open] summary::before { content: "▾ "; }
details.actions[open] { min-width: 300px; }
details.actions form { margin: 12px 0; }
.templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
details.tpl { border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: 12px 16px; background: var(--fill); }
details.tpl[open] { background: var(--surface); }
details.tpl[open] summary { margin-bottom: 12px; }
.qr { margin: 12px 0 8px; display: block; width: fit-content; padding: 8px; background: #fff; border: 1px solid var(--rule); border-radius: var(--radius-sm); }
.qr svg { display: block; }

/* ---------- вход: защитная розетка, как на банкноте ---------- */
body.auth { min-height: 100vh; overflow-x: hidden; }
body.auth main { min-height: 100vh; display: grid; place-items: center; align-content: center; padding-top: 0; padding-bottom: 0; }
body.auth main > .flash { position: relative; z-index: 1; width: min(400px, 100%); margin: 0 0 12px; }
.rosette {
  position: fixed; inset: 50% auto auto 50%; width: 1100px; height: 1100px;
  transform: translate(-50%, -50%); pointer-events: none; z-index: 0;
}
.rosette ellipse { fill: none; stroke: var(--teal); stroke-width: .6; opacity: .085; }
.login {
  position: relative; z-index: 1; width: min(400px, 100%); margin: 0; padding: 30px;
  box-shadow: 0 18px 50px -24px rgba(19, 35, 42, .35), var(--shadow);
}
.login .brand { color: var(--ink); margin-bottom: 22px; font-size: 15px; }
.login .brand-mark { border-color: var(--teal); }
.login .brand-mark::after { border-color: var(--teal); }
.login p { color: var(--ink-2); }

/* ---------- главная: ночной стол отправки ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  margin: 0 0 30px; padding: 34px 40px 0; border-radius: 20px; color: #dfeae8;
  background:
    radial-gradient(90% 120% at 18% 40%, rgba(70, 196, 201, .16), transparent 60%),
    radial-gradient(70% 90% at 100% 0%, rgba(35, 163, 109, .10), transparent 60%),
    linear-gradient(160deg, #18303a 0%, #13232a 55%, #0d1a20 100%);
  box-shadow: 0 30px 60px -38px rgba(13, 26, 32, .8);
}
.hero-guilloche {
  position: absolute; z-index: -1; width: 820px; height: 820px; left: -230px; top: 50%;
  transform: translateY(-50%); animation: hero-spin 260s linear infinite;
}
.hero-guilloche ellipse { fill: none; stroke: var(--teal-bright); stroke-width: .5; opacity: .11; }
@keyframes hero-spin { to { transform: translateY(-50%) rotate(360deg); } }

.hero-inner { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 44px; align-items: center; }
.hero-ring { position: relative; display: block; width: 290px; aspect-ratio: 1; color: inherit; }
.hero-ring:hover { text-decoration: none; }
.hero-ring svg { width: 100%; height: 100%; overflow: visible; }
.ring-track { fill: none; stroke: rgba(255, 255, 255, .06); stroke-width: 16; }
.ring-inner { fill: rgba(9, 20, 25, .55); stroke: rgba(70, 196, 201, .18); stroke-width: .8; }
.hero-ring path {
  fill: none; stroke-width: 16;
  stroke-dasharray: var(--len); stroke-dashoffset: var(--len);
  animation: ring-draw .8s cubic-bezier(.2, .7, .2, 1) var(--d) forwards;
  transition: stroke-width .2s;
}
.hero-ring path:hover { stroke-width: 22; }
.hero-ring path.s-sent { stroke: #3fb9c1; }
.hero-ring path.s-sent.ack { stroke: #3fd99a; filter: drop-shadow(0 0 6px rgba(63, 217, 154, .55)); }
.hero-ring path.s-failed { stroke: #ff7a5c; filter: drop-shadow(0 0 5px rgba(255, 122, 92, .5)); }
.hero-ring path.s-pending { stroke: #f2b544; }
.hero-ring path.s-deleted { stroke: #4a5e65; }
.hero.running .hero-ring path.s-pending { animation: ring-draw .8s cubic-bezier(.2, .7, .2, 1) var(--d) forwards, waiting 1.1s ease-in-out 1s infinite alternate; }
@keyframes ring-draw { to { stroke-dashoffset: 0; } }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; animation: rise .8s ease-out .5s both; }
.ring-center b { font: 600 50px/1 var(--f-mono); color: #fff; letter-spacing: -.03em; }
.ring-center b small, .hero-figures b small { font-size: .5em; color: #7f9d9a; letter-spacing: 0; }
.ring-center > span { margin-top: 8px; font-size: 13px; color: #9fb7b4; }

.hero-text > * { animation: rise .7s ease-out both; }
.hero-text > :nth-child(2) { animation-delay: .08s; }
.hero-text > :nth-child(3) { animation-delay: .16s; }
.hero-text > :nth-child(4) { animation-delay: .24s; }
.hero-text > :nth-child(5) { animation-delay: .32s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.hero-hello { margin: 0 0 22px; font-size: 15px; color: #c9d9d6; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.hero-hello .mono { color: #7f9d9a; font-size: 12px; }
.hero-label { margin: 0 0 10px; font: 500 11.5px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--teal-bright); }
.hero-title { font: 600 27px/1.25 var(--f-display); letter-spacing: -.015em; margin: 0 0 12px; max-width: 30ch; text-wrap: balance; }
.hero-title a { color: #fff; }
.hero-title a:hover { color: #bff0ee; text-decoration: none; }
.hero-meta { margin: 0 0 24px; color: #a9bdba; font-size: 14.5px; }
.hero-bad { color: #ff9a80; }
.hero-new { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-new select {
  width: auto; margin: 0; color: #e6efed; border-color: rgba(255, 255, 255, .16);
  background-color: rgba(255, 255, 255, .06);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239fb7b4' stroke-width='1.6'/%3E%3C/svg%3E");
}
.hero-new select:hover { border-color: rgba(255, 255, 255, .3); }
.hero-new select option { color: var(--ink); background: #fff; }
.hero-new button.primary { background: var(--teal-bright); border-color: var(--teal-bright); color: #08262c; }
.hero-new button.primary:hover { background: #7fdcdf; border-color: #7fdcdf; }
.hero :focus-visible { outline-color: var(--teal-bright); }

.hero-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap;
  margin: 30px -40px 0; padding: 16px 40px; border-top: 1px solid rgba(255, 255, 255, .07);
  background: rgba(6, 15, 19, .35);
}
.hero-figures { display: flex; flex-wrap: wrap; gap: 10px 0; }
.hero-figures > div { display: flex; flex-direction: column; padding-right: 26px; margin-right: 26px; border-right: 1px solid rgba(255, 255, 255, .08); }
.hero-figures > div:last-child { border-right: none; margin-right: 0; padding-right: 0; }
.hero-figures b { font: 600 21px/1.15 var(--f-mono); color: #fff; }
.hero-figures span { font-size: 12.5px; color: #8fa9a6; }
.hero-next {
  display: inline-flex; gap: 10px; align-items: baseline; padding: 7px 14px; border-radius: 999px;
  color: #f6d08a; background: rgba(242, 181, 68, .1); border: 1px solid rgba(242, 181, 68, .25); font-size: 13.5px;
}
.hero-next:hover { text-decoration: none; background: rgba(242, 181, 68, .16); }
.hero-next .mono { color: #f2b544; }
.list-head { font: 600 17px var(--f-display); letter-spacing: -.01em; margin: 0 0 14px; }

/* вход: розетка прорисовывается и медленно вращается */
.rosette { animation: rosette-spin 320s linear infinite; }
.rosette ellipse { stroke-dasharray: 1; stroke-dashoffset: 1; animation: rosette-draw 2.6s cubic-bezier(.3, .6, .2, 1) forwards; animation-delay: calc(var(--i) * 28ms); }
@keyframes rosette-spin { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes rosette-draw { to { stroke-dashoffset: 0; } }
.login { animation: rise .7s ease-out .3s both; }

/* ---------- мелкие экраны ---------- */
@media (max-width: 720px) {
  main { padding: 18px 14px; }
  .top { flex-wrap: wrap; height: auto; padding: 10px 14px 0; gap: 4px 12px; }
  .top .brand > span:last-child { display: none; }
  .top .me { margin-left: auto; }
  .top .me a { padding: 6px 8px; }
  .top nav { order: 3; flex-basis: 100%; margin: 0 -6px; }
  .top nav a { padding: 10px 8px 11px; }
  h1 { font-size: 20px; }
  .card { padding: 18px 16px; }
  table.list th, table.list td { padding: 10px 14px; }
  .send-bar { flex-direction: column; align-items: stretch; }
  .send-bar button { width: 100%; }
  .hero { padding: 24px 20px 0; border-radius: 16px; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 22px; justify-items: center; }
  .hero-ring { width: min(250px, 80vw); }
  .hero-text { width: 100%; }
  .hero-title { font-size: 21px; }
  .hero-guilloche { left: 50%; top: 150px; transform: translate(-50%, -50%); animation: none; }
  .hero-foot { margin: 24px -20px 0; padding: 14px 20px; }
  .hero-figures > div { padding-right: 16px; margin-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-ring path, .rosette ellipse { stroke-dashoffset: 0; }
}
