/*
 * ds — components of the login (auth layout, field, input, password, checkbox, button, alert) and
 * of the app shell (layouts/ds: skip link, grid, sidebar + nav, top bar + menus, footer).
 *
 * Every selector is a .ds-* class (or scoped under .ds); no element-type globals, no Bootstrap
 * overrides. Values come from tokens.css (--ds-*, brand colours from settings via <x-ds.theme>).
 * Layers: the login primitives are ds.components; the app shell is ds.shell, one layer above, so
 * the generic content rules (e.g. .dropdown-menu in overlays.css) never restyle the shell menus,
 * which reuse Bootstrap's dropdown classes. The few declarations that must beat a legacy
 * !important (or a script's inline style) sit in the @layer ds-override block at the end.
 *
 * Sections: auth layout · helpers · field · input · password · checkbox · button · alert ·
 * app shell · motion · overrides.
 */

@layer ds.components {

.ds {
    font-family: var(--ds-font);
    font-size: var(--ds-text-md);
    line-height: var(--ds-leading);
    color: var(--ds-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.ds *, .ds *::before, .ds *::after { box-sizing: border-box; }

.ds-page { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--ds-surface); }

.ds-sr-only {
    position: absolute; width: var(--ds-space-px); height: var(--ds-space-px); padding: 0; margin: calc(-1 * var(--ds-space-px));
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ───────────────────────── auth layout ───────────────────────── */

.ds-auth {
    --ds-control-h: var(--ds-control-h-lg);   /* roomier controls on the login than in the app */
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 100vh;
    min-height: 100dvh;
}

.ds-auth__brand {
    position: relative;
    display: flex;
    align-items: center;
    padding: var(--ds-space-5) var(--ds-space-4);
    background: var(--ds-dark);
    color: var(--ds-dark-ink);
}

.ds-auth__logo {
    display: inline-flex;
    border-radius: var(--ds-radius-sm);
}
.ds-auth__logo:focus-visible { outline: var(--ds-focus-width) solid var(--ds-primary); outline-offset: calc(2 * var(--ds-focus-offset)); }
.ds-auth__logo-img { display: block; height: var(--ds-auth-logo-h); width: auto; max-width: var(--ds-auth-logo-max); object-fit: contain; }

.ds-auth__tagline,
.ds-auth__marks { display: none; }

.ds-auth__main {
    display: flex;
    flex-direction: column;
    padding: var(--ds-space-8) var(--ds-space-4) var(--ds-space-6);
}

.ds-auth__panel {
    width: 100%;
    max-width: var(--ds-auth-panel-w);
    margin: 0 auto;
}

.ds-auth__heading {
    margin: 0 0 var(--ds-space-6);
    font-size: var(--ds-text-3xl);
    line-height: var(--ds-leading-tight);
    font-weight: var(--ds-weight-semibold);
    letter-spacing: var(--ds-tracking-tight);
}

.ds-auth__foot {
    margin: auto auto 0;
    padding-top: var(--ds-space-10);
    width: 100%;
    max-width: var(--ds-auth-panel-w);
    font-size: var(--ds-text-xs);
    color: var(--ds-text-muted);
}

@media (min-width: 40rem) {   /* ≥ 640: tablet portrait — centre the form in the page */
    .ds-auth__brand { padding: var(--ds-space-6) var(--ds-space-8); }
    .ds-auth__logo-img { height: var(--ds-auth-logo-h-tablet); }
    .ds-auth__main { justify-content: center; padding: var(--ds-space-12) var(--ds-space-8) var(--ds-space-6); }
    .ds-auth__panel { margin: auto auto 0; }
    .ds-auth__foot { margin: auto auto 0; }
}

@media (min-width: 60rem) {   /* ≥ 960: split — brand column + form column */
    .ds-auth {
        grid-template-rows: none;
        grid-template-columns: minmax(var(--ds-auth-brand-min), 5fr) 7fr;
    }
    .ds-auth__brand {
        flex-direction: column;
        align-items: flex-start;
        justify-content: space-between;
        padding: var(--ds-space-16) var(--ds-space-16) var(--ds-space-12);
    }
    .ds-auth__logo-img { height: var(--ds-auth-logo-h-split); max-width: var(--ds-auth-logo-max-split); }

    .ds-auth__tagline {
        display: block;
        max-width: var(--ds-auth-tagline-w);
        margin: 0;
        padding-top: var(--ds-space-5);
        border-top: var(--ds-rule-strong) solid var(--ds-primary);
        font-size: var(--ds-text-md);
        line-height: var(--ds-leading-relaxed);
        opacity: .86;
        display: -webkit-box;
        -webkit-line-clamp: 5;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* printer's crop marks at the four corners of the brand column */
    .ds-auth__marks { display: block; position: absolute; inset: var(--ds-space-6); pointer-events: none; }
    .ds-auth__mark { position: absolute; width: var(--ds-auth-mark); height: var(--ds-auth-mark); border: 0 solid var(--ds-primary); opacity: .7; }
    .ds-auth__mark--tl { top: 0; left: 0; border-top-width: var(--ds-border-width); border-left-width: var(--ds-border-width); }
    .ds-auth__mark--tr { top: 0; right: 0; border-top-width: var(--ds-border-width); border-right-width: var(--ds-border-width); }
    .ds-auth__mark--bl { bottom: 0; left: 0; border-bottom-width: var(--ds-border-width); border-left-width: var(--ds-border-width); }
    .ds-auth__mark--br { bottom: 0; right: 0; border-bottom-width: var(--ds-border-width); border-right-width: var(--ds-border-width); }

    .ds-auth__main { padding: var(--ds-space-16) var(--ds-space-16) var(--ds-space-8); }
}

/*
 * 22-Nov-2026 (Dede: "buatlah menjadi lebih bagus … terlihat profesional"): on a phone the brand bar becomes a
 * short dark hero — the logo centred, the printer's crop marks and a halftone dot field (the print shop's own
 * texture) fading out from one corner — and the form sits on a white sheet with rounded top corners that slides
 * a little over it, like an app. One memorable element (the halftone); everything else stays quiet.
 * From 960px the split layout below takes over again, with the same halftone in the brand column.
 */
.ds-auth__brand { overflow: hidden; isolation: isolate; }
.ds-auth__brand::before,
.ds-auth__brand::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: calc(-1 * var(--ds-z-raised)); }
.ds-auth__brand::before {   /* halftone: dots that shrink and fade towards the opposite corner */
    background-image: radial-gradient(circle, var(--ds-primary) var(--ds-auth-dot), transparent var(--ds-auth-dot-edge));
    background-size: var(--ds-auth-dot-gap) var(--ds-auth-dot-gap);
    opacity: .28;
    -webkit-mask-image: var(--ds-auth-dot-fade);
            mask-image: var(--ds-auth-dot-fade);
}
.ds-auth__brand::after {    /* a soft lime glow behind the dots */
    background: radial-gradient(70% 60% at 100% 0%, color-mix(in srgb, var(--ds-primary) 16%, transparent), transparent 70%);
}
.ds-auth__sub {
    margin: calc(-1 * var(--ds-space-4)) 0 var(--ds-space-6);
    font-size: var(--ds-text-md);
    line-height: var(--ds-leading-snug);
    color: var(--ds-text-muted);
}

@media (max-width: 59.99rem) {
    .ds-auth__brand {
        justify-content: center;
        min-height: var(--ds-auth-hero-min);
        padding: var(--ds-space-8) var(--ds-space-6) calc(var(--ds-space-8) + var(--ds-auth-sheet-lap));
    }
    .ds-auth__logo-img { height: var(--ds-auth-logo-h-phone); max-width: var(--ds-auth-logo-max-phone); }
    .ds-auth__marks { display: block; position: absolute; inset: var(--ds-space-4) var(--ds-space-4) calc(var(--ds-space-4) + var(--ds-auth-sheet-lap)); pointer-events: none; }
    .ds-auth__mark { position: absolute; width: var(--ds-auth-mark-phone); height: var(--ds-auth-mark-phone); border: 0 solid var(--ds-primary); opacity: .55; }
    .ds-auth__mark--tl { top: 0; left: 0; border-top-width: var(--ds-border-width); border-left-width: var(--ds-border-width); }
    .ds-auth__mark--tr { top: 0; right: 0; border-top-width: var(--ds-border-width); border-right-width: var(--ds-border-width); }
    .ds-auth__mark--bl { bottom: 0; left: 0; border-bottom-width: var(--ds-border-width); border-left-width: var(--ds-border-width); }
    .ds-auth__mark--br { bottom: 0; right: 0; border-bottom-width: var(--ds-border-width); border-right-width: var(--ds-border-width); }
    .ds-auth__main {
        position: relative;
        z-index: var(--ds-z-raised);
        margin-top: calc(-1 * var(--ds-auth-sheet-lap));
        padding-top: var(--ds-space-8);
        background: var(--ds-surface);
        border-radius: var(--ds-auth-sheet-radius) var(--ds-auth-sheet-radius) 0 0;
        box-shadow: var(--ds-auth-sheet-shadow);
    }
    .ds-auth__foot { text-align: center; }
}

/* ─────────────── auth: brand column extras · one-time code ─────────────── */

/*
 * The brand column's foot. The tagline used to be the last flex item of .ds-auth__brand; it now
 * shares a wrapper with the optional brand slot so both sit together at the bottom of the column
 * while the logo stays at the top. Hidden below 960, like the tagline always was — under that the
 * brand column is a bar, and the form is the page.
 */
.ds-auth__brand-foot { display: none; }

/*
 * The handful of things a customer wants settled before they type their phone number in. Deliberately
 * quiet: a rule, a label, a line of explanation. No icon circles — the column already carries the
 * brand, and three coloured badges would compete with it.
 */
.ds-auth__points { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--ds-space-4); }
.ds-auth__point { display: grid; gap: var(--ds-space-1); padding-left: var(--ds-space-4); border-left: var(--ds-rule-strong) solid var(--ds-primary); }
.ds-auth__point b { font-weight: var(--ds-weight-semibold); font-size: var(--ds-text-sm); }
.ds-auth__point span { font-size: var(--ds-text-sm); line-height: var(--ds-leading-relaxed); opacity: .72; }

/*
 * One-time code entry: six boxes that behave as one field.
 *
 * The group is labelled and described once (the view wires aria-describedby), each box is a single
 * character, and the boxes grow with the panel so the row never overflows a narrow phone.
 */
.ds-otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--ds-space-2); }
.ds-otp__box {
    width: 100%;
    height: var(--ds-control-h);
    padding: 0;
    text-align: center;
    font-size: var(--ds-text-xl);
    font-weight: var(--ds-weight-semibold);
    font-variant-numeric: tabular-nums;
    color: var(--ds-text);
    background: var(--ds-surface);
    border: var(--ds-border-width) solid var(--ds-border);
    border-radius: var(--ds-radius-md);
}
.ds-otp__box:focus-visible { outline: var(--ds-focus-width) solid var(--ds-primary); outline-offset: var(--ds-focus-offset); border-color: var(--ds-primary); }
.ds-otp__box.is-filled { border-color: var(--ds-text); }
.ds-field.is-invalid .ds-otp__box { border-color: var(--ds-danger); }

