/* Настройки монет и привилегий используют те же карточки, поля и цвета, что и чат-бот. */
.channel-settings { padding-bottom: 32px; }
.channel-settings .bot-head { align-items: center; padding-bottom: 28px; }
.channel-settings .bot-head-sub { max-width: 52rem; line-height: 1.6; }
.cs-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; }
.cs-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.cs-rail { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 20px; min-width: 0; }
.cs-card-body { display: flex; flex-direction: column; gap: 20px; padding: 20px; border-top: 1px solid var(--b-line); }
.cs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.cs-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cs-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cs-field .bot-input-with-suffix { width: 100%; }
.cs-label { font-size: 0.8125rem; font-weight: 500; color: var(--b-fg-2); }
.cs-description { font-size: 0.78125rem; line-height: 1.6; color: var(--b-fg-3); }
.cs-status { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--b-line); border-radius: 100px; font-size: 0.75rem; color: var(--b-fg-2); }
.cs-status::before { content: ""; width: 6px; height: 6px; background: var(--b-fg-3); border-radius: 50%; flex-shrink: 0; }
.cs-status.on::before { background: var(--b-ok); }
.cs-preview { padding: 20px; border: 1px solid var(--b-line); border-radius: var(--b-r-lg); background: var(--b-surface); min-width: 0; }
.cs-preview h2, .cs-preview h3 { font-size: 0.8125rem; font-weight: 600; line-height: 1.5; }
.cs-preview > p { margin-top: 6px; font-size: 0.75rem; color: var(--b-fg-3); line-height: 1.6; }
.cs-preview-value { display: block; margin-top: 20px; color: var(--b-accent-hi); font-size: 2rem; font-weight: 650; letter-spacing: -0.04em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.cs-preview-caption { display: block; margin-top: 6px; color: var(--b-fg-3); font-size: 0.75rem; line-height: 1.6; }
.cs-metric { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--b-line); font-size: 0.78125rem; line-height: 1.5; color: var(--b-fg-2); }
.cs-metric:last-child { border-bottom: 0; padding-bottom: 0; }
.cs-metric b, .cs-metric strong { color: var(--b-fg); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.cs-note { padding: 16px 18px; border: 1px solid var(--b-line); border-radius: var(--b-r); background: var(--b-surface-2); color: var(--b-fg-2); font-size: 0.78125rem; line-height: 1.65; }
.cs-note p + p { margin-top: 8px; }
.cs-note b, .cs-note strong { color: var(--b-fg); font-weight: 600; }
.cs-note a, .cs-link { color: var(--b-accent-hi); text-decoration: none; }
.cs-note a:hover, .cs-link:hover { color: #c4a1ff; text-decoration: underline; }
.cs-link-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border: 1px solid var(--b-line); border-radius: var(--b-r-lg); background: var(--b-surface); color: var(--b-fg); text-decoration: none; transition: border-color .18s; }
.cs-link-card:hover { color: var(--b-fg); border-color: var(--b-accent-line); text-decoration: none; }
.cs-link-card strong { display: block; font-size: 0.875rem; font-weight: 600; }
.cs-link-card small, .cs-link-card p { display: block; margin-top: 5px; color: var(--b-fg-3); font-size: 0.78125rem; line-height: 1.6; }
.cs-link-card > svg { width: 18px; height: 18px; color: var(--b-accent-hi); flex-shrink: 0; }
.cs-table-wrap { max-width: 100%; overflow-x: auto; }
.cs-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; text-align: left; }
.cs-table th { padding: 12px 20px; border-block: 1px solid var(--b-line); background: var(--b-surface-2); color: var(--b-fg-3); font-size: 0.6875rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.cs-table td { padding: 14px 20px; border-bottom: 1px solid var(--b-line); color: var(--b-fg-2); vertical-align: middle; }
.cs-table tbody tr:last-child td { border-bottom: 0; }
.cs-table tbody tr:hover { background: rgba(255,255,255,.02); }
.cs-viewer { display: flex; align-items: center; gap: 10px; min-width: 140px; }
.cs-viewer img, .cs-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.cs-avatar { display: inline-flex; align-items: center; justify-content: center; background: var(--b-accent-dim); color: var(--b-accent-hi); }
.cs-viewer-name { color: var(--b-fg); font-weight: 500; }
.cs-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border: 1px solid var(--b-accent-line); border-radius: 6px; color: var(--b-accent-hi); font-size: 0.6875rem; line-height: 1.4; white-space: nowrap; }
.cs-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.cs-savebar { position: sticky; bottom: 16px; z-index: 80; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; padding: 12px 16px; border: 1px solid var(--b-accent-line); border-radius: 14px; background: rgba(20,20,31,.97); box-shadow: 0 8px 32px rgba(0,0,0,.24); }
body:has(.channel-settings .cs-savebar) .support-fab { bottom: 104px; }
.channel-settings .bot-toggle:focus-within .bot-toggle-track { outline: 2px solid var(--b-accent-hi); outline-offset: 3px; }
.channel-settings .bot-power:focus-within { outline: 2px solid var(--b-accent-hi); outline-offset: 3px; }
.channel-settings .bot-input:disabled { opacity: .55; }
.channel-settings .bot-reward-tabs { flex-wrap: wrap; max-width: 100%; align-self: flex-start; }
.channel-settings a:focus-visible, .channel-settings button:focus-visible { outline: 2px solid var(--b-accent-hi); outline-offset: 3px; }
@media (max-width: 1120px) {
    .cs-layout { grid-template-columns: minmax(0, 1fr); }
    .cs-rail { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@media (max-width: 720px) {
    .channel-settings .bot-head { align-items: flex-start; gap: 16px; padding-bottom: 20px; }
    .cs-grid, .cs-grid-3, .cs-rail { grid-template-columns: minmax(0, 1fr); }
    .cs-main { gap: 16px; }
    .cs-card-body, .cs-preview { padding: 16px; }
    .cs-table th, .cs-table td { padding-inline: 16px; }
    .cs-savebar { bottom: 10px; flex-wrap: wrap; gap: 10px; padding: 12px; }
    .cs-savebar .bot-save-actions { margin-left: auto; }
    body:has(.channel-settings .cs-savebar) .support-fab { bottom: calc(132px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 768px) {
    /* overflow:hidden создаёт отдельный scroll-контейнер и мешает sticky-панели.
       clip сохраняет обрезку по горизонтали, не меняя контейнер прокрутки. */
    body .dashboard-app:has(.channel-settings),
    body .dashboard-main:has(.channel-settings) { overflow-x: clip; }
}
