/* ==========================================================================
   HOTELLIX admin panel: the "Apple" surface layer.
   Loaded after theme.css on every page in admin/. It changes the look only:
   the markup, the scripts and the layout variables of bo-shell.css stay as
   they are, so removing this one <link> gives the previous admin back.

   What it does
     1. Tokens        neutral greys for canvas, text and hairlines; the accent,
                      links and status colours still come from the palette
     2. Shell         frosted top bar, sidebar on the canvas, rounded menu items
     3. Page          large title, borderless cards with one soft shadow
     4. KPI tiles     big tabular figures; the grid follows the number of tiles
     5. Controls      pill buttons, filled secondary buttons, soft fields
     6. Tables        quiet header, hairline rows, grouped rows on phones
     7. Overlays      menus, dialogs and toasts as blurred, rounded sheets
     8. Page parts    settings, lists, timeline, footer
     9. Small screens drawer, spacing and touch sizes

   It follows the customizer: palette, light / dark, corners and font.
   Every rule starts with .ds-admin, so nothing leaks into the site or the
   owner panel.
   ========================================================================== */

/* ---------------------------------------------------------------- 1. tokens */
html.ds.ds-admin:root {
  --ds-canvas: #F5F5F7;
  --ds-surface: #FFFFFF;
  --ds-sunken: #F5F5F7;
  --ds-hover: #EBEBF0;
  --ds-row-hover: #FAFAFC;
  --ds-skel: #EBEBF0;
  --ds-border: #E6E6EB;
  --ds-border-card: rgba(0, 0, 0, .06);
  --ds-text-strong: #1D1D1F;
  --ds-text: #1D1D1F;
  --ds-text-2: #48484D;
  --ds-text-muted: #6E6E73;
  --ds-text-placeholder: #6E6E73;
  --ds-neutral-fg: #48484D;
  --ds-neutral-bg: #EFEFF2;
  --ds-neutral-border: transparent;
  --ds-c-grid: #EDEDF0;
  --ds-scrim: rgba(0, 0, 0, .32);

  --ds-sh-card: 0 0 0 1px rgba(0, 0, 0, .035), 0 1px 2px rgba(0, 0, 0, .04), 0 12px 32px -20px rgba(0, 0, 0, .16);
  --ds-sh-3: 0 0 0 1px rgba(0, 0, 0, .06), 0 20px 48px -12px rgba(0, 0, 0, .22), 0 4px 12px -4px rgba(0, 0, 0, .08);
  --ds-sh-4: 0 0 0 1px rgba(0, 0, 0, .06), 0 32px 64px -16px rgba(0, 0, 0, .30);

  --ds-sidebar-w: 264px;
  --ds-card-pad: 20px;
  --ds-gap-cards: 16px;

  /* file-local */
  --ap-fill: rgba(118, 118, 128, .12);          /* filled controls: secondary buttons, search, filters */
  --ap-fill-hover: rgba(118, 118, 128, .18);
  --ap-fill-press: rgba(118, 118, 128, .24);
  --ap-field: #C7C7CC;                          /* text field edge */
  --ap-hair: rgba(0, 0, 0, .08);                /* hairline on a material */
  --ap-glass: rgba(245, 245, 247, .76);         /* top bar */
  --ap-sheet: rgba(255, 255, 255, .84);         /* menus, drawer */
  --ap-pill: 980px;
  --ap-blur: saturate(180%) blur(20px);
}
html.ds.ds-admin[data-theme="dark"]:root {
  --ds-canvas: #0A0A0B;
  --ds-surface: #1C1C1E;
  --ds-sunken: #232325;
  --ds-hover: #2C2C2E;
  --ds-row-hover: #222224;
  --ds-skel: #2C2C2E;
  --ds-border: #2E2E31;
  --ds-border-card: rgba(255, 255, 255, .08);
  --ds-text-strong: #F5F5F7;
  --ds-text: #E8E8ED;
  --ds-text-2: #AEAEB2;
  --ds-text-muted: #98989D;
  --ds-text-placeholder: #8E8E93;
  --ds-neutral-fg: #D1D1D6;
  --ds-neutral-bg: #2C2C2E;
  --ds-neutral-border: transparent;
  --ds-c-grid: #2C2C2E;
  --ds-scrim: rgba(0, 0, 0, .6);

  --ds-sh-card: 0 0 0 1px rgba(255, 255, 255, .07);
  --ds-sh-3: 0 0 0 1px rgba(255, 255, 255, .1), 0 24px 56px -12px rgba(0, 0, 0, .7);
  --ds-sh-4: 0 0 0 1px rgba(255, 255, 255, .1), 0 32px 72px -16px rgba(0, 0, 0, .8);

  --ap-fill: rgba(118, 118, 128, .24);
  --ap-fill-hover: rgba(118, 118, 128, .32);
  --ap-fill-press: rgba(118, 118, 128, .4);
  --ap-field: #48484A;
  --ap-hair: rgba(255, 255, 255, .1);
  --ap-glass: rgba(10, 10, 11, .72);
  --ap-sheet: rgba(36, 36, 38, .84);
}
/* corners: larger by default; the customizer's "Sharp" and "Round" still decide when they are set */
html.ds.ds-admin:not([data-radius]) { --ds-card-r: 20px; --ds-ctl-r: 12px; --cfx-radius: 20px; --ds-r-sm: 8px; --ds-r-md: 12px; --ds-r-lg: 16px; --ds-r-xl: 24px; }
html.ds.ds-admin[data-radius="sharp"] { --ap-pill: 6px; }
/* the device's own system font first (San Francisco on Apple devices), unless a font is chosen in the customizer */
html.ds.ds-admin:not([data-font]) { --ds-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", "Noto Sans Devanagari", sans-serif; }
@media (min-width: 1200px) { html.ds.ds-admin:root { --ds-card-pad: 24px; --ds-gap-cards: 20px; } }

.ds-admin body { background: var(--ds-canvas); color: var(--ds-text); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
.ds-admin ::selection { background: color-mix(in srgb, var(--ds-accent) 22%, transparent); }

/* ---------------------------------------------------------------- 2. shell */
/* top bar: a frosted material, the page scrolls under it */
.ds-admin #page-topbar { background: var(--ds-canvas); border-block-end: 1px solid var(--ap-hair); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .ds-admin #page-topbar { background: var(--ap-glass); -webkit-backdrop-filter: var(--ap-blur); backdrop-filter: var(--ap-blur); }
}
.ds-admin #page-topbar .navbar-header .navbar-brand-box { border-inline-end: 0; }
.ds-admin .ds-brand { border-radius: 12px; }
.ds-admin .ds-brand__app { display: inline-block; margin-block-start: 2px; padding: 1px 7px; border-radius: 6px; background: var(--ap-fill); font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .02em; color: var(--ds-text-2); }
.ds-admin #page-topbar .header-item { border-radius: 50%; color: var(--ds-text-2); transition: background-color .15s var(--ds-ease-out), color .15s var(--ds-ease-out), transform .15s var(--ds-ease-out); }
.ds-admin #page-topbar #page-header-user-dropdown { border-radius: var(--ap-pill); padding-inline: 4px 12px; }
@media (max-width: 767.98px) { .ds-admin #page-topbar #page-header-user-dropdown { padding-inline: 4px; } }
@media (hover: hover) { .ds-admin #page-topbar .header-item:hover { background: var(--ap-fill); color: var(--ds-text-strong); } }
.ds-admin #page-topbar .header-item:active { transform: scale(.94); }
.ds-admin #page-topbar .header-item[data-bs-toggle="dropdown"][aria-expanded="true"] { background: var(--ap-fill-hover); color: var(--ds-text-strong); }
.ds-admin #page-topbar .ds-user-name { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; color: var(--ds-text-strong); }
.ds-admin #page-topbar .cf-avatar { background: linear-gradient(145deg, color-mix(in srgb, var(--ds-accent) 78%, #fff), var(--ds-accent)); color: var(--ds-on-accent); box-shadow: 0 0 0 2px var(--ds-surface), 0 1px 3px rgba(0, 0, 0, .18); font-weight: 600; letter-spacing: .02em; }
.ds-admin #page-topbar .cf-topbar-search { border: 1px solid transparent; border-radius: 12px; background: var(--ap-fill); transition: background-color .15s var(--ds-ease-out), border-color .15s var(--ds-ease-out), box-shadow .15s var(--ds-ease-out); }
.ds-admin #page-topbar .cf-topbar-search:focus-within { outline: 0; border-color: var(--ds-focus); background: var(--ds-surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ds-focus) 18%, transparent); }

/* sidebar: sits on the canvas; the current page is a raised white row with an accent icon */
.ds-admin .vertical-menu { background: var(--ds-canvas); border-inline-end: 1px solid var(--ap-hair); scrollbar-width: thin; scrollbar-color: var(--ap-fill-hover) transparent; }
.ds-admin #sidebar-menu { padding-block-end: 32px; }
.ds-admin #side-menu .menu-title { padding: 20px 22px 6px !important; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ds-text-muted); }
.ds-admin #side-menu .menu-title:first-child { padding-block-start: 8px !important; }
.ds-admin #sidebar-menu ul li a { gap: 11px; min-block-size: 38px; margin-inline: 10px; padding-inline: 12px; border-radius: 10px; font-size: 14px; font-weight: 500; letter-spacing: -0.008em; color: var(--ds-text); }
.ds-admin #sidebar-menu ul li a i { color: var(--ds-accent-fg); }
.ds-admin #sidebar-menu ul li ul.sub-menu { padding-block: 2px 4px; }
.ds-admin #sidebar-menu ul li ul.sub-menu li a { min-block-size: 34px; margin-inline: 10px; padding-inline: 43px 12px; font-size: 14px; font-weight: 400; color: var(--ds-text-2); }
@media (hover: hover) {
  .ds-admin #sidebar-menu ul li a:hover { background-color: var(--ap-fill); color: var(--ds-text-strong); }
  .ds-admin #sidebar-menu ul li a:hover i { color: var(--ds-accent-fg); }
}
.ds-admin #sidebar-menu .mm-active > a,
.ds-admin #sidebar-menu .mm-active .active,
.ds-admin #sidebar-menu ul li a.active { color: var(--ds-text-strong) !important; font-weight: 600; }
.ds-admin #sidebar-menu .mm-active > a > i,
.ds-admin #sidebar-menu ul li a.active i { color: var(--ds-accent-fg) !important; }
.ds-admin #sidebar-menu ul li a.active,
.ds-admin #sidebar-menu ul li ul.sub-menu li a.active { background-color: var(--ds-surface); box-shadow: var(--ds-sh-card); }
.ds-admin[data-theme="dark"] #sidebar-menu ul li a.active,
.ds-admin[data-theme="dark"] #sidebar-menu ul li ul.sub-menu li a.active { background-color: var(--ap-fill); box-shadow: none; }
.ds-admin #sidebar-menu ul li a.active::before { content: none; }
.ds-admin #sidebar-menu .mm-active > a.has-arrow { background-color: transparent; box-shadow: none; }
.ds-admin #sidebar-menu .has-arrow:after { font-size: 12px; color: var(--ds-text-muted); }
.ds-admin #sidebar-menu ul li a:focus-visible { outline: 2px solid var(--ds-focus); outline-offset: -2px; }
@media (pointer: coarse) { .ds-admin #sidebar-menu ul li a, .ds-admin #sidebar-menu ul li ul.sub-menu li a { min-block-size: 44px; } }
@media (min-width: 992px) {
  /* rail: the fly-out is a blurred sheet */
  .ds-admin .vertical-collpsed .vertical-menu #sidebar-menu > ul > li:is(:hover, :focus-within) > a { background-color: var(--ap-fill); }
  .ds-admin .vertical-collpsed .vertical-menu #sidebar-menu > ul > li:is(:hover, :focus-within) > a > span:not(.badge):not(.ds-count),
  .ds-admin .vertical-collpsed .vertical-menu #sidebar-menu > ul > li:is(:hover, :focus-within) > ul { border: 0; background: var(--ds-surface); box-shadow: var(--ds-sh-3); }
  .ds-admin .vertical-collpsed .vertical-menu #sidebar-menu > ul > li:is(:hover, :focus-within) > a > span:not(.badge):not(.ds-count) { border-radius: 12px; }
  .ds-admin .vertical-collpsed .vertical-menu #sidebar-menu > ul > li:is(:hover, :focus-within):has(> ul) > a > span:not(.badge):not(.ds-count) { border-end-start-radius: 0; border-end-end-radius: 0; }
  .ds-admin .vertical-collpsed .vertical-menu #sidebar-menu > ul > li:is(:hover, :focus-within) > ul { border-end-start-radius: 12px; border-end-end-radius: 12px; }
  .ds-admin .vertical-collpsed .vertical-menu #sidebar-menu > ul > li:is(:hover, :focus-within) > ul a { padding-inline: 12px; margin-inline: 6px; }
  .ds-admin .vertical-collpsed #side-menu .menu-title { padding: 0 !important; font-size: 0; color: transparent; }
  .ds-admin .vertical-collpsed #side-menu .menu-title::after { background: var(--ap-hair); }
}

/* ---------------------------------------------------------------- 3. page */
.ds-admin .page-title-box { gap: 8px 16px; margin-block-end: 24px; }
.ds-admin .page-title-box h1 { font-size: clamp(26px, calc(20px + .9vw), 34px); line-height: 1.12; font-weight: 700; letter-spacing: -0.026em; color: var(--ds-text-strong); }
.ds-admin .page-title-box h1 small { font-size: .5em; font-weight: 500; letter-spacing: -0.01em; }
.ds-admin .page-title-box .breadcrumb { font-size: 13px; }
.ds-admin .breadcrumb-item a { color: var(--ds-text-muted); text-decoration: none; }
.ds-admin .breadcrumb-item a:hover { color: var(--ds-link); }
.ds-admin :is(h2, h3, .h4, .h5, .h6) { letter-spacing: -0.014em; }

.ds-admin :is(.ds-card, .card) { border: 0; border-radius: var(--ds-card-r); background: var(--ds-surface); box-shadow: var(--ds-sh-card); }
.ds-admin .ds-card__head > :is(h2, h3, h4), .ds-admin .ht-panel :is(h2, h3) { font-size: 17px; line-height: 24px; font-weight: 600; letter-spacing: -0.016em; color: var(--ds-text-strong); }
.ds-admin .ht-panel > .ds-card__head { margin-block-end: 8px; }
.ds-admin .ht-panel > .table-responsive { margin-inline: calc(var(--ds-card-pad) * -1); }
.ds-admin .ht-grid { gap: var(--ds-gap-cards); margin-block-end: var(--ds-gap-cards); }
.ds-admin .ds-demo-tag { flex: none; white-space: nowrap; border: 0; border-radius: var(--ap-pill); background: var(--ap-fill); color: var(--ds-text-2); }
.ds-admin .ds-alert { border: 0; border-radius: var(--ds-r-lg); }
.ds-admin .footer, .ds-admin .vertical-collpsed .footer { border-block-start: 0; font-size: 12px; color: var(--ds-text-muted); }

/* ---------------------------------------------------------------- 4. KPI tiles */
.ds-admin .ht-kpis { margin-block-end: var(--ds-gap-cards); }
.ds-admin .ds-kpi { gap: 6px; min-block-size: 0; padding: 18px var(--ds-card-pad); border: 0; border-radius: var(--ds-card-r); box-shadow: var(--ds-sh-card); transition: transform .2s var(--ds-ease-out), box-shadow .2s var(--ds-ease-out); }
.ds-admin .ds-kpi__top { align-items: center; margin-block-end: 6px; }
.ds-admin .ds-kpi__label { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ds-text-muted); }
.ds-admin .ds-kpi__icon { inline-size: 36px; block-size: 36px; border-radius: 11px; background: var(--ds-accent-soft); color: var(--ds-accent-fg); font-size: 18px; }
.ds-admin .ds-kpi__value { font-size: clamp(20px, calc(14px + 1.2vw), 30px); line-height: 1.15; font-weight: 700; letter-spacing: -0.028em; color: var(--ds-text-strong); }
.ds-admin .ds-kpi__foot { margin-block-start: 2px; font-size: 12px; color: var(--ds-text-muted); }
@media (hover: hover) { .ds-admin a.ds-kpi:hover { transform: translateY(-2px); box-shadow: var(--ds-sh-card), 0 18px 36px -22px rgba(0, 0, 0, .28); } }
.ds-admin :is(.ds-delta, .ds-pill, .badge) { border-color: transparent; }
.ds-admin .ds-delta { padding-inline: 9px; }
/* the grid follows the number of tiles, so a row is never left with one tile */
@media (max-width: 359.98px) { .ds-admin .ds-kpis { grid-template-columns: minmax(0, 1fr); } }
/* phones: with an odd number of tiles the last one takes the full row instead of sitting alone beside a gap */
@media (max-width: 767.98px) { .ds-admin .ds-kpis > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
/* narrow phones: tiles with a "+9% vs previous period" line get the full width, so that line stays on one row */
@media (max-width: 419.98px) { .ds-admin .ds-kpis:has(.ds-delta) { grid-template-columns: minmax(0, 1fr); } .ds-admin .ds-kpis:has(.ds-delta) .ds-kpi__value { font-size: 24px; } }
@media (min-width: 768px) {
  .ds-admin .ds-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ds-admin .ds-kpis:has(> :nth-child(2):last-child), .ds-admin .ds-kpis:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) { .ds-admin .ds-kpis:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) and (max-width: 1399.98px) { .ds-admin .ds-kpis:has(> :nth-child(4):last-child) .ds-kpi__value { font-size: 24px; } }
@media (min-width: 1600px) { .ds-admin .ds-kpis:has(> :nth-child(5):last-child) { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- 5. controls */
.ds-admin :is(.btn, .ds-btn):not(.header-item, .btn-close, .input-group > *, .btn-group > *) { border-radius: var(--ap-pill); }
.ds-admin :is(.btn, .ds-btn):not(.header-item, .btn-close) { letter-spacing: -0.008em; transition: color .15s var(--ds-ease-out), background-color .15s var(--ds-ease-out), border-color .15s var(--ds-ease-out), transform .15s var(--ds-ease-out), box-shadow .15s var(--ds-ease-out); }
.ds-admin :is(.btn, .ds-btn):not(.header-item, .btn-close, :disabled, .disabled):active { transform: scale(.97); }
.ds-admin :is(.btn, .ds-btn):not(.btn-sm, .ds-btn--sm, .btn-lg, .ds-btn--lg, .header-item, .btn-close, .input-group > *) { padding-inline: 18px; }
.ds-admin :is(.btn-sm, .ds-btn--sm):not(.header-item, .input-group > *) { padding-inline: 14px; }
.ds-admin :is(.btn-secondary, .btn-light, .btn-outline-primary, .btn-outline-secondary, .btn-outline-dark, .ds-btn--secondary) { --b: var(--ap-fill); --bb: transparent; --bh: var(--ap-fill-hover); --bbh: transparent; --ba: var(--ap-fill-press); --bba: transparent; }
.ds-admin :is(.btn-outline-danger, .ds-btn--destructive-secondary) { --b: var(--ds-danger-bg); --bb: transparent; --bh: color-mix(in srgb, var(--ds-danger-solid) 16%, var(--ds-surface)); --bbh: transparent; --bba: transparent; }
.ds-admin :is(.btn-link, .ds-btn--tertiary) { --bh: var(--ap-fill); --ba: var(--ap-fill-hover); }
.ds-admin :is(.btn, .ds-btn):focus-visible { outline: 2px solid var(--ds-focus); outline-offset: 2px; }
.ds-admin .ds-kebab { border-radius: 50%; }
.ds-admin .ds-kebab:hover, .ds-admin .ds-kebab[aria-expanded="true"] { background: var(--ap-fill-hover); }

.ds-admin :is(.form-control, .form-select, .ds-input, .ds-select) { border-color: var(--ap-field); border-radius: var(--ds-ctl-r); letter-spacing: -0.006em; transition: border-color .15s var(--ds-ease-out), box-shadow .15s var(--ds-ease-out), background-color .15s var(--ds-ease-out); }
@media (hover: hover) { .ds-admin :is(.form-control, .form-select, .ds-input, .ds-select):not(:disabled, :focus):hover { border-color: var(--ds-text-muted); } }
.ds-admin :is(.form-control, .form-select, .ds-input, .ds-select):focus { border-color: var(--ds-focus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ds-focus) 18%, transparent); }
.ds-admin .was-validated :is(.form-control, .form-select):invalid:focus, .ds-admin :is(.form-control, .form-select).is-invalid:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ds-danger-fg) 18%, transparent); }
.ds-admin :is(.form-control-sm, .form-select-sm) { border-radius: calc(var(--ds-ctl-r) - 2px); }
.ds-admin .input-group > :is(.form-control, .form-select):not(:first-child) { border-start-start-radius: 0; border-end-start-radius: 0; }
.ds-admin .input-group > :is(.form-control, .form-select):not(:last-child) { border-start-end-radius: 0; border-end-end-radius: 0; }
.ds-admin .input-group-text { border-color: var(--ap-field); border-radius: var(--ds-ctl-r); background: var(--ds-sunken); color: var(--ds-text-2); }
.ds-admin .form-label { font-size: 13px; font-weight: 600; letter-spacing: -0.006em; color: var(--ds-text); }
.ds-admin .form-text { color: var(--ds-text-muted); }
.ds-admin .form-check-input { border-color: var(--ap-field); }
.ds-admin .form-check-input[type="checkbox"] { border-radius: 6px; }
/* switches are always a full pill, whatever the corner option is */
.ds-admin .form-switch .form-check-input, .ds-admin .form-check-input[role="switch"] { border-radius: 999px; }
.ds-admin .form-check-input:is(:checked, :indeterminate) { border-color: var(--ds-accent); }
.ds-admin .form-check-input:focus-visible { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ds-focus) 18%, transparent); }
/* search fields and the filters above a table are filled, without an edge */
.ds-admin .ds-search-field { border-color: transparent; border-radius: 12px; background: var(--ap-fill); transition: background-color .15s var(--ds-ease-out), border-color .15s var(--ds-ease-out), box-shadow .15s var(--ds-ease-out); }
.ds-admin .ds-search-field:focus-within { border-color: var(--ds-focus); background: var(--ds-surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ds-focus) 18%, transparent); }
.ds-admin .ds-search-field > input:focus { outline: 0; box-shadow: none; }
.ds-admin .ht-table-bar .form-select { border-color: transparent; border-radius: 12px; background-color: var(--ap-fill); font-weight: 500; }
.ds-admin .ht-table-bar .form-select:focus { border-color: var(--ds-focus); background-color: var(--ds-surface); }
/* a switch and its label: one row, centred on each other, with a gap between them (the label touched the switch) */
.ds-admin .form-check.form-switch:has(> label) { display: flex; align-items: center; gap: 12px; min-block-size: 32px; margin: 0; padding-inline-start: 0; }
.ds-admin .form-check.form-switch:has(> label) > .form-check-input { flex: none; float: none; margin: 0; cursor: pointer; }
.ds-admin .form-check.form-switch:has(> label) > .form-check-label { min-inline-size: 0; margin: 0; font-size: 14px; line-height: 20px; letter-spacing: -0.006em; color: var(--ds-text); cursor: pointer; }
.ds-admin .ht-form-actions { gap: 10px; }
.ds-admin .ds-form-section > :is(h2, h3) { font-size: 17px; line-height: 24px; font-weight: 600; letter-spacing: -0.016em; }
.ds-admin .ds-form-section__desc { color: var(--ds-text-muted); }

