/*
 * Админка: каталог, серверы, настройки, сотрудники, тикеты, журналы, задачи.
 * Только переменные и приёмы из app.css.
 */

/* Скрытые по data-show-if элементы не должны появляться из-за display у классов. */
[hidden] { display: none !important; }

.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 13.5px; }
.nowrap-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; display: inline-block; vertical-align: bottom; }
.btn.is-copied { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-ink); }
.section-title { font-size: 13px; font-weight: 600; color: var(--text-3); margin: 4px 0 12px; }
.hint-line { color: var(--text-3); font-size: 13px; }
.panel-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.panel-head h2 .badge { margin-left: 8px; vertical-align: 2px; }
.form-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 18px; }
.form-grid-4 .span-2 { grid-column: span 2; }
.form-grid-4 .span-all, .form-grid-3 .span-all { grid-column: 1 / -1; }
.field-check { display: flex; align-items: flex-end; padding-bottom: 2px; }
.field-check > .field { margin-bottom: 16px; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.checks > .field { margin-bottom: 12px; }
.form-narrow { max-width: 860px; }
.danger-zone { border-color: var(--danger-line); }
.danger-zone .panel-head h2 { color: var(--danger-ink); }

/* ---------------------------------------------------------------- подменю раздела (настройки) */

.settings-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.subnav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; }
.subnav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius-s);
  color: var(--text-2); font-weight: 500; font-size: 14.5px; line-height: 1.3; border: 1px solid transparent;
}
.subnav a .icon { width: 17px; height: 17px; opacity: .8; }
.subnav a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.subnav a.is-active { background: var(--surface); color: var(--text); border-color: var(--line); box-shadow: inset 3px 0 0 var(--brand); }
.subnav .subnav-title { font-size: 12.5px; color: var(--text-3); font-weight: 500; margin: 16px 12px 4px; }
.subnav .subnav-title:first-child { margin-top: 0; }

/* ---------------------------------------------------------------- таблицы с полями ввода */

.table-form td { padding: 8px 8px; vertical-align: middle; }
.table-form th { padding: 9px 8px; }
.table-form td:first-child, .table-form th:first-child { padding-left: 18px; }
.table-form td:last-child, .table-form th:last-child { padding-right: 18px; }
.table-form .input, .table-form .select { height: 34px; font-size: 14px; padding: 0 9px; }
.table-form .select { padding-right: 28px; background-position: right 9px center; }
.table-form .input-group .addon { padding: 0 8px; font-size: 13px; }
.table-form .check { justify-content: center; }
.table-form tbody tr:hover td { background: transparent; }
.table-form tr.is-new td { background: var(--surface-2); }
.w-xs { width: 64px; }
.w-sm { width: 96px; }
.w-md { width: 140px; }
.w-lg { width: 200px; }
.w-xl { width: 270px; }
.table .input-group { flex-wrap: nowrap; }
.table .input-group .input { min-width: 0; }
.cell-check { text-align: center; }
.cell-check input { width: 17px; height: 17px; accent-color: var(--brand); }

/* ---------------------------------------------------------------- тарифы: цены и опции */

.price-table td { padding-top: 7px; padding-bottom: 7px; }
.price-table .period { font-weight: 500; white-space: nowrap; }
.price-table .money-cell { width: 180px; }
.price-table tr.is-off td:not(:first-child):not(:nth-child(2)) { opacity: .55; }