/* Small print under an auth form: reassurance, a way out, a link to a human. */
.ds-auth__note {
    margin: var(--ds-space-5) 0 0;
    font-size: var(--ds-text-sm);
    line-height: var(--ds-leading-relaxed);
    color: var(--ds-text-muted);
}
.ds-auth__note + .ds-auth__note { margin-top: var(--ds-space-2); }
.ds-auth__note a { color: var(--ds-text); text-underline-offset: .2em; }

@media (min-width: 60rem) {
    .ds-auth__brand-foot { display: grid; gap: var(--ds-space-8); }
}

/* ───────────────────────── stack / row helpers ───────────────────────── */

.ds-stack > * + * { margin-top: var(--ds-space-5); }
.ds-stack > .ds-row { margin-top: var(--ds-space-3); }   /* the row's touch targets already add air */

.ds-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--ds-space-2) var(--ds-space-4);
}

/* ───────────────────────── field ───────────────────────── */

.ds-field { display: flex; flex-direction: column; gap: var(--ds-space-2); }

.ds-field__label {
    font-size: var(--ds-text-sm);
    font-weight: var(--ds-weight-medium);
    line-height: var(--ds-leading-tight);
    color: var(--ds-text);
}
.ds-field__req { color: var(--ds-text-muted); font-weight: var(--ds-weight-regular); }

.ds-field__hint { margin: 0; font-size: var(--ds-text-xs); color: var(--ds-text-muted); }

.ds-field__error {
    display: flex;
    align-items: flex-start;
    gap: var(--ds-space-2);
    margin: 0;
    font-size: var(--ds-text-xs);
    line-height: var(--ds-leading-snug);
    color: var(--ds-danger);
}
.ds-field__error svg { flex: none; width: var(--ds-glyph-sm); height: var(--ds-glyph-sm); margin-top: var(--ds-space-px); }

/* ───────────────────────── input ───────────────────────── */

.ds-input {
    display: block;
    width: 100%;
    height: var(--ds-control-h);
    margin: 0;
    padding: 0 var(--ds-space-4);
    font: inherit;
    font-size: var(--ds-text-md);    /* 16px: no iOS zoom on focus */
    color: var(--ds-text);
    background: var(--ds-surface);
    border: var(--ds-border-width) solid var(--ds-border-strong);
    border-radius: var(--ds-radius);
    appearance: none;
    transition: border-color var(--ds-dur) var(--ds-ease), box-shadow var(--ds-dur) var(--ds-ease);
}
.ds-input::placeholder { color: var(--ds-placeholder); opacity: 1; }
.ds-input:hover { border-color: var(--ds-text-muted); }
.ds-input:focus { outline: none; }
.ds-input:focus-visible,
.ds-input:focus {
    border-color: var(--ds-focus);
    box-shadow: var(--ds-focus-ring-lg);
}
.ds-input[aria-invalid="true"] { border-color: var(--ds-danger); }
.ds-input[aria-invalid="true"]:focus { box-shadow: var(--ds-focus-ring-lg-danger); }
.ds-input--sm { height: var(--ds-shell-target); padding: 0 var(--ds-space-3); font-size: var(--ds-text-sm); }
.ds-input:disabled { background: var(--ds-canvas); color: var(--ds-text-muted); cursor: not-allowed; }
.ds-input:-webkit-autofill { -webkit-box-shadow: inset 0 0 0 100vmax var(--ds-surface); -webkit-text-fill-color: var(--ds-text); }
.ds-input:-webkit-autofill:focus { -webkit-box-shadow: inset 0 0 0 100vmax var(--ds-surface), var(--ds-focus-ring-lg); }

/* ───────────────────────── password (input + toggle) ───────────────────────── */

.ds-password { position: relative; }
.ds-password .ds-input { padding-right: calc(var(--ds-control-h) + var(--ds-space-1)); }
.ds-password .ds-input::-ms-reveal { display: none; }

