/* Admin site additions on top of the shared portal styles (js/portal-ui.css). */
.hc-admin-signout { margin-left: auto; padding: 8px 16px; border: 1px solid #dfe7ed; border-radius: 999px; background: #fff; color: var(--bn-ink, #0f172a); font-size: 13px; font-weight: 600; text-decoration: none; }
.hc-admin-signout:hover, .hc-admin-signout:focus-visible { border-color: #1aa37f; color: #0f766e; }
.ad-count { display: inline-block; min-width: 22px; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #0f766e; color: #fff; font-size: 12px; text-align: center; }

.ad-form { margin: 16px 0 24px; padding: 24px; border: 1px solid #dfe7ed; border-radius: 24px; background: #fff; box-shadow: 0 20px 60px -40px rgba(15,23,42,.35); }
.ad-form h2 { margin: 0 0 16px; font: 800 21px/1.4 var(--bn-font-head, inherit); }
.ad-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.ad-wide { grid-column: 1 / -1; }
.ad-form input:not([type=checkbox]):not([type=radio]), .ad-form select, .ad-select, .ad-filters input, .ad-filters select { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #dce5ec; border-radius: 12px; background: #fff; font-size: 14px; }
.ad-select { width: auto; min-width: 180px; }
.ad-fieldset { margin: 20px 0 0; padding: 16px; border: 1px solid #e3eaf0; border-radius: 16px; }
.ad-fieldset legend { padding: 0 6px; font-weight: 700; }
.ad-checks { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 10px; padding-left: 4px; }
.ad-check { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; font-size: 14px; }
.ad-neutral { color: #334155; border-color: #dce5ec; }
.ad-filters { display: flex; gap: 16px; flex-wrap: wrap; }
.ad-filters > div { min-width: 200px; }

@media (max-width: 760px){
 .ad-grid { grid-template-columns: 1fr; }
 .ad-select, .ad-filters > div { width: 100%; }
}

/* Content management */
.ad-form textarea, .ad-form input[type=file] { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #dce5ec; border-radius: 12px; background: #fff; font: 14px/1.5 inherit; }
.ad-form textarea { font-family: inherit; resize: vertical; }
.ad-section-title { margin: 18px 0 8px; font: 700 16px/1.4 var(--bn-font-head, inherit); }
.ad-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin-top: 14px; }
.ad-inline .hc-auth-field { min-width: 200px; flex: 1 1 200px; }
.ad-link-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; flex: 2 1 420px; }
.ad-link-form .hc-auth-field { flex: 1 1 160px; }
.ad-results { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.ad-results li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 12px; border: 1px solid #e3eaf0; border-radius: 12px; background: #fff; font-size: 14px; overflow-wrap: anywhere; }
.ad-results li .hc-admin-secondary { min-height: 36px; padding: 6px 12px; margin-left: auto; }
.ad-staff { margin-top: 16px; }
.ad-bulk summary, .ad-form > summary { cursor: pointer; font-weight: 700; }
progress { width: 100%; height: 8px; margin-top: 8px; accent-color: #0f766e; }
.ad-pre { white-space: pre-wrap; margin: 10px 0; font-size: 14px; color: #334155; }
.ad-grow { flex: 3 1 320px !important; }
/* Inputs inside list cards (e.g. replying to bugs & enhancements) */
.hc-approval-request textarea, .hc-approval-request .ad-inline select { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #dce5ec; border-radius: 12px; background: #fff; font: 14px/1.5 inherit; font-family: inherit; }
.hc-approval-request textarea { min-height: 88px; resize: vertical; }
.hc-approval-request .ad-inline { align-items: flex-start; }
.hc-approval-request .ad-inline .hc-auth-field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; }

/* ===== Admin app layout (2026-11-17): the customer Help Center look (same header, background, cards),
   with a side menu card for the admin sections and a dashboard ===== */
.ad-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 24px; align-items: start; width: min(1420px, calc(100% - 32px)); margin: 0 auto 40px; }

/* Side menu: a white card like the documentation library on the customer site */
.ad-sidebar { position: sticky; top: 116px; max-height: calc(100dvh - 136px); overflow-y: auto; padding: 14px 12px; border: 1px solid #e3eaf0; border-radius: 24px; background: linear-gradient(160deg,#fff,#fbfefd); box-shadow: 0 24px 60px -40px rgba(15,23,42,.35); z-index: 900; }
.ad-nav { display: block; }
.ad-nav-group { margin: 16px 12px 6px; color: #94a3b8; font: 700 11px/1.4 var(--bn-font-body, inherit); letter-spacing: .08em; text-transform: uppercase; }
.ad-nav a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 12px; margin: 2px 0; border: 1px solid transparent; border-radius: 12px; color: #475569; font: 600 14px/1.3 var(--bn-font-head, inherit); text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.ad-nav a svg { width: 18px; height: 18px; flex: none; color: #94a3b8; }
.ad-nav a:hover { background: #f2fbf7; color: #0f766e; }
.ad-nav a:hover svg { color: #0f766e; }
.ad-nav a[aria-current="page"] { background: #ecfdf5; border-color: #bce4d7; color: #047857; }
.ad-nav a[aria-current="page"] svg { color: #059669; }
.ad-nav a:focus-visible { outline: 2px solid #1aa37f; outline-offset: 1px; }
.ad-nav .ad-count { margin-left: auto; }

/* Page: the same white panel and intro as customer pages */
.ad-content { min-width: 0; padding: 32px 36px 40px; border: 1px solid #e3eaf0; border-radius: 32px; background: linear-gradient(145deg,#fff,#fbfefd); box-shadow: 0 30px 90px -34px rgba(15,23,42,.22); outline: none; }
.ad-intro { margin-bottom: 20px; }
.ad-intro h1 { font-size: 34px; }
.ad-intro p { max-width: 820px; }
.ad-menu-toggle { display: none; align-items: center; gap: 8px; margin-bottom: 14px; padding: 8px 14px; border: 1px solid #dfe7ed; border-radius: 999px; background: #fff; color: #0f172a; font: 600 14px/1 var(--bn-font-head, inherit); cursor: pointer; }
.ad-menu-toggle svg { width: 18px; height: 18px; }
.ad-header #ad-help-center { white-space: nowrap; }
.ad-content .hc-auth-message { margin: 12px 0; }
.ad-content .hc-approval-toolbar { margin-top: 8px; }

/* Dashboard */
.ad-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 4px 0 24px; }
.ad-kpi { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 20px; border: 1px solid #dfe7ed; border-radius: 22px; background: linear-gradient(160deg,#f4fcf8,#fff 60%); color: inherit; text-decoration: none; box-shadow: 0 20px 44px -36px rgba(15,23,42,.35); transition: border-color .15s, box-shadow .15s, transform .15s; }
.ad-kpi:hover, .ad-kpi:focus-visible { border-color: #9fdcc8; box-shadow: 0 18px 40px -26px rgba(15,23,42,.35); transform: translateY(-1px); outline: none; }
.ad-kpi-icon { margin-bottom: 10px; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.ad-kpi-icon svg { width: 22px; height: 22px; }
.k-amber { background: linear-gradient(135deg,#f59e0b,#f97316); } .k-rose { background: linear-gradient(135deg,#db2777,#f43f5e); } .k-green { background: linear-gradient(135deg,#059669,#0891b2); } .k-blue { background: linear-gradient(135deg,#2563eb,#0891b2); } .k-violet { background: linear-gradient(135deg,#7c3aed,#6366f1); }
.ad-kpi-label { color: #64748b; font-size: 13px; font-weight: 500; }
.ad-kpi strong { font: 800 30px/1.15 var(--bn-font-head, inherit); letter-spacing: -.02em; color: #0f172a; }
.ad-kpi small { color: #64748b; font-size: 12px; min-height: 1em; }
.ad-dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.ad-panel { padding: 22px 24px; border: 1px solid #dfe7ed; border-radius: 24px; background: linear-gradient(160deg,#f4fcf8,#fff 55%,#f2fafc); box-shadow: 0 24px 50px -36px rgba(15,23,42,.3); min-width: 0; }
.ad-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ad-panel-head h2 { margin: 0; font: 800 18px/1.3 var(--bn-font-head, inherit); letter-spacing: -.02em; color: #0f172a; }
.ad-panel-head small { margin-left: 6px; color: #94a3b8; font-weight: 500; font-size: 12px; letter-spacing: 0; }
.ad-panel-link { color: #047857; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.ad-panel-link:hover { text-decoration: underline; }
.ad-muted { color: #64748b; font-size: 14px; }
.ad-attention { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ad-attention-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #e3eaf0; border-left-width: 4px; border-radius: 14px; background: #fff; color: #334155; font-size: 14px; text-decoration: none; }
.ad-attention-item strong { min-width: 28px; font: 800 18px/1 var(--bn-font-head, inherit); color: #0f172a; }
.ad-attention-item:hover, .ad-attention-item:focus-visible { border-color: #bce4d7; background: #f8fdfb; outline: none; }
.ad-attention-go { margin-left: auto; color: #94a3b8; font-size: 20px; }
.tone-amber { border-left-color: #f59e0b !important; } .tone-rose { border-left-color: #f43f5e !important; } .tone-violet { border-left-color: #8b5cf6 !important; } .tone-slate { border-left-color: #94a3b8 !important; }
.ad-all-clear { padding: 14px; border: 1px solid #bce4d7; border-radius: 14px; background: #ecfdf5; color: #047857; font-size: 14px; font-weight: 600; }
.ad-timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.ad-timeline li { display: grid; gap: 2px; padding: 10px 0 10px 20px; border-bottom: 1px solid #e3eaf0; position: relative; font-size: 14px; }
.ad-timeline li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg,#059669,#0891b2); }
.ad-timeline li.ad-muted::before { display: none; }
.ad-timeline li:last-child { border-bottom: 0; }
.ad-timeline strong { color: #0f172a; font-weight: 600; }
.ad-tl-detail { color: #475569; overflow-wrap: anywhere; }
.ad-tl-meta { color: #94a3b8; font-size: 12px; }
.ad-bars { display: grid; gap: 10px; }
.ad-bar { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr) auto; align-items: center; gap: 12px; font-size: 13px; }
.ad-bar-label { color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-bar-track { height: 8px; border-radius: 999px; background: #e7eef3; overflow: hidden; }
.ad-bar-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#059669,#0891b2); }
.ad-bar-value { color: #64748b; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Narrow screens: the side menu slides in from the left */
@media (max-width: 1024px) {
 .ad-shell { grid-template-columns: minmax(0, 1fr); }
 .ad-sidebar { position: fixed; left: 12px; top: 12px; bottom: 12px; max-height: none; width: 270px; transform: translateX(calc(-100% - 24px)); transition: transform .22s ease; z-index: 1200; }
 body.ad-menu-open .ad-sidebar { transform: none; }
 .ad-scrim { position: fixed; inset: 0; z-index: 1150; background: rgba(15,23,42,.35); }
 .ad-menu-toggle { display: inline-flex; }
 .ad-dash-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) { .ad-header .site-links { display: none; } }
@media (max-width: 640px) {
 .ad-content { padding: 22px 18px 28px; border-radius: 24px; }
 .ad-intro h1 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) { .ad-sidebar, .ad-kpi, .ad-nav a { transition: none; } }

.ad-kicker-text { font: inherit; letter-spacing: inherit; }

/* ===== Compact tables (Users, Access requests, Clients, Support tickets) ===== */
.ad-dt-wrap { margin-top: 16px; overflow-x: auto; border: 1px solid #dfe7ed; border-radius: 20px; background: #fff; box-shadow: 0 20px 44px -38px rgba(15,23,42,.35); }
.ad-dt { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.ad-dt th { position: sticky; top: 0; padding: 12px 16px; background: #f6faf8; border-bottom: 1px solid #e3eaf0; color: #64748b; font: 600 12px/1.3 var(--bn-font-body, inherit); letter-spacing: .02em; text-align: left; white-space: nowrap; }
.ad-dt th:first-child { border-top-left-radius: 20px; } .ad-dt th:last-child { border-top-right-radius: 20px; }
.ad-dt td { padding: 12px 16px; border-bottom: 1px solid #edf2f6; vertical-align: middle; color: #334155; }
.ad-dt tbody tr:last-child td { border-bottom: 0; }
.ad-dt tbody tr:not(.ad-dt-detail):hover td { background: #f8fdfb; }
.ad-dt tr.is-open td { background: #f2fbf7; border-bottom-color: transparent; }
.ad-dt tr.is-muted td { color: #94a3b8; }
.ad-dt tr.is-muted .ad-cell strong { color: #64748b; }
.ad-sort { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; cursor: pointer; }
.ad-sort:hover, .ad-sort.is-sorted { color: #0f766e; }
.ad-sort:focus-visible { outline: 2px solid #1aa37f; outline-offset: 3px; border-radius: 4px; }
.ad-sort-icon { font-size: 10px; opacity: .6; }
.ad-sort.is-sorted .ad-sort-icon { opacity: 1; }
.ad-num { text-align: right; font-variant-numeric: tabular-nums; }
th.ad-num .ad-sort { flex-direction: row-reverse; }
.ad-cell { display: grid; gap: 2px; min-width: 0; }
.ad-cell strong { color: #0f172a; font: 600 14px/1.35 var(--bn-font-head, inherit); overflow-wrap: anywhere; }
.ad-cell > span { color: #64748b; font-size: 13px; overflow-wrap: anywhere; }
.ad-cell-warns { display: grid; gap: 2px; margin-top: 2px; }
.ad-cell-warn { display: inline-flex; align-items: center; gap: 6px; color: #b45309 !important; font-size: 12px !important; font-weight: 600; }
.ad-cell-warn::before { content: "!"; display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: #fef3c7; color: #b45309; font-size: 10px; font-weight: 800; }
.ad-cell-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.ad-nowrap { white-space: nowrap; }
.ad-faint { color: #94a3b8; }
.ad-badge { display: inline-flex; align-items: center; padding: 3px 9px; border: 1px solid transparent; border-radius: 999px; font: 700 11px/1.4 var(--bn-font-body, inherit); white-space: nowrap; }
.tone-bg-green { background: #ecfdf5; border-color: #bce4d7; color: #047857; }
.tone-bg-amber { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.tone-bg-rose { background: #fff1f2; border-color: #fecdd3; color: #be123c; }
.tone-bg-blue { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.tone-bg-violet { background: #f5f3ff; border-color: #ddd6fe; color: #6d28d9; }
.tone-bg-slate { background: #f1f5f9; border-color: #e2e8f0; color: #475569; }
.ad-dt-actions { width: 1%; white-space: nowrap; text-align: right; }
.ad-dt-actions-box { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; }
.ad-btn-sm { min-height: 34px !important; padding: 6px 14px !important; border-radius: 10px !important; font-size: 13px !important; }
.ad-select-sm { width: auto !important; min-width: 150px; min-height: 34px; padding: 4px 10px; border: 1px solid #dce5ec; border-radius: 10px; background: #fff; font-size: 13px; }
.ad-row-menu { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid #dfe7ed; border-radius: 10px; background: #fff; color: #475569; font-size: 18px; line-height: 1; cursor: pointer; }
.ad-row-menu:hover, .ad-row-menu[aria-expanded="true"] { border-color: #b7e4d4; color: #0f766e; background: #f2fbf7; }
.ad-row-menu:focus-visible { outline: 2px solid #1aa37f; outline-offset: 2px; }
.ad-menu { position: absolute; z-index: 100000; min-width: 220px; padding: 6px; border: 1px solid #e3eaf0; border-radius: 14px; background: #fff; box-shadow: 0 24px 60px -24px rgba(15,23,42,.35); }
.ad-menu-item { display: block; width: 100%; padding: 9px 12px; border: 0; border-radius: 10px; background: none; color: #334155; font: 500 14px/1.3 var(--bn-font-body, inherit); text-align: left; cursor: pointer; }
.ad-menu-item:hover, .ad-menu-item:focus-visible { background: #f2fbf7; color: #0f766e; outline: none; }
.ad-menu-item.is-danger { color: #b91c1c; }
.ad-menu-item.is-danger:hover, .ad-menu-item.is-danger:focus-visible { background: #fef2f2; color: #991b1b; }
.ad-menu-sep { height: 1px; margin: 5px 4px; background: #e3eaf0; }
.ad-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 12px 6px 8px; border: 1px solid #dfe7ed; border-radius: 999px; background: #fff; color: #64748b; font: 600 12px/1 var(--bn-font-body, inherit); cursor: pointer; }
.ad-toggle::before { content: ""; width: 26px; height: 16px; border-radius: 999px; background: #cbd5e1 radial-gradient(circle at 8px 50%, #fff 5px, transparent 5.5px); transition: background .15s; }
.ad-toggle.is-on { border-color: #ddd6fe; background: #f5f3ff; color: #6d28d9; }
.ad-toggle.is-on::before { background: #7c3aed radial-gradient(circle at 18px 50%, #fff 5px, transparent 5.5px); }
.ad-toggle:focus-visible { outline: 2px solid #7c3aed; outline-offset: 2px; }
.ad-icon-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; border: 1px solid #dfe7ed; border-radius: 8px; background: #fff; color: #475569; cursor: pointer; }
.ad-icon-btn:hover, .ad-icon-btn:focus-visible { border-color: #b7e4d4; color: #0f766e; outline: none; }
.ad-linkcell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ad-linkcell code { padding: 3px 8px; border-radius: 8px; background: #f1f5f9; color: #334155; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.ad-cell-link { display: grid; gap: 2px; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.ad-cell-link strong { color: #0f172a; }
.ad-cell-link:hover strong { color: #0f766e; text-decoration: underline; }
.ad-cell-link:focus-visible { outline: 2px solid #1aa37f; outline-offset: 3px; border-radius: 4px; }
.ad-ref { color: #0f766e; font: 700 12px/1.2 var(--bn-font-mono, ui-monospace, monospace); }
.ad-dt-detail td { padding: 0 16px 16px; background: #f2fbf7; }
.ad-detail { padding: 18px 20px; border: 1px solid #d3ece5; border-radius: 16px; background: #fff; }
.ad-detail .ad-form { margin: 0; padding: 0; border: 0; box-shadow: none; }
.ad-detail-title { margin: 0 0 6px; font: 700 15px/1.3 var(--bn-font-head, inherit); color: #0f172a; }
.ad-detail .ad-inline { margin-top: 10px; align-items: center; }
.ad-ticket-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: #64748b; font-size: 13px; }
.ad-ticket-label { margin: 14px 0 4px; font: 700 13px/1.3 var(--bn-font-head, inherit); color: #0f172a; }
.ad-ticket-reply { align-items: flex-start !important; }
.ad-ticket-reply textarea { width: 100%; min-height: 88px; padding: 8px 12px; border: 1px solid #dce5ec; border-radius: 12px; font: 14px/1.5 inherit; font-family: inherit; resize: vertical; }
.ad-ticket-reply select { min-height: 44px; padding: 8px 12px; border: 1px solid #dce5ec; border-radius: 12px; background: #fff; }
.ad-dt-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; color: #64748b; font-size: 13px; }
.ad-pager { display: inline-flex; align-items: center; gap: 10px; }
.ad-page-btn { min-height: 34px; padding: 6px 12px; border: 1px solid #dfe7ed; border-radius: 10px; background: #fff; color: #334155; font-size: 13px; font-weight: 600; cursor: pointer; }
.ad-page-btn:disabled { opacity: .45; cursor: default; }
.ad-page-btn:not(:disabled):hover { border-color: #b7e4d4; color: #0f766e; }
@media (max-width: 760px) {
 .ad-dt th, .ad-dt td { padding: 10px 12px; }
 .ad-linkcell code { max-width: 160px; }
}

/* ===== Step 3: edit panel, upload box, content pages ===== */
.ad-toolbar { margin: 4px 0 0; align-items: center; }
.ad-toolbar-right { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
/* Edit panel (slides in from the right) */
body.ad-drawer-open { overflow: hidden; }
.ad-drawer-back { position: fixed; inset: 0; z-index: 2000; background: rgba(15,23,42,.32); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.ad-drawer { position: fixed; top: 12px; right: 12px; bottom: 12px; z-index: 2001; display: flex; flex-direction: column; width: min(620px, calc(100% - 24px)); border: 1px solid #e3eaf0; border-radius: 28px; background: linear-gradient(160deg,#fff,#fbfefd); box-shadow: 0 40px 100px -30px rgba(15,23,42,.45); transform: translateX(calc(100% + 24px)); transition: transform .24s ease; }
.ad-drawer.is-in { transform: none; }
.ad-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 28px 16px; border-bottom: 1px solid #e3eaf0; }
.ad-drawer-head h2 { margin: 0; font: 800 22px/1.25 var(--bn-font-head, inherit); letter-spacing: -.02em; color: #0f172a; }
.ad-drawer-sub { margin: 6px 0 0; color: #64748b; font-size: 13px; line-height: 1.5; }
.ad-drawer-x { width: 36px; height: 36px; font-size: 22px; }
.ad-drawer-body { flex: 1; overflow-y: auto; padding: 20px 28px 28px; }
.ad-drawer .ad-form { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; display: grid; gap: 16px; }
.ad-drawer .ad-grid { gap: 14px 16px; }
.ad-drawer .ad-fieldset { margin: 0; }
.ad-drawer .hc-approval-actions { position: sticky; bottom: -28px; margin: 4px -28px -28px; padding: 16px 28px 24px; background: linear-gradient(180deg, rgba(255,255,255,0), #fff 30%); }
.ad-drawer textarea { width: 100%; padding: 10px 12px; border: 1px solid #dce5ec; border-radius: 12px; font: 14px/1.5 inherit; font-family: inherit; resize: vertical; }
.ad-drawer .hc-auth-field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: #334155; }
/* Upload box (same look as the customer site's dropzone) */
.ad-drop { position: relative; display: grid; justify-items: center; gap: 4px; padding: 22px 18px; border: 1.5px dashed #b7d8cc; border-radius: 18px; background: #f6fcf9; color: #334155; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.ad-drop:hover, .ad-drop.is-over { border-color: #10b981; background: #ecfdf5; }
.ad-drop:focus-within { outline: 2px solid #1aa37f; outline-offset: 2px; }
.ad-drop.has-files { border-style: solid; border-color: #9fdcc8; }
.ad-drop-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ad-drop-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 4px; border-radius: 12px; background: linear-gradient(135deg,#059669,#0891b2); color: #fff; }
.ad-drop-icon svg { width: 20px; height: 20px; }
.ad-drop strong { font: 600 14px/1.4 var(--bn-font-head, inherit); color: #0f172a; }
.ad-drop-hint { color: #64748b; font-size: 12px; }
.ad-drop-names { color: #047857; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.ad-drop-names:empty { display: none; }
.ad-progress { width: 100%; height: 8px; margin-top: 8px; border-radius: 999px; accent-color: #059669; }
/* Detail rows on content pages */
.ad-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 12px; align-items: start; }
.ad-detail-grid .ad-link-form { display: grid; gap: 10px; flex: none; }
.ad-detail .hc-auth-field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.ad-detail .hc-auth-field input { width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid #dce5ec; border-radius: 10px; background: #fff; font-size: 14px; box-sizing: border-box; }
.ad-filelist { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.ad-filelist li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #e3eaf0; border-radius: 12px; background: #fbfefd; }
.ad-filelist .ad-cell { flex: 1; }
.ad-file-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border: 1px solid #d3ece5; border-radius: 10px; background: #ecfdf5; color: #047857; }
.ad-file-icon svg { width: 17px; height: 17px; }
.ad-count-link { min-width: 32px; padding: 4px 10px; border: 1px solid #dfe7ed; border-radius: 999px; background: #fff; color: #0f766e; font: 700 13px/1.2 var(--bn-font-body, inherit); font-variant-numeric: tabular-nums; cursor: pointer; }
.ad-count-link:hover, .ad-count-link:focus-visible { border-color: #9fdcc8; background: #f2fbf7; outline: none; }
.ad-dt-inner-wrap { margin-top: 10px; box-shadow: none; }
.ad-dt-inner th { position: static; }
/* "Built articles" block under Documents */
.ad-subsection { margin-top: 32px; padding-top: 24px; border-top: 1px solid #e3eaf0; }
.ad-subsection-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.ad-subsection-head h2 { margin: 0 0 4px; font: 800 20px/1.3 var(--bn-font-head, inherit); letter-spacing: -.02em; color: #0f172a; }
.ad-subsection-head .hc-password-help { margin: 0; max-width: 620px; }
.ad-filters-inline { display: flex; flex-wrap: wrap; gap: 10px; }
.ad-search { min-width: 220px; min-height: 36px; padding: 6px 12px; border: 1px solid #dce5ec; border-radius: 10px; background: #fff; font-size: 13px; }
.ad-plain-strong { font: 600 14px/1.35 var(--bn-font-head, inherit); color: #0f172a; }
.ad-toggle.is-on.is-green { border-color: #bce4d7; background: #ecfdf5; color: #047857; }
.ad-toggle.is-on.is-green::before { background: #059669 radial-gradient(circle at 18px 50%, #fff 5px, transparent 5.5px); }
@media (max-width: 760px) {
 .ad-detail-grid { grid-template-columns: minmax(0, 1fr); }
 .ad-drawer-head, .ad-drawer-body { padding-left: 20px; padding-right: 20px; }
 .ad-drawer .hc-approval-actions { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }
 .ad-drawer .ad-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .ad-drawer { transition: none; } }

/* The hidden attribute always wins (e.g. client tick boxes when "Only selected clients" is not chosen) */
.ad-checks[hidden], .ad-fieldset[hidden], .ad-form [hidden], .ad-drawer [hidden], .ad-detail [hidden] { display: none !important; }
.ad-detail-grid .ad-link-form .ad-btn-sm { justify-self: start; }

/* ===== Step 4: confirmation box, corner messages, header search, remaining pages ===== */
/* Confirmation box */
.ad-dialog-back { position: fixed; inset: 0; z-index: 3000; background: rgba(15,23,42,.38); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); animation: ad-fade .15s ease; }
.ad-dialog { position: fixed; left: 50%; top: 50%; z-index: 3001; width: min(440px, calc(100% - 32px)); padding: 26px 26px 22px; border: 1px solid #e3eaf0; border-radius: 24px; background: #fff; box-shadow: 0 40px 100px -30px rgba(15,23,42,.5); transform: translate(-50%, -50%); animation: ad-pop .16s ease; }
.ad-dialog-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px; border-radius: 14px; background: #ecfdf5; color: #047857; font: 800 20px/1 var(--bn-font-head, inherit); }
.ad-dialog.is-danger .ad-dialog-icon { background: #fef2f2; color: #b91c1c; }
.ad-dialog h2 { margin: 0 0 8px; font: 800 20px/1.3 var(--bn-font-head, inherit); letter-spacing: -.02em; color: #0f172a; }
.ad-dialog p { margin: 0; color: #475569; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.ad-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.ad-dialog-actions button { min-height: 42px; }
.ad-btn-danger { background: linear-gradient(135deg,#dc2626,#b91c1c) !important; border-color: transparent !important; color: #fff !important; }
@keyframes ad-fade { from { opacity: 0; } }
@keyframes ad-pop { from { opacity: 0; transform: translate(-50%, -46%) scale(.98); } }
/* Corner messages */
.ad-toasts { position: fixed; right: 20px; bottom: 92px; z-index: 3100; display: grid; gap: 10px; width: min(380px, calc(100% - 40px)); pointer-events: none; }
.ad-toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 12px 12px 14px; border: 1px solid #bce4d7; border-radius: 16px; background: #fff; box-shadow: 0 24px 50px -24px rgba(15,23,42,.4); color: #0f172a; font-size: 14px; line-height: 1.45; pointer-events: auto; animation: ad-toast-in .2s ease; transition: opacity .25s, transform .25s; }
.ad-toast.is-error { border-color: #fecaca; }
.ad-toast.is-out { opacity: 0; transform: translateY(6px); }
.ad-toast-icon { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 50%; background: #059669; color: #fff; font: 800 12px/1 var(--bn-font-body, inherit); }
.ad-toast.is-error .ad-toast-icon { background: #dc2626; }
.ad-toast-text { flex: 1; overflow-wrap: anywhere; }
.ad-toast-x { flex: none; width: 24px; height: 24px; border: 0; border-radius: 8px; background: none; color: #94a3b8; font-size: 18px; line-height: 1; cursor: pointer; }
.ad-toast-x:hover, .ad-toast-x:focus-visible { background: #f1f5f9; color: #0f172a; outline: none; }
@keyframes ad-toast-in { from { opacity: 0; transform: translateY(8px); } }
/* Search in the header */
.ad-gsearch { position: relative; display: flex; align-items: center; flex: 0 1 380px; min-width: 0; margin-left: auto; }
.ad-gsearch > svg { position: absolute; left: 14px; width: 17px; height: 17px; color: #64748b; pointer-events: none; }
.ad-gsearch input { width: 100%; min-height: 44px; padding: 8px 40px 8px 40px; border: 1px solid #e3eaf0; border-radius: 999px; background: rgba(255,255,255,.9); color: #0f172a; font: 500 14px/1.2 var(--bn-font-body, inherit); }
.ad-gsearch input:focus { outline: none; border-color: #1aa37f; box-shadow: 0 0 0 4px rgba(26,163,127,.14); background: #fff; }
.ad-gsearch kbd { position: absolute; right: 12px; padding: 1px 7px; border: 1px solid #dfe7ed; border-radius: 6px; background: #fff; color: #64748b; font: 600 11px/1.6 var(--bn-font-body, inherit); pointer-events: none; }
.ad-gsearch input:focus ~ kbd { display: none; }
.ad-gsearch-results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 100000; max-height: min(460px, 70vh); overflow-y: auto; padding: 6px; border: 1px solid #e3eaf0; border-radius: 18px; background: #fff; box-shadow: 0 30px 70px -30px rgba(15,23,42,.4); }
.ad-gsearch-results[hidden] { display: none; }
.ad-gsearch-group { margin: 8px 10px 4px; color: #94a3b8; font: 700 11px/1.4 var(--bn-font-body, inherit); letter-spacing: .08em; text-transform: uppercase; }
.ad-gsearch-item { display: grid; gap: 1px; padding: 8px 10px; border-radius: 12px; cursor: pointer; }
.ad-gsearch-item strong { color: #0f172a; font: 600 14px/1.35 var(--bn-font-head, inherit); overflow-wrap: anywhere; }
.ad-gsearch-item span { color: #64748b; font-size: 12px; overflow-wrap: anywhere; }
.ad-gsearch-item.is-active { background: #ecfdf5; }
.ad-gsearch-item.is-active strong { color: #047857; }
.ad-gsearch-empty { margin: 0; padding: 12px; color: #64748b; font-size: 13px; }
.ad-header .site-links { margin-left: 16px; }
/* Row highlighted after a search */
.ad-dt tr.is-flash td { animation: ad-flash 2.2s ease; }
@keyframes ad-flash { 0%, 40% { background: #d1fae5; } 100% { background: transparent; } }
/* Forms that move into the edit panel */
.ad-drawer .ad-form > h2, .ad-drawer #client-form-title { display: none; }
.ad-drawer .ad-form .ad-checks { padding-left: 0; }
.ad-push-right { margin-left: auto; }
/* View as client */
.ad-pickbar { max-width: 420px; margin: 8px 0 20px; }
.ad-pickbar select { width: 100%; }
.ad-preview-link { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; color: #64748b; font-size: 13px; }
.ad-preview-link code { padding: 4px 10px; border-radius: 8px; background: #f1f5f9; color: #334155; font-size: 13px; }
.ad-preview-out .ad-dash-grid { margin-bottom: 14px; }
.ad-panel-icon { display: inline-block; width: 17px; height: 17px; margin-right: 8px; vertical-align: -3px; color: #059669; }
.ad-panel-count { min-width: 26px; padding: 2px 8px; border-radius: 999px; background: #ecfdf5; color: #047857; font: 700 12px/1.5 var(--bn-font-body, inherit); text-align: center; }
.ad-plainlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ad-plainlist li { padding: 8px 12px; border: 1px solid #edf2f6; border-radius: 10px; background: #fff; color: #334155; font-size: 13px; overflow-wrap: anywhere; }
/* Emails */
.ad-mono-soft { color: #475569; font-size: 13px; }
.ad-chips-label { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: #334155; }
.ad-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ad-chip { padding: 4px 10px; border: 1px solid #d3ece5; border-radius: 999px; background: #f2fbf7; color: #047857; font: 600 12px/1.4 var(--bn-font-mono, ui-monospace, monospace); cursor: pointer; }
.ad-chip:hover, .ad-chip:focus-visible { border-color: #10b981; background: #ecfdf5; outline: none; }
.ad-drawer textarea[rows="12"] { min-height: 240px; font-family: inherit; }
@media (max-width: 1100px) { .ad-gsearch { flex-basis: 280px; } .ad-header .site-links { display: none; } }
@media (max-width: 760px) { .ad-gsearch { display: none; } .ad-toasts { bottom: 88px; } }
@media (prefers-reduced-motion: reduce) { .ad-dialog, .ad-dialog-back, .ad-toast { animation: none; } .ad-dt tr.is-flash td { animation: none; background: #d1fae5; } }

.ad-dt th.ad-num { text-align: right; }

/* Step image rule in the Word upload panel */
.ad-image-rule { padding: 12px 14px; border: 1px solid #d3ece5; border-radius: 14px; background: #f6fcf9; color: #334155; font-size: 13px; line-height: 1.55; }
.ad-image-rule strong { display: block; margin-bottom: 4px; color: #0f172a; font: 700 13px/1.4 var(--bn-font-head, inherit); }
.ad-image-rule ul { margin: 0; padding-left: 18px; }
.ad-image-rule p { margin: 0; }