/* ---------------------------------------------------------------- 6. tables */
.ds-admin .ht-card-table { overflow: visible; }
.ds-admin .ht-table-bar { padding: 14px var(--ds-card-pad); border-block-end: 1px solid var(--ds-border); }
.ds-admin .ds-toolbar__count { font-size: 13px; color: var(--ds-text-muted); }
.ds-admin .table > thead > tr > * { block-size: 40px; padding-block: 8px; background-color: transparent; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0; color: var(--ds-text-muted); border-block-end: 1px solid var(--ds-border); white-space: nowrap; }
.ds-admin .table > tbody > tr > * { border-block-end-color: var(--ds-border); font-size: 14px; letter-spacing: -0.006em; }
.ds-admin .table > tbody > tr:last-child > * { border-block-end: 0; }
.ds-admin .ds-card .table > :not(caption) > * > :first-child { padding-inline-start: var(--ds-card-pad); }
.ds-admin .ds-card .table > :not(caption) > * > :last-child { padding-inline-end: var(--ds-card-pad); }
.ds-admin .ht-sort.is-on { color: var(--ds-text-strong); }
.ds-admin .ds-ident__media { background: var(--ap-fill); }
.ds-admin .ds-ident__media--thumb { border-radius: 10px; }
.ds-admin .ds-ident__name { letter-spacing: -0.01em; }
.ds-admin :is(.ds-pill, .badge) { padding-inline: 9px; font-weight: 600; letter-spacing: -0.004em; }
.ds-admin .ds-ref { font-family: var(--ds-font); font-size: 14px; font-weight: 500; letter-spacing: -0.006em; color: var(--ds-text-strong); }
.ds-admin .table td > code:not(.ds-ref) { padding: 2px 8px; border-radius: 7px; background: var(--ap-fill); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; font-weight: 500; color: var(--ds-text-2); }
@media (min-width: 768px) {
  /* tighter cells leave more room for the text; amounts and numbers never break */
  .ds-admin .ht-table-wrap > .table > :not(caption) > * > * { padding-inline: 12px; }
  .ds-admin .ht-table-wrap > .table > tbody > tr > td { text-wrap: balance; }
  .ds-admin .ht-table-wrap > .table > tbody > tr > td:is(.text-end, .ds-num, .ds-col-actions), .ds-admin .ht-table-wrap > .table .ds-ref { white-space: nowrap; }
  /* a text cell keeps room for about two words a line; a wide table scrolls sideways inside its card, under the pinned
     actions column, whose edge fades so the cut reads as "more this way" */
  .ds-admin .ht-table-wrap > .table > tbody > tr > td:not(.text-end, .ds-num, .ds-col-actions):not(:has(> .ds-pill, > .ds-ref, > input, > code, > .ds-ident)) { min-inline-size: 6.5rem; }
  .ds-admin .ht-table-wrap > .table > tbody > tr > .ds-col-actions::before { content: ""; position: absolute; inset-block: 0; inset-inline-end: 100%; inline-size: 12px; background: linear-gradient(to left, var(--ds-surface), transparent); pointer-events: none; }
  [dir="rtl"].ds-admin .ht-table-wrap > .table > tbody > tr > .ds-col-actions::before { background: linear-gradient(to right, var(--ds-surface), transparent); }
  @media (hover: hover) { .ds-admin .ht-table-wrap > .table > tbody > tr:hover > * { background-color: var(--ds-row-hover); } }
  .ds-admin .ht-card-table > .ht-table-wrap { scrollbar-width: thin; scrollbar-color: var(--ap-fill-hover) transparent; }
}
.ds-admin .ds-pager { padding: 12px var(--ds-card-pad); border-block-start: 1px solid var(--ds-border); }
.ds-admin .ds-pager-info { font-size: 13px; color: var(--ds-text-muted); }
.ds-admin .page-link { border: 0; border-radius: var(--ap-pill); background-color: transparent; color: var(--ds-text-2); }
@media (hover: hover) { .ds-admin .page-link:hover { background-color: var(--ap-fill); color: var(--ds-text-strong); } }
.ds-admin .pagination .page-item.active .page-link { background-color: var(--ds-accent); color: var(--ds-on-accent); }
.ds-admin .pagination .page-item.disabled .page-link { background-color: transparent; opacity: .4; }
.ds-admin .pagination :is(.page-item:first-child, .page-item:last-child) .page-link { border-radius: var(--ap-pill); }
.ds-admin .ht-pagesize select { border-color: transparent; background-color: var(--ap-fill); }

