/* The case-management-admin look (WT-2183): PrimeNG's Aura preset with its defaults (emerald primary, slate
   surfaces) and Lato at 14px, as the admin shows them before a tenant theme is applied. Light and dark follow the
   system setting, like the rest of the dashboards; data-theme="light"/"dark" on <html> forces one.
   The admin's sizes are in rem of its 14px root; the dashboards' root is 16px, so they are written here as
   multiples of --aura-rem. Values come from @primeuix/themes Aura and the admin's _topbar.scss, _core.scss and
   _utils.scss. The pages' neutral tokens (--page, --surface, --ink, --rule...) and --font are defined here too
   (WT-2185), and so are the page header, section headings and tabs (WT-2188) and the buttons, fields, tags, links,
   focus ring and live colours (WT-2189), and the chart series, status and message colours (WT-2190). */
@font-face { font-family: "Lato"; src: url("/static/fonts/Lato-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Lato"; src: url("/static/fonts/Lato-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --aura-rem: 14px;
  --aura-font: "Lato", sans-serif;
  /* light: surface = slate, primary = emerald */
  --aura-content-bg: #ffffff;        /* content.background: surface.0 */
  --aura-text: #334155;              /* text.color: surface.700 */
  --aura-text-muted: #64748b;        /* text.mutedColor: surface.500 */
  --aura-hover-bg: #f1f5f9;          /* content.hoverBackground: surface.100 */
  --aura-border: #e2e8f0;            /* content.borderColor: surface.200 */
  --aura-primary: #10b981;           /* primary.color: emerald.500 */
  --aura-good: #22c55e;              /* green.500 */
  --aura-bad: #ef4444;               /* red.500 */
  --aura-topbar-shadow: 0 3px 5px rgba(0, 0, 0, .1);
  --aura-radius: 6px;                /* content.borderRadius: the admin's .card corners */
  --aura-gap: var(--aura-rem);       /* 1rem between cards */

  /* the page's neutral tokens (WT-2185), named as the pages use them: Aura values in place of the old greys */
  --font: var(--aura-font);
  --page: #f1f5f9;                   /* surface ground: surface.100 */
  --surface: #ffffff;                /* cards: content.background */
  --sunk: #f8fafc;                   /* a recess or hover inside a card: surface.50 */
  --ink: #334155;                    /* text.color */
  --ink-2: #475569;                  /* secondary text: text.hoverMutedColor, surface.600 */
  --muted: #64748b;                  /* text.mutedColor */
  --grid: #e2e8f0;                   /* chart grid lines and dividers: content.borderColor */
  --axis: #94a3b8;                   /* chart axes: surface.400 */
  --rule: #e2e8f0;                   /* borders: content.borderColor */
  --ring: #cbd5e1;                   /* form field borders: formField.borderColor, surface.300 */
  --hover: #f1f5f9;                  /* content.hoverBackground */

  /* buttons, fields and tags (WT-2189): Aura's button, inputtext, selectbutton and tag tokens */
  --primary-hover: #059669;          /* primary.hoverColor: emerald.600 */
  --on-primary: #ffffff;             /* primary.contrastColor */
  --primary-soft: #d1fae5;           /* tag primary background: emerald.100 */
  --primary-ink: #047857;            /* tag primary text: emerald.700; links on light surfaces */
  --btn-2: #f1f5f9;                  /* button secondary background: surface.100 */
  --btn-2-hover: #e2e8f0;            /* surface.200 */
  --btn-2-ink: #475569;              /* surface.600 */
  --btn-2-ink-hover: #334155;        /* surface.700 */
  --field-hover: #94a3b8;            /* formField.hoverBorderColor: surface.400 */
  --danger: #ef4444;                 /* button danger: red.500 */
  --danger-soft: #fee2e2;            /* tag danger: red.100 */
  --danger-ink: #b91c1c;             /* red.700 */
  --caution-soft: #ffedd5;           /* tag warn: orange.100 */
  --caution-ink: #c2410c;            /* orange.700 */
  --seg-track: #f1f5f9;              /* togglebutton background: surface.100 */
  --seg-chip: #ffffff;               /* togglebutton content checkedBackground: surface.0 */
  --seg-ink: #64748b;                /* surface.500 */
  --seg-ink-on: #0f172a;             /* checkedColor: surface.900 */
  /* the live state is Aura's primary: filling tags, live meters, the job's pulse and its approval prompt */
  --live: var(--aura-primary);
  --live-ink: var(--primary-ink);
  --live-bg: var(--primary-soft);

  /* chart series (WT-2190): the admin's analytics palette, Aura's 500 shades, the same in both modes */
  --s1: #3b82f6; --s2: #22c55e; --s3: #f97316; --s4: #a855f7;   /* blue, green, orange, purple */
  --s5: #06b6d4; --s6: #ec4899; --s7: #eab308; --s8: #6366f1;   /* cyan, pink, yellow, indigo */
  /* status (WT-2190): Aura's green and red for text, darkened for contrast; warn and error are Aura's p-message */
  --good: #15803d;                   /* green.700 */
  --bad: #b91c1c;                    /* red.700 */
  --warn-bg: #fff7ed;                /* message warn background: orange.50 */
  --warn-ink: #c2410c;               /* orange.700 */
  --warn-line: #fed7aa;              /* message warn border: orange.200 */
  --err-bg: #fef2f2;                 /* message error background: red.50 */
  --err-ink: #b91c1c;                /* red.700 */
  --err-line: #fecaca;               /* message error border: red.200 */
  --overlay-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);   /* overlay.popover.shadow */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --aura-content-bg: #0f172a;      /* surface.900 */
    --aura-text: #ffffff;            /* surface.0 */
    --aura-text-muted: #94a3b8;      /* surface.400 */
    --aura-hover-bg: #1e293b;        /* surface.800 */
    --aura-border: #334155;          /* surface.700 */
    --aura-primary: #34d399;         /* emerald.400 */
    --aura-good: #4ade80;            /* green.400 */
    --aura-bad: #f87171;             /* red.400 */
    --page: #020617;                 /* surface.950 */
    --surface: #0f172a;              /* surface.900 */
    --sunk: #020617;                 /* surface.950 */
    --ink: #ffffff;                  /* surface.0 */
    --ink-2: #cbd5e1;                /* surface.300 */
    --muted: #94a3b8;                /* surface.400 */
    --grid: #334155;                 /* surface.700 */
    --axis: #64748b;                 /* surface.500 */
    --rule: #334155;                 /* surface.700 */
    --ring: #475569;                 /* formField.borderColor, surface.600 */
    --hover: #1e293b;                /* surface.800 */
    --primary-hover: #6ee7b7;        /* emerald.300 */
    --on-primary: #020617;           /* surface.950 */
    --primary-soft: rgba(16, 185, 129, .16);   /* emerald.500 at 16% */
    --primary-ink: #6ee7b7;          /* emerald.300 */
    --btn-2: #1e293b;                /* surface.800 */
    --btn-2-hover: #334155;          /* surface.700 */
    --btn-2-ink: #cbd5e1;            /* surface.300 */
    --btn-2-ink-hover: #e2e8f0;      /* surface.200 */
    --field-hover: #64748b;          /* surface.500 */
    --danger: #f87171;               /* red.400 */
    --danger-soft: rgba(239, 68, 68, .16);
    --danger-ink: #fca5a5;           /* red.300 */
    --caution-soft: rgba(249, 115, 22, .16);
    --caution-ink: #fdba74;          /* orange.300 */
    --seg-track: #020617;            /* surface.950 */
    --seg-chip: #1e293b;             /* surface.800 */
    --seg-ink: #94a3b8;              /* surface.400 */
    --seg-ink-on: #ffffff;           /* surface.0 */
    --good: #4ade80;                 /* green.400 */
    --bad: #f87171;                  /* red.400 */
    --warn-bg: rgba(249, 115, 22, .16);   /* orange.500 at 16% */
    --warn-ink: #fdba74;             /* orange.300 */
    --warn-line: rgba(194, 65, 12, .36);  /* orange.700 at 36% */
    --err-bg: rgba(239, 68, 68, .16);     /* red.500 at 16% */
    --err-ink: #fca5a5;              /* red.300 */
    --err-line: rgba(185, 28, 28, .36);   /* red.700 at 36% */
  }
}
:root[data-theme="dark"] {
  --aura-content-bg: #0f172a;
  --aura-text: #ffffff;
  --aura-text-muted: #94a3b8;
  --aura-hover-bg: #1e293b;
  --aura-border: #334155;
  --aura-primary: #34d399;
  --aura-good: #4ade80;
  --aura-bad: #f87171;
  --page: #020617;
  --surface: #0f172a;
  --sunk: #020617;
  --ink: #ffffff;
  --ink-2: #cbd5e1;
  --muted: #94a3b8;
  --grid: #334155;
  --axis: #64748b;
  --rule: #334155;
  --ring: #475569;
  --hover: #1e293b;
  --primary-hover: #6ee7b7;
  --on-primary: #020617;
  --primary-soft: rgba(16, 185, 129, .16);
  --primary-ink: #6ee7b7;
  --btn-2: #1e293b;
  --btn-2-hover: #334155;
  --btn-2-ink: #cbd5e1;
  --btn-2-ink-hover: #e2e8f0;
  --field-hover: #64748b;
  --danger: #f87171;
  --danger-soft: rgba(239, 68, 68, .16);
  --danger-ink: #fca5a5;
  --caution-soft: rgba(249, 115, 22, .16);
  --caution-ink: #fdba74;
  --seg-track: #020617;
  --seg-chip: #1e293b;
  --seg-ink: #94a3b8;
  --seg-ink-on: #ffffff;
  --good: #4ade80;
  --bad: #f87171;
  --warn-bg: rgba(249, 115, 22, .16);
  --warn-ink: #fdba74;
  --warn-line: rgba(194, 65, 12, .36);
  --err-bg: rgba(239, 68, 68, .16);
  --err-ink: #fca5a5;
  --err-line: rgba(185, 28, 28, .36);
}

