/* ═══ unibox — стили: левое меню, секции, бирюзовая тема ═══ */

:root {
    --accent:        #0d9488;
    --accent-hover:  #0f766e;
    --on-accent:     #ffffff;
    --accent-soft:   #d5f1ec;
    --bg:        #eceff2;
    --surface:   #ffffff;
    --surface-2: #f4f6f8;
    --text:      #0d1b2a;
    --muted:     #5b6b7c;
    --faint:     #94a3b3;
    --border:    #e3e7ec;
    --shadow:    0 1px 3px rgba(13,27,42,.07), 0 1px 2px rgba(13,27,42,.04);
    --shadow-lg: 0 12px 40px rgba(13,27,42,.16);
    --bubble-in:       #ffffff;
    --bubble-in-text:  var(--text);
    --bubble-out:      #cdeee8;
    --bubble-out-text: #06352f;
    --danger:    #dc2f33;
    --danger-bg: #fdecec;
    --success:   #16a34a;
    --radius:    16px;
    --radius-sm: 11px;
}
[data-theme="dark"] {
    --accent:        #2dd4bf;
    --accent-hover:  #5eead4;
    --on-accent:     #06302b;
    --accent-soft:   #14342f;
    --bg:        #0d141d;
    --surface:   #18222e;
    --surface-2: #1f2b38;
    --text:      #e8eef4;
    --muted:     #93a4b6;
    --faint:     #5f6f7e;
    --border:    #28333f;
    --shadow:    0 1px 3px rgba(0,0,0,.45);
    --shadow-lg: 0 16px 44px rgba(0,0,0,.6);
    --bubble-in:       #1f2b38;
    --bubble-in-text:  var(--text);
    --bubble-out:      #115e54;
    --bubble-out-text: #d7f3ee;
    --danger:    #f0696a;
    --danger-bg: #3b2125;
    --success:   #4ade80;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
    height: 100%;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 15px; line-height: 1.5; color: var(--text);
    -webkit-font-smoothing: antialiased; background: var(--bg);
}
input, button, textarea { font-family: inherit; font-size: 15px; color: var(--text); }
input:not([type=checkbox]):not([type=radio]), textarea { font-size: 16px; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus, textarea:focus { outline: none; }
.hidden { display: none !important; }
.screen { min-height: 100dvh; }

@keyframes riseIn  { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn   { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { transform: translateY(50px); } to { transform: none; } }
@keyframes paneIn  { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes spin    { to { transform: rotate(360deg); } }

/* ─── Кнопки ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 12px 18px; border: 1px solid transparent; border-radius: var(--radius-sm);
    font-weight: 600; cursor: pointer; background: var(--surface-2); color: var(--text);
    transition: transform .08s, background .15s, opacity .15s; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 4px 14px -4px var(--accent); }
.btn-primary:active { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--accent); border-color: var(--border); }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 13px; font-size: 13px; }

.icon-btn {
    width: 36px; height: 36px; border-radius: 10px; border: none;
    background: transparent; color: var(--muted); cursor: pointer; font-size: 16px;
    flex-shrink: 0; transition: background .15s, transform .08s;
    display: flex; align-items: center; justify-content: center;
}
.icon-btn:active { background: var(--surface-2); transform: scale(.92); }

/* ─── Поля ввода ──────────────────────────────────────────────── */
input[type=text], input[type=password], input[type=email], input[type=number],
input:not([type]), input[type=tel], input[type=search], textarea {
    width: 100%; padding: 12px 14px; border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
    outline: none; transition: border-color .15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 78px; }
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field-row { display: flex; gap: 8px; }
.field-row .field { flex: 1; }
.form-error {
    background: var(--danger-bg); color: var(--danger);
    padding: 10px 13px; border-radius: var(--radius-sm); font-size: 13px; animation: popIn .15s ease;
}
.form-hint { font-size: 12px; color: var(--faint); margin: -4px 0 12px; }

/* ─── Сегментированные переключатели ─────────────────────────── */
.auth-tabs, .status-tabs {
    display: flex; gap: 3px; background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 4px;
}
.auth-tab, .status-tab {
    flex: 1; padding: 9px 6px; border: none; border-radius: 8px; cursor: pointer;
    background: transparent; color: var(--muted); font-weight: 600; font-size: 13px;
    transition: background .15s, color .15s;
}
.auth-tab.active, .status-tab.active { background: var(--accent); color: var(--on-accent); }

/* ─── Экран авторизации ──────────────────────────────────────── */
.auth-screen {
    display: flex; align-items: center; justify-content: center; padding: 24px;
    background: radial-gradient(900px 460px at 50% -8%, #115e54 0%, transparent 70%),
                linear-gradient(180deg, #0c1c1a 0%, #081210 100%);
}
.auth-card {
    width: 100%; max-width: 380px; background: var(--surface);
    border-radius: 22px; padding: 30px 24px; box-shadow: 0 24px 60px rgba(0,0,0,.45);
    animation: popIn .25s ease;
}
.auth-logo { font-size: 34px; font-weight: 800; letter-spacing: -1.2px; text-align: center; color: var(--text); }
.auth-logo span { color: var(--accent); }
.auth-sub { text-align: center; color: var(--muted); font-size: 13px; margin: 5px 0 22px; }
.auth-tabs { margin-bottom: 18px; }
.auth-form { display: flex; flex-direction: column; gap: 11px; }

/* ─── Левое меню ─────────────────────────────────────────────── */
#menu-rail {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: 58px; padding-bottom: env(safe-area-inset-bottom);
    display: flex; flex-direction: row;
    background: var(--surface); border-top: 1px solid var(--border);
}
.rail-logo { display: none; }
.rail-logo span { color: var(--accent); }
.rail-item {
    flex: 1; position: relative; border: none; background: transparent; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--faint); transition: color .15s, background .15s;
}
.rail-item:active { background: var(--surface-2); }
.rail-item.active { color: var(--accent); }
.rail-item.active::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent);
}
.rail-ico { font-size: 21px; line-height: 1; }
.rail-label { font-size: 10px; font-weight: 600; }
.rail-badge {
    position: absolute; top: 5px; left: 56%;
    min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
    background: var(--danger); color: #fff; font-size: 10px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.avatar-mini {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff; font-weight: 700; font-size: 12px;
    display: flex; align-items: center; justify-content: center;
}

/* ─── Панели: каркас (мобильный — стек) ──────────────────────── */
#screen-app { display: block; }
.section { display: block; }
.pane {
    position: fixed; top: 0; left: 0; right: 0; bottom: 58px; z-index: 10;
    display: flex; flex-direction: column; background: var(--bg);
    animation: paneIn .24s ease;
}
#pane-threads { z-index: 11; }
#pane-main    { z-index: 12; }

.pane-top {
    flex-shrink: 0; display: flex; align-items: center; justify-content: space-between;
    gap: 8px; height: 62px;
    padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.pane-title {
    flex: 1; min-width: 0; font-size: 17px; font-weight: 800; letter-spacing: -.3px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pane-body {
    flex: 1; min-height: 0; overflow-y: auto;
    padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
}
.pane-main { background: var(--bg); }
.pane-main > * { flex: 1; min-height: 0; }
.pane-empty { display: flex; align-items: center; justify-content: center; }

/* ─── Десктоп: меню + колонки ────────────────────────────────── */
@media (min-width: 1024px) {
    #screen-app { display: flex; height: 100dvh; }
    #menu-rail {
        position: static; height: 100dvh; width: 86px; flex-direction: column;
        border-top: none; border-right: 1px solid var(--border); padding: 12px 0;
    }
    .rail-logo {
        display: block; text-align: center; color: var(--text);
        margin: 4px 0 16px; font-size: 16px; font-weight: 800; letter-spacing: -.5px;
    }
    .rail-item { flex: 0 0 auto; padding: 11px 4px; }
    .rail-item.active::before {
        top: 8px; bottom: 8px; left: 0; transform: none;
        width: 3px; height: auto; border-radius: 0 3px 3px 0;
    }
    .rail-badge { left: auto; right: 16px; }
    .rail-balance { margin-top: auto; }

    .section { flex: 1; min-width: 0; height: 100dvh; }
    #sec-projects { display: flex; }
    .pane { position: static; inset: auto; z-index: auto; height: 100dvh; animation: none; }
    /* Проект не выбран — окно проектов широкое (= проекты + диалоги). */
    #pane-projects { width: 664px; flex-shrink: 0; border-right: 1px solid var(--border);
                     transition: width .26s ease; }
    /* Проект выбран — окно проектов сужается, справа из него выезжают диалоги. */
    #screen-app.has-project #pane-projects { width: 300px; }
    #pane-threads  { width: 364px; flex-shrink: 0; border-right: 1px solid var(--border);
                     animation: paneIn .26s ease; }
    #pane-main     { flex: 1; min-width: 0; }
    .sec-pane {
        width: 100%; max-width: 620px; margin: 0;
        border-right: 1px solid var(--border);
    }
    .mobile-only { display: none !important; }
}