/* ---------------------------------------------------------------- 7. overlays */
.ds-admin .dropdown-menu { padding: 6px; border: 0; border-radius: 14px; background-color: var(--ds-surface); box-shadow: var(--ds-sh-3); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .ds-admin .dropdown-menu { background-color: var(--ap-sheet); -webkit-backdrop-filter: saturate(180%) blur(28px); backdrop-filter: saturate(180%) blur(28px); }
}
.ds-admin .dropdown-item { border-radius: 9px; letter-spacing: -0.006em; }
.ds-admin .dropdown-item:focus-visible { outline: 0; }
@media (hover: hover) {
  .ds-admin .dropdown-item:is(:hover, :focus-visible) { background-color: var(--ds-accent); color: var(--ds-on-accent); }
  .ds-admin .dropdown-item:is(:hover, :focus-visible) > :is(i, svg):first-child { color: var(--ds-on-accent); }
  .ds-admin .dropdown-item:is(.text-danger, .ds-danger):is(:hover, :focus-visible) { background-color: var(--ds-danger-solid); color: #fff !important; }
  .ds-admin .dropdown-item:is(.text-danger, .ds-danger):is(:hover, :focus-visible) > :is(i, svg):first-child { color: #fff; }
}
.ds-admin .dropdown-header { padding: 6px 12px; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ds-text-muted); }
.ds-admin .dropdown-divider { margin: 6px 8px; border-color: var(--ap-hair); opacity: 1; }
.ds-admin .ht-colmenu .ds-check-row { padding-inline: 12px; border-radius: 9px; }
@media (hover: hover) { .ds-admin .ht-colmenu .ds-check-row:hover { background: var(--ap-fill); } }

/* select menus (js/panel/select.js): the list of a <select> opens as a panel menu instead of the system list */
.ds-admin .ap-select { position: fixed; inset: auto; z-index: 1090; margin: 0; max-inline-size: min(360px, calc(100vw - 16px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--ap-fill-hover) transparent; transform-origin: 50% 0; animation: ap-select-in .14s var(--ds-ease-out) both; }
.ds-admin .ap-select--up { transform-origin: 50% 100%; }
.ds-admin .ap-select__opt { gap: 8px; inline-size: 100%; min-block-size: 34px; padding-inline: 8px 14px; border: 0; background: transparent; font-family: inherit; text-align: start; cursor: default; }
.ds-admin .ap-select__opt > i { flex: none; inline-size: 16px; font-size: 14px; visibility: hidden; }
.ds-admin .ap-select__opt[aria-selected="true"] { font-weight: 600; color: var(--ds-text-strong); }
.ds-admin .ap-select__opt[aria-selected="true"] > i { visibility: visible; color: var(--ds-accent-fg); }
/* only the active row is highlighted (hover and focus on their own do nothing), so two rows never light up together */
html.ds.ds-admin .ap-select .ap-select__opt:is(:hover, :focus, :focus-visible, :active) { background-color: transparent; color: var(--ds-text); outline: 0; box-shadow: none; }
html.ds.ds-admin .ap-select .ap-select__opt[aria-selected="true"]:is(:hover, :focus, :focus-visible, :active) { color: var(--ds-text-strong); }
html.ds.ds-admin .ap-select .ap-select__opt:is(:hover, :focus, :focus-visible) > i { color: var(--ds-accent-fg); }
html.ds.ds-admin .ap-select .ap-select__opt.is-active, html.ds.ds-admin .ap-select .ap-select__opt.is-active:is(:hover, :focus, :focus-visible, :active) { background-color: var(--ds-accent); color: var(--ds-on-accent); outline: 0; }
html.ds.ds-admin .ap-select .ap-select__opt.is-active > i { color: var(--ds-on-accent); }
.ds-admin .ap-select__opt[aria-disabled="true"] { opacity: .4; pointer-events: none; }
/* the focus ring of a field is the soft halo; the outline on top of it made a double ring */
.ds-admin :is(.form-control, .form-select):is(:focus, :focus-visible), .ds-admin .form-select.is-open { outline: 0; }
.ds-admin .form-select.is-open { border-color: var(--ds-focus); background-color: var(--ds-surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ds-focus) 18%, transparent); }
@keyframes ap-select-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .ds-admin .ap-select { animation: none; } }