/* the top bar (WT-2184): the admin's .layout-topbar */
.topbar { position: sticky; top: 0; z-index: 997; display: flex; align-items: center; gap: var(--aura-rem);
  height: calc(4 * var(--aura-rem)); padding: 0 var(--aura-rem); background: var(--aura-content-bg);
  color: var(--aura-text); box-shadow: var(--aura-topbar-shadow); font: 400 var(--aura-rem)/1.5 var(--aura-font);
  -webkit-font-smoothing: antialiased; }
.topbar :focus-visible { outline: 1px solid var(--aura-primary); outline-offset: 2px; }
.topbar-logo { display: inline-flex; align-items: center; gap: calc(.5 * var(--aura-rem)); flex: none;
  color: var(--aura-text); text-decoration: none; font-size: calc(1.2 * var(--aura-rem)); font-weight: 500;
  border-radius: 6px; }
.topbar-logo img { display: block; width: auto; height: calc(3 * var(--aura-rem)); flex: none; }  /* the admin's h-12 */
.topbar-back { display: inline-flex; align-items: center; gap: calc(.3 * var(--aura-rem)); flex: none;
  padding: calc(.3 * var(--aura-rem)) calc(.6 * var(--aura-rem)); border-radius: 6px; color: var(--aura-text-muted);
  text-decoration: none; }
