﻿:root {
    --b-divider-thickness: 1px;
    --b-bar-dark-background: var(--b-primary-color);
    --b-bar-dropdown-dark-background: var(--b-primary-color);
}

html {
    font-family: sans-serif;
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
    display: block;
}

body {
    margin: 0;
    font-family: var(--dl-font);
    font-size: .825rem;
    font-weight: 400;
    line-height: 1.625;
    color: #6c757d;
    text-align: left;
    background-color: #FFFFFF;
}

b-bar-menu {
    background-color: var(--b-primary-color);
}

.main {
    display: flex;
    width: 100%;
    min-height: 100vh;
    min-width: 0;
    transition: margin-left .35s ease-in-out, left .35s ease-in-out, margin-right .35s ease-in-out, right .35s ease-in-out;
    flex-direction: column;
}

.content {
    padding: 1rem 1rem 1rem;
    flex: 1;
    direction: ltr;
}

.container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.row-search-bar {
    margin-bottom: 5px !important;
    margin-top: 5px !important;
}


.badge {
    display: inline-block;
    padding: .3em .45em;
    font-size: 80%;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: .2rem;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.btn {
    font-weight: 400;
    padding: .25rem .7rem;
    font-size: .825rem;
    line-height: 1.625;
    border-radius: .2rem;
}

.btn-group-sm > .btn, .btn-sm {
    padding: .15rem .5rem;
    font-size: .75rem;
    line-height: 1.625;
    border-radius: .1rem;
}

.btn-group-lg > .btn, .btn-lg {
    padding: .35rem 1rem;
    font-size: .95rem;
    line-height: 1.625;
    border-radius: .3rem;
}


.card .card-header {
    background: #f6fdff;
}

.card .card-header .card-title {
    font-size: 1rem;
    font-weight: 400;
    color: #414b54;
    line-height: 1.2;
    margin-bottom: 1rem;
}

[data-theme="dark"] .card .card-header .card-title {
    color: var(--dl-dark-text);
}

.card-subtitle {
    font-weight: 400;
    margin-top: -.5rem;
    font-size:12px !important;
}

.card-subtitle, .card-text:last-child {
    margin-bottom: 0;
    font-size:12px !important;
}

.form-control {
    display: block;
    width: 100%;
    height: calc(1.84062rem + 2px);
    padding: .25rem .7rem;
    font-size: .825rem;
    font-weight: 400;
    line-height: 1.625;
    color: #414b54;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: .2rem;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.custom-select {
    display: inline-block;
    width: 100%;
    height: calc(1.84062rem + 2px);
    padding: .25rem 1.7rem .25rem .7rem;
    font-size: .825rem;
    font-weight: 400;
    line-height: 1.625;
    color: #414b54;
    vertical-align: middle;
    background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5'%3E%3Cpath fill='%23020202' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right 0.7rem center/8px 10px;
    border: 1px solid #ced4da;
    border-radius: .2rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: .25rem .7rem;
    margin-bottom: 0;
    font-size: .825rem;
    font-weight: 400;
    line-height: 1.625;
    color: #414b54;
    text-align: center;
    white-space: nowrap;
    background-color: #e2e8ee;
    border: 1px solid #ced4da;
    border-radius: .2rem;
}

.input-group-lg > .custom-select, .input-group-lg > .form-control, .input-group-lg > .input-group-append > .btn, .input-group-lg > .input-group-append > .input-group-text, .input-group-lg > .input-group-prepend > .btn, .input-group-lg > .input-group-prepend > .input-group-text {
    padding: .35rem 1rem;
    font-size: .95rem;
    line-height: 1.625;
    border-radius: .3rem;
}

.input-group-sm > .custom-select, .input-group-sm > .form-control:not(textarea) {
    height: calc(1.51875rem + 2px);
}

.input-group-sm > .custom-select, .input-group-sm > .form-control, .input-group-sm > .input-group-append > .btn, .input-group-sm > .input-group-append > .input-group-text, .input-group-sm > .input-group-prepend > .btn, .input-group-sm > .input-group-prepend > .input-group-text {
    padding: .15rem .5rem;
    font-size: .75rem;
    line-height: 1.625;
    border-radius: .1rem;
}

.table.b-datagrid + .row {
    padding-left: 1rem;
    padding-right: 1rem;
}

.nav.nav-tabs .nav-item .nav-link.active {
    background: #fff;
    color: #020202;
}

.nav.nav-tabs .nav-item .nav-link {
    background: transparent;
    color: #020202 !important;
    padding: .75rem 1rem;
    border: 0;
}

.tab-content {
    background: #fff;
    padding: 1.25rem;
}

.nav.nav-tabs + .tab-content {
    box-shadow: 0 0.1rem 0.2rem RGB(0 0 0/5%);
    border-radius: 0 0 .2rem .2rem;
}

.tab-content h4 {
    font-size: .95rem;
}

.tab-vertical-left .col-auto {
    padding-right: 0;
}

.tab-vertical-left .col {
    padding-left: 0;
}

.tab-vertical-right .col-auto {
    padding-left: 0;
}

.tab-vertical-right .col {
    padding-right: 0;
}

h6 {
    font-size: .825rem;
}

.text-sm {
    font-size: .75rem;
}

.text-lg {
    font-size: .95rem;
}

.illustration {
    background: white;
    color: #497aca;
}

.stat {
    background: #e0eafc;
    border-radius: 50%;
    padding: .75rem;
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
}

.stat i {
    color: #497aca !important;
    text-align: center !important;
}

.floating-button {
    position: fixed !important; /* fixed will keep it on top even when scrolling */
    top: 10px; /* adjust as needed */
    left: 10px; /* adjust as needed */
    z-index: 1000; /* a high z-index ensures the button is above other content */
}

/* ==================== Syncfusion Grid - Header Color ==================== */
/* Apply consistent header colour to ALL columns including frozen borders */
.e-grid .e-gridheader tr:first-child th.e-headercell,
.e-grid .e-gridheader tr th.e-headercell.e-leftfreeze,
.e-grid .e-gridheader tr th.e-headercell.e-rightfreeze,
.e-grid .e-gridheader tr th.e-headercell.e-freezeleftborder,
.e-grid .e-gridheader tr th.e-headercell.e-freezerightborder {
    background-color: rgba(var(--dl-primary-rgb), 0.15) !important;
    color: #5D5068 !important;
}

/* ==================== Mobile Slideout Content (Global - bypasses CSS isolation) ==================== */
/* These styles ensure sidebar content is visible in the mobile slideout panel */
.dl-slideout-body .sidebar-content {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    min-height: 0 !important;
    height: 100% !important;
    width: 100% !important;
    background: #ffffff !important;
}

.dl-slideout-body .sidebar-header {
    display: flex !important;
    align-items: center !important;
    padding: 20px !important;
    border-bottom: 1px solid #e5e7eb !important;
    gap: 12px !important;
    flex-shrink: 0 !important;
}

.dl-slideout-body .sidebar-search {
    padding: 16px 20px !important;
    border-bottom: 1px solid #e5e7eb !important;
    background: #fafafa !important;
    flex-shrink: 0 !important;
}

.dl-slideout-body .user-list,
.dl-slideout-body .group-list,
.dl-slideout-body .query-list,
.dl-slideout-body .report-list,
.dl-slideout-body .param-list {
    flex: 1 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding: 12px 0 !important;
}

/* ==================== DLTable Styles ==================== */
/* Container for scrollable table with fixed height */
.dl-table-container {
    width: 100%;
    overflow-x: auto;
}

/* Only apply scroll constraints when fixed height is set */
.dl-table-container.dl-table-fixed-height {
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

/* Table with sticky header - ONLY for fixed height tables */
.dl-table-fixed-height .dl-table-sticky-header {
    border-collapse: separate;
    border-spacing: 0;
}

.dl-table-fixed-height .dl-table-sticky-header thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Fallback background - will be overridden by inline styles if custom header format is set */
.dl-table-fixed-height .dl-table-sticky-header thead th {
    background-color: #EDFAFF;
    border-bottom: 2px solid #dee2e6;
}

/* Pagination container */
.dl-table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid #dee2e6;
    margin-top: 8px;
    flex-wrap: wrap;
    gap: 12px;
}

/* Style the pagination buttons */
.dl-table-pagination .pagination .page-link {
    padding: 4px 10px;
    font-size: 0.85rem;
    border-radius: 4px;
    margin: 0 2px;
}

.dl-table-pagination .pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.dl-table-pagination .pagination .page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

/* Responsive pagination */
@media screen and (max-width: 576px) {
    .dl-table-pagination {
        flex-direction: column;
        align-items: flex-start;
    }

    .dl-table-pagination > div {
        flex-wrap: wrap;
    }
}

/* ==================== DLTable Flex Container Fix ==================== */
/* When DLTable is inside a flex parent (chart-card-body), ensure proper width */
.chart-card-body > .container-fluid {
    width: 100%;
    min-width: 0;
    flex: 1;
}

/* Ensure the row inside also takes full width */
.chart-card-body .container-fluid > .row {
    width: 100%;
}

/* Make dl-table-container fill available width in flex context */
.chart-card-body .dl-table-container {
    flex: 1;
    min-width: 0;
}

/* DL-1624 / T12-T14 — Shared CSS for module forms rendered inside DTSAdmin host.
   Per-module .razor files import this implicitly via the .UI project's _Imports.razor
   (kept centralised so every form gets identical chrome). */

.dts-module {
    padding: 1rem 0 0 0;
}

.dts-module-title-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.75rem;
}

