/* Active Directory pages (directory.js). Uses the variables and components of style.css; everything of its own starts with "ad-". */

.ad-mono { font-family: "Cascadia Mono", Consolas, monospace; font-size: 12.5px; }
.ad-bad { color: var(--bad); font-weight: 600; }
.ad-warn { color: var(--warn); font-weight: 600; }
.ad-center { justify-content: center; }
.ad-mark.on { color: var(--accent); background: var(--accent-soft); }
.ad-done { color: var(--ok); background: var(--ok-soft); }
.ad-danger { color: var(--bad); background: var(--bad-soft); }
.ad-admin .icon { width: 13px; height: 13px; }
.ad-face { flex: none; }
.ad-face.off { opacity: .55; }
.avatar.ad-face.sm { width: 26px; height: 26px; border-radius: 8px; }
.hd-face.ad-face.lg, .avatar.ad-face.lg { width: 48px; height: 48px; font-size: 16px; }
.avatar.ad-face.lg { border-radius: 14px; }

/* Empty, waiting and refused states */
.ad-none b, .ad-wait b { color: var(--text); font-size: 15px; }
.ad-none > span, .ad-wait > span:not(.spin) { max-width: 560px; }
#page-directory .empty :is(button, .buttonlink) .icon, .ad-devcard .empty :is(button, .buttonlink) .icon, .ad-none :is(button, .buttonlink) .icon { width: 15px; height: 15px; }
.ad-none .buttonlink, .ad-none .row { margin-top: 4px; }
.ad-wait .spin { width: 42px; height: 42px; border-radius: 12px; }
.ad-wait .spin .icon { width: 20px; height: 20px; }
.ad-stale { border: 1px solid transparent; border-radius: 12px; margin-bottom: 14px; }