.topbar-back:hover { background: var(--aura-hover-bg); color: var(--aura-text); }
.topbar-back svg { width: var(--aura-rem); height: var(--aura-rem); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: var(--aura-rem); min-width: 0; }

/* the connected tools: one entry per MCP server, with an ok / unavailable / not set up icon */
.topbar-status { display: flex; flex-wrap: wrap; gap: calc(.3 * var(--aura-rem)) var(--aura-rem); align-items: center;
  min-width: 0; color: var(--aura-text-muted); font-size: calc(.9 * var(--aura-rem)); }
.topbar-status .srv { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.topbar-status .srv b { color: var(--aura-text); font-weight: 700; }
.topbar-status .srv .ico { width: 14px; height: 14px; }
.topbar-status .srv.ok .ico { color: var(--aura-good); }
.topbar-status .srv.bad .ico { color: var(--aura-bad); }
.topbar-status .srv.off { opacity: .8; }

/* round icon buttons (.layout-topbar-action) and the signed-in user's initials */
.topbar-action { display: inline-flex; justify-content: center; align-items: center; flex: none;
  width: calc(2.5 * var(--aura-rem)); height: calc(2.5 * var(--aura-rem)); border-radius: 50%; color: var(--aura-text);
  background: transparent; border: 0; padding: 0; cursor: pointer; text-decoration: none;
  transition: background-color .2s; }
.topbar-action:hover { background: var(--aura-hover-bg); }
.topbar-action svg { width: calc(1.25 * var(--aura-rem)); height: calc(1.25 * var(--aura-rem)); }
.topbar-user { display: inline-flex; justify-content: center; align-items: center; flex: none;
  width: calc(2.5 * var(--aura-rem)); height: calc(2.5 * var(--aura-rem)); border-radius: 50%;
  /* the admin's initials badge: bg-primary-100, border-primary-300, text-primary-700, text-sm bold */
  background: #d1fae5; border: 1px solid #6ee7b7; color: #047857; font-size: calc(.875 * var(--aura-rem));
  font-weight: 700; line-height: 1; cursor: default; }
/* the user's profile picture in the same round badge (WT-2210), as the admin's top bar shows it */
.topbar-user.has-picture { overflow: hidden; background: none; }
.topbar-user.has-picture img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* the page header (WT-2188): the title on the page background, like the admin's page titles (text-2xl font-semibold);
   its bottom line is the page's live meter, drawn in the primary colour while a job or refresh runs */
.page-head-in { max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.page-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 32px; flex-wrap: wrap;
  padding: 22px 0 14px; }
.page-head h1 { margin: 0; font-size: calc(1.5 * var(--aura-rem)); font-weight: 700; line-height: 1.25; color: var(--ink);
  text-wrap: balance; }
.page-rule { height: 3px; position: relative; overflow: hidden; }
.page-rule i { position: absolute; inset: 0; background: var(--aura-primary); transform-origin: left; transform: scaleX(0);
  transition: transform .6s cubic-bezier(.16, 1, .3, 1); }
.page-rule.sweep i { right: auto; width: 28%; animation: sweep 1.6s cubic-bezier(.45, 0, .55, 1) infinite; transition: none; }
@keyframes sweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(360%); } }
@media (prefers-reduced-motion: reduce) { .page-rule.sweep i { animation: none; width: 100%; transform: none; opacity: .55; } }