/* ─── Заголовки разделов внутри панелей ──────────────────────── */
.view-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.view-head h1 { font-size: 20px; font-weight: 800; letter-spacing: -.3px; flex: 1;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back-btn {
    border: 1px solid var(--border); background: var(--surface); color: var(--text);
    width: 36px; height: 36px; border-radius: 10px; cursor: pointer; font-size: 19px;
    flex-shrink: 0; align-self: center; line-height: 1; transition: transform .08s;
    display: flex; align-items: center; justify-content: center;
}
.back-btn:active { transform: scale(.92); }

/* ─── Карточки ───────────────────────────────────────────────── */
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
    animation: riseIn .22s ease;
}
.card + .card { margin-top: 10px; }
.card-tappable { cursor: pointer; transition: transform .08s, border-color .15s; }

/* ─── Баланс ─────────────────────────────────────────────────── */
.rail-balance-amt { display: none; font-size: 9px; font-weight: 700; color: var(--accent); }
@media (min-width: 1024px) { .rail-balance-amt { display: block; } }

.balance-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); text-align: center;
}
.balance-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.balance-amount {
    font-size: 33px; font-weight: 800; letter-spacing: -.5px;
    margin: 6px 0 16px; color: var(--text);
}
.balance-hint { font-size: 12px; color: var(--faint); margin: 14px 4px; line-height: 1.55; }
.balance-note { font-size: 13px; color: var(--muted); padding: 10px 4px; }
.ledger-list { padding: 2px 0; }
.ledger-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 11px 16px; border-bottom: 1px solid var(--border);
}
.ledger-row:last-child { border-bottom: none; }
.ledger-info { min-width: 0; }
.ledger-note { font-size: 13px; font-weight: 600; color: var(--text); }
.ledger-date { font-size: 11px; color: var(--faint); margin-top: 2px; }
.ledger-amt { font-size: 14px; font-weight: 700; flex-shrink: 0; white-space: nowrap; }
.ledger-amt.pos { color: var(--success); }
.ledger-amt.neg { color: var(--muted); }
.frozen-banner {
    background: var(--danger-bg); color: var(--danger);
    border-radius: var(--radius-sm); padding: 11px 13px; font-size: 13px;
    margin-bottom: 14px; line-height: 1.5;
}
.link-btn {
    background: none; border: none; padding: 0; cursor: pointer;
    color: var(--accent); font-weight: 700; font-size: inherit; text-decoration: underline;
}
.frozen-banner .link-btn { color: var(--danger); }