.ds-admin .modal-content { border: 0; border-radius: var(--ds-r-xl); box-shadow: var(--ds-sh-4); }
.ds-admin .modal-header { padding: 20px 24px 8px; border-block-end: 0; }
.ds-admin .modal-title { font-size: 19px; line-height: 24px; font-weight: 700; letter-spacing: -0.02em; }
.ds-admin .modal-body { padding: 12px 24px 20px; }
.ds-admin .modal-footer { padding: 14px 24px 20px; border-block-start: 0; border-end-start-radius: var(--ds-r-xl); border-end-end-radius: var(--ds-r-xl); }
.ds-admin .modal-header .btn-close { inline-size: 30px; block-size: 30px; padding: 0; border-radius: 50%; background-color: var(--ap-fill); background-size: 10px; opacity: 1; }
.ds-admin .modal-header .btn-close:hover { background-color: var(--ap-fill-hover); }
.ds-admin .modal-backdrop { --bs-backdrop-bg: #000; --bs-backdrop-opacity: .36; background-color: #000; }
.ds-admin .modal-backdrop.show { opacity: .36; }
.ds-admin .modal.fade .modal-dialog { transform: translateY(12px) scale(.98); transition: transform .28s var(--ds-ease-out); }
.ds-admin .modal.show .modal-dialog { transform: none; }
.ds-admin .ds-toast { border: 0; border-radius: 16px; box-shadow: var(--ds-sh-3); }
@media (prefers-reduced-motion: reduce) { .ds-admin .modal.fade .modal-dialog, .ds-admin .ds-kpi, .ds-admin :is(.btn, .ds-btn) { transition: none; transform: none; } }

/* ---------------------------------------------------------------- 8. page parts */
/* settings and roles: the section list is a grouped card */
.ds-admin .ht-settings { gap: var(--ds-gap-cards); }
.ds-admin .ht-settings__nav { gap: 2px; padding: 6px; border-radius: var(--ds-card-r); background: var(--ds-surface); box-shadow: var(--ds-sh-card); scrollbar-width: none; }
.ds-admin .ht-settings__nav::-webkit-scrollbar { display: none; }
.ds-admin .ht-settings__nav button { gap: 10px; min-block-size: 40px; padding: 8px 12px; border-radius: calc(var(--ds-card-r) - 8px); font-size: 14px; font-weight: 500; letter-spacing: -0.008em; color: var(--ds-text); transition: background-color .15s var(--ds-ease-out); }
.ds-admin .ht-settings__nav button i { font-size: 18px; color: var(--ds-accent-fg); }
@media (hover: hover) { .ds-admin .ht-settings__nav button:hover { background: var(--ap-fill); } }
.ds-admin .ht-settings__nav button[aria-selected="true"] { background: var(--ds-accent); color: var(--ds-on-accent); font-weight: 600; }
.ds-admin .ht-settings__nav button[aria-selected="true"] i { color: var(--ds-on-accent); }
.ds-admin .ht-settings__nav button:focus-visible { outline: 2px solid var(--ds-focus); outline-offset: -2px; }
@media (min-width: 992px) { .ds-admin .ht-settings { grid-template-columns: 240px minmax(0, 1fr); } .ds-admin .ht-settings__nav { align-self: start; position: sticky; inset-block-start: calc(var(--bo-top) + 16px); } }

.ds-admin .ht-list > li { padding-block: 13px; border-block-end-color: var(--ds-border); }
.ds-admin .ht-list a { font-weight: 500; color: var(--ds-text-strong); text-decoration: none; }
.ds-admin .ht-list a:hover { color: var(--ds-link); }
.ds-admin .ht-list a i { color: var(--ds-accent-fg); }
.ds-admin .ht-bar { block-size: 6px; background: var(--ap-fill); }
.ds-admin .ht-timeline li::before { box-shadow: 0 0 0 4px var(--ds-accent-soft); }
.ds-admin .ht-dl dt { color: var(--ds-text-muted); font-weight: 500; }
.ds-admin .ht-perms :is(th, td) { white-space: nowrap; }
.ds-admin .ds-empty__icon { border-radius: 50%; background: var(--ap-fill); }

/* ---------------------------------------------------------------- 9. small screens */
@media (max-width: 991.98px) {
  /* the menu opens as a rounded sheet that floats over the page */
  .ds-admin .vertical-menu { inset-block: calc(var(--bo-top) + 8px) 8px; inset-inline-start: 8px; inline-size: min(calc(100vw - 16px), 320px); border: 0; border-radius: 22px; background: var(--ds-surface); box-shadow: var(--ds-sh-4); }
  .ds-admin .vertical-collpsed .vertical-menu { inline-size: min(calc(100vw - 16px), 320px) !important; }
  .ds-admin #sidebar-menu ul li a.active, .ds-admin #sidebar-menu ul li ul.sub-menu li a.active { background-color: var(--ds-accent-soft); box-shadow: none; }
  .ds-admin body.sidebar-enable::after { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  @media (max-width: 991.98px) { .ds-admin .vertical-menu { background: var(--ap-sheet); -webkit-backdrop-filter: saturate(180%) blur(28px); backdrop-filter: saturate(180%) blur(28px); } }
}
@media (max-width: 767.98px) {
  .ds-admin .page-title-box { margin-block-end: 16px; }
  .ds-admin .ds-kpi { padding: 14px 16px; }
  .ds-admin .ds-kpi__icon { inline-size: 32px; block-size: 32px; border-radius: 10px; font-size: 16px; }
  .ds-admin .ht-table-bar { padding: 12px 16px; }
  .ds-admin .ht-table-bar .ht-table-search { flex-basis: 100%; max-inline-size: none; }
  .ds-admin .ht-table-bar .ht-table-filter { flex: 1 1 140px; min-inline-size: 0; }
  /* stacked table: each record is a grouped block, the first value is its title */
  .ds-admin .ds-table-stack > tbody { padding: 0; }
  .ds-admin .ds-table-stack > tbody > tr { margin: 0; padding: 10px 16px; border: 0; border-block-end: 8px solid var(--ds-canvas); border-radius: 0; background: var(--ds-surface); box-shadow: none; }
  .ds-admin .ds-table-stack > tbody > tr:last-child { border-block-end: 0; border-end-start-radius: var(--ds-card-r); border-end-end-radius: var(--ds-card-r); }
  .ds-admin .ds-table-stack > tbody > tr:first-child { border-start-start-radius: var(--ds-card-r); border-start-end-radius: var(--ds-card-r); }
  .ds-admin .ht-card-table .ds-table-stack > tbody > tr { border-radius: 0; }
  .ds-admin .ds-table-stack > tbody > tr > td { padding-block: 7px; border-block-end: 0; font-size: 14px; }
  .ds-admin .ds-table-stack > tbody > tr > td[data-label]::before { font-size: 13px; font-weight: 500; color: var(--ds-text-muted); }
  .ds-admin .ds-pager { justify-content: center; padding: 12px 16px; }
  .ds-admin .modal-dialog:not(.modal-fullscreen) { margin: 8px; }
  .ds-admin .modal-header { padding: 16px 18px 6px; }
  .ds-admin .modal-body { padding: 10px 18px 16px; }
  .ds-admin .modal-footer { padding: 12px 18px 16px; }
  .ds-admin .modal-footer > .btn { flex: 1 1 0; }
  .ds-admin .ht-form-actions > :is(.btn, .ds-btn) { flex: 1 1 0; }
  .ds-admin .footer .row { row-gap: 2px; text-align: center; }
  .ds-admin .footer .text-sm-end { text-align: center !important; }
}
/* ---------------------------------------------------------------- 10. alignment and rhythm
   One start edge inside a card (title, text, table), one height for page heads and card heads, no stretched cards. */
/* page head: the same height with or without an action button, so the first row of every page starts at one line */
.ds-admin .page-title-box { align-items: center; min-block-size: 44px; }
.ds-admin .page-title-box > .page-title-right:empty { display: none; }
.ds-admin .ht-row--between { row-gap: 12px; }
/* card heads: one height and one heading size everywhere; a link in the head lines up with the card edge */
.ds-admin .ds-card__head { min-block-size: 32px; }
.ds-admin .ds-card :is(h2, h3):not(.ds-empty__title, .modal-title) { margin-block: 0; font-size: 17px; line-height: 24px; font-weight: 600; letter-spacing: -0.016em; color: var(--ds-text-strong); }
.ds-admin .ds-card__head > :is(.ds-btn--tertiary, .btn-link) { min-block-size: 32px; margin-inline-end: -12px; padding-inline: 12px; }
/* a table in a padded card runs edge to edge, and its first column starts on the card's text edge */
.ds-admin form.ds-card > .table-responsive { margin-inline: calc(var(--ds-card-pad) * -1); }
.ds-admin .table > :last-child > tr:last-child > * { border-block-end: 0; }
.ds-admin .table > tfoot > tr > * { border-block-end-color: var(--ds-border); }
/* row actions sit at the end of the row */
.ds-admin .table td:last-child > .ht-row { justify-content: flex-end; flex-wrap: nowrap; }
.ds-admin :is(.btn, .ds-btn)[aria-label]:has(> i:only-child) { flex: none; inline-size: var(--ds-ctl-md); padding-inline: 0; border-radius: 50%; color: var(--ds-text-2); }
.ds-admin :is(.btn-sm, .ds-btn--sm)[aria-label]:has(> i:only-child) { inline-size: var(--ds-ctl-sm); }
.ds-admin :is(.btn, .ds-btn)[aria-label][data-del]:has(> i:only-child):hover { background: var(--ds-danger-bg); color: var(--ds-danger-fg); }
/* field groups (a "%" in front of a number): one edge colour, round outer corners, square inner corners */
html.ds.ds-admin .input-group > :is(.form-control, .form-select, .input-group-text) { border-color: var(--ap-field); border-radius: var(--ds-ctl-r) !important; }
html.ds.ds-admin .input-group > :not(:first-child):is(.form-control, .form-select, .input-group-text, .btn) { border-start-start-radius: 0 !important; border-end-start-radius: 0 !important; }
html.ds.ds-admin .input-group > :is(.form-control, .form-select, .input-group-text, .btn):has(+ :is(.form-control, .form-select, .input-group-text, .btn)) { border-start-end-radius: 0 !important; border-end-end-radius: 0 !important; }
html.ds.ds-admin .input-group > .form-control:focus { z-index: 3; border-color: var(--ds-focus); }
.ds-admin .ds-form-section__desc { margin-block: -6px 0; font-size: 14px; }
/* detail pages: label / value pairs on an even grid; side cards keep their own height */
.ds-admin .ht-dl { gap: 18px 24px; margin: 0; }
.ds-admin .ht-dl dt { margin-block-end: 2px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ds-text-muted); }
.ds-admin .ht-dl dd { margin: 0; font-size: 15px; line-height: 22px; font-weight: 500; color: var(--ds-text-strong); }
.ds-admin .ht-stack { align-content: start; gap: var(--ds-gap-cards); }
.ds-admin .ht-stack > .ds-card { flex: none; }
.ds-admin .ds-card > :is(h2, h3):first-child { margin-block-end: 8px; }
.ds-admin .table :is(td, th).text-end { white-space: nowrap; }
.ds-admin .table td > .form-control-sm { min-inline-size: 88px; }
.ds-admin .ht-wallet__amount { font-size: 28px; line-height: 1.15; letter-spacing: -0.026em; }
.ds-admin .cf-stars { font-size: 15px; letter-spacing: 1px; color: var(--ds-highlight); }
/* long forms: Cancel / Save stay in reach in a floating bar at the bottom of the window */
.ds-admin .ht-form > .ht-form-actions { position: sticky; inset-block-end: 16px; z-index: 5; inline-size: fit-content; margin-block-start: var(--ds-gap-cards); margin-inline-start: auto; padding: 8px; border-radius: calc(var(--ds-ctl-md) / 2 + 8px); background: var(--ds-surface); box-shadow: var(--ds-sh-3); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .ds-admin .ht-form > .ht-form-actions { background: var(--ap-sheet); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); }
}
.ds-admin[data-radius="sharp"] .ht-form > .ht-form-actions { border-radius: 10px; }
@media (max-width: 767.98px) {
  .ds-admin .ht-form > .ht-form-actions { inset-block-end: 12px; inline-size: auto; margin-inline-start: 0; }
  .ds-admin .ht-row--between > .ht-row:has(> .btn, > .ds-btn) { inline-size: 100%; }
  .ds-admin .ht-row--between > .ht-row > :is(.btn, .ds-btn) { flex: 1 1 auto; }
  .ds-admin .ht-dl { gap: 14px 16px; }
}
/* ---------------------------------------------------------------- 11. tinted KPI tiles and the data table
   KPI tiles: each tile in a row has its own soft tint (a light wash that fades into the card colour), with the icon in
   the same hue. Six hues, repeated. Change a hue here; the wash, the edge and the icon follow it. */