.ds-password__toggle {
    position: absolute;
    top: calc(2 * var(--ds-space-px));
    right: calc(2 * var(--ds-space-px));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: calc(var(--ds-control-h) - 4 * var(--ds-space-px));
    height: calc(var(--ds-control-h) - 4 * var(--ds-space-px));
    padding: 0;
    color: var(--ds-text-muted);
    background: transparent;
    border: 0;
    border-radius: calc(var(--ds-radius) - 2 * var(--ds-space-px));
    cursor: pointer;
}
.ds-password__toggle:hover { color: var(--ds-text); background: var(--ds-canvas); }
.ds-password__toggle:focus-visible { outline: var(--ds-focus-outline); outline-offset: calc(-1 * var(--ds-focus-offset)); color: var(--ds-text); }
.ds-password__toggle svg { width: var(--ds-glyph-lg); height: var(--ds-glyph-lg); }
.ds-password__toggle .ds-icon-hide,
.ds-password__toggle[aria-pressed="true"] .ds-icon-show { display: none; }
.ds-password__toggle[aria-pressed="true"] .ds-icon-hide { display: block; }

/* ───────────────────────── checkbox ───────────────────────── */

.ds-checkbox {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--ds-space-3);
    min-height: var(--ds-target);   /* incl. label */
    font-size: var(--ds-text-sm);
    color: var(--ds-text);
    cursor: pointer;
    user-select: none;
}
.ds-checkbox__input {
    position: absolute;
    left: 0;
    top: 50%;
    width: var(--ds-auth-check);
    height: var(--ds-auth-check);
    margin: calc(var(--ds-auth-check) / -2) 0 0;
    opacity: 0;
    cursor: pointer;
}
.ds-checkbox__box {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--ds-auth-check);
    height: var(--ds-auth-check);
    color: transparent;
    background: var(--ds-surface);
    border: var(--ds-border-width) solid var(--ds-border-strong);
    border-radius: var(--ds-radius-xs);
    transition: background-color var(--ds-dur) var(--ds-ease), border-color var(--ds-dur) var(--ds-ease);
}
.ds-checkbox__box svg { width: var(--ds-glyph-xs); height: var(--ds-glyph-xs); }
.ds-checkbox:hover .ds-checkbox__box { border-color: var(--ds-text-muted); }
.ds-checkbox__input:checked + .ds-checkbox__box { background: var(--ds-dark); border-color: var(--ds-dark); color: var(--ds-dark-ink); }
.ds-checkbox__input:focus-visible + .ds-checkbox__box { outline: var(--ds-focus-outline); outline-offset: var(--ds-focus-offset); box-shadow: var(--ds-focus-halo-lg); }
.ds-checkbox__input:disabled + .ds-checkbox__box { background: var(--ds-canvas); }

/* ───────────────────────── button ───────────────────────── */

.ds-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--ds-space-2);
    min-height: var(--ds-control-h);
    padding: 0 var(--ds-space-6);
    font: inherit;
    font-size: var(--ds-text-md);
    font-weight: var(--ds-weight-semibold);
    line-height: var(--ds-leading-tight);
    text-decoration: none;
    border: var(--ds-border-width) solid transparent;
    border-radius: var(--ds-radius);
    cursor: pointer;
    transition: background-color var(--ds-dur) var(--ds-ease), border-color var(--ds-dur) var(--ds-ease), transform var(--ds-dur) var(--ds-ease);
}
.ds-btn:focus-visible { outline: var(--ds-focus-outline); outline-offset: var(--ds-focus-offset); }
.ds-btn:active { transform: translateY(var(--ds-space-px)); }
.ds-btn--block { display: flex; width: 100%; }

.ds-btn--primary { color: var(--ds-primary-ink); background: var(--ds-primary); border-color: var(--ds-primary-edge); }
.ds-btn--primary:hover { color: var(--ds-primary-ink); background: color-mix(in srgb, var(--ds-primary) 86%, var(--ds-dark)); }

.ds-btn--secondary { color: var(--ds-text); background: var(--ds-surface); border-color: var(--ds-border-strong); }
.ds-btn--secondary:hover { color: var(--ds-text); background: var(--ds-canvas); }

.ds-btn--link {
    min-height: var(--ds-target);
    padding: 0 var(--ds-space-1);
    margin-inline: calc(-1 * var(--ds-space-1));   /* room for the focus ring, text stays aligned */
    font-size: var(--ds-text-sm);
    font-weight: var(--ds-weight-medium);
    color: var(--ds-dark);
    background: none;
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
    text-underline-offset: var(--ds-underline-offset);
}
.ds-btn--link:hover { color: var(--ds-dark); text-decoration-color: currentColor; }

.ds-btn[aria-disabled="true"], .ds-btn:disabled { cursor: not-allowed; opacity: .6; transform: none; }
.ds-btn.is-busy { cursor: progress; opacity: 1; }
.ds-btn.is-busy .ds-btn__label { opacity: .7; }
.ds-btn__spinner {
    display: none;
    width: var(--ds-glyph-sm);
    height: var(--ds-glyph-sm);
    border: var(--ds-rule-strong) solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: ds-spin .7s linear infinite;
}
.ds-btn.is-busy .ds-btn__spinner { display: inline-block; }

@keyframes ds-spin { to { transform: rotate(360deg); } }

/* ───────────────────────── alert ───────────────────────── */

.ds-alert {
    display: flex;
    gap: var(--ds-space-3);
    padding: var(--ds-space-3) var(--ds-space-4);
    font-size: var(--ds-text-sm);
    line-height: var(--ds-leading-snug);
    border: var(--ds-border-width) solid;
    border-radius: var(--ds-radius);
}
.ds-alert svg { flex: none; width: var(--ds-glyph-md); height: var(--ds-glyph-md); margin-top: var(--ds-space-px); }
.ds-alert__title { display: block; font-weight: var(--ds-weight-semibold); }
.ds-alert--success { color: var(--ds-success); background: var(--ds-success-bg); border-color: var(--ds-success-border); }
.ds-alert--error { color: var(--ds-danger); background: var(--ds-danger-bg); border-color: var(--ds-danger-border); }
.ds-alert--info { color: var(--ds-info); background: var(--ds-info-bg); border-color: var(--ds-info-border); }

}   /* @layer ds.components */

@layer ds.shell {

/* ───────────────────────── app shell (layouts/ds) ─────────────────────────
 *
 * L-shaped chrome around the untouched page content: sidebar (settings: sidebar bg/text) on the
 * left, top bar (settings: navbar bg/text) over the content, one-line footer under it. The chrome
 * roots carry .ds; page content inside .ds-shell__main is restyled by base.css, layout.css and
 * the other content files (scoped .ds-shell), never by this file.
 *
 *   ≥ 992px  sidebar docked; [data-rail] = 72px icon rail that opens over the content on hover or
 *            keyboard focus. Rail is the default below 1200px; the choice is remembered per user.
 *   < 992px  sidebar is an off-canvas drawer ([data-drawer="open"]) over a backdrop.
 *
 * The ds shell does not load global-radius.css / density.css / page-header.css (see
 * layouts/ds/assets), so the radii here need no !important.
 */

/* The legacy theme sets overflow-x: hidden on <html> and <body>; that turns both into scroll containers
   that never scroll, so the docked sidebar's position: sticky had nothing to stick to and scrolled away
   with the page (23-Oct). clip hides sideways overflow without creating a scroll container. */
html:has(> body.ds-body), body.ds-body { overflow-x: clip; overflow-y: visible; }

.ds-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
}

.ds-shell__col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
}

/* content: no padding of its own (pages bring .content-wrapper / .container-fluid); the first
   child grows so the footer sits at the bottom of short pages — same rule the classic shell had. */
.ds-shell__main {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    min-width: 0;
}
.ds-shell__main > .content-wrapper,
.ds-shell__main > .container-fluid,
.ds-shell__main > div:first-child { flex: 1 0 auto; }
.ds-shell__main:focus { outline: none; }

