/* Админка: поверх dashboard.css (токены, шрифты, шапка, карточки) —
   только то, чего нет в дашборде: таблицы, метки состояния, формы. */

.dash-main { max-width: 1120px; }
.dash-nav-inner, .dash-tabs { max-width: 1120px; }

.notice { background: var(--surface-2); border-radius: 12px; padding: 10px 14px; font-size: .9rem; font-weight: 600; }
.crumbs { font-size: .85rem; }
.crumbs a, .link-muted, .ch-head a { color: var(--muted); text-decoration: none; font-size: .85rem; font-weight: 600; }
.crumbs a:hover, .link-muted:hover, .ch-head a:hover { color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: .78rem; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .88em; letter-spacing: .02em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.kpi-grid.kpi-3 { grid-template-columns: repeat(3, 1fr); }
.kpi-link { text-decoration: none; color: inherit; display: block; }
.kpi-link:hover { border-color: var(--muted); }
.kpi-link[aria-current="true"] { border-color: var(--accent); }

.filters input.search, .inline-form input {
  font: inherit; font-size: .9rem; padding: 9px 12px; min-height: 40px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); min-width: 240px;
}
.filters { align-items: center; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }

.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.table-card h3 { font-size: .85rem; color: var(--muted); font-weight: 700; margin: 16px 0 6px; text-transform: none; }
.table-card .table-scroll { overflow-x: auto; max-height: none; margin-top: 0; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin-table th, .admin-table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table thead th { color: var(--muted); font-weight: 600; font-size: .8rem; white-space: nowrap; }
.admin-table tbody tr:last-child th, .admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody th { font-weight: 600; }
.admin-table a { color: var(--ink); }
.admin-table.numeric td, .admin-table.numeric thead th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table .row-empty td, .admin-table .row-empty th { color: var(--muted); }
.admin-table td.actions { text-align: right; white-space: nowrap; }
.admin-table td.actions form { display: inline; }
.empty-row { color: var(--muted); font-size: .9rem; padding: 6px 0; }
.plain-list { margin: 0; padding-left: 18px; font-size: .88rem; line-height: 1.7; }

.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 100px; white-space: nowrap; }
.badge-ok, .badge-sent { background: rgba(30, 158, 92, .12); color: var(--ok); }
.badge-silent, .badge-pending { background: rgba(185, 120, 10, .14); color: var(--attn); }
.badge-deleted, .badge-failed { background: var(--surface-2); color: var(--muted); }
@media (prefers-color-scheme: dark) {
  .badge-ok, .badge-sent { background: rgba(53, 208, 138, .14); }
  .badge-silent, .badge-pending { background: rgba(255, 194, 77, .14); }
}

.btn-small {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 9px; font: inherit;
  font-size: .82rem; font-weight: 700; background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  text-decoration: none; cursor: pointer;
}
.btn-small:hover { background: var(--surface-2); }
.btn-small.danger { color: var(--attn); }
.btn-danger, .btn-danger-outline {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 12px; font: inherit;
  font-weight: 700; cursor: pointer; text-decoration: none;
}
.btn-danger { background: var(--attn); color: #fff; border: 0; }
.btn-danger-outline { background: transparent; color: var(--attn); border: 1px solid var(--attn); }
@media (prefers-color-scheme: dark) { .btn-danger { color: #1a1204; } }

.info-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 18px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px;
}
.info-grid .wide { grid-column: 1 / -1; }
.info-grid p { margin: 0; }
.info-grid p + p { margin-top: 2px; }

.danger-zone { border: 1px dashed var(--line); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.danger-zone h2 { font-size: 1rem; }
.danger-zone p { color: var(--muted); font-size: .88rem; max-width: 640px; }

.confirm-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; max-width: 640px; display: flex; flex-direction: column; gap: 14px; }
.confirm-card h1 { font-size: 1.25rem; }
.confirm-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.key-box { background: var(--surface-2); border-radius: 12px; padding: 14px 16px; font-size: 1rem; word-break: break-all; user-select: all; }

.check-list { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 4px 18px; }
.check { display: grid; grid-template-columns: 14px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.check:last-child { border-bottom: 0; }
.check .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.check.ok .dot { background: var(--ok); }
.check.attn .dot { background: var(--attn); }
.check-title { font-weight: 700; font-size: .92rem; }
.check-note { color: var(--muted); font-size: .8rem; }
.check-value { font-weight: 700; font-size: .9rem; text-align: right; }
.check.attn .check-value { color: var(--attn); }

@media (max-width: 720px) {
  .kpi-grid.kpi-3 { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .kpi-grid.kpi-3 .kpi-delta { display: none; }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .filters input.search, .inline-form input { min-width: 0; flex: 1; }
  .check { grid-template-columns: 14px 1fr; }
  .check-value { grid-column: 2; text-align: left; }
}