/* section headings: the admin's card titles (font-semibold text-xl), with a muted count and the section's button */
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 34px; }
.section-head h2, h2.section-head { margin: 0; font-size: calc(1.25 * var(--aura-rem)); font-weight: 700; line-height: 1.4;
  color: var(--ink); }
.section-head .count { margin-left: 8px; color: var(--muted); font-size: var(--aura-rem); font-weight: 400; white-space: nowrap; }
.section-head button { white-space: nowrap; flex: none; }

/* tabs: PrimeNG Aura's p-tabs, a card-coloured row with a line under it; the selected tab is underlined in primary */
.tabs { display: flex; background: var(--surface); border-bottom: 1px solid var(--rule);
  border-radius: var(--aura-radius) var(--aura-radius) 0 0; overflow-x: auto; scrollbar-width: thin; }
.tab { border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: 0; background: none;
  padding: var(--aura-rem) calc(1.125 * var(--aura-rem)); min-height: 0; color: var(--muted); white-space: nowrap;
  font-weight: 700; transition: color .2s, border-color .2s; }
.tab:hover { background: none; color: var(--ink); }
.tab[aria-selected="true"] { color: var(--aura-primary); border-bottom-color: var(--aura-primary); }
.tab:focus-visible { outline: 1px solid var(--aura-primary); outline-offset: -4px; }