.ds-admin .ds-kpis > .ds-kpi { --kpi: #0A84FF;
  background: linear-gradient(140deg, color-mix(in srgb, var(--kpi) 12%, var(--ds-surface)) 0%, color-mix(in srgb, var(--kpi) 5%, var(--ds-surface)) 55%, color-mix(in srgb, var(--kpi) 2%, var(--ds-surface)) 100%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--kpi) 13%, transparent); }   /* a hairline edge in the tile's hue, no drop shadow */
.ds-admin .ds-kpis > .ds-kpi:nth-child(6n + 2) { --kpi: #30B158; }
.ds-admin .ds-kpis > .ds-kpi:nth-child(6n + 3) { --kpi: #FF9500; }
.ds-admin .ds-kpis > .ds-kpi:nth-child(6n + 4) { --kpi: #FF2D55; }
.ds-admin .ds-kpis > .ds-kpi:nth-child(6n + 5) { --kpi: #AF52DE; }
.ds-admin .ds-kpis > .ds-kpi:nth-child(6n + 6) { --kpi: #30B0C7; }
.ds-admin .ds-kpis > .ds-kpi .ds-kpi__icon { background: color-mix(in srgb, var(--kpi) 18%, var(--ds-surface)); color: color-mix(in srgb, var(--kpi) 74%, var(--ds-text-strong)); }
.ds-admin .ds-kpis > .ds-kpi .ds-kpi__label { color: color-mix(in srgb, var(--kpi) 22%, var(--ds-text-2)); }
@media (hover: hover) { .ds-admin .ds-kpis > a.ds-kpi:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--kpi) 28%, transparent); } }

/* tables: the header is a soft band, rows are divided by a faint line */
.ds-admin .table > thead > tr > * { block-size: 40px; background-color: var(--ds-sunken); border-block-end: 0; font-size: 12px; font-weight: 600; color: var(--ds-text-muted); }
.ds-admin .table > tbody > tr > * { border-block-end: 1px solid color-mix(in srgb, var(--ds-border) 70%, transparent); }
.ds-admin .table > :last-child > tr:last-child > * { border-block-end: 0; }
/* people in a table: initials on a soft colour, a different one from row to row */
.ds-admin .table > tbody > tr { --tint: #0A84FF; }
.ds-admin .table > tbody > tr:nth-child(6n + 2) { --tint: #AF52DE; }
.ds-admin .table > tbody > tr:nth-child(6n + 3) { --tint: #30B158; }
.ds-admin .table > tbody > tr:nth-child(6n + 4) { --tint: #FF9500; }
.ds-admin .table > tbody > tr:nth-child(6n + 5) { --tint: #FF2D55; }
.ds-admin .table > tbody > tr:nth-child(6n + 6) { --tint: #30B0C7; }
.ds-admin .table .ds-ident__media:not(img, .ds-ident__media--thumb) { background: color-mix(in srgb, var(--tint) 15%, var(--ds-surface)); color: color-mix(in srgb, var(--tint) 70%, var(--ds-text-strong)); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
@media (min-width: 768px) {
  /* list tables: the header band and the row highlight are rounded and sit inside the card, clear of its edges */
  .ds-admin .ht-table-bar { padding-block-end: 12px; border-block-end: 0; }
  .ds-admin .ht-card-table .ht-table-wrap { padding: 0 12px 6px; }
  /* a table wider than its card: the pinned actions column goes to the card edge, so nothing shows in the side padding */
  .ds-admin .ht-card-table .ht-table-wrap > .table > * > tr > .ds-col-actions { inset-inline-end: -12px; }
  .ds-admin .ht-table-wrap > .table { border-collapse: separate; border-spacing: 0; }
  .ds-admin .ht-card-table .ht-table-wrap > .table > :not(caption) > * > :first-child { padding-inline-start: 12px; }
  .ds-admin .ht-card-table .ht-table-wrap > .table > :not(caption) > * > :last-child { padding-inline-end: 12px; }
  .ds-admin .ht-table-wrap > .table > thead > tr > :first-child { border-start-start-radius: 12px; border-end-start-radius: 12px; }
  .ds-admin .ht-table-wrap > .table > thead > tr > :last-child { border-start-end-radius: 12px; border-end-end-radius: 12px; }
  .ds-admin .ht-table-wrap > .table > tbody > tr > td { block-size: 62px; padding-block: 10px; transition: background-color .12s var(--ds-ease-out); }
  .ds-admin .ht-table-wrap > .table > tbody > tr > :first-child { border-start-start-radius: 12px; border-end-start-radius: 12px; }
  .ds-admin .ht-table-wrap > .table > tbody > tr > :last-child { border-start-end-radius: 12px; border-end-end-radius: 12px; }
  @media (hover: hover) {
    .ds-admin .ht-table-wrap > .table > tbody > tr:hover > * { background-color: color-mix(in srgb, var(--ds-accent) 5%, var(--ds-surface)); border-block-end-color: transparent; }
    .ds-admin .ht-table-wrap > .table > tbody > tr:has(+ tr:hover) > * { border-block-end-color: transparent; }
    .ds-admin .ht-table-wrap > .table > tbody > tr:hover > .ds-col-actions::before { background: none; }
  }
  .ds-admin .ht-table-wrap > .table > thead > tr > .ds-col-actions, .ds-admin .ht-table-wrap > .table > thead > tr > :last-child { background-color: var(--ds-sunken); }
  .ds-admin .ds-pager { border-block-start: 0; padding-block: 8px 16px; }
}
/* ---------------------------------------------------------------- 12. narrow cards and in-between widths
   A card can be narrow on a wide screen too (three cards in a row beside the side menu), so nothing here depends on the
   window being a phone. */
/* nothing inside a grid may push its card wider than its column */
.ds-admin .ht-grid > *, .ds-admin .ht-stack > *, .ds-admin .ds-kpis > *, .ds-admin .ht-settings > * { min-inline-size: 0; }
.ds-admin .ds-card__head > :is(h2, h3, h4) { min-inline-size: 0; overflow-wrap: anywhere; }
/* "name · bar · amount" rows: the amount always fits; the name gives way first (ellipsis), then the bar gets shorter */
.ds-admin .ht-list > li { min-inline-size: 0; }
.ds-admin .ht-list > li > :first-child { min-inline-size: 0; }
.ds-admin .ht-list > li:has(> .ht-bar) > span:first-child { flex: 0 1 150px; min-inline-size: 0 !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-admin .ht-list > li > .ht-bar { flex: 1 1 48px; min-inline-size: 28px; }
.ds-admin .ht-list > li > :is(b, .ds-num, .ds-count, .ds-pill):last-child { flex: none; white-space: nowrap; }
.ds-admin .ht-list > li > a { display: inline-flex; align-items: center; gap: 10px; overflow: hidden; }
/* card grids open up later, because the side menu takes 264px of the window: two columns from 1200, three from 1400 */
@media (min-width: 768px) and (max-width: 1399.98px) {
  .ds-admin .ht-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ds-admin .ht-grid--3 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  .ds-admin .ht-grid--2, .ds-admin .ht-grid--21 { grid-template-columns: minmax(0, 1fr); }
}
/* a link or tag in a card head keeps to one line; the title beside it wraps instead */
.ds-admin .ds-card__head > :is(a, .btn, .ds-btn, .ds-pill, .ds-demo-tag) { flex: none; white-space: nowrap; }
/* a table in a half-width card: the person keeps a readable width and the table scrolls inside the card if it must */
.ds-admin .ht-panel .table td .ds-ident { min-inline-size: 9.5rem; }
.ds-admin .ht-panel .table > tbody > tr > td { white-space: nowrap; }
/* beside the side menu three tiles are too narrow for the "+9% vs previous period" line: two per row until 1200 */
@media (min-width: 992px) and (max-width: 1199.98px) { .ds-admin .ds-kpis:has(.ds-delta) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ds-admin .ds-delta { max-inline-size: 100%; }
/* charts never get wider than their card */
.ds-admin .ht-chart { min-inline-size: 0; max-inline-size: 100%; }
.ds-admin .ht-chart > canvas { max-inline-size: 100%; }
@media print { .ds-admin :is(.ds-card, .ds-kpi) { box-shadow: none; border: 1px solid #ddd; } }