/* Опции заказа: свёрнутая карточка со сводкой, по «Изменить» — поля простым языком. */
.opt-list { display: grid; gap: 10px; }
.opt-list-new:not(:has(> .opt-card:not([hidden]))) { display: none; }
.opt-list + .opt-list { margin-top: 10px; }
.opt-empty { margin-bottom: 0; }
.opt-card { border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); transition: border-color .12s ease, box-shadow .12s ease; }
.opt-card:hover { border-color: var(--line-strong); }
.opt-card[open] { border-color: var(--line-strong); box-shadow: 0 10px 30px -22px rgba(20, 32, 56, .45); }
.opt-card.is-new { border-style: dashed; }
.opt-card.is-new[open] { border-style: solid; }
.opt-summary { display: flex; align-items: center; gap: 14px; padding: 12px 16px; cursor: pointer; list-style: none; border-radius: var(--radius-m); }
.opt-summary::-webkit-details-marker { display: none; }
.opt-ico { flex: none; width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); }
.opt-ico .icon { width: 17px; height: 17px; }
.is-linked .opt-ico { background: var(--info-bg); color: var(--info-ink); }
.opt-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.opt-title { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.opt-title .badge .icon { width: 12px; height: 12px; }
.opt-meta { color: var(--text-3); font-size: 13px; }
.opt-price { flex: 0 1 auto; text-align: right; display: flex; flex-direction: column; min-width: 0; max-width: 44%; }
.opt-price strong { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.opt-price small { color: var(--text-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-toggle { flex: none; color: var(--brand-ink); font-size: 13.5px; font-weight: 500; min-width: 72px; text-align: right; }
.opt-card .when-open, .opt-card[open] .when-closed { display: none; }
.opt-card[open] .when-open { display: inline; }
.opt-body { padding: 4px 16px 16px; border-top: 1px solid var(--line); }
.opt-fields { padding-top: 14px; }
.opt-fields .field { margin-bottom: 14px; }
.opt-fields .field > label, .opt-fields .label { font-size: 13.5px; }
.opt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.opt-grid .span-2 { grid-column: span 2; }
.opt-block { margin-top: 2px; }
.opt-example { margin: 0 0 14px; }
.opt-example b { font-weight: 600; }
.variants .table-wrap { border: 1px solid var(--line); border-radius: var(--radius-s); margin-top: 2px; }
.variants-table th, .variants-table td { padding-top: 6px; padding-bottom: 6px; }
.variants-table th:first-child, .variants-table td:first-child { padding-left: 10px; }
.variants-table th:last-child, .variants-table td:last-child { padding-right: 6px; width: 44px; }
.variants-table .money-cell { width: 170px; }
.variants-table .v-value { width: 190px; }
.variants:not(.show-values) .v-value { display: none; }
.variants-table .v-license { width: 240px; }
.variants-table .v-license .select { width: 100%; }
.variants-foot { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 10px 0 8px; }
.opt-more { margin-top: 4px; }
.opt-more > summary { cursor: pointer; color: var(--text-2); font-size: 13.5px; list-style: none; display: inline-flex; align-items: center; gap: 8px; }
.opt-more > summary::-webkit-details-marker { display: none; }
.opt-more > summary::before { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); transition: transform .15s ease; }
.opt-more[open] > summary::before { transform: rotate(45deg); }
.opt-more > summary:hover { color: var(--text); }
.opt-foot { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-top: 10px; padding-top: 12px; border-top: 1px dashed var(--line); }
.opt-foot .field { margin-bottom: 0; }
.opt-foot .opt-sort .input { width: 90px; }
.opt-delete { margin-left: auto; color: var(--danger-ink); font-size: 13.5px; }
.opt-card:has(.opt-delete input:checked) { border-color: var(--danger-line); background: color-mix(in srgb, var(--danger-bg) 35%, var(--surface)); }
.opt-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.static-value { height: 40px; display: flex; align-items: center; color: var(--text-2); }
.linked-prices .money-cell { width: 180px; }
.library-pick { display: grid; gap: 14px; max-height: 52vh; overflow: auto; }
.library-pick legend { font-size: 13px; color: var(--text-3); font-weight: 500; margin-bottom: 6px; }
.library-pick .check { padding: 6px 0; }
.library-pick .help { display: block; margin-top: 0; }
.option-grid-qty { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 14px; }
@media (max-width: 760px) {
  .opt-grid { grid-template-columns: minmax(0, 1fr); }
  .opt-grid .span-2 { grid-column: auto; }
  .opt-summary { flex-wrap: wrap; }
  .opt-price { order: 3; flex-basis: 100%; max-width: none; text-align: left; padding-left: 48px; }
  .opt-toggle { min-width: 0; }
}

.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 20px; }
.check-grid .field { margin-bottom: 10px; }

.module-box { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px 16px 4px; margin-top: 4px; background: var(--surface-2); }
.module-box .module-box-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.module-box .module-box-head strong { font-weight: 600; }

.group-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.flag-off { color: var(--text-3); }

/* ---------------------------------------------------------------- серверы и сверка аккаунтов */

.server-name { display: flex; align-items: center; gap: 10px; }
.check-result { display: block; color: var(--text-3); font-size: 12.5px; margin-top: 2px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recon-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; margin-bottom: 20px; }
.recon-counts > div { padding: 14px 18px; border-right: 1px solid var(--line); }
.recon-counts > div:last-child { border-right: 0; }
.recon-why { border-bottom: 1px solid var(--line); }
.panel-link-form { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.panel-link-form .select { width: auto; max-width: 260px; height: 32px; font-size: 13.5px; padding-top: 0; padding-bottom: 0; }
.recon-why ul { padding-left: 18px; color: var(--text-2); font-size: 13.5px; }
.recon-why li + li { margin-top: 4px; }
.recon-why b { color: var(--text); }
.recon-counts .label { color: var(--text-3); font-size: 13px; display: flex; gap: 8px; align-items: center; }
.recon-counts .value { font-family: var(--font-display); font-size: 25px; font-weight: 600; margin-top: 4px; }

/* ---------------------------------------------------------------- шаблоны писем */

.mail-preview { display: block; width: 100%; height: 620px; border: 1px solid var(--line); border-radius: var(--radius-s); background: #f3f4f1; }
.mail-subject { padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface-2); margin-bottom: 12px; font-weight: 500; }
.var-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.var-list li { font-size: 13px; line-height: 1.35; }
.var-list code { cursor: copy; display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
.var-list code:hover { background: var(--brand-soft); color: var(--brand-ink); }
.var-list .muted { display: block; margin-top: 2px; }
.template-body { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; min-height: 340px; }

/* ---------------------------------------------------------------- журналы и задачи */

.log-pre { max-height: 520px; overflow: auto; margin: 0; }
.log-details summary { cursor: pointer; color: var(--brand-ink); font-size: 13px; }
.log-details[open] summary { margin-bottom: 8px; }
.log-details pre { margin: 0; max-height: 320px; overflow: auto; }
.error-text { color: var(--danger-ink); font-size: 13px; overflow-wrap: anywhere; }
.mail-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.6; margin: 0; }
.cmd { display: flex; gap: 8px; align-items: stretch; }
.cmd .input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px; }
.req-list { list-style: none; margin: 0; padding: 0; }
.req-list li { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.req-list li:last-child { border-bottom: 0; }
.req-list .note { margin-left: auto; color: var(--text-3); font-size: 13px; text-align: right; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- тикеты */

.ticket-subject { display: flex; align-items: center; gap: 8px; }
.waiting { font-size: 12.5px; color: var(--text-3); }
.waiting.is-late { color: var(--danger-ink); }
.reply-box .textarea { min-height: 160px; }
.reply-box .form-actions { justify-content: space-between; }
.msg-internal .msg-head .who::after { content: "внутренняя заметка"; font-weight: 500; font-size: 12px; color: var(--warn-ink); background: var(--surface); border: 1px solid var(--warn-line); border-radius: 999px; padding: 0 8px; line-height: 19px; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { padding: 10px 18px; border-bottom: 1px solid var(--line); font-size: 14px; }
.side-list li:last-child { border-bottom: 0; }

/* ---------------------------------------------------------------- профиль и 2FA */

.totp-setup { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 22px; align-items: start; }
.qr { width: 200px; height: 200px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); }
.qr svg { width: 100%; height: 100%; display: block; }
.secret-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 17px; letter-spacing: .06em; }
.code-input { max-width: 180px; font-size: 18px; letter-spacing: .2em; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- адаптив */

@media (max-width: 1100px) {
  .option-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .form-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .settings-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .subnav { position: static; flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .subnav a { white-space: nowrap; }
  .subnav .subnav-title { display: none; }
  .totp-setup { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .option-grid, .option-grid-qty, .form-grid-4 { grid-template-columns: minmax(0, 1fr); }
  .form-grid-4 .span-2 { grid-column: auto; }
  .recon-counts { grid-template-columns: minmax(0, 1fr); }
  .recon-counts > div { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* ---------------------------------------------------------------- редактор шаблона письма */

.template-editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.template-vars { border-left: 1px solid var(--line); padding-left: 20px; max-height: 560px; overflow-y: auto; overflow-x: hidden; }
.money-cell.has-error .input { border-color: var(--danger); }
@media (max-width: 1250px) {
  .template-editor { grid-template-columns: minmax(0, 1fr); }
  .template-vars { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 16px; max-height: none; }
}
.reply-box .form-actions { align-items: flex-end; }
.reply-box .form-actions .gap > div > .field { margin-bottom: 0; }
.input[type="file"] { height: auto; padding: 7px 10px; }
.group-tabs .pill-count { font-size: 12.5px; opacity: .7; margin-left: 2px; font-variant-numeric: tabular-nums; }
.tabs .badge { line-height: 18px; padding: 0 7px; font-size: 11.5px; }

/* ---------------------------------------------------------------- доработки после проверки на экране */

.products-table { table-layout: fixed; }
.products-table .c-name { width: 27%; }
.products-table .c-module { width: 25%; }
.products-table .c-price { width: 18%; }
.products-table .c-visible { width: 12%; }
.products-table .c-order { width: 10%; }
.products-table .c-count { width: 8%; }
.products-table td { overflow-wrap: anywhere; }
.add-options > summary { list-style: none; display: inline-flex; }
.add-options > summary::-webkit-details-marker { display: none; }
.add-options[open] > summary { background: var(--surface-2); }
@media (max-width: 640px) { .products-table { table-layout: auto; } }
.tpl-table { table-layout: fixed; }
.tpl-table .c-code { width: 220px; }
.tpl-table .c-state { width: 160px; }
.tpl-table .c-sent { width: 186px; }
.tpl-table td { overflow-wrap: anywhere; }
.tpl-table td .badge { margin: 1px 4px 1px 0; }
.tpl-table .secondary { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) {
  .tpl-table { table-layout: auto; }
  .tpl-table .c-state { width: auto; }
  .tpl-table .secondary { white-space: normal; }
}
.tld-table td, .tld-table th { padding-left: 6px; padding-right: 6px; }
.tld-table .w-reg { width: 172px; }
.tld-table .w-money { width: 78px; text-align: right; }
.tld-table .w-year { width: 54px; padding: 0 6px; }
.tld-table .w-prof { width: 106px; }
.server-name .badge { margin-left: 2px; }
.server-name { flex-wrap: wrap; row-gap: 2px; }
.server-name .primary { white-space: nowrap; }
.check-result { max-width: 280px; }
.panel-foot .input, .panel-foot .select { height: 36px; font-size: 14px; }
.kv.mb-2 { margin-bottom: 16px; }
.kv.kv-side { grid-template-columns: max-content minmax(0, 1fr); gap: 8px 14px; }
.kv.kv-side dd { margin-bottom: 0; }
.secret-box { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 8px 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface-2); }
.secret-box .secret-code { font-size: 15px; line-height: 1.5; word-spacing: 2px; }
.side-list .led { margin-right: 6px; vertical-align: 1px; }
.linked-service { border-bottom: 1px solid var(--line); }
.cmd-line { background: none; padding: 0; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.stat .value .status { font-size: 19px; gap: 10px; }
.date-filter { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-3); }
.filters .date-filter .input { width: 150px; min-width: 0; }
.filters .input.w-md { width: 140px; min-width: 0; }

/* Импорт тарифов провайдера */
.period-grid { display: grid; gap: 8px 28px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.period-row { display: flex; align-items: center; gap: 12px; min-height: 36px; }
.period-row .check { white-space: nowrap; min-width: 96px; }
.period-row .gap { white-space: nowrap; }
/* Импорт тарифов: дополнения провайдера, которые завести опциями заказа. */
.addon-picks { display: grid; gap: 6px 28px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.addon-picks .check { align-items: flex-start; }
.addon-picks .check > span { line-height: 1.45; }
.sticky-actions { position: sticky; bottom: 0; padding: 12px 0; background: var(--bg); border-top: 1px solid var(--line); z-index: 2; }
.os-choice { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius-m); }

/* Поле и единица рядом: «7 [₽ к курсу]» */
.input-pair { display: inline-flex; gap: 6px; align-items: center; }
.input-pair .select { width: auto; }

/* Строка с адресом и кнопкой «скопировать» */
.copy-line { display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.copy-line code { word-break: break-all; }

/* Кластеры и узлы VMmanager на странице сервера */
.topology-table .topology-cluster td { background: var(--surface-2); }
.topology-table .topology-node td:first-child { padding-left: 34px; position: relative; }
.topology-table .tree-branch { position: absolute; left: 20px; top: 0; bottom: 50%; width: 9px; border-left: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.topology-table .input-pair .select { max-width: 190px; }
.topology-table .input-pair .input { width: 140px; }
.panel.is-attention { border-color: var(--warn-line); box-shadow: inset 3px 0 0 var(--warn-ink); }

/* ---------------------------------------------------------------- библиотека дополнений */

.linked-prices td, .linked-prices th { padding-top: 6px; padding-bottom: 6px; }
.library-pick fieldset, .product-pick { border: 0; padding: 0; margin: 0; min-width: 0; }
.library-pick legend, .product-pick legend { font-size: 13px; font-weight: 600; color: var(--text-2); padding: 0; margin-bottom: 8px; }
.library-pick .help { display: block; color: var(--text-3); font-size: 12.5px; margin-top: 1px; }
.product-pick { margin-bottom: 14px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.product-pick:last-of-type { border-bottom: 0; }
.product-pick legend { display: flex; gap: 14px; align-items: center; width: 100%; }
.product-pick legend .check { font-weight: 400; color: var(--text-3); }
.product-pick .badge { margin-left: 4px; }
.addons-table .choices-cell { max-width: 420px; color: var(--text-2); }


/* Подвкладки внутри вкладки: «Действующие / Удалённые» */
.tabs.tabs-sub { border-bottom: 0; gap: 6px; margin: -6px 0 14px; }
.tabs.tabs-sub a { padding: 5px 12px; border: 1px solid var(--line-strong); border-radius: 999px; margin-bottom: 0; font-size: 13.5px; background: var(--surface); }
.tabs.tabs-sub a.is-active { background: var(--text); border-color: var(--text); color: var(--surface); }
/* Счётчик на тёмной активной «таблетке»: свой полупрозрачный фон от цвета текста — виден в обеих темах. */
.tabs.tabs-sub a.is-active .count { color: inherit; background: color-mix(in srgb, currentColor 20%, transparent); }

/* Тарифы: поиск, отбор «без страны» и страна для отмеченных */
.products-filters .filters { border-bottom: 0; }
.products-filters .filters .input[type="search"] { flex: 1 1 280px; max-width: 420px; }
.products-table .c-check { width: 44px; }
.bulk-place-body { display: flex; gap: 12px 18px; align-items: flex-end; flex-wrap: wrap; padding: 14px 18px; }
.bulk-place-text { flex: 1 1 240px; display: flex; flex-direction: column; gap: 2px; align-self: center; }
.bulk-place .form-grid { flex: 2 1 420px; margin: 0; }
.bulk-place .field { margin-bottom: 0; }

/* ---------------------------------------------------------------- оформление: темы, цвет, логотип */

.theme-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.theme-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 14px 44px; border: 1px solid var(--line-strong); border-radius: var(--radius-m); background: var(--surface); cursor: pointer; }
.theme-card:hover { border-color: var(--text-3); }
.theme-card input { position: absolute; left: 16px; top: 17px; width: 16px; height: 16px; margin: 0; accent-color: var(--brand); }
.theme-card:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.theme-card .title { font-weight: 600; display: flex; gap: 8px; align-items: center; }
.theme-card .meta { color: var(--text-2); font-size: 13px; }
.theme-swatches { display: flex; gap: 0; margin-bottom: 4px; }
.theme-swatches i { width: 28px; height: 20px; border: 1px solid rgba(0, 0, 0, .08); }
.theme-swatches i:first-child { border-radius: 6px 0 0 6px; }
.theme-swatches i:last-child { border-radius: 0 6px 6px 0; }
.accent-row { display: flex; flex-wrap: wrap; gap: 4px 28px; align-items: flex-start; }
.accent-pick { display: flex; gap: 12px; align-items: center; }
.accent-pick input[type="color"] { width: 52px; height: 40px; padding: 3px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface); cursor: pointer; }
.accent-field { margin-bottom: 0; }
.logo-row { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.logo-preview { display: flex; align-items: center; gap: 10px; min-width: 220px; min-height: 64px; padding: 14px 18px; border-radius: var(--radius-m); background: var(--side-bg); border: 1px solid var(--side-line); font-weight: 600; }

/* ---------------------------------------------------------------- новости и промо */

.promo-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.promo-admin { display: flex; flex-direction: column; gap: 10px; }
.promo-admin > .promo { flex: 1 1 auto; }
.promo-admin-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.tone-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.tone-blue { background: #1f66f2; } .tone-green { background: #16774a; } .tone-violet { background: #6a3fd8; } .tone-amber { background: #e09b12; } .tone-dark { background: #1f2d4a; }

/* ---------------------------------------------------------------- названия опций после переноса */

.option-names td { vertical-align: top; }
.option-names td:nth-child(1) { width: 22%; }
.option-names td:nth-child(3) { width: 30%; }
.option-names td:nth-child(4) { width: 130px; }
.option-names .input { width: 100%; }
.option-names td .secondary { margin-top: 3px; }
.option-names-values { color: var(--text-2); font-size: 13.5px; overflow-wrap: anywhere; }
/* Состояние системы: платёжные системы — текст последней ошибки под строкой */
.req-list li.req-detail { padding-top: 0; margin-top: -6px; border-bottom: 1px solid var(--line); }
.req-list .note form.inline { margin-left: 8px; }

/* ---------------------------------------------------------------- переводы каталога («Каталог → Переводы») */

.tr-row > td { padding-top: 0 !important; background: var(--surface-2); }
.tr-row details > summary { cursor: pointer; font-size: 13.5px; color: var(--text-2); padding: 6px 0 10px; list-style: none; }
.tr-row details > summary::-webkit-details-marker { display: none; }
.tr-row details > summary::before { content: '▸ '; }
.tr-row details[open] > summary::before { content: '▾ '; }

/* Строка «Переводы» в форме тарифа и дополнения */
.tr-line { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); }
.tr-line.is-todo { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.tr-line-icon { display: inline-flex; width: 34px; height: 34px; flex: none; align-items: center; justify-content: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); }
.tr-line-icon svg { width: 18px; height: 18px; }
.tr-line-text { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; }
.tr-chip { display: inline-flex; gap: 5px; align-items: baseline; padding: 2px 9px; border-radius: 999px; background: var(--muted-bg); color: var(--text-2); font-size: 13px; white-space: nowrap; }
.tr-chip b { font-weight: 600; color: var(--text); font-size: 12px; letter-spacing: .02em; }
.tr-chip.is-done { background: var(--ok-bg); color: var(--ok-ink); }

/* Сколько переведено */
.tr-progress { padding: 16px 20px; }
.tr-progress-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 10px; font-size: 15px; }
.tr-only { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px 3px 11px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: 13px; }
.tr-only:hover { text-decoration: none; filter: brightness(.97); }
.tr-only svg { width: 14px; height: 14px; }
.tr-bar { display: flex; height: 8px; border-radius: 999px; background: var(--muted-bg); overflow: hidden; }
.tr-bar-manual { background: var(--brand); }
.tr-bar-auto { background: color-mix(in srgb, var(--brand) 40%, var(--surface)); }
.tr-legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; font-size: 13px; color: var(--text-2); }
.tr-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--muted-bg); box-shadow: inset 0 0 0 1px var(--line-strong); vertical-align: 0; }
.tr-dot-manual { background: var(--brand); box-shadow: none; }
.tr-dot-auto { background: color-mix(in srgb, var(--brand) 40%, var(--surface)); box-shadow: none; }

/* Отбор и таблица строк */
.tr-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 10px; background: var(--muted-bg); max-width: 100%; }
.tr-seg a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.tr-seg a:hover { color: var(--text); text-decoration: none; }
.tr-seg a.is-active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(20, 32, 56, .1), 0 0 0 1px var(--line); }
.tr-seg .count { font-size: 12px; color: var(--text-3); }
.tr-filters .input[type="search"] { flex: 1; max-width: 360px; }
.tr-table td { vertical-align: top; }
.tr-table td:first-child { width: 46%; }
.tr-source { display: block; margin: 0; font-weight: 500; color: var(--text); white-space: pre-line; overflow-wrap: anywhere; cursor: text; }
.tr-table td .secondary { margin-top: 4px; }
.tr-table .input, .tr-table .textarea { width: 100%; }
.tr-table tr.tr-manual .input, .tr-table tr.tr-manual .textarea { border-color: color-mix(in srgb, var(--brand) 30%, var(--line-strong)); }
.tr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 20px; }
.tr-actions .hint-line { margin: 0; }
@media (max-width: 720px) {
  .tr-line { flex-wrap: wrap; }
  .tr-table td:first-child { width: auto; }
  .tr-filters .input[type="search"] { max-width: none; min-width: 0; }
}

/* Импорт тарифов своего VMmanager: цена в месяц вводится в таблице */
.price-input { width: 120px; margin-left: auto; text-align: right; }