.ds-side, .ds-side__panel, .ds-side__brand, .ds-nav, .ds-nav__list, .ds-nav__sub, .ds-nav__item,
.ds-nav__header, .ds-bar, .ds-foot, .ds-strip, .ds-backdrop, .ds-skip:not(:focus) { border-radius: 0; }

/* ── skip link ── */
.ds-skip {
    position: fixed;
    top: var(--ds-space-2);
    left: var(--ds-space-2);
    z-index: var(--ds-z-skip);
    padding: var(--ds-space-3) var(--ds-space-4);
    font-weight: var(--ds-weight-semibold);
    color: var(--ds-dark-ink);
    background: var(--ds-dark);
    border-radius: var(--ds-radius-sm);
    transform: translateY(-200%);
}
.ds-skip:focus { transform: none; outline: var(--ds-focus-width) solid var(--ds-primary); outline-offset: var(--ds-focus-offset); color: var(--ds-dark-ink); }

/* ── strips above the content (impersonation, subscription) ── */
.ds-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--ds-space-2) var(--ds-space-4);
    padding: var(--ds-space-2) var(--ds-space-4);
    font-size: var(--ds-text-sm);
    line-height: var(--ds-leading-snug);
    border-bottom: var(--ds-border-width) solid;
}
.ds-strip__text { flex: 1 1 var(--ds-strip-text-min); margin: 0; }
.ds-strip form { margin: 0; }
.ds-strip--danger { color: var(--ds-danger); background: var(--ds-danger-bg); border-color: var(--ds-danger-border); }
/* impersonation: sticky under the top bar, one line on a phone (layouts/ds/shell) */
.ds-strip--impersonate {
    position: sticky;
    top: var(--ds-bar-h);
    z-index: calc(var(--ds-z-sticky) - 1);
    flex-wrap: nowrap;
    gap: var(--ds-space-2);
    padding: var(--ds-space-1) var(--ds-page-pad-x);
}
.ds-strip--impersonate .ds-strip__text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-strip--impersonate .ds-btn { min-height: var(--ds-control-h-sm); padding-inline: var(--ds-space-3); white-space: nowrap; gap: var(--ds-space-1); }
.ds-strip--impersonate .ds-strip__meta, .ds-strip--impersonate .ds-strip__long { display: none; }
@media (min-width: 36rem) {
    .ds-strip--impersonate .ds-strip__meta, .ds-strip--impersonate .ds-strip__long { display: inline; }
    .ds-strip--impersonate .ds-strip__short { display: none; }
}
.ds-strip--info { color: var(--ds-info); background: var(--ds-info-bg); border-color: var(--ds-info-border); }
.ds-strip--warning { color: var(--ds-warning-text); background: var(--ds-warning-bg); border-color: var(--ds-warning-border); }
.ds-strip .ds-btn { min-height: var(--ds-shell-target-sm); padding: 0 var(--ds-space-3); font-size: var(--ds-text-sm); border-radius: var(--ds-radius-sm); }

/* ── announcement ticker under the top bar (components/ds/announcement-ticker, js/ticker.js): a brand pill, then the
      notices running right to left (category chip · bold title · text, a dot between notices). Two identical tracks
      slide by their own width, so the line loops without a jump; paused on hover / focus, still for reduced motion ── */
.ds-ticker {
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--ds-space-3);
    min-height: var(--ds-space-10);
    padding-block: var(--ds-space-1);
    color: var(--ds-text);
    background: var(--ds-surface);
    border-color: var(--ds-border);
}
.ds-ticker[hidden] { display: none; }
/* "Announcements": the brand dark with its own ink (the theme guarantees the contrast; --ds-solid/--ds-primary-ink
   are not a pair — on a lime primary the ink is dark, which left a black blob without text) */
.ds-ticker__label {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: var(--ds-space-1);
    min-height: calc(var(--ds-space-6) + var(--ds-space-1));
    padding: 0 var(--ds-space-3);
    font-size: var(--ds-text-xs);
    font-weight: var(--ds-weight-semibold);
    line-height: var(--ds-leading-tight);
    color: var(--ds-dark-ink);
    text-decoration: none;
    background: var(--ds-dark);
    border-radius: var(--ds-radius-pill);
}
.ds-ticker__label .mdi { font-size: var(--ds-text-sm); line-height: var(--ds-leading-none); }
.ds-ticker__label:hover,
.ds-ticker__label:focus-visible { color: var(--ds-dark-ink); filter: brightness(1.15); }
.ds-ticker__count {
    min-width: calc(var(--ds-space-4) + var(--ds-space-1));
    padding: 0 var(--ds-space-1);
    font-size: var(--ds-text-xs);
    line-height: calc(var(--ds-space-4) + var(--ds-space-1));
    text-align: center;
    color: var(--ds-dark);
    background: var(--ds-dark-ink);
    border-radius: var(--ds-radius-pill);
}
.ds-ticker__viewport {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    min-width: 0;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, black var(--ds-space-6), black calc(100% - var(--ds-space-6)), transparent);
}
.ds-ticker__track {
    display: flex;
    flex: none;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
    white-space: nowrap;
    animation: ds-ticker var(--ds-ticker-duration, 30s) linear infinite;
}
.ds-ticker__item { display: inline-flex; align-items: center; }
/* a quiet dot between notices (and after the last one, before the copy starts again) */
.ds-ticker__item::after {
    content: "";
    flex: none;
    width: calc(var(--ds-space-1) + var(--ds-space-px));
    height: calc(var(--ds-space-1) + var(--ds-space-px));
    margin-inline: var(--ds-space-6);
    background: var(--ds-border-strong);
    border-radius: var(--ds-radius-pill);
}
.ds-ticker__item > a {
    display: inline-flex;
    align-items: center;
    gap: var(--ds-space-2);
    min-height: calc(var(--ds-space-6) + var(--ds-space-1));
    color: inherit;
    text-decoration: none;
    border-radius: var(--ds-radius-sm);
}
.ds-ticker__item > a:hover .ds-ticker__title,
.ds-ticker__item > a:focus-visible .ds-ticker__title { text-decoration: underline; }
.ds-ticker__pin { flex: none; font-size: var(--ds-text-sm); line-height: var(--ds-leading-none); color: var(--ds-accent); }
.ds-ticker__cat {
    flex: none;
    padding: var(--ds-space-px) var(--ds-space-2);
    font-size: var(--ds-text-xs);
    font-weight: var(--ds-weight-medium);
    line-height: var(--ds-leading-tight);
    color: var(--ds-text-muted);
    background: var(--ds-surface-2);
    border: var(--ds-border-width) solid var(--ds-border);
    border-radius: var(--ds-radius-pill);
}
.ds-ticker__title { font-size: var(--ds-text-sm); font-weight: var(--ds-weight-semibold); color: var(--ds-text); }
.ds-ticker__text { font-size: var(--ds-text-sm); color: var(--ds-text-muted); }
.ds-ticker:hover .ds-ticker__track { animation-play-state: paused; }
.ds-ticker:focus-within .ds-ticker__track { animation-play-state: paused; }
.ds-ticker__close { flex: none; margin-left: auto; }
/* everything fits (ticker.js measures): the notices stand still, left-aligned — no running line, no second copy,
   no fade at the edges and no dot after the last one */
.ds-ticker[data-ds-ticker-static] .ds-ticker__track { animation: none; }
.ds-ticker[data-ds-ticker-static] .ds-ticker__track[aria-hidden] { display: none; }
.ds-ticker[data-ds-ticker-static] .ds-ticker__viewport { mask-image: none; }
.ds-ticker[data-ds-ticker-static] .ds-ticker__item:last-child::after { display: none; }
@keyframes ds-ticker { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
    .ds-ticker__track { animation: none; }
    .ds-ticker__track[aria-hidden] { display: none; }
    .ds-ticker__viewport { overflow-x: auto; mask-image: none; }
}
@media (max-width: 47.99rem) {
    .ds-ticker { gap: var(--ds-space-2); padding-inline: var(--ds-space-3); }
    .ds-ticker__label { padding: 0 var(--ds-space-2); }
    .ds-ticker__label-text { display: none; }
    .ds-ticker__text { display: none; }   /* a phone shows category + title; the notice opens on tap */
}