/* links, focus and selection (WT-2189): Aura's focus ring is 1px of primary at a 2px offset */
::selection { background: var(--primary-soft); color: var(--ink); }
a { color: var(--primary-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 1px solid var(--aura-primary); outline-offset: 2px; }

/* buttons: Aura's p-button. Plain buttons are its secondary severity, .primary its primary; .small is size="small" */
button { font: inherit; font-weight: 500; line-height: 1.5; cursor: pointer; display: inline-flex; align-items: center;
  justify-content: center; gap: calc(.5 * var(--aura-rem)); padding: calc(.5 * var(--aura-rem)) calc(.75 * var(--aura-rem));
  min-height: calc(2.5 * var(--aura-rem)); border: 1px solid var(--btn-2); border-radius: var(--aura-radius);
  background: var(--btn-2); color: var(--btn-2-ink); transition: background-color .2s, border-color .2s, color .2s; }
button:hover { background: var(--btn-2-hover); border-color: var(--btn-2-hover); color: var(--btn-2-ink-hover); }
button.primary { background: var(--aura-primary); border-color: var(--aura-primary); color: var(--on-primary); }
button.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); }
button:disabled, button:disabled:hover { opacity: .6; cursor: not-allowed; }
button.primary:disabled:hover { background: var(--aura-primary); border-color: var(--aura-primary); }
button.small { font-size: calc(.875 * var(--aura-rem)); padding: calc(.375 * var(--aura-rem)) calc(.625 * var(--aura-rem));
  min-height: calc(2 * var(--aura-rem)); }
/* on the page background (slate-100, the secondary fill's own colour) a secondary button takes the card colour and a
   rule, so it stays visible; so does one on a hovered card */
.page-head button:not(.primary), .section-head button:not(.primary) { background: var(--surface); border-color: var(--rule); }
.page-head button:not(.primary):hover, .section-head button:not(.primary):hover { background: var(--btn-2-hover); }
/* delete: secondary until hovered, then the danger tint; armed (the second click deletes) is Aura's danger button */
button.danger:hover, button.danger:focus-visible { color: var(--danger-ink); }
button.danger:hover { background: var(--danger-soft); border-color: var(--danger-soft); }
button.danger:focus-visible { outline-color: var(--danger); }
button.danger.armed, button.danger.armed:hover { background: var(--danger); border-color: var(--danger); color: var(--on-primary); }

/* fields: Aura's inputtext and select. The border turns primary on focus, Aura's form-field focus (no outline) */
input[type=text], textarea, select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--ring);
  border-radius: var(--aura-radius); padding: calc(.5 * var(--aura-rem)) calc(.75 * var(--aura-rem));
  box-shadow: 0 1px 2px 0 rgba(18, 18, 23, .05); transition: border-color .2s; }
input[type=text]:hover, textarea:hover, select:hover { border-color: var(--field-hover); }
input[type=text]:focus, textarea:focus, select:focus { outline: 0; border-color: var(--aura-primary); }
::placeholder { color: var(--muted); opacity: 1; }
input[type=checkbox] { accent-color: var(--aura-primary); }

/* segmented choices: Aura's SelectButton, a grey track with the chosen option raised on a chip */
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; background: var(--seg-track); border-radius: var(--aura-radius); }
.seg button { border: 0; background: none; color: var(--seg-ink); border-radius: 4px; min-height: 0;
  padding: calc(.25 * var(--aura-rem)) calc(.75 * var(--aura-rem)); font-size: calc(.875 * var(--aura-rem)); }
.seg button:hover { background: none; color: var(--seg-ink-on); }
.seg button[aria-pressed="true"] { background: var(--seg-chip); color: var(--seg-ink-on);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .02), 0 1px 2px 0 rgba(0, 0, 0, .04); }
.seg button:focus-visible { outline-offset: -1px; }

/* tags: Aura's p-tag (0.875rem bold, 0.25rem by 0.5rem, 6px corners). Plain .tag is secondary; .tag-primary,
   .tag-warn and .tag-danger are its other severities */
.tag, .tag-primary, .tag-warn, .tag-danger { display: inline-flex; align-items: center; gap: calc(.25 * var(--aura-rem));
  padding: calc(.25 * var(--aura-rem)) calc(.5 * var(--aura-rem)); border-radius: var(--aura-radius); font-size: calc(12 * var(--aura-rem) / 14);
  font-weight: 700; line-height: 1.3; white-space: nowrap; background: var(--btn-2); color: var(--btn-2-ink); }
.tag-primary { background: var(--primary-soft); color: var(--primary-ink); }
.tag-warn { background: var(--caution-soft); color: var(--caution-ink); }
.tag-danger { background: var(--danger-soft); color: var(--danger-ink); }
.tag b { font-weight: 700; color: var(--ink); }
.tag .n { color: var(--muted); font-weight: 400; }

