/* ════════════════════════════════════════════════════════════════
   Portal component kit — shared building blocks for data pages
   (tables, modals, forms, empty states, key/value rows, comments).
   Layout-level primitives (.panel, .pill, .page-head, .btn-ghost,
   .section, .reveal) come from DashboardLayout.razor.css.
   Colour tokens (--surface, --line, --accent…) are declared on .shell
   and inherit here, so plain global rules resolve them correctly.
   ════════════════════════════════════════════════════════════════ */

/* ─── Buttons ─────────────────────────────────────────────────── */
.admin-kit .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 16px;
    border: 1px solid var(--line);
    border-radius: 0;
    background: var(--surface);
    color: var(--text);
    font: 600 13px var(--font-body);
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.admin-kit .btn:hover:not(:disabled) { border-color: var(--accent-line); background: var(--surface-2); transform: translateY(-1px); }
.admin-kit .btn:disabled { opacity: .5; cursor: not-allowed; }
.admin-kit .btn-primary { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-2); }
.admin-kit .btn-primary:hover:not(:disabled) { background: rgba(45,212,191,.22); }
.admin-kit .btn-danger { color: var(--bad); border-color: rgba(255,107,107,.30); background: rgba(255,107,107,.08); }
.admin-kit .btn-danger:hover:not(:disabled) { background: rgba(255,107,107,.16); }
.admin-kit .btn.is-active { border-color: var(--accent-line); color: var(--accent-2); background: var(--accent-soft); }
.admin-kit .btn-sm { padding: 6px 11px; font-size: 12px; }

/* ─── Toolbar ─────────────────────────────────────────────────── */
.admin-kit .toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-kit .toolbar-group { display: inline-flex; gap: 6px; }
.admin-kit .toolbar-spacer { flex: 1; }

/* ─── Data table ──────────────────────────────────────────────── */
.admin-kit .data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-kit .data-table thead th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--faint);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.admin-kit .data-table tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); color: var(--text); vertical-align: middle; }
.admin-kit .data-table tbody tr:last-child td { border-bottom: none; }
.admin-kit .data-table tbody tr.row-click { cursor: pointer; transition: background .14s ease; }
.admin-kit .data-table tbody tr.row-click:hover { background: var(--surface-2); }
.admin-kit .cell-strong { font-weight: 600; }
.admin-kit .cell-mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12px; color: var(--muted); }
.admin-kit .cell-muted { color: var(--faint); }
/* A UAV on the open board whose customer has replied and is waiting on SecOps. The same pill as the
   incident queue's "Your reply needed" (.inc-attn-pill), in the theme's amber; the light theme takes the
   darker variant for the same contrast reason. */
.admin-kit .uav-attn-pill {
    --attn-c: var(--warn);
    display: inline-block;
    margin-top: 4px;
    padding: 1px 7px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--attn-c);
    background: color-mix(in srgb, var(--attn-c) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--attn-c) 45%, transparent);
    white-space: nowrap;
}
html[data-theme="light"] .admin-kit .uav-attn-pill { --attn-c: #8A6209; }
/* Free-text values the customer types (names, emails, labels, detail) are
   unbounded, and `.content .panel` is overflow:hidden — a row wider than its
   panel is clipped, not scrolled (conventions §26). Wrap such a value in
   `.cell-clip` so the column caps at a readable width and ellipses the rest,
   with the full value on a `title`. The wrapper is what does it: `max-width`
   on a `td` is ignored under auto table layout, but an inline-block's
   max-content contribution is capped, so the column can't grow past it.
   Override per column with `style="--clip:340px"`. */
.admin-kit .data-table .cell-clip {
    display: inline-block;
    vertical-align: middle;
    max-width: var(--clip, 260px);
    min-width: 0; /* as a flex item (.user-cell) min-width:auto would override max-width */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ─── Live count / strap ──────────────────────────────────────── */
.admin-kit .live-count { font-size: 12.5px; color: var(--muted); padding: 12px 16px 0; }

/* ─── Empty state ─────────────────────────────────────────────── */
.admin-kit .empty { padding: 40px 24px; text-align: center; color: var(--muted); }
.admin-kit .empty-title { font-size: 14.5px; font-weight: 600; color: var(--text); margin: 0 0 6px; }
.admin-kit .empty-detail { font-size: 13px; color: var(--faint); margin: 0; }
.admin-kit .loading { padding: 28px 24px; text-align: center; color: var(--muted); font-size: 13px; }

/* ─── Skeleton shimmer ─────────────────────────────────────────────
   Project-wide loading convention: while data is loading, show a
   shimmering placeholder shaped like the eventual content — never a
   "Loading…" string and never a zero/empty value that pops in later.
   `.shimmer` supplies the animated surface; the `.sk-*` classes give it
   a shape. The reusable <Skeleton> component wraps the common cases. */
.admin-kit .shimmer {
    position: relative;
    overflow: hidden;
    background: var(--surface-2);
    border-radius: 0;
}
.admin-kit .shimmer::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(120, 160, 220, .13), transparent);
    animation: shimmer-slide 1.3s ease-in-out infinite;
}
@keyframes shimmer-slide { 100% { transform: translateX(100%); } }