/* ───────── sidebar ───────── */

.ds-side {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: var(--ds-z-drawer);         /* drawer: above the sticky bar, below Bootstrap modals */
    width: min(var(--ds-side-w), 86vw);
    color: var(--ds-side-ink);
    background: var(--ds-side);
    transform: translateX(-100%);
    visibility: hidden;                  /* closed drawer: out of the tab order and the a11y tree */
    transition: transform var(--ds-dur-slow) var(--ds-ease), visibility 0s linear var(--ds-dur-slow);
}
.ds-shell[data-drawer="open"] .ds-side {
    transform: none;
    visibility: visible;
    transition: transform var(--ds-dur-slow) var(--ds-ease), visibility 0s;
    box-shadow: 0 0 0 100vmax var(--ds-scrim);   /* doubles as the backdrop tint */
}

.ds-backdrop {
    position: fixed;
    inset: 0;
    z-index: var(--ds-z-drawer-backdrop);
    display: none;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: default;
}
.ds-shell[data-drawer="open"] .ds-backdrop { display: block; }

.ds-side__panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: var(--ds-side);
}

.ds-side__brand {
    flex: none;
    display: flex;
    align-items: center;
    gap: var(--ds-space-2);
    height: var(--ds-bar-h);
    padding: 0 var(--ds-space-3) 0 var(--ds-space-4);
    border-bottom: var(--ds-border-width) solid color-mix(in srgb, var(--ds-side-ink) 12%, transparent);
}
.ds-side__logo {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    height: var(--ds-target);
    border-radius: var(--ds-radius-sm);
}
.ds-side__logo:focus-visible { outline: var(--ds-focus-width) solid var(--ds-side-ink); outline-offset: var(--ds-focus-offset); }
.ds-side__logo img { display: block; height: var(--ds-side-logo-h); width: auto; max-width: var(--ds-side-logo-max); object-fit: contain; border-radius: var(--ds-radius-xs); }
.ds-side__logo .ds-side__logo-mini { display: none; height: var(--ds-side-logo-h); width: var(--ds-side-logo-h); object-fit: contain; }

.ds-side__brand .ds-side__close { margin-left: auto; }

.ds-side__search {
    flex: none;
    position: relative;
    padding: var(--ds-space-3) var(--ds-space-3) var(--ds-space-1);
}
.ds-side__search .mdi {
    position: absolute;
    left: calc(var(--ds-space-3) + var(--ds-space-2));
    top: calc(var(--ds-space-3) + var(--ds-shell-target-sm) / 2);   /* the filter's centre line */
    transform: translateY(-50%);
    font-size: var(--ds-glyph-md);
    line-height: var(--ds-leading-none);
    opacity: .6;
    pointer-events: none;
}
.ds-side__filter {
    display: block;
    width: 100%;
    height: var(--ds-shell-target-sm);
    margin: 0;
    padding: 0 var(--ds-space-3) 0 calc(2 * var(--ds-space-2) + var(--ds-glyph-md));
    font: inherit;
    font-size: var(--ds-text-sm);
    color: var(--ds-side-ink);
    background: color-mix(in srgb, var(--ds-side-ink) 7%, transparent);
    border: var(--ds-border-width) solid color-mix(in srgb, var(--ds-side-ink) 16%, transparent);
    border-radius: var(--ds-radius-sm);
    appearance: none;
}
.ds-side__filter::placeholder { color: color-mix(in srgb, var(--ds-side-ink) 62%, transparent); opacity: 1; }
.ds-side__filter:focus { outline: var(--ds-focus-width) solid var(--ds-side-ink); outline-offset: var(--ds-space-px); border-color: transparent; }
.ds-side__filter::-webkit-search-cancel-button { filter: grayscale(1); }
.ds-side__filter { padding-right: calc(var(--ds-space-3) + var(--ds-space-12)); }   /* room for the shortcut hint */
/* The Ctrl K / ⌘K hint inside the filter (ds.js sets the text per platform); gone once typing starts. */
.ds-side__kbd {
    position: absolute;
    right: calc(var(--ds-space-3) + var(--ds-space-2));
    top: calc(var(--ds-space-3) + var(--ds-shell-target-sm) / 2);
    transform: translateY(-50%);
    padding: 0 var(--ds-space-1);
    font: inherit;
    font-size: var(--ds-text-xs);
    line-height: 1.5;
    color: color-mix(in srgb, var(--ds-side-ink) 70%, transparent);
    background: transparent;
    border: var(--ds-border-width) solid color-mix(in srgb, var(--ds-side-ink) 22%, transparent);
    border-radius: var(--ds-radius-xs);
    pointer-events: none;
}
.ds-side__filter:not(:placeholder-shown) + .ds-side__kbd { display: none; }

.ds-side__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: var(--ds-space-2) 0 var(--ds-space-6);
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--ds-side-ink) 22%, transparent) transparent;
}

.ds-side__empty {
    margin: var(--ds-space-3) var(--ds-space-4);
    font-size: var(--ds-text-sm);
    color: color-mix(in srgb, var(--ds-side-ink) 72%, transparent);
}

/* subscription blocked: the whole menu is locked */
.ds-side[data-locked] .ds-nav__link,
.ds-side[data-locked] .ds-nav__toggle { pointer-events: none; opacity: .45; }

/* ── nav ── */
.ds-nav__list, .ds-nav__sub { margin: 0; padding: 0; list-style: none; }
.ds-nav__item { margin: 0; }
.ds-nav__item[hidden], .ds-nav__header[hidden] { display: none; }

.ds-nav__header {
    margin: var(--ds-space-5) var(--ds-space-4) var(--ds-space-1) var(--ds-space-5);
    font-size: var(--ds-text-xs);
    font-weight: var(--ds-weight-semibold);
    line-height: var(--ds-leading-tight);
    color: color-mix(in srgb, var(--ds-side-ink) 64%, transparent);
}
.ds-nav__list > .ds-nav__header:first-child { margin-top: var(--ds-space-2); }

.ds-nav__link,
.ds-nav__toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--ds-space-3);
    width: calc(100% - var(--ds-space-4));
    min-height: var(--ds-shell-target);
    margin: var(--ds-space-px) var(--ds-space-2);
    padding: var(--ds-space-1) var(--ds-space-3);
    font: inherit;
    font-size: var(--ds-text-sm);
    font-weight: var(--ds-weight-medium);
    line-height: var(--ds-leading-tight);
    text-align: left;
    text-decoration: none;
    color: color-mix(in srgb, var(--ds-side-ink) 86%, transparent);
    background: transparent;
    border: 0;
    border-radius: var(--ds-radius-sm);
    cursor: pointer;
    transition: background-color var(--ds-dur) var(--ds-ease), color var(--ds-dur) var(--ds-ease);
}
.ds-nav__link:hover,
.ds-nav__toggle:hover { color: var(--ds-side-ink); background: color-mix(in srgb, var(--ds-side-ink) 8%, transparent); }
.ds-nav__link:focus-visible,
.ds-nav__toggle:focus-visible { outline: var(--ds-focus-width) solid var(--ds-side-ink); outline-offset: calc(-1 * var(--ds-focus-offset)); color: var(--ds-side-ink); }