/* ---- The domains ---- */
.ad-domains { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.ad-wide { grid-column: 1 / -1; }
.ad-domain { overflow: hidden; }
.ad-domain-head { display: flex; align-items: center; gap: 13px; padding: 16px 18px; min-width: 0; background: linear-gradient(135deg, var(--accent-soft), transparent 55%); }
.ad-domain-head .grow { flex: 1; min-width: 0; }
.ad-domain-head h2 { font-size: 16.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-domain-head .sub { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.ad-dcs { border-top: 1px solid var(--line); }
.ad-dcrow { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; min-width: 0; }
.ad-dcrow .grow { flex: 1; min-width: 0; }
.ad-dcrow b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-dcrow .sub { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-dcrow > .icon { color: var(--muted); }
a.ad-dcrow:hover { background: var(--panel-2); }
a.ad-dcrow:hover > .icon { color: var(--accent); }
a.ad-dcrow:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.ad-domain-foot { display: flex; align-items: center; gap: 12px; padding: 12px 18px; min-height: 60px; }
.ad-domain-foot .grow { flex: 1; min-width: 0; }

/* ---- One domain: header and tabs ---- */
.ad-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 20px; margin-bottom: 14px; background: linear-gradient(135deg, var(--accent-soft), transparent 45%), var(--panel); }
.ad-top .grow { flex: 1; min-width: 200px; }
.ad-title { font-size: 21px; letter-spacing: -.015em; overflow-wrap: anywhere; }
.ad-top .pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.ad-through { display: flex; align-items: center; gap: 9px; font-weight: 400; color: var(--muted); }
.ad-through select { color: var(--text); font-weight: 600; }
.ad-tabs { max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
.ad-tabs button { flex: none; }
#page-directory button[aria-disabled="true"]:hover, #ad-dialog button[aria-disabled="true"]:hover { background: var(--panel-2); border-color: var(--line-strong); }
#page-directory button.primary[aria-disabled="true"]:hover { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
#page-directory button.ghost[aria-disabled="true"]:hover { background: none; border-color: transparent; color: var(--muted); }

/* ---- Overview ---- */
.ad-health { padding: 18px 20px; margin-bottom: 18px; display: grid; gap: 14px; }
.ad-health-head { display: flex; align-items: center; gap: 14px; }
.ad-health-head .grow { flex: 1; min-width: 0; }
.ad-health-head h2 { font-size: 16.5px; }
.ad-health-mark { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--ok-soft); color: var(--ok); }
.ad-health.bad { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
.ad-health.bad .ad-health-mark { background: var(--warn-soft); color: var(--warn); }
.ad-fails { display: grid; gap: 8px; }
.ad-fail { display: flex; gap: 11px; align-items: flex-start; padding: 11px 14px; border-radius: 11px; background: var(--warn-soft); }
.ad-fail > .icon { color: var(--warn); margin-top: 1px; }
.ad-fail b { display: block; }
.ad-fail span { font-size: 13px; overflow-wrap: anywhere; }
.ad-passes { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.ad-pass { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.ad-pass .icon { color: var(--ok); }

.ad-tilehead { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.ad-tilehead h3 { margin: 0; flex: 1; }
.ad-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-bottom: 18px; }
.ad-tile { display: flex; align-items: center; gap: 13px; padding: 14px 16px; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: inherit; transition: background .15s, border-color .15s; }
.ad-tile:hover { border-color: var(--accent); background: var(--panel-2); }
.ad-tile .grow { flex: 1; min-width: 0; }
.ad-tile .chip { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.ad-tile .value { display: block; font-size: 24px; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ad-tile .label { display: block; color: var(--muted); font-size: 12.5px; }
.ad-tile > .icon { color: var(--muted); }
.ad-tile:hover > .icon { color: var(--accent); }
.ad-tile.none .chip { background: var(--raised); color: var(--muted); }
.ad-tile.none .value { color: var(--muted); }
.ad-tile.hot { border-color: color-mix(in srgb, var(--warn) 60%, var(--line)); }
.ad-tile.hot .chip { background: var(--warn-soft); color: var(--warn); }
.ad-tile.hot .value { color: var(--warn); }

.ad-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.ad-dclist { display: grid; }
.ad-dc { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.ad-dc:first-child { padding-top: 0; }
.ad-dc:last-child { border-bottom: 0; padding-bottom: 0; }
.ad-dc .grow { flex: 1; min-width: 0; }
.ad-dc .sub { display: block; font-size: 12.5px; color: var(--muted); }
.ad-line { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.ad-roles { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.ad-rules { display: grid; gap: 10px; }
.ad-rules p { display: flex; gap: 10px; align-items: flex-start; }
.ad-rules p .icon { color: var(--accent); margin-top: 3px; }
.ad-rolefacts dt[title] { cursor: help; }
table.ad-plain tbody tr, table.ad-plain tbody tr:hover { cursor: default; }

/* ---- Lists ---- */
.ad-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ad-bar .searchbox { flex: 1 1 280px; max-width: 440px; }
.ad-scope .hd-chip { padding: 2px 4px 2px 10px; }
.ad-scope .hd-chip .text { max-width: 320px; }
.ad-chips { margin-bottom: 12px; }
.ad-chips button { gap: 6px; }
.ad-chips em { font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--raised); border-radius: 999px; padding: 0 6px; }
.ad-chips button.active em { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--text); }
.ad-listpanel { position: relative; overflow: hidden; }
.ad-progress { position: absolute; left: 0; right: 0; top: 0; height: 2px; overflow: hidden; opacity: 0; pointer-events: none; z-index: 1; transition: opacity .12s; }
.ad-loading .ad-progress { opacity: 1; }
.ad-loading .ad-progress::after { content: ""; position: absolute; left: 0; top: 0; width: 32%; height: 100%; border-radius: 2px; background: var(--accent); animation: locwait 1.5s ease-in-out infinite; }
.ad-loading .ad-table tbody { opacity: .55; transition: opacity .2s .15s; }
.ad-table th { padding-top: 10px; padding-bottom: 10px; }
.ad-table th:first-child, .ad-table td:first-child { padding-left: 18px; }
.ad-table th:last-child, .ad-table td:last-child { padding-right: 18px; }
.ad-th { background: none; border: 0; border-radius: 5px; padding: 0; gap: 2px; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; }
.ad-th:hover { background: none; color: var(--text); }
.ad-th:active { transform: none; }
.ad-th.sorted { color: var(--accent); }
.ad-th.sorted:not(.desc) .icon { transform: rotate(180deg); }
.ad-who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.ad-name { font-weight: 650; color: inherit; text-decoration: none; border-radius: 4px; }
a.ad-name:hover { color: var(--accent); }
.ad-who .sub { max-width: 340px; overflow: hidden; text-overflow: ellipsis; margin-top: 0; }
.ad-where { color: var(--muted); }
tr.ad-dim .ad-name, tr.ad-dim .ad-mono, tr.ad-dim .ad-where { opacity: .62; }
.ad-table tbody tr.ad-open { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
td.ad-links { white-space: normal; min-width: 260px; color: var(--muted); }
.ad-count { margin-top: 10px; min-height: 19px; }
.ad-hint { margin-bottom: 12px; align-items: center; }

/* ---- Organizational units ---- */
.ad-units { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.ad-tree { padding: 8px; overflow: auto; max-height: calc(100vh - 250px); min-height: 80px; }
dialog .ad-tree { border: 1px solid var(--line); border-radius: 11px; background: var(--panel-2); max-height: min(320px, 46vh); }
.ad-node { display: flex; align-items: center; gap: 2px; padding-left: calc(var(--depth, 0) * 18px); }
.ad-twist { width: 24px; height: 28px; padding: 0; flex: none; display: grid; place-items: center; border-radius: 6px; }
.ad-twist .icon { transition: transform .12s; }
.ad-twist.open .icon { transform: rotate(90deg); }
.ad-nodebtn { flex: 1; min-width: 0; justify-content: flex-start; gap: 8px; padding: 5px 9px; background: none; border-color: transparent; text-align: left; font-weight: 500; }
.ad-nodebtn span { overflow: hidden; text-overflow: ellipsis; flex: 1; }
.ad-nodebtn em { font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--raised); border-radius: 999px; padding: 0 7px; }
.ad-node.sel .ad-nodebtn em { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--text); }
.ad-nodebtn .icon { color: var(--muted); }
.ad-nodebtn:hover { background: var(--raised); border-color: transparent; }
.ad-node.sel .ad-nodebtn { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); font-weight: 650; }
.ad-node.sel .ad-nodebtn .icon { color: var(--accent); }
.ad-nodenote { padding: 5px 9px 5px calc(var(--depth, 0) * 18px + 34px); gap: 8px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.ad-unit .panel-head .grow { flex: 1; min-width: 0; }
.ad-unit .panel-head .sub { display: block; font-size: 12.5px; color: var(--muted); }
.ad-unitdesc { padding: 14px 18px 0; }
.ad-unitlinks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 16px 18px 0; }
.ad-unitlinks .ad-tile { background: var(--panel-2); }
.ad-unitlist { padding: 0 18px; }
.ad-unitlist .subhead { margin-top: 18px; }
.ad-unitlist .ad-ref { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; }
.ad-unitlist .ad-ref > .icon { color: var(--muted); }
.ad-unitfoot { padding: 12px 18px 16px; }

/* ---- One user, group or computer: the side panel ---- */
.ad-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(600px, 100vw); z-index: 30; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 20px; outline: none;
  background: var(--panel); border-left: 1px solid var(--line-strong); box-shadow: -18px 0 44px rgba(0, 0, 0, .3); animation: ad-slide .18s ease-out; }
@keyframes ad-slide { from { transform: translateX(26px); opacity: 0; } }
:root[data-theme="light"] .ad-drawer { box-shadow: -18px 0 44px rgba(20, 30, 60, .16); }
@media (min-width: 1700px) { #page-directory.ad-drawn { margin-right: 590px; } }
.ad-dhead { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; gap: 14px; padding: 18px 16px 14px 20px; border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, var(--accent-soft), transparent 55%), var(--panel); }
.ad-dhead .grow { flex: 1; min-width: 0; }
.ad-dhead h2 { font-size: 19px; letter-spacing: -.01em; overflow-wrap: anywhere; outline: none; }
.ad-dhead .sub { display: flex; gap: 4px 12px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 13px; margin-top: 2px; }
.ad-dpills { margin-top: 8px; gap: 6px; }
.ad-drawer > .toolnote { border-bottom: 1px solid var(--line); padding-left: 20px; padding-right: 20px; }
.ad-drawer > .empty { padding-top: 70px; }
.ad-banner { display: flex; align-items: center; gap: 12px; margin: 14px 20px 0; padding: 11px 14px; border-radius: 12px; background: var(--off-soft); }
.ad-banner > .icon { color: var(--muted); }
.ad-banner.warn { background: var(--warn-soft); }
.ad-banner.warn > .icon { color: var(--warn); }
.ad-banner .grow { flex: 1; min-width: 0; }
.ad-banner b { display: block; }
.ad-banner .grow span { font-size: 13px; }
.ad-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 20px 0; }
.ad-working { opacity: .7; }
.ad-why { display: flex; gap: 8px; align-items: flex-start; padding: 10px 20px 0; }
.ad-why .icon { margin-top: 2px; flex: none; }
.ad-cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 16px 20px 0; }
.ad-cell { background: var(--panel-2); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; min-width: 0; }
.ad-cell b { display: block; font-size: 14.5px; overflow-wrap: anywhere; }
.ad-cell .sub { display: block; font-size: 12px; color: var(--muted); }
.ad-cell.warn b { color: var(--warn); }
.ad-cell.bad b { color: var(--bad); }
.ad-section { padding: 20px 20px 0; }
.ad-sechead { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; min-height: 26px; }
.ad-sechead h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.ad-sechead em { font-style: normal; font-size: 11.5px; letter-spacing: 0; background: var(--raised); border-radius: 999px; padding: 0 7px; }
.ad-facts { gap: 8px 18px; font-size: 13.5px; }
.ad-reflist { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.ad-ref { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; min-width: 0; }
.ad-reflist .ad-ref:last-child { border-bottom: 0; }
.ad-ref .grow { flex: 1; min-width: 0; }
.ad-ref b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-ref .sub { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.ad-ref:hover { background: var(--panel-2); }
a.ad-ref:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.ad-ref .iconbtn { padding: 5px; }
.ad-dfoot { display: flex; align-items: center; gap: 8px; margin: 22px 20px 0; padding-top: 12px; border-top: 1px solid var(--line); }
.ad-dn { flex: 1; min-width: 0; overflow-wrap: anywhere; font-family: "Cascadia Mono", Consolas, monospace; font-size: 11.5px; }

/* ---- Dialogs ---- */
#ad-dialog, #ad-confirm { max-height: calc(100vh - 32px); overflow-y: auto; }
#ad-dialog.ad-mid { width: min(580px, calc(100vw - 32px)); }
#ad-dialog.ad-edit { width: min(880px, calc(100vw - 32px)); }
#ad-confirm { width: min(450px, calc(100vw - 32px)); }
#ad-confirm p + p { margin-top: 10px; }
#ad-dialog input:not([type="checkbox"]):not([type="radio"]), #ad-dialog select, #ad-dialog textarea { width: 100%; font-weight: 400; }
#ad-dialog .dialog-head { margin-bottom: 4px; }
#ad-dialog .dialog-head .grow { flex: 1; min-width: 0; }
#ad-dialog .dialog-head h2 { overflow-wrap: anywhere; }
#ad-dialog > .dialog-head { margin-bottom: 14px; }
#ad-dialog form > h2 { margin-bottom: 0; }
#ad-dialog > .toolnote { margin-top: 12px; }
.ad-lead { margin-top: -6px; }
.ad-help { display: block; font-weight: 400; }
.ad-check { align-items: flex-start; }
.ad-check input { margin-top: 2px; flex: none; }
.ad-check input[type="radio"] { width: 16px; height: 16px; padding: 0; accent-color: var(--accent); }
.ad-check input:disabled + span { color: var(--muted); }
.ad-flabel { display: block; font-size: 13px; font-weight: 600; }
.ad-fieldblock { display: grid; gap: 6px; }
.ad-secretbox, .ad-secretdone { padding: 14px; border-radius: 12px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.ad-secretbox { display: grid; gap: 9px; }
.ad-secretrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#ad-dialog input.ad-secret { font: 600 16px/1.4 "Cascadia Mono", Consolas, monospace; letter-spacing: .01em; padding: 10px 12px; background: var(--panel); }
.ad-secret.masked { -webkit-text-security: disc; }
.ad-secretout { min-height: 44px; font: 600 16px/1.4 "Cascadia Mono", Consolas, monospace; padding: 10px 12px; border-radius: 9px; background: var(--panel); border: 1px solid var(--line-strong); overflow-wrap: anywhere; user-select: all; }
.ad-remind b { color: var(--text); }
.ad-picker { display: grid; gap: 10px; }
.ad-picker .searchbox { max-width: none; }
.ad-picklist { max-height: min(300px, 40vh); }
.ad-pick { display: flex; width: 100%; align-items: center; justify-content: flex-start; gap: 10px; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; text-align: left; white-space: normal; }
.ad-pick:last-child { border-bottom: 0; }
.ad-pick:hover { background: var(--raised); }
.ad-pick:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.ad-pick[aria-disabled="true"]:hover { background: none; }
.ad-pick .grow { flex: 1; min-width: 0; }
.ad-pick b { display: block; font-weight: 600; }
.ad-pick .sub { display: block; font-size: 12.5px; color: var(--muted); }
.ad-pickstate { text-align: right; max-width: 190px; }
.ad-pick.done .ad-pickstate { color: var(--ok); font-weight: 600; }
.ad-chosen { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); min-width: 0; }
.ad-chosen:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ad-chosen .grow { flex: 1; min-width: 0; }
.ad-chosen b { display: block; overflow-wrap: anywhere; }
.ad-chosen .sub { display: block; font-size: 12.5px; color: var(--muted); }
.ad-wherefield { display: grid; gap: 6px; }
.ad-movepick { display: flex; align-items: center; gap: 8px; }
.ad-movepick .icon { color: var(--accent); }
.ad-typeword { padding: 1px 7px; border-radius: 6px; background: var(--raised); user-select: all; font-weight: 600; }
.ad-editgrid { columns: 2; column-gap: 14px; }
.ad-fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px 14px; margin: 0 0 12px; min-width: 0; background: var(--panel-2); break-inside: avoid; }
#ad-dialog.ad-edit form > .actions { position: sticky; bottom: -24px; margin: 0 -24px -24px; padding: 14px 24px; background: var(--panel); border-top: 1px solid var(--line); }
#ad-dialog.ad-edit form { gap: 10px; }
.ad-fieldset legend { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 0 6px; }
.ad-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.ad-fieldset input:not([type="checkbox"]) { background: var(--panel); }
.ad-span { grid-column: 1 / -1; display: grid; gap: 6px; }
.ad-options { gap: 8px; }
.ad-stephead { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; }
.ad-stephead h2 { margin: 0; flex: 1; }
.ad-steps { display: flex; gap: 14px; list-style: none; margin: 0; padding: 0; font-size: 12.5px; color: var(--muted); }
.ad-steps li { display: flex; align-items: center; gap: 6px; }
.ad-steps i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; background: var(--raised); }
.ad-steps i .icon { width: 12px; height: 12px; stroke-width: 2.4; }
.ad-steps .now { color: var(--text); font-weight: 600; }
.ad-steps .now i { background: var(--accent); color: var(--on-accent); }
.ad-steps .done i { background: var(--ok-soft); color: var(--ok); }
.ad-summary { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
#ad-dialog > .ad-summary { margin-bottom: 12px; }

/* ---- Confirmations ---- */
.ad-toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; justify-items: center; width: max-content; max-width: calc(100vw - 32px); pointer-events: none; }
.ad-toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 580px; padding: 8px 8px 8px 14px; border-radius: 12px; background: var(--raised); color: var(--text);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow); font-weight: 550; animation: ad-rise .18s ease-out; }
.ad-toast > .icon { color: var(--ok); }
.ad-toast.bad { border-color: var(--bad); }
.ad-toast.bad > .icon { color: var(--bad); }
.ad-toast .iconbtn { padding: 4px; }
@keyframes ad-rise { from { transform: translateY(8px); opacity: 0; } }

/* ---- The device page's section ---- */
.ad-devbody { display: grid; gap: 14px; }
.ad-devdomain { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ad-devdomain .grow { flex: 1; min-width: 0; }
.ad-devdomain b { display: block; font-size: 17px; overflow-wrap: anywhere; }
.ad-devdomain .sub { display: block; font-size: 12.5px; color: var(--muted); }
.ad-allgood { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.ad-allgood .icon { color: var(--ok); }
.ad-devcard .stat.warn b { color: var(--warn); }
.ad-devcard .stats { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); }
.ad-devcard .panel-head { flex-wrap: wrap; }

@media (max-width: 1100px) { .ad-grid { grid-template-columns: 1fr; } }
@media (max-width: 1000px) { .ad-units { grid-template-columns: 1fr; } .ad-tree { max-height: 340px; } }
@media (max-width: 760px) {
  .ad-editgrid { columns: 1; }
  .ad-bar .searchbox { max-width: none; flex-basis: 100%; }
  .ad-steps li:not(.now) { font-size: 0; gap: 0; }
  .ad-domains { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .ad-cells, .ad-unitlinks, .ad-fields { grid-template-columns: 1fr; }
  .ad-actions button { flex: 1 1 auto; }
  .ad-dhead { padding-left: 16px; }
  .ad-section, .ad-actions, .ad-cells { padding-left: 16px; padding-right: 16px; }
  .ad-banner, .ad-dfoot { margin-left: 16px; margin-right: 16px; }
  .ad-through > span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ad-drawer, .ad-toast { animation: none; }
  .ad-loading .ad-progress::after { animation: none; width: 100%; opacity: .5; }
  .ad-twist .icon { transition: none; }
}