.proj-name { font-weight: 700; font-size: 16px; }
.proj-desc { color: var(--muted); font-size: 13px; margin-top: 4px;
    overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.proj-meta { display: flex; gap: 7px; align-items: center; margin-top: 12px; flex-wrap: wrap; }

.badge { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px;
    background: var(--surface-2); color: var(--muted); }
.badge-owner  { background: var(--accent-soft); color: var(--accent); }
.badge-member { background: var(--surface-2); color: var(--muted); }

.section-label {
    font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .5px; color: var(--faint); margin: 22px 0 9px;
}

/* ─── Список участников / контактов ──────────────────────────── */
.member-row, .contact-row {
    display: flex; align-items: center; gap: 11px; padding: 11px 0;
    border-bottom: 1px solid var(--border);
}
.member-row:last-child, .contact-row:last-child { border-bottom: none; }
.member-av {
    width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff; font-weight: 700; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
}
.member-info { flex: 1; min-width: 0; }
.member-name { font-weight: 600; }
.member-sub { font-size: 12px; color: var(--faint);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── Пустые состояния ───────────────────────────────────────── */
.empty { text-align: center; color: var(--muted); padding: 52px 20px; animation: fadeIn .25s ease; }
.empty-ico { font-size: 44px; }
.empty-text { margin-top: 10px; font-size: 14px; }

/* ─── Список диалогов ────────────────────────────────────────── */
.status-tabs { margin-bottom: 14px; }
.thread-row {
    display: flex; align-items: center; gap: 12px; padding: 12px 13px;
    background: var(--surface); cursor: pointer;
    transition: background .12s;
}
.thread-av {
    position: relative; width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff; font-weight: 700; font-size: 16px;
    display: flex; align-items: center; justify-content: center;
}
.thread-chan {
    position: absolute; right: -3px; bottom: -3px; width: 20px; height: 20px;
    border-radius: 50%; background: var(--surface);
    box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 2.5px var(--border);
    font-size: 11px; display: flex; align-items: center; justify-content: center;
}
.thread-main { flex: 1; min-width: 0; }
.thread-top { display: flex; align-items: baseline; gap: 8px; }
.thread-name { font-weight: 700; flex: 1; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-time { font-size: 11px; color: var(--faint); flex-shrink: 0; }
.thread-preview { font-size: 13px; color: var(--muted); margin-top: 3px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-preview.out::before { content: 'Вы: '; color: var(--faint); }
.thread-unread {
    min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px;
    background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.thread-count {
    display: flex; align-items: center; gap: 3px; flex-shrink: 0;
    font-size: 12px; font-weight: 600; color: var(--faint);
}

/* ─── Плоские списки (проекты / диалоги / приглашения) ───────── */
#chats-list, #ib-threads, #inv-list {
    margin-left: -16px; margin-right: -16px;
    border-top: 1px solid var(--border);
}
.proj-card, .thread-row, .inv-card {
    border: none; border-bottom: 1px solid var(--border);
    border-radius: 0; box-shadow: none; margin: 0 !important;
}
.proj-card:active, .thread-row:active { transform: none; background: var(--surface-2); }
.proj-card.active, .thread-row.active {
    background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent);
}

/* ─── Каналы (в настройках) ──────────────────────────────────── */
.chan-row { display: flex; align-items: center; gap: 11px; padding: 12px 0;
    border-bottom: 1px solid var(--border); }
.chan-row:last-child { border-bottom: none; }
.chan-ico {
    width: 40px; height: 40px; border-radius: 11px; background: var(--surface-2);
    display: flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0;
}
.chan-info { flex: 1; min-width: 0; }
.chan-name { font-weight: 600; }
.chan-sub { font-size: 12px; color: var(--faint); }
.chan-err { font-size: 12px; color: var(--danger); margin-top: 3px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.type-btn {
    display: flex; flex-direction: column; align-items: center; gap: 7px;
    padding: 18px 8px; border: 1.5px solid var(--border); border-radius: var(--radius);
    background: var(--surface); color: var(--text); cursor: pointer; font-weight: 600; font-size: 13px;
    transition: transform .08s, border-color .15s;
}
.type-btn:active { transform: scale(.97); border-color: var(--accent); }
.type-btn .type-ico { font-size: 28px; }

/* ─── Чат ────────────────────────────────────────────────────── */
.chat-screen { display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
.chat-header {
    display: flex; align-items: center; gap: 10px; flex-shrink: 0;
    height: 62px; min-height: 62px; max-height: 62px;
    padding: 0 12px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.chat-cust { flex: 1; min-width: 0; }
.chat-cust-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-cust-sub { font-size: 12px; color: var(--faint); }
.chat-messages {
    flex: 1; overflow-y: auto; padding: 14px 12px;
    display: flex; flex-direction: column; gap: 7px;
}
.msg-row { display: flex; }
.msg-row.in  { justify-content: flex-start; }
.msg-row.out { justify-content: flex-end; }
.bubble {
    max-width: min(540px, 78%); padding: 9px 13px 7px; border-radius: 18px;
    font-size: 14px; line-height: 1.42; word-wrap: break-word;
    box-shadow: var(--shadow);
}
.msg-text { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.bubble-in  { background: var(--bubble-in); color: var(--bubble-in-text);
    border: 1px solid var(--border); border-bottom-left-radius: 6px; }
.bubble-out { background: var(--bubble-out); color: var(--bubble-out-text);
    border-bottom-right-radius: 6px; }
.msg-time { font-size: 10px; opacity: .65; margin-top: 4px; text-align: right; }
.msg-author { font-size: 11px; font-weight: 700; opacity: .75; margin-bottom: 2px; }
.msg-att {
    display: flex; align-items: center; gap: 7px; margin-top: 6px; padding: 9px 11px;
    background: rgba(127,127,127,.14); border-radius: 11px; cursor: pointer; font-size: 13px;
}
.chat-day {
    align-self: center; font-size: 11px; color: var(--muted); font-weight: 600;
    background: var(--surface); border: 1px solid var(--border);
    padding: 4px 12px; border-radius: 999px; margin: 6px 0;
}
.chat-reply {
    flex-shrink: 0; display: flex; gap: 8px; align-items: flex-end;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--border);
}
.chat-reply textarea {
    flex: 1; min-height: 44px; resize: none; padding: 11px 15px;
    border-radius: 22px; line-height: 1.4; overflow-y: hidden;
    scrollbar-width: none;                 /* без полосы прокрутки (Firefox) */
}
.chat-reply textarea::-webkit-scrollbar { display: none; }  /* и в Chrome/Safari */
.chat-send {
    width: 44px; height: 44px; border-radius: 50%; border: none; flex-shrink: 0;
    background: var(--accent); color: var(--on-accent); font-size: 17px; cursor: pointer;
    box-shadow: 0 4px 14px -4px var(--accent); transition: transform .1s;
}
.chat-send:active { transform: scale(.9); }
.chat-send:disabled { opacity: .5; }

/* ─── Модальное окно ─────────────────────────────────────────── */
.modal-root { position: fixed; inset: 0; z-index: 100; display: flex;
    align-items: flex-end; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(7,15,20,.6); animation: fadeIn .15s ease; }
.modal {
    position: relative; width: 100%; max-width: 480px; background: var(--surface);
    border-radius: 22px 22px 0 0; max-height: 92dvh; overflow-y: auto;
    animation: slideUp .24s cubic-bezier(.2,.8,.2,1);
    padding-bottom: env(safe-area-inset-bottom); box-shadow: var(--shadow-lg);
}
.modal-head {
    position: sticky; top: 0; background: var(--surface); display: flex; align-items: center;
    justify-content: space-between; padding: 17px 16px 11px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 17px; font-weight: 700; }
.modal-body { padding: 16px; }
.modal-actions { display: flex; gap: 9px; margin-top: 16px; }
.modal-actions .btn { flex: 1; }
@media (min-width: 560px) {
    .modal-root { align-items: center; }
    .modal { border-radius: 22px; }
}

/* ─── Тост ───────────────────────────────────────────────────── */
.toast {
    position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%);
    z-index: 200; max-width: 90%;
    background: #0d1b2a; color: #fff; padding: 12px 19px; border-radius: 999px;
    font-size: 13px; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.4);
    animation: popIn .2s ease;
}
.toast.toast-error   { background: var(--danger); color: #fff; }
.toast.toast-success { background: var(--accent); color: var(--on-accent); }

/* ─── Спиннер ────────────────────────────────────────────────── */
.spinner-wrap { display: flex; justify-content: center; padding: 44px; }
.spinner {
    width: 30px; height: 30px; border: 3px solid var(--border);
    border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite;
}