/* meters: settled values and live progress, both in the primary colour */
.meter { height: 4px; background: var(--grid); position: relative; overflow: hidden; border-radius: 2px; }
.meter i { position: absolute; inset: 0 auto 0 0; background: var(--aura-primary); }

@media (max-width: 767px) {
  .topbar { gap: calc(.5 * var(--aura-rem)); }
  .topbar-actions { gap: calc(.5 * var(--aura-rem)); }
  .topbar-status .srv { font-size: 0; gap: 0; }          /* icons only; each keeps its name in its tooltip */
  .topbar-back span { display: none; }                   /* the arrow alone, labelled for screen readers */
}
@media (max-width: 640px) {
  .page-head-in { padding-left: 16px; padding-right: 16px; }
  .page-title { padding: 16px 0 12px; }
}
@media (max-width: 420px) {
  .topbar-logo span { display: none; }
}

/* ---- the side menu (WT-2219, menu.js), like the admin's .layout-sidebar (_menu.scss, _responsive.scss): a card at
   the left, 5px below the top bar; on a desktop the page beside it moves over, on a narrow screen it opens over the
   page. Modes: body.menu-expanded (icons and labels), body.menu-icons (labels as tooltips), body.menu-hidden. */
body.has-menu { --menu-full: calc(15 * var(--aura-rem)); --menu-icons: calc(4.5 * var(--aura-rem)); --menu-space: 0px; }
body.has-menu.menu-expanded { --menu-space: calc(var(--menu-full) + var(--aura-rem)); }
body.has-menu.menu-icons { --menu-space: calc(var(--menu-icons) + var(--aura-rem)); }
body.has-menu > :not(.topbar):not(.layout-sidebar):not(.layout-mask):not(script) {
  margin-left: var(--menu-space); transition: margin-left .2s; }
.layout-menu-button { margin-right: calc(-.5 * var(--aura-rem)); }
.layout-sidebar { position: fixed; z-index: 999; left: 0; top: calc(4 * var(--aura-rem) + 5px);
  height: calc(100vh - 4 * var(--aura-rem) - 5px - 3 * var(--aura-rem)); width: var(--menu-full); box-sizing: border-box;
  overflow-y: auto; overflow-x: hidden; padding: calc(.5 * var(--aura-rem)) var(--aura-rem); user-select: none;
  background: var(--aura-content-bg); color: var(--aura-text); border-radius: 0 var(--aura-radius) var(--aura-radius) 0;
  box-shadow: var(--aura-topbar-shadow); font: 400 var(--aura-rem)/1.5 var(--aura-font);
  transition: transform .2s, width .2s; }