.dts-module-title-row i {
    color: var(--b-primary-color, #0d5a9e);
    font-size: 1.25rem;
}

.dts-module-title-row h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #2c3440;
}

.dts-module-subtitle {
    margin: 0;
    font-size: 0.85rem;
    color: #6b7480;
}

.dts-module-shift-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.65rem 0.85rem;
    background: #f6f8fa;
    border: 1px solid #e2e6ea;
    border-radius: 6px;
    max-width: 480px;
}

.dts-module-shift-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #2c3440;
    flex: 0 0 auto;
}

.dts-module-shift-row select {
    flex: 1 1 auto;
    padding: 0.35rem 0.55rem;
    border: 1px solid #d4d9df;
    border-radius: 4px;
    font-size: 0.9rem;
}

.dts-module-line {
    display: grid;
    align-items: end;
    gap: 0.75rem;
}

.dts-module-line .dts-field-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7480;
    font-weight: 500;
    display: block;
    margin-bottom: 0.15rem;
}

.dts-module-line input[type="text"],
.dts-module-line input[type="number"],
.dts-module-line select {
    width: 100%;
    padding: 0.4rem 0.55rem;
    border: 1px solid #d4d9df;
    border-radius: 4px;
    font-size: 0.9rem;
    background: #fff;
}

.dts-module-line input[type="number"] {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.dts-module-line input:focus,
.dts-module-line select:focus {
    outline: 2px solid #c8d8ea;
    border-color: #1976d2;
}

.dts-module-line input:read-only {
    background: #f6f8fa;
    color: #6b7480;
    cursor: not-allowed;
}

/* Per-archetype grid templates */
.dts-line--tills      { grid-template-columns: minmax(220px, 2fr) 140px 140px; }
.dts-line--tenders    { grid-template-columns: minmax(180px, 1.5fr) minmax(160px, 1.4fr) 140px 140px; }
.dts-line--kegs       { grid-template-columns: minmax(220px, 2fr) 140px 140px 140px; }
.dts-line--pcash      { grid-template-columns: minmax(160px, 1.2fr) minmax(220px, 2fr) 140px; }
.dts-line--commission { grid-template-columns: minmax(220px, 2fr) 160px; }
.dts-line--functions  { grid-template-columns: 140px minmax(220px, 2fr) 140px; }
.dts-line--gaming-crt { grid-template-columns: minmax(120px, 1fr) repeat(6, minmax(110px, 1fr)); }
.dts-line--keno       { grid-template-columns: minmax(150px, 1fr) repeat(3, minmax(120px, 1fr)); }
.dts-line--tab        { grid-template-columns: minmax(140px, 1.1fr) repeat(10, minmax(110px, 1fr)); overflow-x: auto; }

.dts-module-totals {
    margin-top: 1rem;
    padding: 0.65rem 0.85rem;
    background: #fbfcfd;
    border: 1px solid #e2e6ea;
    border-radius: 6px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
}

.dts-module-totals-label {
    font-size: 0.85rem;
    color: #6b7480;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}

.dts-module-totals-value {
    font-size: 1.15rem;
    font-weight: 600;
    color: #2c3440;
    font-variant-numeric: tabular-nums;
}

.dts-module-notes {
    margin-top: 1rem;
}

.dts-module-notes textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.55rem 0.65rem;
    border: 1px solid #d4d9df;
    border-radius: 6px;
    font-size: 0.9rem;
    resize: vertical;
    font-family: inherit;
}

.dts-module-notes textarea:read-only {
    background: #f6f8fa;
    color: #6b7480;
}

/* Single-form / card-stack layouts */

.dts-module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
    max-width: 960px;
}

.dts-module-grid--3col { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.dts-module-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dts-module-field-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7480;
    font-weight: 500;
}

.dts-module-field input[type="text"],
.dts-module-field input[type="number"],
.dts-module-field select {
    padding: 0.45rem 0.6rem;
    border: 1px solid #d4d9df;
    border-radius: 4px;
    font-size: 0.95rem;
    background: #fff;
}

.dts-module-field input[type="number"] {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.dts-module-field input:focus,
.dts-module-field select:focus {
    outline: 2px solid #c8d8ea;
    border-color: #1976d2;
}

.dts-module-field input:read-only {
    background: #f6f8fa;
    color: #6b7480;
}

.dts-module-card {
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1px solid #e2e6ea;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.dts-module-card h5 {
    margin: 0 0 0.75rem 0;
    font-size: 0.95rem;
    color: #2c3440;
}

.dts-module-checklist-section {
    margin-bottom: 0.85rem;
}

.dts-module-checklist-item {
    display: grid;
    grid-template-columns: 24px minmax(180px, 2fr) minmax(160px, 3fr);
    gap: 0.5rem;
    align-items: center;
    padding: 0.35rem 0;
    border-bottom: 1px dashed #e2e6ea;
}

.dts-module-checklist-item:last-child {
    border-bottom: none;
}

.dts-module-checklist-item input[type="text"] {
    padding: 0.3rem 0.5rem;
    border: 1px solid #d4d9df;
    border-radius: 4px;
    font-size: 0.85rem;
}

.dts-module-tender-split {
    margin-top: 0.5rem;
    border-top: 1px dashed #d4d9df;
    padding-top: 0.5rem;
}

.dts-module-tender-split-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7480;
    font-weight: 500;
    margin-bottom: 0.35rem;
}

.dts-module-tender-split-row {
    display: grid;
    grid-template-columns: minmax(140px, 1.2fr) 140px 28px;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.3rem;
}

.dts-module-tender-split-row input,
.dts-module-tender-split-row select {
    padding: 0.3rem 0.5rem;
    border: 1px solid #d4d9df;
    border-radius: 4px;
    font-size: 0.85rem;
}

.dts-module-tender-split-add {
    margin-top: 0.25rem;
    background: transparent;
    border: 1px dashed #93a1b0;
    color: #155380;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
}

.dts-module-tender-split-add:hover {
    background: #e9f2fb;
}

.dts-module-tender-split-remove {
    background: transparent;
    border: none;
    color: #99202d;
    cursor: pointer;
}

.dts-module-readonly-banner {
    margin-bottom: 0.85rem;
    padding: 0.5rem 0.75rem;
    background: #f6f8fa;
    border-left: 4px solid #6b7480;
    border-radius: 4px;
    color: #6b7480;
    font-size: 0.85rem;
}

/* DL-1874 — collapsible group/total rows.
   Shared by DLDatagrid (V1) and DLDatagridV2. Makes the group caption line — the row a
   section folds down to — read as a distinct, tappable header, and enlarges Syncfusion's
   native expand/collapse toggle so the affordance is obvious. Purely cosmetic: the
   collapse behaviour itself is Syncfusion's built-in group folding. */
.e-grid .e-groupcaptionrow {
    background: #eef2f7;
}

.e-grid .e-groupcaptionrow .e-groupcaption,
.e-grid .e-groupcaptionrow .e-groupcaption .e-groupcaptext {
    font-weight: 600;
    color: #003b73;
}

/* Native group expand (+) / collapse (−) toggle cell — make it prominent and clickable. */
.e-grid .e-recordplusexpand,
.e-grid .e-recordpluscollapse {
    cursor: pointer;
}

.e-grid .e-recordplusexpand .e-icons,
.e-grid .e-recordpluscollapse .e-icons {
    font-size: 1rem;
    color: #003b73;
}

/* DL-1874 — dark mode for the collapsible group/total rows.
   The light palette above (#eef2f7 fill, #003b73 text/icons) is illegible on the dark
   surface, so remap onto the project dark-mode vars: raised surface for the caption line,
   primary dark text for the caption label, and the cyan accent for the fold toggle. */
[data-theme="dark"] .e-grid .e-groupcaptionrow {
    background: var(--dl-dark-surface-raised);
}

[data-theme="dark"] .e-grid .e-groupcaptionrow .e-groupcaption,
[data-theme="dark"] .e-grid .e-groupcaptionrow .e-groupcaption .e-groupcaptext {
    color: var(--dl-dark-text);
}

[data-theme="dark"] .e-grid .e-recordplusexpand .e-icons,
[data-theme="dark"] .e-grid .e-recordpluscollapse .e-icons {
    color: #4fcaff;
}