/* Block-level line placeholders (varied widths read as text rows). */
.admin-kit .sk-line { display: block; height: 13px; }
.admin-kit .sk-line.sm { height: 10px; }
.admin-kit .sk-line.lg { height: 26px; }
/* Panel/table body: a padded stack of shimmer rows. */
.admin-kit .sk-rows { display: flex; flex-direction: column; gap: 14px; padding: 20px 16px; }
/* Drop the default padding when the stack sits inside an already-padded panel. */
.admin-kit .sk-rows.sk-flush { padding: 4px 0; }
/* Inline placeholders that sit inside a line of text (counts, values). */
.admin-kit .sk-inline { display: inline-block; height: 1em; vertical-align: -0.12em; border-radius: 3px; }
.admin-kit .sk-num { display: inline-block; width: 1.6ch; height: 1em; vertical-align: -0.12em; border-radius: 3px; }

@media (prefers-reduced-motion: reduce) { .admin-kit .shimmer::after { animation: none; } }
.admin-kit .error-box { margin: 0 0 12px; padding: 11px 14px; border: 1px solid rgba(255,107,107,.3); background: rgba(255,107,107,.08); color: #ffb3b3; font-size: 12.5px; }
.admin-kit .ok-box { margin: 0 0 12px; padding: 11px 14px; border: 1px solid rgba(61,220,151,.3); background: rgba(61,220,151,.1); color: #8ff0c4; font-size: 12.5px; }

/* ─── Modal overlay + card (centred, faded backdrop) ──────────── */
.admin-kit .modal-overlay {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    background: rgba(7, 9, 10, 0.66);
    backdrop-filter: blur(3px);
    animation: modal-fade .18s ease both;
}
.admin-kit .modal {
    /* These five reset Bootstrap's own `.modal` rules (display:none, position:fixed,
       height:100%, inset:0, overflow:hidden) which would otherwise hide this card. */
    display: block;
    position: relative;
    inset: auto;
    height: auto;
    overflow-x: hidden;

    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 24px 60px rgba(0,0,0,.5);
    padding: 22px 24px 26px;
    animation: modal-rise .22s cubic-bezier(.22,.9,.3,1) both;
}
.admin-kit .modal-lg { max-width: 720px; }
.admin-kit .modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.admin-kit .modal-title { margin: 0; font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.admin-kit .modal-eyebrow { margin: 0 0 3px; font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.admin-kit .modal-close {
    flex: none; width: 30px; height: 30px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); background: transparent; color: var(--muted);
    font-size: 15px; cursor: pointer; transition: border-color .15s, color .15s;
}
.admin-kit .modal-close:hover { border-color: var(--accent-line); color: var(--text); }
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-rise { from { opacity: 0; transform: translateY(12px) scale(.99); } to { opacity: 1; transform: none; } }

/* ─── Logo crop dialog (LogoCropper.razor) ────────────────────── */
/* Centres the image; the faint tint keeps a white-on-transparent logo visible. */
.admin-kit .crop-stage {
    display: flex; align-items: center; justify-content: center;
    padding: 18px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.03);
}
/* Wraps the image exactly, so the crop box's percentage coordinates are image coordinates.
   overflow:hidden clips the box's 9999px dimming shadow to the image. */
.admin-kit .crop-frame {
    position: relative; display: inline-block; max-width: 100%;
    line-height: 0; overflow: hidden;
    user-select: none; -webkit-user-select: none;
}
.admin-kit .crop-frame img { display: block; max-width: 100%; max-height: 320px; }
.admin-kit .crop-box {
    position: absolute; box-sizing: border-box;
    border: 1.5px dashed var(--accent);
    /* Dims everything the crop will remove — cheaper and simpler than four surround divs. */
    box-shadow: 0 0 0 9999px rgba(7,9,10,.55);
    cursor: move; touch-action: none;
}
/* Handles sit fully inside the box so the frame's overflow clipping never cuts them off,
   even with the crop at the full image. Corners are visible chips; edges are unpainted
   grab zones whose cursor announces them. */
.admin-kit .crop-handle { position: absolute; touch-action: none; }
.admin-kit .crop-handle[data-h=nw] { left: 0; top: 0; width: 14px; height: 14px; cursor: nwse-resize; }
.admin-kit .crop-handle[data-h=ne] { right: 0; top: 0; width: 14px; height: 14px; cursor: nesw-resize; }
.admin-kit .crop-handle[data-h=sw] { left: 0; bottom: 0; width: 14px; height: 14px; cursor: nesw-resize; }
.admin-kit .crop-handle[data-h=se] { right: 0; bottom: 0; width: 14px; height: 14px; cursor: nwse-resize; }
.admin-kit .crop-handle[data-h=nw]::after,
.admin-kit .crop-handle[data-h=ne]::after,
.admin-kit .crop-handle[data-h=sw]::after,
.admin-kit .crop-handle[data-h=se]::after { content: ''; position: absolute; inset: 3px; background: var(--accent); }
.admin-kit .crop-handle[data-h=n] { left: 14px; right: 14px; top: 0; height: 9px; cursor: ns-resize; }
.admin-kit .crop-handle[data-h=s] { left: 14px; right: 14px; bottom: 0; height: 9px; cursor: ns-resize; }
.admin-kit .crop-handle[data-h=w] { left: 0; top: 14px; bottom: 14px; width: 9px; cursor: ew-resize; }
.admin-kit .crop-handle[data-h=e] { right: 0; top: 14px; bottom: 14px; width: 9px; cursor: ew-resize; }
.admin-kit .crop-actions { display: flex; gap: 10px; align-items: center; margin-top: 16px; }
.admin-kit .crop-actions .crop-spacer { flex: 1; }

/* ─── Bulletin type picker ────────────────────────────────────── */
.admin-kit .type-picker { display: grid; gap: 10px; }
.admin-kit .type-card {
    display: flex; flex-direction: column; gap: 4px;
    padding: 14px 16px; text-align: left; cursor: pointer;
    border: 1px solid var(--line); background: var(--surface-2);
    color: var(--text); transition: border-color .15s ease, background .15s ease;
}
.admin-kit .type-card:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.admin-kit .type-card strong { font-size: 13.5px; font-weight: 600; }
.admin-kit .type-card span { font-size: 12px; color: var(--faint); line-height: 1.5; }

/* Sub-group heading inside the bulletins list panel */
.admin-kit .list-group-label {
    padding: 12px 16px 5px; font-size: 11px; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase; color: var(--faint);
}

/* ─── Forms ───────────────────────────────────────────────────── */
.admin-kit .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.admin-kit .field-label { font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--faint); }
.admin-kit .field-input, .admin-kit .field-select, .admin-kit .field-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 13.5px var(--font-body);
    transition: border-color .15s ease;
}
.admin-kit .field-input:focus, .admin-kit .field-select:focus, .admin-kit .field-textarea:focus { outline: none; border-color: var(--accent-line); }
.admin-kit .field-input::placeholder, .admin-kit .field-textarea::placeholder { color: var(--faint); }
.admin-kit .field-input:disabled, .admin-kit .field-select:disabled, .admin-kit .field-textarea:disabled { opacity: .55; }
.admin-kit .field-textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.admin-kit .field-hint { font-size: 12px; color: var(--faint); }
.admin-kit .check-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--text); cursor: pointer; }
.admin-kit .check-row input[type=checkbox] { margin-top: 2px; accent-color: var(--accent, #009FC2); }
/* A fixed option shown for context, not to be toggled (e.g. Sentinel in the security-products list). */
.admin-kit .check-row.is-fixed { color: var(--faint); cursor: default; }

/* ─── Key/value meta rows ─────────────────────────────────────── */
.admin-kit .meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; margin: 4px 0 18px; }
.admin-kit .meta-row { display: flex; flex-direction: column; gap: 3px; }
.admin-kit .meta-label { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.admin-kit .meta-value { font-size: 13.5px; color: var(--text); }
.admin-kit .kv-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.admin-kit .kv-row:last-child { border-bottom: none; }

/* ─── Raised-to-customer box (incident detail) ─────────────────── */
.admin-kit .raised-box { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 4px 0 18px; background: var(--surface-2); }
.admin-kit .raised-box.is-yes { border-color: color-mix(in srgb, #3DDC97 45%, var(--line)); background: color-mix(in srgb, #3DDC97 8%, var(--surface-2)); }
.admin-kit .raised-box-top { display: flex; align-items: center; gap: 10px; }
.admin-kit .raised-box-icon { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 50%; font-size: 13px; font-weight: 700; background: var(--surface); color: var(--faint); }
.admin-kit .raised-box.is-yes .raised-box-icon { background: #3DDC97; color: #06231a; }
.admin-kit .raised-box-label { font-size: 13.5px; font-weight: 600; color: var(--text); margin-right: auto; }
.admin-kit .raised-box-people { font-size: 12.5px; color: var(--muted); margin-top: 8px; padding-left: 32px; }

/* ─── Section label inside panels/modals ──────────────────────── */
.admin-kit .block-label { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); margin: 18px 0 8px; display: flex; align-items: center; gap: 8px; }
/* A number beside a heading, or a labelled count beside the Documents breadcrumb: one line either way. */
.admin-kit .count-chip { flex: none; display: inline-flex; min-width: 18px; height: 18px; padding: 0 6px; align-items: center; justify-content: center; white-space: nowrap; background: var(--surface-2); border: 1px solid var(--line); font-size: 11px; color: var(--muted); }

/* ─── Description / prose ─────────────────────────────────────── */
.admin-kit .prose { font-size: 13.5px; line-height: 1.6; color: var(--text); white-space: pre-wrap; word-break: break-word; }

/* ─── Comment thread ──────────────────────────────────────────── */
.admin-kit .comments { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.admin-kit .comment { border: 1px solid var(--line-soft); background: var(--bg); padding: 11px 13px; }
.admin-kit .comment-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.admin-kit .comment-author { font-weight: 600; font-size: 12.5px; color: var(--text); }
.admin-kit .comment-date { font-size: 11.5px; color: var(--faint); }
.admin-kit .comment-body { font-size: 13px; line-height: 1.5; color: var(--muted); white-space: pre-wrap; }
.admin-kit .no-comments { font-size: 13px; color: var(--faint); padding: 6px 0; }

/* ─── Risk / status colour helpers ────────────────────────────── */
.admin-kit .tag-risk { display: inline-flex; padding: 3px 10px; font-size: 11.5px; font-weight: 600; border: 1px solid transparent; }
.admin-kit .tag-risk--low      { color: var(--good); background: rgba(61,220,151,.10); border-color: rgba(61,220,151,.25); }
.admin-kit .tag-risk--medium   { color: var(--warn); background: rgba(255,180,84,.11); border-color: rgba(255,180,84,.28); }
.admin-kit .tag-risk--high     { color: var(--bad);  background: rgba(255,107,107,.11); border-color: rgba(255,107,107,.28); }
.admin-kit .tag-risk--critical { color: var(--crit); background: rgba(185,138,255,.12); border-color: rgba(185,138,255,.30); }
.admin-kit .tag-risk--unknown  { color: var(--faint); background: var(--surface-2); border-color: var(--line); }
.admin-kit .badge-good { color: var(--good); font-weight: 600; }
.admin-kit .badge-bad  { color: var(--bad);  font-weight: 600; }

/* ─── Two-column split (list + preview) ───────────────────────── */
.admin-kit .split { display: grid; grid-template-columns: 360px 1fr; gap: 22px; align-items: start; }
@media (max-width: 960px) { .admin-kit .split { grid-template-columns: 1fr; } .admin-kit .meta-grid { grid-template-columns: 1fr; } }

/* ─── Simple list rows (documents, digests) ───────────────────── */
.admin-kit .list-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line-soft); cursor: pointer; transition: background .14s ease; }
.admin-kit .list-row:last-child { border-bottom: none; }
.admin-kit .list-row:hover { background: var(--surface-2); }
.admin-kit .list-row.sel { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.admin-kit .list-row-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.admin-kit .list-row-meta { font-size: 12px; color: var(--faint); margin-top: 2px; }
.admin-kit .icon-btn { flex: none; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; background: transparent; color: var(--faint); cursor: pointer; font-size: 13px; }
.admin-kit .icon-btn:hover { color: var(--bad); border-color: rgba(255,107,107,.3); }
.admin-kit .panel-head-row { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.admin-kit .panel-head-row h3 { margin: 0; font-size: 14px; font-weight: 600; }
.admin-kit .panel-head-add { margin-left: auto; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--surface-2); color: var(--accent-2); cursor: pointer; font-size: 16px; }
.admin-kit .panel-head-add:hover:not(:disabled) { border-color: var(--accent-line); }
.admin-kit .panel-head-add:disabled { opacity: .45; cursor: not-allowed; }

/* Per-panel manual refresh. Sits at the right of the panel head; when it follows the add button it
   gives up the auto margin so the pair stays together rather than splitting across the row. */
.admin-kit .panel-head-refresh { margin-left: auto; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); cursor: pointer; }
.admin-kit .panel-head-add + .panel-head-refresh { margin-left: 0; }
.admin-kit .panel-head-refresh svg { width: 14px; height: 14px; }
.admin-kit .panel-head-refresh:hover:not(:disabled) { color: var(--accent-2); border-color: var(--accent-line); }
.admin-kit .panel-head-refresh:disabled { cursor: progress; color: var(--accent-2); }
.admin-kit .panel-head-refresh svg.spin { transform-box: fill-box; transform-origin: center; animation: tb-spin .7s linear infinite; }

/* A field's own character counter, beside its label: the input stops taking keystrokes at maxlength, so
   the form has to say where the limit is rather than just going quiet (§35). */
.admin-kit .field-label:has(.field-counter) { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.admin-kit .field-counter { font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--faint); font-variant-numeric: tabular-nums; }

/* Breadcrumb in a panel head, for the document library's folder browser (§45). Stands in for the head's
   <h3>: where the operator is is what the panel has to say. Each crumb navigates back up to itself. */
.admin-kit .crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
.admin-kit .crumb {
    max-width: 200px; padding: 2px 4px; border: 0; background: none;
    font: 600 14px var(--font-body); color: var(--muted); cursor: pointer;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    transition: color .14s ease;
}
.admin-kit .crumb:hover { color: var(--accent-2); }
.admin-kit .crumb.here { color: var(--text); cursor: default; }
.admin-kit .crumb-sep { color: var(--faint); font-size: 12px; }

/* A table cell that navigates (a folder row's name). Reads as the cell, not as a button. */
.admin-kit .link-cell {
    display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
    padding: 0; border: 0; background: none; color: var(--text);
    font: inherit; text-align: left; cursor: pointer;
}
.admin-kit .link-cell:hover { color: var(--accent-2); }
.admin-kit .folder-glyph { flex: none; color: var(--accent); font-size: 11px; }

/* Something that went right and would otherwise leave the operator guessing (folders added, or already
   there). The counterpart of .error-box, in the accent rather than --bad. */
.admin-kit .notice-box { padding: 11px 14px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent-2); font-size: 12.5px; }

/* ─── Row actions & consent link (Admin tenants) ──────────────── */
.admin-kit .row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-kit .btn-mini { display: inline-flex; align-items: center; padding: 4px 9px; font-size: 11.5px; font-weight: 600; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); cursor: pointer; text-decoration: none; transition: border-color .14s ease, color .14s ease, background .14s ease; }
.admin-kit .btn-mini:hover:not(:disabled) { border-color: var(--accent-line); color: var(--text); }
.admin-kit .btn-mini:disabled { opacity: .45; cursor: not-allowed; }
/* A .btn-mini used as a tab rather than an action: the selected one of a set. The rules-of-engagement
   section uses it for the document's three parts, where a row of plain minis gives the operator no way
   to tell which one they are looking at. */
.admin-kit .btn-mini.is-on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-2); }
.admin-kit .btn-mini-danger { color: var(--bad); border-color: rgba(255,107,107,.3); }
.admin-kit .btn-mini-danger:hover:not(:disabled) { background: rgba(255,107,107,.12); color: var(--bad); }
.admin-kit .consent-link { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.admin-kit .consent-link .field-input { flex: 1; font-family: var(--mono, monospace); font-size: 11.5px; }

.admin-kit .probe-result { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.admin-kit .probe-result .probe-error { flex-basis: 100%; font-size: 11.5px; color: var(--bad); }

/* ─── Cross-tenant "viewing as" banner ────────────────────────── */
.admin-kit .tenant-banner { display: flex; align-items: center; gap: 10px; padding: 10px 16px; margin-bottom: 16px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--text); font-size: 13px; }
.admin-kit .tenant-banner .btn-mini { margin-left: auto; }
.admin-kit .tenant-banner-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ─── Onboarding / connection callback ────────────────────────── */
.admin-kit .onboarding-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg, #0b0f14); }
.admin-kit .onboarding-card { width: 100%; max-width: 440px; padding: 40px 36px; border: 1px solid var(--line); background: var(--surface, #121820); text-align: center; }
.admin-kit .onboarding-brand { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 24px; color: var(--text); }
.admin-kit .onboarding-brand .brand-name { font-size: 18px; font-weight: 600; }
.admin-kit .ob-title { font-size: 20px; font-weight: 600; color: var(--text); margin: 16px 0 8px; }
.admin-kit .ob-text { font-size: 13.5px; line-height: 1.6; color: var(--faint); margin: 0 0 22px; }
.admin-kit .ob-icon { width: 56px; height: 56px; margin: 0 auto; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 28px; }
.admin-kit .ob-icon-good { background: rgba(61,220,151,.14); color: #8ff0c4; border: 1px solid rgba(61,220,151,.35); }
.admin-kit .ob-icon-bad { background: rgba(255,107,107,.12); color: #ffb3b3; border: 1px solid rgba(255,107,107,.35); }
.admin-kit .ob-metric { margin: 0 0 22px; padding: 16px; border: 1px solid var(--line); background: var(--surface-2); }
.admin-kit .ob-metric-value { display: block; font-size: 30px; font-weight: 700; color: var(--accent-2); }
.admin-kit .ob-metric-label { display: block; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); margin-top: 4px; }
.admin-kit .ob-bar { height: 6px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.admin-kit .ob-bar-fill { height: 100%; background: var(--accent); transition: width .4s ease; }
.admin-kit .ob-spinner { width: 44px; height: 44px; margin: 0 auto; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: ob-spin 0.9s linear infinite; }
@keyframes ob-spin { to { transform: rotate(360deg); } }

/* Setup gate (customer onboarding prompt — two-step connect) */
/* The shell + a dimmed page outline stay visible; this popup sits over the content area only,
   so the left nav is still shown (but the overlay blocks interaction until both planes connect). */
.admin-kit .setup-gate { position: relative; min-height: 60vh; }
.admin-kit .setup-outline { filter: blur(1.5px); opacity: .45; pointer-events: none; user-select: none; }
.admin-kit .setup-overlay { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 32px; background: rgba(8, 12, 18, .5); backdrop-filter: blur(2px); }
.admin-kit .setup-modal { width: 100%; max-width: 540px; padding: 28px 30px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.admin-kit .setup-modal-head { margin-bottom: 6px; }
.admin-kit .setup-lead { font-size: 13px; line-height: 1.6; color: var(--faint); margin: 4px 0 20px; }
.admin-kit .setup-steps { display: flex; flex-direction: column; gap: 12px; margin: 8px 0 20px; text-align: left; }
.admin-kit .setup-row { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border: 1px solid var(--line); background: var(--surface-2); }
.admin-kit .setup-row-icon { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; background: var(--surface); border: 1px solid var(--line); color: var(--faint); }
.admin-kit .setup-row.is-done .setup-row-icon { background: rgba(61,220,151,.14); color: #8ff0c4; border-color: rgba(61,220,151,.35); }
.admin-kit .setup-row-body { flex: 1 1 auto; min-width: 0; }
.admin-kit .setup-row-title { font-weight: 600; color: var(--text); font-size: 14px; }
.admin-kit .setup-row-detail { font-size: 12.5px; color: var(--faint); margin-top: 3px; line-height: 1.5; }
.admin-kit .setup-row-error { font-size: 11.5px; color: #ffb3b3; margin-top: 6px; word-break: break-word; }
.admin-kit .setup-row-action { flex: 0 0 auto; align-self: center; }
.admin-kit .setup-foot { display: flex; align-items: center; justify-content: center; gap: 12px; }
.admin-kit .setup-poll-note { font-size: 11.5px; color: var(--faint); }
.admin-kit .setup-dots { display: inline-flex; gap: 4px; }

/* ════════════════════════════════════════════════════════════════
   Additions for the .admin-kit island (restored Admin page).
   The wrapper mirrors the layout's section rhythm; the pill/reveal
   primitives came from the old DashboardLayout ::deep kit; the
   digest-* rules from the old SecurityBulletins page (the Admin
   bulletins editor shares its markup).
   ════════════════════════════════════════════════════════════════ */
.admin-kit { display: flex; flex-direction: column; gap: 34px; }

.admin-kit .pill { display: inline-flex; align-items: center; padding: 5px 13px; border-radius: 0; font-size: 12.5px; font-weight: 600; border: 1px solid transparent; }
.admin-kit .pill.sm { padding: 3px 10px; font-size: 11.5px; }
.admin-kit .pill-strong { color: #5CF0B0; background: rgba(61, 220, 151, 0.16); border-color: rgba(61, 220, 151, 0.35); }
.admin-kit .pill-good   { color: var(--good); background: rgba(61, 220, 151, 0.10); border-color: rgba(61, 220, 151, 0.25); }
.admin-kit .pill-warn   { color: var(--warn); background: rgba(255, 180, 84, 0.11); border-color: rgba(255, 180, 84, 0.28); }
.admin-kit .pill-bad    { color: var(--bad);  background: rgba(255, 107, 107, 0.11); border-color: rgba(255, 107, 107, 0.28); }
.admin-kit .pill-crit   { color: var(--crit); background: rgba(185, 138, 255, 0.12); border-color: rgba(185, 138, 255, 0.30); }

.admin-kit .reveal { animation: ak-rise .6s cubic-bezier(.22,.9,.3,1) both; animation-delay: calc(var(--d, 0) * 90ms); }
@keyframes ak-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .admin-kit .reveal { animation: none; } }

.admin-kit .digest-doc { max-width: 760px; }
.admin-kit .digest-header { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; margin-bottom: 22px; background: var(--surface-2); border: 1px solid var(--line); border-left: 2px solid var(--accent); font-size: 13px; color: var(--muted); }
.admin-kit .digest-header strong { color: var(--text); font-weight: 600; }
.admin-kit .digest-divider { height: 0; margin: 24px 0; border: none; border-top: 1px solid var(--line); }
.admin-kit .digest-threat { scroll-margin-top: 24px; }
.admin-kit .digest-threat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.admin-kit .digest-threat-title { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 600; line-height: 1.35; color: var(--text); }
.admin-kit .digest-wwd-label { margin: 16px 0 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.admin-kit .digest-add-section { padding: 4px 0 2px; }

/* ── Security-bulletins unified list: type filter + search + rows ── */
.admin-kit .bul-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.admin-kit .bul-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-kit .bul-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: color .15s ease, border-color .15s ease, background .15s ease; }
.admin-kit .bul-chip:hover { color: var(--text); border-color: rgba(255,255,255,.22); }
.admin-kit .bul-chip i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--c, var(--accent)); }
.admin-kit .bul-chip span { color: var(--faint); font-variant-numeric: tabular-nums; }
.admin-kit .bul-chip.is-active { color: var(--text); border-color: color-mix(in srgb, var(--c, var(--accent)) 55%, transparent); background: color-mix(in srgb, var(--c, var(--accent)) 10%, var(--surface)); }

.admin-kit .bul-search { display: inline-flex; align-items: center; gap: 8px; min-width: 220px; padding: 7px 12px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.admin-kit .bul-search svg { width: 15px; height: 15px; flex: none; }
.admin-kit .bul-search input { flex: 1; min-width: 0; border: none; background: transparent; color: var(--text); font: inherit; outline: none; }
.admin-kit .bul-search input::placeholder { color: var(--faint); }

.admin-kit .bul-row { display: grid; grid-template-columns: 96px 148px minmax(0, 1fr) auto 26px; gap: 14px; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); cursor: pointer; transition: background .14s ease; }
.admin-kit .bul-row:last-of-type { border-bottom: none; }
.admin-kit .bul-row:hover { background: var(--surface-2); }
.admin-kit .bul-tag { justify-self: start; max-width: 100%; padding: 2px 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; font-variant-numeric: tabular-nums; color: var(--accent-2); background: var(--accent-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-kit .bul-type { justify-self: start; display: inline-flex; align-items: center; padding: 3px 10px; font-size: 11.5px; font-weight: 600; white-space: nowrap; color: var(--c, var(--muted)); border: 1px solid color-mix(in srgb, var(--c, var(--muted)) 50%, transparent); background: color-mix(in srgb, var(--c, var(--muted)) 10%, transparent); }
.admin-kit .bul-main { display: grid; gap: 2px; min-width: 0; }
.admin-kit .bul-main strong { font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-kit .bul-sub { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-kit .bul-when { text-align: right; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Wraps because it carries the shared <Pager> beside the count (site/components.css). */
.admin-kit .bul-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; padding: 12px 16px; border-top: 1px solid var(--line-soft); color: var(--faint); font-size: 12.5px; }

@media (max-width: 720px) {
    .admin-kit .bul-row { grid-template-columns: minmax(0, 1fr) 26px; row-gap: 8px; }
    .admin-kit .bul-tag { order: -2; }
    .admin-kit .bul-type { order: -1; justify-self: end; }
    .admin-kit .bul-when { text-align: left; grid-column: 1 / -1; }
}

/* ─── Free-form topic tags: editor (TagInput) + read-only row chips ─── */

/* TagInput — existing tags as removable chips plus a free-text field; used on the bulletin, digest
   and tenant editors. */
.admin-kit .tag-input {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
}
.admin-kit .tag-input.is-disabled { opacity: .55; pointer-events: none; }
.admin-kit .tag-input:focus-within { border-color: var(--accent-line); }
.admin-kit .tag-input-chip {
    display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border-radius: 999px;
    font: 600 12px var(--font-body); white-space: nowrap;
    color: color-mix(in srgb, var(--accent) 82%, var(--text));
    border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
    background: color-mix(in srgb, var(--accent) 13%, transparent);
}
.admin-kit .tag-input-x {
    display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px;
    border: none; border-radius: 50%; background: transparent; color: inherit; cursor: pointer;
    font-size: 14px; line-height: 1;
}
.admin-kit .tag-input-x:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.admin-kit .tag-input-field {
    flex: 1; min-width: 120px; border: none; outline: none; background: transparent; color: var(--text);
    font: 400 13px var(--font-body); padding: 2px 0;
}
.admin-kit .tag-input-field::placeholder { color: var(--faint); }

/* Read-only topic-tag chips on list rows. */
.admin-kit .bul-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.admin-kit .tag-chip {
    display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px;
    font-size: 11px; font-weight: 600; white-space: nowrap;
    color: color-mix(in srgb, var(--accent) 82%, var(--text));
    border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
    background: color-mix(in srgb, var(--accent) 13%, transparent);
}

/* ── the UAV picker's selection bar ───────────────────────────────────────────────────────────────── */
/* One warning can cover several CVEs, so the picker is a tick list and the press is one action over the
   lot. The bar sits above the table and stays there once anything is ticked, because a selection whose
   control is a page away is a selection the operator loses. */
.admin-kit .uav-pick-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line-soft);
}

.admin-kit .uav-pick-bar .live-count { display: inline-flex; align-items: center; gap: 5px; }

/* The action sits at the far end, away from the count it acts on. */
.admin-kit .uav-pick-bar .btn-mini.is-on { margin-left: auto; }

/* The picked set inside the dialog, each chip removable: the table it was ticked on is behind the dialog,
   so an operator who spots a wrong one must not have to close it and start the press again. */
.admin-kit .uav-pick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

.admin-kit .uav-pick-chips .count-chip { gap: 5px; height: 22px; font-variant-numeric: tabular-nums; }

.admin-kit .uav-chip-x {
    padding: 0;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
}

.admin-kit .uav-chip-x:hover:not(:disabled) { color: var(--bad); }
.admin-kit .uav-chip-x:disabled { opacity: .45; cursor: not-allowed; }

/* ─── One published UAV (UavConsoleDialog.razor) ─────────────── */
/* Wider than the kit's forms: it carries a CVE table and a thread. */
.admin-kit .modal-uav { max-width: 860px; }
.admin-kit .uavc-subject { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.admin-kit .uavc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -6px 0 16px; font-size: 12.5px; }
.admin-kit .uavc-pill { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border: 1px solid; font-size: 11.5px; font-weight: 600; }
.admin-kit .uavc-advice { margin: 0; white-space: pre-wrap; font-size: 13px; line-height: 1.55; color: var(--text); }
.admin-kit .uavc-row-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.admin-kit .uavc-status { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; font-size: 12.5px; color: var(--muted); }
.admin-kit .uavc-status .field-input { width: auto; min-width: 150px; }
.admin-kit .uavc-cves { width: 100%; table-layout: auto; }
.admin-kit .uavc-cves td { font-size: 12.5px; }
.admin-kit .uavc-thread { display: grid; gap: 10px; margin-top: 12px; }
.admin-kit .uavc-comment { display: flex; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-soft); background: var(--surface-2); }
.admin-kit .uavc-comment.is-soc { border-color: var(--accent-line); }
.admin-kit .uavc-avatar {
    flex: none; width: 28px; height: 28px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    overflow: hidden; background: var(--surface); border: 1px solid var(--line);
    font-size: 11px; font-weight: 600; color: var(--muted);
}
.admin-kit .uavc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.admin-kit .uavc-comment-body { min-width: 0; flex: 1; }
.admin-kit .uavc-comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; }
.admin-kit .uavc-comment-body p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.5; }
.admin-kit .uavc-activity { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 12.5px; }
.admin-kit .uavc-activity li { display: flex; justify-content: space-between; gap: 12px; }