.ds-nav__icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--ds-nav-icon-w);
    font-size: var(--ds-glyph-lg);
    line-height: var(--ds-leading-none);
    opacity: .78;
}
.ds-nav__label { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.ds-nav__label .label-modul { margin-left: var(--ds-space-1); font-size: var(--ds-text-3xs); vertical-align: middle; }
.ds-nav__chev {
    flex: none;
    font-size: var(--ds-glyph-md);
    line-height: var(--ds-leading-none);
    opacity: .7;
    transition: transform var(--ds-dur) var(--ds-ease);
}
.ds-nav__toggle[aria-expanded="true"] .ds-nav__chev { transform: rotate(180deg); }

/* where am I: the active page gets a filled row and a registration mark in the accent colour */
.ds-nav__link[aria-current="page"] {
    color: var(--ds-side-ink);
    font-weight: var(--ds-weight-semibold);
    background: color-mix(in srgb, var(--ds-side-ink) 11%, transparent);
}
.ds-nav__link[aria-current="page"] .ds-nav__icon { opacity: 1; }
.ds-nav__link[aria-current="page"]::before {
    content: "";
    position: absolute;
    left: calc(-1 * var(--ds-space-2));
    top: 50%;
    width: var(--ds-nav-mark-w);
    height: var(--ds-nav-mark-h);
    background: var(--ds-side-accent);
    border-radius: 0 var(--ds-radius-2xs) var(--ds-radius-2xs) 0;
    transform: translateY(-50%);
}
.ds-nav__toggle.is-current { color: var(--ds-side-ink); }
.ds-nav__toggle.is-current .ds-nav__icon { opacity: 1; }

/* sub levels hang off a guide line under the parent's icon */
.ds-nav__sub {
    position: relative;
    margin: 0 0 var(--ds-space-1) calc(var(--ds-space-2) + var(--ds-space-3) + var(--ds-nav-icon-w) / 2);   /* under the parent's icon */
    padding-left: var(--ds-space-2);
    border-left: var(--ds-border-width) solid color-mix(in srgb, var(--ds-side-ink) 16%, transparent);
}
.ds-nav__sub[hidden] { display: none; }
.ds-nav__sub .ds-nav__link,
.ds-nav__sub .ds-nav__toggle {
    width: calc(100% - var(--ds-space-2));
    min-height: var(--ds-shell-target-sm);
    margin: var(--ds-space-px) var(--ds-space-2) var(--ds-space-px) 0;
    padding-left: var(--ds-space-3);
    font-weight: var(--ds-weight-regular);
    color: color-mix(in srgb, var(--ds-side-ink) 76%, transparent);
}
.ds-nav__sub .ds-nav__icon { width: var(--ds-glyph-md); font-size: var(--ds-glyph-md); }
.ds-nav__sub .ds-nav__link[aria-current="page"] { color: var(--ds-side-ink); font-weight: var(--ds-weight-semibold); }
.ds-nav__sub .ds-nav__link[aria-current="page"]::before {   /* centred on the guide line */
    left: calc(-1 * var(--ds-space-2) - (var(--ds-nav-mark-w) + var(--ds-border-width)) / 2);
    width: var(--ds-nav-mark-w);
    height: var(--ds-nav-mark-h-sub);
    border-radius: var(--ds-radius-2xs);
}
.ds-nav__sub .ds-nav__sub { margin-left: var(--ds-space-3); }

/* ───────── top bar ───────── */

.ds-bar {
    position: sticky;
    top: 0;
    z-index: var(--ds-z-sticky);
    display: flex;
    align-items: center;
    gap: var(--ds-space-2);
    height: var(--ds-bar-h);
    padding: 0 var(--ds-space-3);
    color: var(--ds-bar-ink);
    background: var(--ds-bar);
    border-bottom: var(--ds-rule-strong) solid var(--ds-bar-accent);
}
.ds-bar__start, .ds-bar__end { display: flex; align-items: center; gap: var(--ds-space-1); min-width: 0; }
.ds-bar__end { margin-left: auto; margin-bottom: 0; padding: 0; list-style: none; }
.ds-bar__end > li { display: flex; align-items: center; margin: 0; }

/* Back (layouts/ds/topbar, js/navigation.js): hidden until the installed app (standalone) or a sub-page without
   its own Back shows it */
.ds-bar__back[hidden] { display: none; }

.ds-bar__logo { display: inline-flex; align-items: center; height: var(--ds-target); border-radius: var(--ds-radius-sm); }
.ds-bar__logo img { display: block; height: var(--ds-bar-logo-h); width: auto; max-width: var(--ds-bar-logo-max); object-fit: contain; border-radius: var(--ds-radius-xs); }
.ds-bar__logo:focus-visible { outline: var(--ds-focus-width) solid var(--ds-bar-ink); outline-offset: var(--ds-focus-offset); }

.ds-iconbtn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: var(--ds-shell-target);
    height: var(--ds-shell-target);
    margin: 0;
    padding: 0;
    font: inherit;
    font-size: var(--ds-glyph-xl);
    line-height: var(--ds-leading-none);
    color: inherit;
    background: transparent;
    border: 0;
    border-radius: var(--ds-radius-sm);
    cursor: pointer;
    text-decoration: none;
    opacity: .88;
    transition: background-color var(--ds-dur) var(--ds-ease), opacity var(--ds-dur) var(--ds-ease);
}
.ds-iconbtn:hover, .ds-iconbtn.show { opacity: 1; color: inherit; background: color-mix(in srgb, currentColor 11%, transparent); }
.ds-iconbtn:focus-visible { opacity: 1; outline: var(--ds-focus-width) solid currentColor; outline-offset: var(--ds-space-px); }
.ds-iconbtn .mdi { line-height: var(--ds-leading-none); }

.ds-badge {
    position: absolute;
    top: var(--ds-space-1);
    right: calc(var(--ds-space-1) / 2);
    min-width: var(--ds-counter-h);
    height: var(--ds-counter-h);
    padding: 0 var(--ds-space-1);
    font-size: var(--ds-text-3xs);
    font-weight: var(--ds-weight-semibold);
    line-height: var(--ds-counter-h);
    text-align: center;
    font-variant-numeric: tabular-nums;
    color: var(--ds-gray-0);
    background: var(--ds-danger);
    border-radius: var(--ds-radius-pill);
    box-shadow: 0 0 0 var(--ds-rule-strong) var(--ds-bar);
    pointer-events: none;
}

.ds-bar__label { max-width: var(--ds-bar-label-max); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--ds-text-sm); font-weight: var(--ds-weight-medium); }
.ds-bar__pill { width: auto; gap: var(--ds-space-2); padding: 0 var(--ds-space-2); font-size: var(--ds-glyph-lg); }
.ds-bar__pill .ds-bar__label { display: none; }

.ds-bar__end > .ds-bar__clock {
    display: none;
    flex-direction: column;
    justify-content: center;
    margin: 0 var(--ds-space-2);
    font-size: var(--ds-text-xs);
    line-height: var(--ds-leading-tight);
    text-align: right;
    white-space: nowrap;
}
.ds-bar__clock-date { opacity: .72; }
.ds-bar .ds-bar__clock-time#current-time { font-family: var(--ds-font); font-size: inherit; color: inherit; font-weight: var(--ds-weight-semibold); letter-spacing: 0; font-variant-numeric: tabular-nums; }   /* beats movera-ui #current-time */

.ds-user { width: auto; gap: var(--ds-space-2); padding: 0 var(--ds-space-1); }
.ds-user__name { display: none; max-width: var(--ds-user-name-max); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--ds-text-sm); font-weight: var(--ds-weight-medium); }
.ds-user .mdi-chevron-down { display: none; font-size: var(--ds-glyph-md); opacity: .7; }
.ds-avatar {
    flex: none;
    width: var(--ds-avatar);
    height: var(--ds-avatar);
    object-fit: cover;
    background: color-mix(in srgb, currentColor 18%, transparent);
    border-radius: 50%;
}
.ds-avatar--lg { width: var(--ds-avatar-lg); height: var(--ds-avatar-lg); }