.layout-sidebar .layout-menuitem-root-text { margin: calc(.75 * var(--aura-rem)) 0; font-size: calc(.857 * var(--aura-rem));
  font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.layout-menu { list-style: none; margin: 0; padding: 0; white-space: nowrap; }
.layout-menu a { display: flex; align-items: center; gap: calc(.5 * var(--aura-rem)); padding: calc(.75 * var(--aura-rem));
  border-radius: var(--aura-radius); color: var(--aura-text); text-decoration: none; transition: background-color .2s; }
.layout-menu a:hover { background: var(--aura-hover-bg); }
.layout-menu a:focus-visible { outline: 1px solid var(--aura-primary); outline-offset: -1px; }
.layout-menu a.active-route { color: var(--aura-primary); font-weight: 700; }
.layout-menuitem-icon { display: inline-flex; flex: none; position: relative; }
/* a connection with a problem (WT-2222): a small dot on the Sources icon, as visible with the labels hidden */
.layout-menu a.has-problem .layout-menuitem-icon::after { content: ""; position: absolute; top: -2px; right: -3px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--aura-bad, #ef4444);
  box-shadow: 0 0 0 2px var(--aura-content-bg); }
.layout-menuitem-icon svg { width: calc(1.15 * var(--aura-rem)); height: calc(1.15 * var(--aura-rem)); }
body.menu-icons .layout-sidebar { width: var(--menu-icons); padding: calc(.5 * var(--aura-rem)); }
body.menu-icons .layout-sidebar .layout-menuitem-root-text,
body.menu-icons .layout-sidebar .layout-menuitem-text { display: none; }
body.menu-icons .layout-menu a { justify-content: center; }
body.menu-hidden .layout-sidebar { transform: translateX(-110%); }
.layout-mask { display: none; }
@media (max-width: 991px) {
  body.has-menu > :not(.topbar):not(.layout-sidebar):not(.layout-mask):not(script) { margin-left: 0; }
  /* below the top bar, so its button still closes the menu */
  body.has-menu .layout-sidebar { width: var(--menu-full); padding: calc(.5 * var(--aura-rem)) var(--aura-rem);
    top: calc(4 * var(--aura-rem)); height: calc(100vh - 4 * var(--aura-rem)); border-radius: 0;
    transform: translateX(-110%); }
  body.has-menu .layout-sidebar .layout-menuitem-root-text,
  body.has-menu .layout-sidebar .layout-menuitem-text { display: revert; }
  body.has-menu .layout-menu a { justify-content: flex-start; }
  body.has-menu.menu-open .layout-sidebar { transform: none; }
  body.has-menu.menu-open .layout-mask { display: block; position: fixed; inset: calc(4 * var(--aura-rem)) 0 0 0;
    z-index: 998; background: rgba(0, 0, 0, .4); }
}
@media (prefers-reduced-motion: reduce) { .layout-sidebar, body.has-menu > * { transition: none !important; } }

/* a short message under the top bar's actions (WT-2223), e.g. when the theme couldn't be saved */
.topbar-note { position: fixed; z-index: 1000; top: calc(4 * var(--aura-rem) + 8px); right: var(--aura-rem);
  max-width: min(28rem, calc(100vw - 2 * var(--aura-rem))); padding: calc(.5 * var(--aura-rem)) var(--aura-rem);
  border-radius: var(--aura-radius); background: var(--aura-content-bg); color: var(--aura-text);
  border: 1px solid var(--aura-border); box-shadow: var(--aura-topbar-shadow); font: 400 calc(.9 * var(--aura-rem))/1.4 var(--aura-font); }
.topbar-note[hidden] { display: none; }

/* the theme menu (WT-2224), like the admin's configurator panel: under its palette button, only the font size */
.theme-menu { position: relative; display: inline-flex; }
.theme-panel { position: absolute; z-index: 1000; top: calc(100% + 8px); right: 0; width: calc(16 * var(--aura-rem));
  padding: var(--aura-rem); border-radius: var(--aura-radius); background: var(--aura-content-bg); color: var(--aura-text);
  border: 1px solid var(--aura-border); box-shadow: var(--aura-topbar-shadow); display: flex; flex-direction: column;
  gap: calc(.75 * var(--aura-rem)); font: 400 var(--aura-rem)/1.5 var(--aura-font); }
.theme-panel[hidden] { display: none; }
.theme-panel-head { display: flex; justify-content: space-between; align-items: center; font-size: calc(.875 * var(--aura-rem));
  font-weight: 600; color: var(--aura-text-muted); }
.theme-close { border: 0; background: none; color: var(--aura-text-muted); font-size: calc(1.2 * var(--aura-rem)); cursor: pointer;
  border-radius: 50%; width: calc(1.8 * var(--aura-rem)); height: calc(1.8 * var(--aura-rem)); }
.theme-close:hover { background: var(--aura-hover-bg); }
.font-size { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: calc(.5 * var(--aura-rem));
  padding: calc(.25 * var(--aura-rem)); border-radius: var(--aura-radius); background: var(--aura-hover-bg); }
.font-size button { width: calc(2.2 * var(--aura-rem)); height: calc(2.2 * var(--aura-rem)); border: 0; border-radius: var(--aura-radius);
  background: none; color: var(--aura-text); font-size: calc(1.2 * var(--aura-rem)); cursor: pointer; }
.font-size button:hover:not(:disabled) { background: var(--aura-content-bg); }
.font-size button:disabled { opacity: .4; cursor: default; }
.font-size output { text-align: center; padding: calc(.25 * var(--aura-rem)); border-radius: var(--aura-radius);
  background: var(--aura-content-bg); }
.fs-reset { align-self: flex-start; border: 0; background: none; color: var(--aura-primary); cursor: pointer; padding: 0;
  font: inherit; font-size: calc(.875 * var(--aura-rem)); }
.fs-reset:disabled { color: var(--aura-text-muted); cursor: default; }