/* ---------------------------------------------------------------------------
   DL-2289 panel polish — the three surface tokens the whole console restyle
   hangs off. --dl-band is the section tint inside a record panel: one step off
   the panel surface, enough to group a section, never enough to read as a card.
   --dl-btn-surface is the quiet button's own raised ground, which must sit
   ABOVE the band in both themes — pure white in light, a lifted slate in dark
   (never a muddy grey between the two). The shadow swaps character with the
   theme: a micro drop in light, a top highlight in dark, because light comes
   from above on a dark surface.
   --------------------------------------------------------------------------- */
:root {
    --dl-band: #f6f8fb;
    --dl-btn-surface: #ffffff;
    --dl-btn-shadow: 0 1px 1px rgba(16, 24, 40, 0.05);
}

[data-theme="dark"] {
    --dl-band: #20262e;
    --dl-btn-surface: #283039;
    --dl-btn-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

/* ---------------------------------------------------------------------------
   DL-2356 — AdminKit DetailPanel width.
   Slides applies its SlideSize parameter verbatim as a CSS class on .slide-panel.
   Scoped component CSS can never reach Slides' own markup, so the 46% the design
   calls for has to be declared globally, here, beside the Slides size classes.
   --------------------------------------------------------------------------- */
/* The slide-over covers the full content height, action bar included — the panel IS the page
   while it is open. DL-2445 briefly parked it below the bar; it read as cut off, so the legacy
   full-height overlay is back (site.css already pins `.slide-panel` at top:0/100vh). */
.slide-panel.dl-admin-detail {
    width: 46%;
    min-width: 420px;
    max-width: 100vw;
    /* Slides parks the panel at translateX(100%) and every built-in size class un-parks it
       alongside the width. A size class that sets width alone leaves the panel off-screen with
       its click-blocking backdrop live — the whole page then eats clicks with nothing visible. */
    transform: translateX(0);

}

/* DL-2289 — anchor to the bottom instead of trusting `height: 100vh`.
   Slides declares the panel `position: fixed`, but `.content-body-wrapper` carries a
   `backdrop-filter`, which makes IT the containing block for fixed descendants. The panel
   therefore starts at the wrapper's top (61px, under the navbar) and `100vh` then runs its last
   61px BELOW the fold. Nothing noticed while the only thing down there was more scrollable body;
   the moment this ticket pinned a Save/Cancel row to the panel's bottom, that row was off-screen
   and an edit could not be committed at all. top/bottom fill whatever containing block applies.

   `!important` here is answering one: site.css declares `height: 100vh !important` on
   `.slide-panel`, so no amount of specificity alone reaches it. Scoped to the console panel rather
   than fixed in site.css, because that rule is shared by every Slides consumer in the app and a
   blind change there would resize panels this ticket never looked at. */
.slide-panel.dl-admin-detail {
    bottom: 0;
    height: auto !important;
}

@media (max-width: 900px) {
    .slide-panel.dl-admin-detail {
        width: 72%;
        min-width: 320px;
    }
}

@media (max-width: 480px) {
    .slide-panel.dl-admin-detail {
        width: 100vw;
        min-width: 0;
    }
}

/* ---------------------------------------------------------------------------
   DL-2289 panel polish — the identity band. The panel used to open with a
   whisper: a small avatar and grey crumbs on the same white as everything under
   it. The header is now an identity MOMENT — a brand-tinted gradient the width
   of the panel, closed by a 2px accent underline so it reads as its own surface
   rather than the first slice of the body. Global because the header is Slides'
   own markup, which no scoped sheet can reach; scoped to the console panel so no
   other Slides consumer inherits it.
   --------------------------------------------------------------------------- */
.slide-panel.dl-admin-detail .slide-panel-header {
    align-items: flex-start;
    padding: 18px 18px 16px;
    background: linear-gradient(180deg,
        rgba(var(--dl-primary-rgb, 16, 113, 185), 0.11),
        rgba(var(--dl-primary-rgb, 16, 113, 185), 0.035));
    border-bottom: 1px solid rgba(var(--dl-primary-rgb, 16, 113, 185), 0.22);
    box-shadow: inset 0 -2px 0 rgba(var(--dl-primary-rgb, 16, 113, 185), 0.16);
}

[data-theme="dark"] .slide-panel.dl-admin-detail .slide-panel-header {
    background: linear-gradient(180deg,
        rgba(var(--dl-primary-rgb, 16, 113, 185), 0.30),
        rgba(var(--dl-primary-rgb, 16, 113, 185), 0.08));
    border-bottom-color: rgba(var(--dl-primary-rgb, 16, 113, 185), 0.42);
    box-shadow: inset 0 -2px 0 rgba(var(--dl-primary-rgb, 16, 113, 185), 0.32);
}

/* The close X keeps its corner and gains a real 30px hit area; hover lifts it onto the
   button surface instead of the old grey smudge. */
.slide-panel.dl-admin-detail .slide-panel-close {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 15px;
    transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.slide-panel.dl-admin-detail .slide-panel-close:hover {
    background: var(--dl-btn-surface, #ffffff);
    border-color: var(--dl-border-light, rgba(0, 0, 0, 0.1));
    color: var(--dl-text-primary, #1a202c);
}

[data-theme="dark"] .slide-panel.dl-admin-detail .slide-panel-close:hover {
    background: var(--dl-btn-surface, #283039);
    border-color: var(--dl-dark-border-light);
    color: var(--dl-dark-text);
}

/* ---------------------------------------------------------------------------
   DL-2294 / DL-2569 — the report-category row cell (AC-14).
   The cell is an AdminColumn template built with a RenderTreeBuilder, so the
   Razor compiler never stamps a scope attribute on it and the page's scoped CSS
   would never match — which is why these rules are global rather than in
   ReportCategoriesPage.razor.css.

   DL-2569 replaced the separate Colour column with the name cell's own swatch
   (AdminNameColumn.Swatch, styled by the kit), and put the usage bar in the
   Reports cell instead: how many reports carry this colour, against the busiest
   category. Only the bar's fill takes an inline colour, and only because that
   colour is the row's own data.
   --------------------------------------------------------------------------- */
.category-usecell {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
}

.category-unused {
    display: inline-flex;
    align-items: center;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: rgba(214, 158, 46, 0.18);
    color: #8a5a00;
    white-space: nowrap;
}

.category-usebar {
    display: inline-block;
    width: 74px;
    height: 6px;
    border-radius: 999px;
    background: var(--dl-bg-secondary, #edf2f7);
    overflow: hidden;
    flex: none;
}

.category-usebar__fill {
    display: block;
    height: 100%;
    border-radius: 999px;
}

.category-count {
    font-size: 0.72rem;
    color: var(--dl-text-secondary, #6c757d);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

[data-theme="dark"] .category-unused {
    background: rgba(236, 201, 75, 0.20);
    color: #ecc94b;
}

[data-theme="dark"] .category-usebar {
    background: rgba(255, 255, 255, 0.10);
}

[data-theme="dark"] .category-count {
    color: var(--dl-dark-text-muted);
}

/* ---------------------------------------------------------------------------
   DL-2452 — console value atoms: chips, pills, the two-column fact grid and the
   panel note. Every value on a console card or in a console panel is a pill or a
   chip, never loose text, and panel facts sit two across so a tall panel never
   scrolls.

   Global rather than scoped on purpose: these atoms are written in two different
   pages' markup (Scheduled jobs and Parameter objects, with more to follow), and
   a scoped copy per page would be the same rules maintained in n places — the
   first edit that lands in one and not the other makes the two consoles disagree
   about what a chip looks like.
   --------------------------------------------------------------------------- */

.admin-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    /* 14px floor. These carry the record's actual values; at 13.3px they read as footnotes and
       operators skim past the thing they opened the panel to see. */
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    background: var(--dl-bg-secondary, #edf2f7);
    color: var(--dl-text-secondary, #4a5568);
    max-width: 100%;
    overflow-wrap: anywhere;
}

.admin-chip--mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 500;
    font-size: 0.8125rem;
    color: var(--dl-text-primary, #1a202c);
}

.admin-chip--accent {
    background: rgba(var(--dl-primary-rgb, 16, 113, 185), 0.12);
    color: rgb(var(--dl-primary-rgb, 16, 113, 185));
}

.admin-chip--muted {
    color: var(--dl-text-muted, #a0aec0);
}

.admin-chiprow {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

/* A state, not a value — same shape, tinted by what it says. */
.admin-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8125rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    white-space: nowrap;
    flex: none;
}

.admin-pill--good {
    background: rgba(56, 161, 105, 0.15);
    color: var(--dl-success, #38a169);
}

.admin-pill--bad {
    background: rgba(229, 62, 62, 0.15);
    color: var(--dl-danger, #e53e3e);
}

.admin-pill--warn {
    background: rgba(214, 158, 46, 0.17);
    color: var(--dl-warning, #d69e2e);
}

.admin-pill--neutral {
    background: var(--dl-bg-secondary, #edf2f7);
    color: var(--dl-text-muted, #a0aec0);
}

/* Two columns, so a panel of facts fits its own view instead of scrolling. */
.admin-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem 0.9rem;
    margin: 0;
}

.admin-facts--one {
    grid-template-columns: 1fr;
}

.admin-facts__cell {
    min-width: 0;
}

.admin-facts dt {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dl-text-muted, #a0aec0);
    margin-bottom: 0.25rem;
}

.admin-facts dd {
    margin: 0;
    min-width: 0;
    /* A value that is plain text still reads at value size — the 14px floor is the atom's, not
       the chip's. */
    font-size: 0.875rem;
    color: var(--dl-text-primary, #1a202c);
}

/* A note is a paragraph, not a row. It was `display:flex`, which makes every inline child its
   own flex item — so a note containing <b> or <code> broke into columns mid-sentence ("Run
   history needs | lastRun / nextRun | on the | ReportJob | DTO…"). Notes without inline markup
   survived only because their text was one anonymous item. Block flow keeps the prose inline;
   the icon comes out of flow and the padding reserves its gutter, which preserves the hanging
   indent the flex row gave for free. */
/* DL-2289 panel polish — an advisory is a FLAT CALLOUT, not a grey box: a solid semantic
   edge on the left, a low-alpha tint of the same hue behind it, and the icon in a small
   tinted disc so the note announces its kind before a word is read. Square left corners
   keep the edge honest. */
.admin-note {
    display: block;
    position: relative;
    margin-top: 0.9rem;
    padding: 0.6rem 0.8rem 0.6rem 2.15rem;
    border-left: 3px solid rgb(var(--dl-primary-rgb, 16, 113, 185));
    border-radius: 0 10px 10px 0;
    background: rgba(var(--dl-primary-rgb, 16, 113, 185), 0.07);
    color: var(--dl-text-secondary, #4a5568);
    font-size: var(--dl-text-sm, 0.833rem);
    line-height: 1.55;
}

.admin-note > i {
    position: absolute;
    left: 0.65rem;
    top: 0.62rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.68rem;
    color: rgb(var(--dl-primary-rgb, 16, 113, 185));
    background: rgba(var(--dl-primary-rgb, 16, 113, 185), 0.14);
}

.admin-note b {
    color: var(--dl-text-primary, #1a202c);
}

/* Inside a section the gap already spaces it; the note's own top margin on top of that opened a
   dead band under the section heading that read as a missing row. */
.admin-section > .admin-note {
    margin-top: 0;
}

.admin-note--warn {
    background: rgba(214, 158, 46, 0.12);
    border-left-color: var(--dl-warning, #d69e2e);
}

.admin-note--warn > i {
    color: var(--dl-warning-ink, #8a5a00);
    background: rgba(214, 158, 46, 0.22);
}

.admin-note--bad {
    background: rgba(229, 62, 62, 0.1);
    border-left-color: var(--dl-danger, #e53e3e);
}

.admin-note--bad > i {
    color: #c02626;
    background: rgba(229, 62, 62, 0.18);
}

.admin-note--good {
    background: rgba(56, 161, 105, 0.11);
    border-left-color: var(--dl-success, #38a169);
}

.admin-note--good > i {
    color: #1b6f45;
    background: rgba(56, 161, 105, 0.2);
}

/* ------------------------------------------------------------------ dark mode */

[data-theme="dark"] .admin-chip,
[data-theme="dark"] .admin-pill--neutral {
    background: var(--dl-dark-surface-raised);
    color: var(--dl-dark-text);
}

[data-theme="dark"] .admin-chip--mono {
    color: var(--dl-dark-text);
}

[data-theme="dark"] .admin-chip--accent {
    background: rgba(var(--dl-primary-rgb, 16, 113, 185), 0.2);
    color: rgb(var(--dl-primary-rgb, 16, 113, 185));
}

[data-theme="dark"] .admin-chip--muted,
[data-theme="dark"] .admin-pill--neutral,
[data-theme="dark"] .admin-facts dt {
    color: var(--dl-dark-text-muted);
}

/* Dark callouts lift their tints; the bright hues already clear AA as ink on dark. */
[data-theme="dark"] .admin-note {
    background: rgba(var(--dl-primary-rgb, 16, 113, 185), 0.16);
    color: var(--dl-dark-text);
}

[data-theme="dark"] .admin-note > i {
    color: #8ec2ee;
}

[data-theme="dark"] .admin-note--warn {
    background: rgba(214, 158, 46, 0.16);
}

[data-theme="dark"] .admin-note--warn > i {
    color: #ecc94b;
}

[data-theme="dark"] .admin-note--bad {
    background: rgba(229, 62, 62, 0.16);
}

[data-theme="dark"] .admin-note--bad > i {
    color: #fc8181;
}

[data-theme="dark"] .admin-note--good {
    background: rgba(56, 161, 105, 0.16);
}

[data-theme="dark"] .admin-note--good > i {
    color: #5fd08d;
}

[data-theme="dark"] .admin-note b {
    color: var(--dl-dark-text);
}

/* ---------------------------------------------------------------------------
   DL-2289 — console panel system: sections, form controls, hints, footer row.

   Extends the DL-2452 value atoms above into the whole panel body. Before this,
   eight console pages each hand-rolled their own `<page>-sechead`, `<page>-field`,
   `<page>-form` and `<page>-btn` — so the eight slide-outs disagreed about what a
   section heading, a labelled input and a save row look like. Global for the same
   reason the atoms are: one definition, or the first divergent edit makes two
   consoles look like two products.

   The rhythm: sections stack at 1.35rem, a section is an uppercase eyebrow plus
   its content, facts sit two across, form fields sit two across when short.
   --------------------------------------------------------------------------- */

/* The panel body's own stack. Every console panel body is one of these. */
.admin-panel {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
    min-width: 0;
}

/* DL-2289 panel polish — a section is a BAND, not an island: a soft surface tint, 12px
   radius, generous inner padding — and deliberately NO border and NO shadow, because a
   bordered box inside a panel is the card-in-card nesting we banned. The band is the ground;
   the white rows, cards and buttons inside it are what get to be raised, and the tint is
   what finally makes them read that way. */
.admin-section {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-width: 0;
    background: var(--dl-band, #f6f8fb);
    border-radius: 12px;
    padding: 0.85rem 1rem 1rem;
}

/* ---------------------------------------------------------------------------
   DL-2289 (Ro's ruling, 18 Aug) — INSIDE A SLIDE-OVER THERE IS NO BAND.

   Sites was the tell: "dark background on the content". Stack three tinted bands
   in a panel and the record stops being a record — it becomes a column of grey
   slabs, and the white things standing on them all read at the same weight.

   The Users panel is the one reference and it never had a band: a white ground,
   sections told apart by a hairline-ruled heading with its mark, and the rows,
   tiles and buttons ON that white as the only raised things. So a section inside
   a panel drops the tint, the radius and the inset padding and becomes exactly
   what `.users-sechead` always was.

   Scoped to `.detail-panel` on purpose: `.admin-section` is also a PAGE-level
   band outside any panel, and there the tint is still doing its job.
   --------------------------------------------------------------------------- */
.detail-panel .admin-section {
    background: none;
    border-radius: 0;
    padding: 0;
}

/* The section's verb row bled to the band's edges with negative margins. With no
   band to bleed to, it is simply a hairline-topped row under the section. */
.detail-panel .admin-sectionfoot {
    margin: 0.35rem 0 0;
    padding: 0.7rem 0 0;
    border-radius: 0;
}

/* With the band gone, the raised things have to raise against the PANEL's ground,
   not against a tint that is no longer there. A tile took `--dl-bg-primary`, which
   is a shade DARKER than the panel in light and IDENTICAL to it in dark — sunken in
   one theme and invisible in the other. On the panel it takes the same lifted
   surface every quiet button in the kit takes, so "raised" means one thing. */
.detail-panel .admin-tile {
    background: var(--dl-btn-surface, #ffffff);
    box-shadow: var(--dl-btn-shadow, 0 1px 1px rgba(16, 24, 40, 0.05));
}

/* And the hover is a brand tint, never a grey fill — a grey hover on a white row
   reads as the row going disabled, which is the exact fault the quiet buttons fixed. */
.detail-panel .admin-tile--clickable:hover {
    background: rgba(var(--dl-primary-rgb, 16, 113, 185), 0.06);
    border-color: rgba(var(--dl-primary-rgb, 16, 113, 185), 0.4);
}

/* A section heading must never be mistakeable for a field label: bigger, heavier,
   full-strength ink, and it owns a rule across the band. Labels are none of those. */
.admin-sectionhead {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    border-bottom: 1.5px solid var(--dl-border-light, rgba(0, 0, 0, 0.1));
    padding-bottom: 0.5rem;
}

.admin-sectionhead__title {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: -0.005em;
    text-transform: none;
    color: var(--dl-text-primary, #1a202c);
    margin: 0;
    white-space: nowrap;
}

.admin-sectionhead__count {
    font-size: 0.8125rem;
    color: var(--dl-text-muted, #a0aec0);
    white-space: nowrap;
}

/* Anything after this is pushed to the right edge of the heading row — the section's own verb. */
.admin-sectionhead__spacer {
    flex: 1 1 auto;
    min-width: 0;
}

/* ---------------------------------------------------------------------------
   DL-2289 polish — THE SECTION-HEADING MARK.

   Ro's ruling: the shield leading "Sign-in & security" is what a section heading
   should look like everywhere. So the shield became a component (SectionMark)
   and this is its one class — global, because the same mark has to work inside a
   shared `.admin-sectionhead` band, inside a page's own bespoke `*-sechead` row,
   and inside a card title, and no scoped sheet reaches all three.

   Neutral is the default and reads exactly like a DLActionBar verb: a faint
   surface disc with the registry's own coloured artwork on it. A toned mark is
   for the few sections that HAVE a state — the disc takes the hue, the glyph
   goes mono in that ink. Both are AA on their own disc in both themes.
   --------------------------------------------------------------------------- */
.admin-secmark {
    /* Sized to the heading, not to the panel: a 26px disc beside a 14px title is
       a lead-in, a 40px one is an avatar and starts competing with the header. */
    width: 26px;
    height: 26px;
    border-radius: 8px;
    flex: none;
    display: inline-grid;
    place-items: center;
    font-size: 0.78rem;
    line-height: 1;
}

/* The registry SVG carries width/height ATTRIBUTES of 24; only a stylesheet can
   resize it, because it is injected as raw markup with no scoped-css attribute. */
.admin-secmark > svg {
    width: 16px;
    height: 16px;
    display: block;
}

.admin-secmark--neutral {
    /* Not grey-on-grey: on a tinted band the disc has to be LIGHTER than the band
       for the mark to read as raised, which is the same move the white quiet
       buttons make. */
    background: var(--dl-btn-surface, #ffffff);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08), 0 0 0 1px var(--dl-border-subtle, rgba(0, 0, 0, 0.06));
    color: var(--dl-text-secondary, #55616f);
}

/* A state that is genuinely neutral — "unknown", "not applicable", "off". Flat rather than
   raised, so it reads as a state disc alongside its good/warn/bad siblings and not as the
   topic mark. This is what the MFA shield always did for a service account. */
.admin-secmark--state {
    background: var(--dl-bg-secondary, #edf2f7);
    color: var(--dl-text-secondary, #55616f);
}

.admin-secmark--good {
    background: rgba(56, 161, 105, 0.16);
    color: #1b6f45;
}

.admin-secmark--warn {
    background: rgba(214, 158, 46, 0.18);
    color: #8a5a00;
}

.admin-secmark--bad {
    background: rgba(229, 62, 62, 0.16);
    color: #c02626;
}

[data-theme="dark"] .admin-secmark--neutral {
    background: var(--dl-dark-surface-raised, #283039);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--dl-dark-border-light, rgba(255, 255, 255, 0.09));
    color: var(--dl-dark-text-secondary, #b9c2cd);
}

[data-theme="dark"] .admin-secmark--state {
    background: rgba(255, 255, 255, 0.08);
    color: var(--dl-dark-text-secondary, #b9c2cd);
}

[data-theme="dark"] .admin-secmark--good {
    background: rgba(56, 161, 105, 0.26);
    color: #7ee2b0;
}

[data-theme="dark"] .admin-secmark--warn {
    background: rgba(214, 158, 46, 0.28);
    color: #f3cd7d;
}

[data-theme="dark"] .admin-secmark--bad {
    background: rgba(229, 62, 62, 0.26);
    color: #ff9d9d;
}

/* A heading row that carries a mark has to be a flex row for the mark to sit
   beside the title rather than above it. `.admin-sectionhead` and every page's
   own `*-sechead` already are; a card title is not, so it gets the row here. */
.admin-sechead-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

/* ---------------------------------------------------------------------------
   DL-2289 polish — a fact is a RAISED ROW on the band, never grey-on-grey.

   The Customers panel was the tell: two full-width tinted bands, every value a
   grey chip on the grey band, nothing raised anywhere — so the whole slide-over
   read as one grey slab next to the Users panel's crisp white record. The band
   is the ground; the facts standing on it are what get to be the surface.
   --------------------------------------------------------------------------- */
.admin-section > .admin-facts > .admin-facts__cell,
.admin-section > .admin-facts .admin-facts__cell {
    background: var(--dl-btn-surface, #ffffff);
    border: 1px solid var(--dl-border-subtle, rgba(0, 0, 0, 0.06));
    border-radius: 10px;
    padding: 0.5rem 0.65rem 0.55rem;
}

/* On a white cell the plain value chip's own grey fill is a second surface for no
   reason — the value reads as ink. States keep their tint: that IS the meaning. */
.admin-section > .admin-facts .admin-facts__cell > dd > .admin-chip,
.admin-section > .admin-facts .admin-facts__cell > dd > .admin-chiprow > .admin-chip {
    background: transparent;
    padding-left: 0;
    padding-right: 0;
    color: var(--dl-text-primary, #1a202c);
}

[data-theme="dark"] .admin-section > .admin-facts .admin-facts__cell {
    background: var(--dl-dark-surface-raised, #283039);
    border-color: var(--dl-dark-border-light, rgba(255, 255, 255, 0.08));
}

[data-theme="dark"] .admin-section > .admin-facts .admin-facts__cell > dd > .admin-chip,
[data-theme="dark"] .admin-section > .admin-facts .admin-facts__cell > dd > .admin-chiprow > .admin-chip {
    color: var(--dl-dark-text, #e6ebf1);
}

/* DL-2289 panel polish — the section's own verb row, sitting on the band's bottom edge.
   Negative margins pull it flush so the hairline runs the band's full width. */
.admin-sectionfoot {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin: 0.35rem -1rem -1rem;
    padding: 0.7rem 1rem;
    border-top: 1px solid var(--dl-border-subtle, rgba(0, 0, 0, 0.06));
    border-radius: 0 0 12px 12px;
}

.admin-sectionfoot > .admin-hint {
    margin-left: auto;
}

/* Raised things on the band: an in-band tile or expander takes the button surface so the
   band reads as the ground and the row as the thing sitting on it. Light already gets this
   for free (tiles are white); dark must lift them ABOVE the band, not sink them below it. */
[data-theme="dark"] .admin-section .admin-tile {
    background: var(--dl-btn-surface, #283039);
    box-shadow: var(--dl-btn-shadow, inset 0 1px 0 rgba(255, 255, 255, 0.045));
}

.admin-section .admin-expander {
    box-shadow: none;
}

/* DL-2289 panel polish — a header fact chip is a raised label/value pair on the button
   surface: the label NAMES the fact (uppercase micro-label) so the chips read without the
   grid to compare against, and the value carries the ink. Semantic variants keep the raised
   surface and say their meaning in the hairline and the value ink — a tinted fill here would
   drop the value's contrast onto a tint on a tint. */
.admin-factchip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--dl-btn-surface, #ffffff);
    border: 1px solid var(--dl-border-light, rgba(0, 0, 0, 0.1));
    box-shadow: var(--dl-btn-shadow, 0 1px 1px rgba(16, 24, 40, 0.05));
    font-size: 0.72rem;
    color: var(--dl-text-primary, #1a202c);
    white-space: nowrap;
}

.admin-factchip > i {
    font-style: normal;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--dl-text-muted, #a0aec0);
}

.admin-factchip > b {
    font-weight: 650;
    color: var(--dl-text-primary, #1a202c);
}

.admin-factchip--accent { border-color: rgba(var(--dl-primary-rgb, 16, 113, 185), 0.42); }
.admin-factchip--accent > b { color: rgb(var(--dl-primary-rgb, 16, 113, 185)); }
.admin-factchip--ok { border-color: rgba(56, 161, 105, 0.5); }
.admin-factchip--ok > b { color: #1b6f45; }
.admin-factchip--warn { border-color: rgba(214, 158, 46, 0.55); }
.admin-factchip--warn > b { color: var(--dl-warning-ink, #8a5a00); }
.admin-factchip--bad { border-color: rgba(229, 62, 62, 0.5); }
.admin-factchip--bad > b { color: #c02626; }
.admin-factchip--muted > b { color: var(--dl-text-secondary, #4a5568); }

[data-theme="dark"] .admin-factchip {
    border-color: var(--dl-dark-border-light);
    color: var(--dl-dark-text);
}

[data-theme="dark"] .admin-factchip > i {
    color: var(--dl-dark-text-muted);
}

[data-theme="dark"] .admin-factchip > b {
    color: var(--dl-dark-text);
}

[data-theme="dark"] .admin-factchip--accent > b {
    color: color-mix(in srgb, rgb(var(--dl-primary-rgb, 16, 113, 185)) 42%, #ffffff);
}

[data-theme="dark"] .admin-factchip--ok > b { color: #5fd08d; }
[data-theme="dark"] .admin-factchip--warn > b { color: #ecc94b; }
[data-theme="dark"] .admin-factchip--bad > b { color: #fc8181; }
[data-theme="dark"] .admin-factchip--muted > b { color: var(--dl-dark-text-muted); }

/* A one-line muted hint under a field or a value. Replaces the explainer paragraphs the panels
   had accumulated: the sentence stays, the banner box around it does not. */
.admin-hint {
    display: block;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--dl-text-muted, #a0aec0);
    margin: 0;
}

/* DL-2506 — the hint turned refusal: the same one-liner slot under a field, but carrying the
   reason a save is blocked. Inline, next to the mistake — never a dialog. */
.admin-hint--bad {
    color: var(--dl-danger, #e53e3e);
}

.admin-hint--bad > i {
    margin-right: 0.3rem;
}

/* An explanation that has to stay but must not shout — the info glyph carries it, the sentence
   arrives on hover. Used where a banner used to be. */
.admin-why {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 0.3rem;
    border-radius: 50%;
    font-size: 0.62rem;
    vertical-align: middle;
    background: var(--dl-bg-secondary, #edf2f7);
    color: var(--dl-text-muted, #a0aec0);
    cursor: help;
}

/* ------------------------------------------------------------------ form controls */

/* Two across when the fields are short, one when they are not. The panel is 46% of the viewport,
   so a stack of full-width inputs wastes half of it and pushes the save row off screen. */
.admin-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 0.9rem;
    min-width: 0;
}

.admin-form--one {
    grid-template-columns: 1fr;
}

/* A field that needs the full width — a long name, a password, a textarea. */
.admin-field--wide {
    grid-column: 1 / -1;
}

.admin-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.admin-field__lab {
    font-size: 0.75rem;
    font-weight: 650;
    color: var(--dl-text-secondary, #4a5568);
}

/* One control shape for text, select and textarea. 38px is a comfortable target — the old
   hand-rolled inputs ran as short as 28px. */
.admin-input,
.admin-select,
.admin-textarea {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    font: inherit;
    font-size: 0.875rem;
    color: var(--dl-text-primary, #1a202c);
    background: var(--dl-bg-primary, #ffffff);
    border: 1px solid var(--dl-border-emphasis, rgba(0, 0, 0, 0.16));
    border-radius: var(--dl-radius-sm, 6px);
    padding: 0 0.65rem;
    height: 38px;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.admin-textarea {
    height: auto;
    min-height: 84px;
    padding: 0.5rem 0.65rem;
    line-height: 1.5;
    resize: vertical;
}

.admin-select {
    /* The native arrow needs room, and appearance:none would cost us the platform control. */
    padding-right: 0.35rem;
    cursor: pointer;
}

.admin-input--mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.admin-input:focus,
.admin-select:focus,
.admin-textarea:focus {
    outline: none;
    border-color: rgb(var(--dl-primary-rgb, 16, 113, 185));
    box-shadow: 0 0 0 3px rgba(var(--dl-primary-rgb, 16, 113, 185), 0.15);
}

/* DL-2506 — a field whose current value cannot be saved. The border says which field the
   admin-hint--bad underneath is talking about, focused or not. */
.admin-input--invalid,
.admin-input--invalid:focus {
    border-color: var(--dl-danger, #e53e3e);
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.15);
}

.admin-input:disabled,
.admin-select:disabled,
.admin-textarea:disabled,
.admin-input[readonly] {
    background: var(--dl-bg-secondary, #edf2f7);
    color: var(--dl-text-muted, #a0aec0);
    cursor: not-allowed;
}

/* A boolean the user can flip. Booleans that are merely reported stay pills — this is for the
   ones with a write behind them. */
.admin-toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    cursor: pointer;
    padding: 0.35rem 0;
}

.admin-toggle input {
    /* The native checkbox, sized up to a real target rather than replaced by a div that no
       screen reader can find. */
    width: 18px;
    height: 18px;
    flex: none;
    accent-color: rgb(var(--dl-primary-rgb, 16, 113, 185));
    cursor: pointer;
}

.admin-toggle input:disabled {
    cursor: not-allowed;
}

.admin-toggle__lines {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.admin-toggle__lab {
    font-size: 0.875rem;
    font-weight: 550;
    color: var(--dl-text-primary, #1a202c);
}

/* ------------------------------------------------------------------ buttons */

/* The panel's own button. Same shape as the command-bar verb, sized for a body action.

   DL-2289 wave-2 polish — this is the DLActionBar language, not a grey chip: a white/surface
   ground, a COLOURED icon, and the label in normal ink. The old grey-on-grey read as disabled
   even when it wasn't, which is exactly why the whole console looked quiet. Primary (filled
   blue), danger (red) and risky (amber) are untouched — they were never the problem. */
.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    height: 36px;
    padding: 0 0.9rem;
    border: 1px solid var(--dl-border-emphasis, rgba(0, 0, 0, 0.16));
    border-radius: var(--dl-radius-sm, 6px);
    /* DL-2289 panel polish — a quiet button is NOT transparent and never grey: it carries its
       own raised surface (white in light, lifted slate in dark) with a micro shadow, so it
       reads as a control on any ground the panel puts behind it — panel, band or footer. */
    background: var(--dl-btn-surface, #ffffff);
    box-shadow: var(--dl-btn-shadow, 0 1px 1px rgba(16, 24, 40, 0.05));
    color: var(--dl-text-primary, #1a202c);
    cursor: pointer;
    white-space: nowrap;
    transition: background 140ms ease, border-color 140ms ease;
}

/* Hover is a brand tint with a brand border — never a grey fill, which read as disabled. */
.admin-btn:hover:not(:disabled) {
    background: rgba(var(--dl-primary-rgb, 16, 113, 185), 0.08);
    border-color: rgba(var(--dl-primary-rgb, 16, 113, 185), 0.42);
}

/* The coloured mark. Sized HERE because the SVG is injected as a MarkupString with no scoped-css
   attribute — a global rule is the only one that can reach it (its width/height attributes are
   presentation attributes, so CSS wins). */
.admin-btn .dl-svg-icon,
.detail-btn .dl-svg-icon,
.profile-btn .dl-svg-icon,
.profile-action .dl-svg-icon,
.security-btn .dl-svg-icon,
.adv-btn .dl-svg-icon {
    width: 16px;
    height: 16px;
    flex: none;
}

.admin-btn--sm .dl-svg-icon,
.admin-btn--xs .dl-svg-icon,
.security-btn--xs .dl-svg-icon,
.adv-btn--xs .dl-svg-icon {
    width: 14px;
    height: 14px;
}

/* Any verb still on a Font Awesome glyph picks up the brand colour rather than the label's ink,
   so a page mid-migration still reads as "coloured icon, ink label". The toned variants opt out —
   a red Delete wants a red glyph, not a blue one. */
.admin-btn > i {
    color: rgb(var(--dl-primary-rgb, 16, 113, 185));
    flex: none;
}

.admin-btn--primary > i,
.admin-btn--danger > i,
.admin-btn--risky > i {
    color: inherit;
}

/* Safety net: a filled brand button paints its label white, so a brand-coloured mark on it would
   be invisible. AdminIcon's Plain flag normally keeps the glyph instead — this knocks anything
   that slips through to white rather than letting it disappear. */
.admin-btn--primary .dl-svg-icon,
.detail-btn--primary .dl-svg-icon,
.security-btn--pri .dl-svg-icon,
.profile-btn--primary .dl-svg-icon {
    filter: brightness(0) invert(1);
}

.admin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.admin-btn--primary {
    background: rgb(var(--dl-primary-rgb, 16, 113, 185));
    border-color: rgb(var(--dl-primary-rgb, 16, 113, 185));
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.14);
}

.admin-btn--primary:hover:not(:disabled) {
    background: rgb(var(--dl-primary-rgb, 16, 113, 185));
    filter: brightness(1.08);
}

.admin-btn--danger {
    color: var(--dl-danger, #e53e3e);
    border-color: var(--dl-danger, #e53e3e);
}

.admin-btn--danger:hover:not(:disabled) {
    background: rgba(229, 62, 62, 0.08);
}

/* The small verb that rides in a section heading. */
.admin-btn--sm {
    height: 28px;
    padding: 0 0.6rem;
    font-size: 0.8125rem;
}

/* DL-2289 wave 2 — the in-row size from the approved users.html mock (.btn.xs): sits inside a
   card header, a section heading or a table cell without pushing the row taller than the text
   beside it. There are no text links on a console page — this is the shape a tiny verb takes. */
.admin-btn--xs {
    height: 24px;
    padding: 0 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 5px;
}

/* DL-2289 wave 2 — a verb that takes something away ("Disable sign-in") is neither primary nor
   destructive: amber, same quiet-chip shape as its siblings. */
.admin-btn--risky {
    color: var(--dl-warning-ink, #8a5a00);
    border-color: var(--dl-warning, #d69e2e);
}

.admin-btn--risky:hover:not(:disabled) {
    background: rgba(214, 158, 46, 0.13);
}

/* DL-2289 wave 2 — @keyframes for the AdminKit in-place cards and the DetailPanel footer
   confirm. GLOBAL on purpose: a scoped @keyframes silently never runs when the animation
   property crosses a component boundary (see reference_blazor_scoped_keyframes_trap). */
@keyframes dl-admin-unfold {
    from {
        opacity: 0;
        transform: translateY(-7px);
    }
}

@keyframes dl-admin-rise {
    from {
        opacity: 0;
        transform: translateY(9px);
    }
}

/* A row of items inside a section — collectors, clients, jobs. Cards, not a row stack, so a
   section of many shows many per screen. */
.admin-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.55rem;
    min-width: 0;
}

.admin-tile {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--dl-border-light, rgba(0, 0, 0, 0.09));
    border-radius: var(--dl-radius-md, 10px);
    background: var(--dl-bg-primary, #ffffff);
    text-align: left;
    transition: border-color 140ms ease, background 140ms ease;
}

.admin-tile--clickable {
    cursor: pointer;
}

.admin-tile--clickable:hover {
    border-color: rgba(var(--dl-primary-rgb, 16, 113, 185), 0.4);
    background: var(--dl-bg-secondary, #edf2f7);
}

.admin-tile__name {
    font-size: 0.875rem;
    font-weight: 650;
    color: var(--dl-text-primary, #1a202c);
    overflow-wrap: anywhere;
}

.admin-tile__sub {
    font-size: 0.78rem;
    color: var(--dl-text-muted, #a0aec0);
    overflow-wrap: anywhere;
}

/* A section with nothing in it yet. One sentence, no box-in-a-box. */
.admin-blank {
    font-size: 0.8125rem;
    color: var(--dl-text-muted, #a0aec0);
    padding: 0.75rem 0;
    margin: 0;
}

/* DL-2289 (Ro, 18 Aug) — micro empty state: where a blank has both a truth AND a consequence,
   it gets a dashed glyph tile, what's true in full ink, and one line saying what happens if
   you act. Smaller than the grid's page-level empty state on purpose — this is a section. */
.admin-mt {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 0.1rem 0.3rem;
}

.admin-mt__g {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    flex: none;
    display: grid;
    place-items: center;
    background: var(--dl-bg-primary, #fff);
    border: 1px dashed var(--dl-border-emphasis, rgba(0, 0, 0, .16));
    color: var(--dl-text-muted, #8592a3);
    font-size: 0.9rem;
}

.admin-mt__txt b {
    display: block;
    color: var(--dl-text-primary, #1a202c);
    font-size: 0.8rem;
    font-weight: 650;
    line-height: 1.35;
}

.admin-mt__txt em {
    display: block;
    font-style: normal;
    margin: 0.2rem 0 0;
    font-size: 0.72rem;
    color: var(--dl-text-muted, #667384);
    line-height: 1.55;
    max-width: 400px;
}

/* ------------------------------------------------------------------ dark mode */

[data-theme="dark"] .admin-sectionhead {
    border-bottom-color: var(--dl-dark-border);
}

/* The section title is full ink in dark too — only the count and hints stay muted. */
[data-theme="dark"] .admin-sectionhead__title {
    color: var(--dl-dark-text);
}

[data-theme="dark"] .admin-sectionhead__count,
[data-theme="dark"] .admin-hint,
[data-theme="dark"] .admin-blank,
[data-theme="dark"] .admin-tile__sub {
    color: var(--dl-dark-text-muted);
}

[data-theme="dark"] .admin-mt__g {
    background: var(--dl-dark-surface);
    border-color: var(--dl-dark-border, rgba(255, 255, 255, .2));
    color: var(--dl-dark-text-muted);
}

[data-theme="dark"] .admin-mt__txt b {
    color: var(--dl-dark-text);
}

[data-theme="dark"] .admin-mt__txt em {
    color: var(--dl-dark-text-muted);
}

[data-theme="dark"] .admin-why {
    background: var(--dl-dark-surface-raised);
    color: var(--dl-dark-text-muted);
}

[data-theme="dark"] .admin-field__lab,
[data-theme="dark"] .admin-toggle__lab,
[data-theme="dark"] .admin-tile__name,
[data-theme="dark"] .admin-facts dd {
    color: var(--dl-dark-text);
}

[data-theme="dark"] .admin-input,
[data-theme="dark"] .admin-select,
[data-theme="dark"] .admin-textarea {
    background: var(--dl-dark-surface-raised);
    border-color: var(--dl-dark-border-light);
    color: var(--dl-dark-text);
}

/* DL-2506 — outrank the dark resets above, which would otherwise grey the refusal out.
   Not --dl-danger: that token is defined once, globally, as the light red (#E53E3E), which on the
   dark panel is ~4.0:1 — under AA for hint-sized text. --dl-dark-danger is the dark rung; until
   the token ladder mints it, the fallback carries the AA-passing red. */
[data-theme="dark"] .admin-hint--bad {
    color: var(--dl-dark-danger, #fc8181);
}

/* !important matches dl-effects.css:1142's global dark input:focus (itself !important), which
   would otherwise repaint the invalid border primary-blue the moment the field is focused —
   exactly when the operator is looking at it. */
[data-theme="dark"] .admin-input--invalid,
[data-theme="dark"] .admin-input--invalid:focus {
    border-color: var(--dl-dark-danger, #fc8181) !important;
    box-shadow: 0 0 0 3px rgba(252, 129, 129, 0.18) !important;
}

[data-theme="dark"] .admin-input::placeholder,
[data-theme="dark"] .admin-textarea::placeholder {
    color: var(--dl-dark-text-subtle);
}

[data-theme="dark"] .admin-input:disabled,
[data-theme="dark"] .admin-select:disabled,
[data-theme="dark"] .admin-textarea:disabled,
[data-theme="dark"] .admin-input[readonly] {
    background: var(--dl-dark-surface-overlay);
    color: var(--dl-dark-text-muted);
}

/* Dark keeps the same ordering — band above the panel, button above the band. The lifted
   slate surface and its top highlight come from the shared tokens. */
[data-theme="dark"] .admin-btn {
    background: var(--dl-btn-surface, #283039);
    box-shadow: var(--dl-btn-shadow, inset 0 1px 0 rgba(255, 255, 255, 0.045));
    border-color: var(--dl-dark-border-light);
    color: var(--dl-dark-text);
}

[data-theme="dark"] .admin-btn:hover:not(:disabled) {
    background: rgba(var(--dl-primary-rgb, 16, 113, 185), 0.26);
    border-color: rgba(var(--dl-primary-rgb, 16, 113, 185), 0.6);
}

[data-theme="dark"] .admin-btn--danger:hover:not(:disabled) {
    background: rgba(229, 62, 62, 0.22);
}

/* The toned variants must restate their fills and inks in dark — the dark base rule above
   carries higher specificity than the light variant rules and would flatten them onto the
   quiet surface otherwise. */
[data-theme="dark"] .admin-btn--primary {
    background: rgb(var(--dl-primary-rgb, 16, 113, 185));
    border-color: rgb(var(--dl-primary-rgb, 16, 113, 185));
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .admin-btn--primary:hover:not(:disabled) {
    background: rgb(var(--dl-primary-rgb, 16, 113, 185));
    border-color: rgb(var(--dl-primary-rgb, 16, 113, 185));
    filter: brightness(1.08);
}

[data-theme="dark"] .admin-btn--danger {
    color: #fc8181;
    border-color: rgba(252, 129, 129, 0.55);
}

/* The Font Awesome fallback lifts to the dark-mode brand tint so it stays legible on the
   surface; the coloured SVGs carry their own palette and need nothing. */
[data-theme="dark"] .admin-btn > i {
    color: #8ec2ee;
}

[data-theme="dark"] .admin-btn--primary > i,
[data-theme="dark"] .admin-btn--danger > i,
[data-theme="dark"] .admin-btn--risky > i {
    color: inherit;
}

/* Amber ink on a dark surface: the bright hue already clears AA on its own tint. */
[data-theme="dark"] .admin-btn--risky {
    color: #ecc94b;
    border-color: #ecc94b;
}

[data-theme="dark"] .admin-btn--risky:hover:not(:disabled) {
    background: rgba(236, 201, 75, 0.12);
}

[data-theme="dark"] .admin-tile {
    background: var(--dl-dark-surface);
    border-color: var(--dl-dark-border);
}

[data-theme="dark"] .admin-tile--clickable:hover {
    background: var(--dl-dark-surface-raised);
}

@media (prefers-reduced-motion: reduce) {
    .admin-input,
    .admin-select,
    .admin-textarea,
    .admin-btn,
    .admin-tile {
        transition: none;
    }
}

/* Mobile: the panel is full width and the two-column grids collapse. */
@media (max-width: 640px) {
    .admin-form,
    .admin-facts {
        grid-template-columns: 1fr;
    }

    .admin-tiles {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   DL-2289 UX round 2 — THE CONSOLE TILE.

   Ro, 20 Aug 2026: "the cards in the dataset and reports and parameters, it does not look good.
   I was thinking using a table but I think you can design the cards better — like has SVG as
   main display etc."

   The old cards were a title, a subtitle and a chip in a box, which is why they read as weak: the
   first thing the eye met was text it then had to read to learn anything. These lead with a
   PICTURE OF THE THING — a report's blocks, a dataset's formats, the control a parameter puts in
   front of a reader — drawn from that row's own data, and the text supports it.

   One anatomy for all three screens: hero, name lines, foot of chips. They are siblings and must
   look it, which is why this lives in the global sheet rather than three times in three scoped
   ones — the pages author the markup, so a component's scoped CSS could not reach it.

   Rules that hold everywhere it is used:
     · The hero is drawn from REAL data. Never a stock illustration, never decoration, never a
       fabricated value. Nothing to draw means the honest empty hero, which says what is missing.
     · Every colour is a token. The art is currentColor at an opacity so it reads in both themes.
   ============================================================================ */

.dl-tile {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    min-width: 0;
    width: 100%;
}

/* ---------------------------------------------------------------- the hero */

.dl-tile__hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    height: 84px;
    padding: .6rem .7rem;
    border-radius: 9px;
    background: var(--dl-bg-secondary, #EDF2F7);
    color: rgb(var(--dl-primary-rgb, 16, 113, 185));
    overflow: hidden;
}

/* A row of faces — a dataset's formats, a report's blocks — in their real order. */
.dl-tile__hero--strip {
    justify-content: flex-start;
    align-items: stretch;
}

.dl-tile__art {
    flex: 1 1 0;
    min-width: 0;
    max-width: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* One face, centred and given room — a single glyph pushed to the left of an otherwise empty
   panel reads as a layout that broke, not one that was decided. */
.dl-tile__hero:not(.dl-tile__hero--strip) > .dl-tile__art {
    flex: none;
    width: 96px;
    max-width: 96px;
    height: 100%;
}

/* Later blocks in a strip step back, so the ORDER of a report's blocks is legible. */
.dl-tile__art--soft {
    opacity: .55;
}

/* "+2 more" — the strip caps, the badge carries the true number. */
.dl-tile__more {
    flex: none;
    align-self: center;
    font-size: var(--dl-text-xs, .694rem);
    font-weight: 700;
    color: var(--dl-text-secondary, #4A5568);
    background: var(--dl-surface, #FFFFFF);
    border-radius: 999px;
    padding: .1rem .42rem;
}

/* Nothing to draw. Says what is missing rather than sitting blank or inventing a picture. */
.dl-tile__hero--none {
    color: var(--dl-text-muted, #A0AEC0);
    background: repeating-linear-gradient(
        135deg,
        var(--dl-bg-secondary, #EDF2F7),
        var(--dl-bg-secondary, #EDF2F7) 7px,
        transparent 7px,
        transparent 14px
    );
    border: 1px dashed var(--dl-border, #E2E8F0);
}

.dl-tile__none {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .18rem;
    font-size: var(--dl-text-xs, .694rem);
    font-weight: 600;
    text-align: center;
    line-height: 1.25;
}

.dl-tile__none i {
    font-size: .95rem;
    opacity: .8;
}

/* A colour that belongs to the row — a report's category. The value is data, so it arrives as an
   inline custom property from the markup; this rule is what turns it into ink. */
.dl-tile__hero--tinted {
    background: color-mix(in srgb, var(--tile-hue, currentColor) 12%, var(--dl-bg-secondary, #EDF2F7));
    color: var(--tile-hue, rgb(var(--dl-primary-rgb, 16, 113, 185)));
}

/* Top-right marker on the hero — a state that must be seen before the name is read. */
.dl-tile__flag {
    position: absolute;
    top: .4rem;
    right: .45rem;
    font-size: var(--dl-text-xs, .694rem);
    font-weight: 700;
    letter-spacing: .02em;
    border-radius: 999px;
    padding: .08rem .45rem;
    background: var(--dl-surface, #FFFFFF);
    color: var(--dl-text-secondary, #4A5568);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

.dl-tile__flag--bad {
    background: var(--dl-danger, #E53E3E);
    color: #FFFFFF;
}

.dl-tile__flag--warn {
    background: var(--dl-warning, #DD6B20);
    color: #FFFFFF;
}

/* ---------------------------------------------------------------- the words */

.dl-tile__who {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    min-width: 0;
}

.dl-tile__name {
    font-size: var(--dl-text-sm, .833rem);
    font-weight: 650;
    line-height: 1.3;
    color: var(--dl-text-primary, #1A202C);

    /* Two lines, then an ellipsis. A card that grows to fit a long name breaks the grid's rhythm. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Ro, 24 Aug 2026: this line was one nowrap line with an ellipsis, so a dataset's source and
   groups — "rsc · Aurora, Business Analyst, DefaultAdmin…" — were cut mid-word on every card.
   It wraps to two lines and the card grows to hold them. Two, not unlimited: the grid still has
   to keep a rhythm, and a runaway group list would give one card the height of three. */
.dl-tile__sub {
    font-size: var(--dl-text-xs, .694rem);
    line-height: 1.35;
    color: var(--dl-text-muted, #A0AEC0);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.dl-tile__foot {
    display: flex;
    align-items: center;
    gap: .3rem;
    flex-wrap: wrap;
    margin-top: auto;
}

/* ---------------------------------------------------------------- list view */

/* AdminViewToggle's dense read reflows the same tile into a row: the hero shrinks to a face and
   the words take the width. Same slots, same order — never a second card design. */
.admin-card--list .dl-tile {
    flex-direction: row;
    align-items: center;
    gap: .8rem;
}

.admin-card--list .dl-tile__hero {
    flex: none;
    width: 76px;
    height: 44px;
    padding: .3rem;
}

.admin-card--list .dl-tile__hero .dl-tile__more,
.admin-card--list .dl-tile__flag {
    display: none;
}

.admin-card--list .dl-tile__art:nth-child(n + 3) {
    display: none;
}

.admin-card--list .dl-tile__who {
    flex: 1;
}

.admin-card--list .dl-tile__name,
.admin-card--list .dl-tile__sub {
    -webkit-line-clamp: 1;
}

.admin-card--list .dl-tile__foot {
    margin-top: 0;
}

/* ------------------------------------------------------------------ dark mode */

[data-theme="dark"] .dl-tile__hero {
    background: var(--dl-dark-surface-overlay);
}

[data-theme="dark"] .dl-tile__hero--none {
    background: repeating-linear-gradient(
        135deg,
        var(--dl-dark-surface-overlay),
        var(--dl-dark-surface-overlay) 7px,
        transparent 7px,
        transparent 14px
    );
    border-color: var(--dl-dark-border);
    color: var(--dl-dark-text-subtle);
}

[data-theme="dark"] .dl-tile__hero--tinted {
    background: color-mix(in srgb, var(--tile-hue, currentColor) 22%, var(--dl-dark-surface-overlay));
}

[data-theme="dark"] .dl-tile__more,
[data-theme="dark"] .dl-tile__flag {
    background: var(--dl-dark-surface-raised);
    color: var(--dl-dark-text-muted);
    box-shadow: none;
}

[data-theme="dark"] .dl-tile__name {
    color: var(--dl-dark-text);
}

[data-theme="dark"] .dl-tile__sub {
    color: var(--dl-dark-text-subtle);
}

/* DL-2943 — the DTS Admin banking sheet (DtsBankingPrintSheet). While the sheet is in the DOM, a
   print is the sheet alone: every element that neither is the sheet, sits inside it nor contains
   it is removed, and the sheet's ancestors are stripped of their layout chrome so it starts at the
   top-left of one A4 page. display:none rather than visibility:hidden — hidden elements keep their
   height and would print as trailing blank pages. Pages without the sheet match nothing here, and
   the A4 page box is a NAMED page so no other screen's printing changes. */
@page dts-banking-sheet {
    size: A4 portrait;
    margin: 12mm;
}

/* DL-3664 — the DTS Review Week sheet rides the same rules on a landscape page: eight columns of
   figures do not fit A4 portrait. */
@page dts-review-sheet {
    size: A4 landscape;
    margin: 10mm;
}

@media print {
    .dts-print-sheet {
        page: dts-banking-sheet;
    }

    .dts-print-sheet.dts-rs-print {
        page: dts-review-sheet;
    }

    body:has(.dts-print-sheet) *:not(.dts-print-sheet):not(.dts-print-sheet *):not(:has(.dts-print-sheet)) {
        display: none !important;
    }

    body:has(.dts-print-sheet),
    body:has(.dts-print-sheet) *:has(.dts-print-sheet) {
        display: block !important;
        position: static !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        width: auto !important;
        max-width: none !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        transform: none !important;
        box-shadow: none !important;
        background: #fff !important;
    }
}
