/* Стили экрана admin.js (макет 08-admin, docs/PANEL-V2.md): только классы с префиксом .ad-…
   Размеры — логические пиксели холста 1440 (картинка макета 1.5×). */

.ad-create { min-width: 220px; }
.ad-body code, .ad-how code { font-family: var(--mono); font-size: 12px; background: var(--inset); border: 1px solid var(--border);
  border-radius: 5px; padding: 0 5px; color: var(--soft); }
.ad-pend .banner, .ad-bn .banner { margin: 0 0 18px; }
.ad-pend .banner a { font-weight: 600; margin-left: 4px; white-space: nowrap; }
.ad-top.g-main-aside { align-items: stretch; }
.ad-gap { margin-top: 18px; }
.ad-strong { font-weight: 600; color: var(--text); }
.ad-small { font-size: 12px; }
.ad-right-sub { font-size: 13px; font-weight: 600; color: var(--muted); }
.ad-lead { margin: 0 0 16px; line-height: 1.5; }
.ad-res { font-size: 13px; }
/* заглушка наблюдения сторожа за шиной */
.ad-mute-bn { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 14px; overflow-wrap: anywhere; }
.ad-mute-bn .i { flex: none; margin-top: 2px; }
.ad-mute-note { margin-bottom: 14px; max-width: 560px; }
.ad-mute .btn { white-space: nowrap; }

/* таблица от края до края карточки, как в макете */
.ad-edge { margin: 0 -17px; }
.ad-edge .tbl th { border-radius: 0 !important; padding-top: 11px; padding-bottom: 11px; }
.ad-edge .tbl th:first-child, .ad-edge .tbl td:first-child { padding-left: 17px; }
.ad-edge .tbl th:last-child, .ad-edge .tbl td:last-child { padding-right: 17px; }
.ad-edge .tbl td { padding-top: 12px; padding-bottom: 12px; }
.ad-edge .tbl tbody tr:last-child td { border-bottom: 1px solid var(--border); }
.ad-edge .empty, .ad-none { padding-left: 17px; padding-right: 17px; }

/* пользователи */
.ad-users .card-h { margin-bottom: 16px; }
.ad-filters { display: flex; gap: 11px; flex-wrap: wrap; margin-bottom: 16px; }
.ad-filters .search { width: 256px; max-width: 100%; }
.ad-filters .select { width: auto; min-width: 134px; }
.ad-login { display: flex; align-items: center; gap: 8px; }
.ad-login .mono { font-size: 14px; color: var(--text); }
.ad-you { font-size: 11px; font-weight: 600; color: var(--blue); background: var(--blbg); border-radius: 6px; padding: 1px 6px; }
.ad-fn { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ad-acc { display: inline-block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; color: var(--soft); }
.ad-st { font-weight: 600; }
.ad-ut th { white-space: nowrap; }
.ad-ut td:first-child, .ad-ut td:nth-child(4), .ad-ut td:last-child { white-space: nowrap; }
.ad-ut .link, .ad-rt .link { font-size: 13px; }
.ad-count { font-size: 13px; color: var(--muted); padding: 18px 0 2px; }

/* инфраструктура */
.ad-infra .card-h { margin-bottom: 4px; }
.ad-inf { display: flex; align-items: center; gap: 13px; padding: 17px 0; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; }
.ad-inf:first-child { border-top: none; padding-top: 12px; }
.ad-inf:hover { text-decoration: none; }
.ad-inf:hover b { color: var(--blue); }
.ad-inf-ic { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--inset); display: grid; place-items: center;
  color: var(--blue); flex: none; align-self: flex-start; margin-top: 1px; }
.ad-inf-ic .i { width: 16px; height: 16px; }
.ad-inf-t { flex: 1; min-width: 0; }
.ad-inf-t b { display: block; font-size: 15px; font-weight: 600; }
.ad-inf-t small { display: block; font-size: 13px; color: var(--soft); margin-top: 6px; }
.ad-inf-t small.t-good { color: var(--good); } .ad-inf-t small.t-red { color: var(--red); }
.ad-inf-t small.t-amber { color: var(--amber); } .ad-inf-t small.t-muted { color: var(--muted); }
.ad-inf .ad-inf-go { color: var(--soft); }

/* роли */
.ad-roles { margin-top: 18px; }
.ad-roles .card-h { margin-bottom: 20px; }
.ad-role-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.ad-role { background: var(--inset); border: 1px solid var(--border); border-radius: 10px; padding: 14px 14px 18px; min-height: 138px; }
.ad-role p { margin: 12px 0 0; font-size: 13px; color: var(--soft); line-height: 1.55; }
.ad-role .pill + p { margin-top: 18px; }
.ad-howto { font-size: 13px; color: var(--muted); margin: 18px 0 0; line-height: 1.5; }

/* заявки */
.ad-how { margin-top: 18px; }
.ad-how-l { margin: 0; padding-left: 18px; color: var(--soft); font-size: 13px; line-height: 1.6; }
.ad-how-l li + li { margin-top: 6px; }
.ad-how-l b { color: var(--text); font-weight: 600; }
.ad-note { display: inline-block; max-width: 300px; white-space: normal; color: var(--soft); overflow-wrap: anywhere; }
.ad-acts { display: inline-flex; gap: 12px; justify-content: flex-end; align-items: center; font-weight: 600; }
.ad-acts .btn .i { width: 14px; height: 14px; }