/* ── dropdown menus (Bootstrap dropdown behaviour, ds look) ── */
.ds-bar .ds-menu {
    min-width: var(--ds-menu-w);
    max-width: calc(100vw - var(--ds-space-4));
    padding: var(--ds-space-1);
    font-family: var(--ds-font);
    font-size: var(--ds-text-sm);
    color: var(--ds-text);
    background: var(--ds-surface);
    border: var(--ds-border-width) solid var(--ds-border);
    border-radius: var(--ds-radius);
    box-shadow: var(--ds-shadow);
    animation: none;
}
.ds-bar .ds-menu--wide { width: var(--ds-menu-w-wide); }
.ds-bar .ds-menu--user { min-width: var(--ds-menu-w-user); max-width: var(--ds-menu-w-wide); }
.ds-bar .ds-menu--flush { padding: 0; overflow: hidden; }
.ds-bar .ds-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--ds-space-2);
    min-height: var(--ds-shell-target);
    margin: 0;
    padding: var(--ds-space-2) var(--ds-space-3);
    font-size: var(--ds-text-sm);
    color: var(--ds-text);
    white-space: normal;
    border-radius: var(--ds-radius-sm);
    transform: none;
    transition: background-color var(--ds-dur) var(--ds-ease);
}
.ds-bar .ds-menu .dropdown-item:hover,
.ds-bar .ds-menu .dropdown-item:focus { color: var(--ds-text); background: var(--ds-canvas); transform: none; }
.ds-bar .ds-menu .dropdown-item:focus-visible { outline: var(--ds-focus-outline); outline-offset: calc(-1 * var(--ds-focus-offset)); }
.ds-bar .ds-menu .dropdown-item.active,
.ds-bar .ds-menu .dropdown-item[aria-current="true"] { color: var(--ds-text); font-weight: var(--ds-weight-semibold); background: var(--ds-canvas); }
.ds-bar .ds-menu .dropdown-item .mdi { font-size: var(--ds-glyph-md); color: var(--ds-text-muted); }
.ds-bar .ds-menu form { margin: 0; }
.ds-bar .ds-menu hr,
.ds-menu__sep { height: 0; margin: var(--ds-space-1) 0; border: 0; border-top: var(--ds-border-width) solid var(--ds-border); opacity: 1; }

.ds-menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ds-space-3);
    padding: var(--ds-space-2) var(--ds-space-3);
    font-size: var(--ds-text-xs);
    margin: 0;
    font-weight: var(--ds-weight-semibold);
    color: var(--ds-text-muted);
}
.ds-menu__pad { padding: 0 var(--ds-space-2) var(--ds-space-2); }
.ds-menu__head .ds-btn--link { min-height: var(--ds-control-h-sm); font-size: var(--ds-text-xs); }
.ds-menu__scroll { max-height: min(var(--ds-menu-max-h), 60vh); overflow-y: auto; }
.ds-menu__empty { margin: 0; padding: var(--ds-space-4) var(--ds-space-3); font-size: var(--ds-text-sm); color: var(--ds-text-muted); text-align: center; }
.ds-menu__foot { display: flex; justify-content: center; }

.ds-who { display: flex; align-items: center; gap: var(--ds-space-3); padding: var(--ds-space-3); }
.ds-who__text { min-width: 0; }
.ds-who__name { margin: 0; font-weight: var(--ds-weight-semibold); color: var(--ds-text); overflow-wrap: anywhere; }
.ds-who__meta { margin: 0; font-size: var(--ds-text-xs); color: var(--ds-text-muted); overflow-wrap: anywhere; }

.ds-note { flex-direction: column; }
.ds-note__title { font-weight: var(--ds-weight-semibold); }
.ds-note__msg { font-size: var(--ds-text-xs); color: var(--ds-text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ds-note__time { font-size: var(--ds-text-xs); color: var(--ds-text-muted); }
.ds-note--unread { background: color-mix(in srgb, var(--ds-accent) 7%, transparent); }
.ds-note__new { margin-inline-start: var(--ds-space-2); padding: 0 var(--ds-space-1); border-radius: var(--ds-radius-sm); font-size: var(--ds-text-3xs); font-weight: var(--ds-weight-semibold); color: var(--ds-accent); border: var(--ds-border-width) solid currentColor; vertical-align: middle; }

.ds-lang { display: flex; gap: var(--ds-space-1); padding: var(--ds-space-1) var(--ds-space-3) var(--ds-space-2); }
.ds-lang a {
    flex: 1;
    padding: var(--ds-space-1) var(--ds-space-2);
    font-size: var(--ds-text-xs);
    font-weight: var(--ds-weight-semibold);
    text-align: center;
    text-decoration: none;
    color: var(--ds-text);
    border: var(--ds-border-width) solid var(--ds-border-strong);
    border-radius: var(--ds-radius-sm);
}
.ds-lang a[aria-current="true"] { color: var(--ds-dark-ink); background: var(--ds-dark); border-color: var(--ds-dark); }
.ds-lang a:focus-visible { outline: var(--ds-focus-outline); outline-offset: var(--ds-focus-offset); }

/* ───────── footer ───────── */

.ds-foot {
    flex: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0 var(--ds-space-2);
    padding: var(--ds-space-3) var(--ds-page-pad-x) var(--ds-space-4);
    font-size: var(--ds-text-xs);
    line-height: var(--ds-leading);
    color: var(--ds-text-muted);
    text-align: center;
    border-top: var(--ds-border-width) solid var(--ds-border);
}
.ds-foot p { margin: 0; }
/* a phone: the credits on one centred line, "·" between them */
.ds-foot__item + .ds-foot__item::before { content: "\00B7"; margin-right: var(--ds-space-2); }
.ds-foot a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: var(--ds-underline-offset); }
.ds-foot a:hover { color: var(--ds-text); text-decoration-color: currentColor; }
.ds-foot a:focus-visible { outline: var(--ds-focus-outline); outline-offset: var(--ds-focus-offset); border-radius: var(--ds-radius-2xs); }

/* ───────── breakpoints ───────── */

@media (min-width: 36rem) {   /* ≥ 576 */
    .ds-bar { padding: 0 var(--ds-space-4); }
    .ds-bar__pill .ds-bar__label { display: inline; }
}

@media (min-width: 48rem) {   /* ≥ 768 */
    .ds-user { padding: 0 var(--ds-space-2) 0 var(--ds-space-1); }
    .ds-user__name, .ds-user .mdi-chevron-down { display: inline; }
    /* a desktop: the two ends of the row, on the page's own inset */
    .ds-foot { justify-content: space-between; gap: var(--ds-space-1) var(--ds-space-6); padding: var(--ds-space-4) var(--ds-page-pad-x); text-align: left; }
    .ds-foot__item + .ds-foot__item::before { content: none; }
}

@media (min-width: 62rem) {   /* ≥ 992: docked sidebar */
    .ds-shell {
        grid-template-columns: var(--ds-side-w) minmax(0, 1fr);
        transition: grid-template-columns var(--ds-dur-slow) var(--ds-ease);
    }
    .ds-shell[data-rail] { grid-template-columns: var(--ds-rail-w) minmax(0, 1fr); }

    .ds-side {
        position: sticky;
        top: 0;
        z-index: var(--ds-z-bar);
        width: auto;
        height: 100vh;
        height: 100dvh;
        transform: none;
        visibility: visible;
        transition: none;
    }

    /* rail: icons only; opens to full width over the content on hover / keyboard focus */
    .ds-shell[data-rail] .ds-side__panel {
        position: absolute;
        inset: 0 auto 0 0;
        width: var(--ds-rail-w);
        overflow: hidden;
        transition: width var(--ds-dur) var(--ds-ease), box-shadow var(--ds-dur) var(--ds-ease);
    }
    /* The rail stays 72px under the mouse: hovering an icon shows its name, a group opens a flyout with its
       sub-menu (ds.js initRailTips). Only keyboard focus opens the full sidebar over the content. */
    .ds-shell[data-rail] .ds-side:has(:focus-visible) .ds-side__panel {
        width: var(--ds-side-w);
        box-shadow: var(--ds-shadow);
    }
    .ds-shell[data-rail] .ds-side:not(:has(:focus-visible)) .ds-side__brand { padding: 0; justify-content: center; }
    .ds-shell[data-rail] .ds-side:not(:has(:focus-visible)) .ds-side__logo-full { display: none; }
    .ds-shell[data-rail] .ds-side:not(:has(:focus-visible)) .ds-side__logo-mini { display: block; }
    .ds-shell[data-rail] .ds-side:not(:has(:focus-visible)) .ds-side__search,
    .ds-shell[data-rail] .ds-side:not(:has(:focus-visible)) .ds-nav__chev,
    .ds-shell[data-rail] .ds-side:not(:has(:focus-visible)) .ds-nav__sub { display: none; }
    .ds-shell[data-rail] .ds-side:not(:has(:focus-visible)) .ds-nav__header {
        height: var(--ds-border-width);
        margin: var(--ds-space-3) var(--ds-space-4);
        overflow: hidden;
        color: transparent;
        background: color-mix(in srgb, var(--ds-side-ink) 16%, transparent);
    }
    .ds-shell[data-rail] .ds-side:not(:has(:focus-visible)) .ds-nav__link,
    .ds-shell[data-rail] .ds-side:not(:has(:focus-visible)) .ds-nav__toggle {
        justify-content: center;
        width: calc(var(--ds-rail-w) - var(--ds-space-4));
        padding: 0;
    }
    .ds-shell[data-rail] .ds-side:not(:has(:focus-visible)) .ds-nav__label {
        position: absolute; width: var(--ds-space-px); height: var(--ds-space-px); overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
    }
    .ds-shell[data-rail] .ds-side:not(:has(:focus-visible)) .ds-nav__toggle.is-current {
        background: color-mix(in srgb, var(--ds-side-ink) 11%, transparent);
    }
    .ds-shell[data-rail] .ds-side:not(:has(:focus-visible)) .ds-nav__toggle.is-current::before {
        content: ""; position: absolute; left: calc(-1 * var(--ds-space-2)); top: 50%; width: var(--ds-nav-mark-w); height: var(--ds-nav-mark-h);
        background: var(--ds-side-accent); border-radius: 0 var(--ds-radius-2xs) var(--ds-radius-2xs) 0; transform: translateY(-50%);
    }
}

@media (min-width: 75rem) {   /* ≥ 1200 */
    .ds-bar { padding: 0 var(--ds-space-6) 0 var(--ds-space-4); }
    .ds-bar__end > .ds-bar__clock { display: flex; }
}

@media print {
    .ds-shell { display: block; }
}

/* ───────────────────────── motion ───────────────────────── */

/* durations are tokens (0ms under prefers-reduced-motion, tokens.css); the spinner keeps turning,
   slower, so a busy button still reads as busy */
@media (prefers-reduced-motion: reduce) {
    .ds .ds-btn__spinner { animation-duration: 1.6s; }
}


/* rail tooltip + group flyout (ds.js initRailTips), appended to <body> so the rail's overflow does not clip them */
.ds-railtip {
    position: fixed;
    z-index: var(--ds-z-tooltip);
    max-width: var(--ds-tooltip-max-w);
    padding: var(--ds-space-1) var(--ds-space-2);
    font-family: var(--ds-font);
    font-size: var(--ds-text-xs);
    line-height: var(--ds-leading-tight);
    color: var(--ds-gray-0);
    white-space: nowrap;
    background: var(--ds-gray-900);
    border-radius: var(--ds-radius-sm);
    box-shadow: var(--ds-shadow);
    pointer-events: none;
}
.ds-flyout {
    position: fixed;
    z-index: var(--ds-z-popup);
    min-width: var(--ds-menu-min-w);
    max-width: var(--ds-menu-w-wide);
    max-height: calc(100dvh - 2 * var(--ds-space-2));
    overflow-y: auto;
    padding: var(--ds-space-1) 0 var(--ds-space-2);
    font-family: var(--ds-font);
    color: var(--ds-side-ink);
    background: var(--ds-side);
    border-radius: var(--ds-radius-md);
    box-shadow: var(--ds-shadow);
}
.ds-flyout__title,
.ds-flyout__group {
    padding: var(--ds-space-2) var(--ds-space-4) var(--ds-space-1);
    font-size: var(--ds-text-xs);
    font-weight: var(--ds-weight-semibold);
    color: color-mix(in srgb, var(--ds-side-ink) 64%, transparent);
}
.ds-flyout__title { color: var(--ds-side-ink); font-size: var(--ds-text-sm); }
.ds-flyout__list { margin: 0; padding: 0; list-style: none; }
.ds-flyout .ds-nav__link { padding-left: var(--ds-space-3); }
}   /* @layer ds.shell */

/*
 * Overrides: !important declarations that must win over a legacy !important (Bootstrap display /
 * flex utilities on the same element) or over a script's inline style. @layer ds-override comes
 * before @layer legacy, so its !important beats every legacy !important; it holds nothing else.
 */
@layer ds-override {
    /* drawer open on phones/tablets: the page behind does not scroll (set on <html> by ds.js) */
    .ds-scroll-lock { overflow: hidden !important; }

    /* the wide top-bar menus on a phone: a panel under the bar (over Popper's inline position) */
    @media (max-width: 35.99rem) {
        /* UX 13-Nov: anchored to an icon in the middle of the bar, the wide menus ran off the left edge of a phone */
        .ds-bar .ds-menu--wide.show {
            position: fixed !important;
            inset: calc(var(--ds-bar-h) + var(--ds-space-1)) var(--ds-space-2) auto var(--ds-space-2) !important;
            transform: none !important;
            width: auto !important;
            max-width: none !important;
            margin-top: 0 !important;
        }
        .ds-bar .ds-menu--wide .ds-menu__scroll { max-height: calc(100dvh - var(--ds-bar-h) - 3 * var(--ds-space-16)) !important; }
    }

    .ds-iconbtn::after { display: none !important; }   /* no Bootstrap dropdown caret */
    .ds-bar__chat { display: none !important; }        /* the chat script toggles inline display */
    .ds-bar .ds-menu { margin-top: var(--ds-space-2) !important; }   /* Bootstrap/Popper menu offset */
    .ds-note { align-items: stretch !important; gap: var(--ds-space-px) !important; }   /* .dropdown-item flex utilities */

    @media (min-width: 62rem) {
        .ds-backdrop, .ds-side__close, .ds-bar__logo { display: none !important; }
        .ds-bar__chat { display: flex !important; }
    }

    /* page hooks: POS fullscreen hides the chrome (body.pos-fullscreen, Modules/POS) */
    .pos-fullscreen .ds-side, .pos-fullscreen .ds-bar, .pos-fullscreen .ds-foot { display: none !important; }
    .pos-fullscreen .ds-shell { grid-template-columns: minmax(0, 1fr) !important; }

    @media print {
        .ds-side, .ds-bar, .ds-foot, .ds-skip, .ds-backdrop, .ds-strip { display: none !important; }
    }
}