/* шины */
.ad-bt tr.ad-sel td { background: var(--raised); }
.ad-bt tr.ad-sel td:first-child { box-shadow: inset 3px 0 0 var(--blue); }
.ad-open { color: var(--blue); font-weight: 600; white-space: nowrap; }
.ad-cl + .ad-cl { margin-top: 3px; }
.ad-cl { white-space: nowrap; }
.ad-detail { margin-top: 18px; scroll-margin-top: 84px; }
.ad-pills { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ad-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.ad-stat { background: var(--inset); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px 12px; min-width: 0; }
.ad-stat span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.ad-stat b { display: block; font-size: 17px; font-weight: 600; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-stat small { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-h3 { font-size: 15px; font-weight: 600; margin: 20px 0 10px; }
.ad-ty { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.ad-ct td { white-space: nowrap; }
.ad-logm { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.ad-cats { display: inline-flex; flex-wrap: wrap; gap: 8px 16px; padding: 7px 12px; border: 1px dashed var(--border); border-radius: 8px; }
.ad-form .field + .field { margin-top: 14px; }
.ad-form .btn.block { margin-top: 18px; justify-content: center; }

/* прошивки, архив */
.ad-ft td, .ad-art td { white-space: nowrap; }
.ad-file input[type=file] { font-size: 13px; color: var(--soft); max-width: 100%; }
.ad-file input[type=file]::file-selector-button { font: inherit; font-weight: 600; color: var(--soft); background: var(--inset); border: 1px solid var(--border);
  border-radius: 8px; height: 32px; padding: 0 12px; margin-right: 10px; cursor: pointer; }
.ad-file input[type=file]::file-selector-button:hover { border-color: #3a4c60; }
.ad-kpis { margin-bottom: 18px; }
.ad-ar .card-h .right .select { width: 230px; font-weight: 400; }

/* сертификаты */
.ad-certs .rows .v { max-width: 66%; }
.ad-fp { font-family: var(--mono); font-size: 12px; font-weight: 400; word-break: break-all; }
.ad-sans { display: inline-flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.ad-sans span { font-family: var(--mono); font-size: 12px; font-weight: 400; background: var(--inset); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }

/* окна: создание, правка, одобрение, одноразовый секрет */
.ad-mf { display: flex; flex-direction: column; gap: 14px; }
.ad-mf .rows { background: var(--inset); border: 1px solid var(--border); border-radius: 10px; padding: 2px 14px; }
.ad-mf .note { margin: 0; }
.ad-mf .result { margin-top: 0; min-height: 0; }
.ad-mf .result:empty { display: none; }
.ad-access { gap: 9px; }
.ad-buslist { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--inset); max-height: 190px; overflow: auto; }
.ad-buslist.off { opacity: .45; }
.ad-buslist .check { align-items: flex-start; }
.ad-buslist .check input { margin-top: 2px; flex: none; }
.modal:has(.ad-mf) .actions { flex-wrap: wrap; }
.modal:has(.ad-mf) .actions .btn.danger { margin-right: auto; }
.ad-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 6px; font-size: 13px; font-weight: 600; color: var(--soft); }
.ad-pre { white-space: pre-wrap; word-break: break-all; margin: 0; line-height: 1.5; }

/* нет прав */
.ad-denied { display: flex; gap: 16px; align-items: flex-start; margin-top: 24px; padding: 22px; max-width: 720px; }
.ad-denied h2 { margin: 0; font-size: 19px; font-weight: 600; }
.ad-denied p { margin: 10px 0 0; }
.ad-denied-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--vibg); color: var(--violet); display: grid; place-items: center; flex: none; }

@media (max-width: 1100px) {
  .ad-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-role-grid { grid-template-columns: 1fr; }
  .ad-role { min-height: 0; }
}
@media (max-width: 860px) {
  .ad-filters .search { width: 100%; }
  .ad-filters .select { flex: 1; }
  .ad-certs .rows .v { max-width: 60%; }
  .ad-ar .card-h { flex-wrap: wrap; }
  .ad-ar .card-h .right { margin-left: 0; width: 100%; }
  .ad-ar .card-h .right .select { width: 100%; }
  .ad-card-h-wrap .card-h { flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .ad-stats { grid-template-columns: 1fr; }
  .ad-create { min-width: 0; }
}
.ad-fhint { margin: 6px 0 0; font-size: 12px; }
.ad-form .ad-fhint + .field { margin-top: 14px; }
/* тон значения в rows(): в app.css `.rows .v` перебивает `.t-*` по специфичности */
.ad-body .rows .v.t-good { color: var(--good); } .ad-body .rows .v.t-red { color: var(--red); }
.ad-body .rows .v.t-amber { color: var(--amber); } .ad-body .rows .v.t-blue { color: var(--blue); }
.ad-body .rows .v.t-muted { color: var(--muted); }
