/*
 * Octane theme for Bootstrap 5.3 (ADR-0067). Linked after bootstrap.min.css by
 * templates/base5.html.twig.
 *
 * Look: the staff app's current colours, i.e. Metronic's "darkblue" theme as base.html.twig
 * shows it today (Pete, 2026-11-10: "make the theme color look like the existing one"). The
 * values below are read from layouts/layout/css/themes/darkblue.min.css and
 * global/css/components-rounded.min.css, so staff see the same header, sidebar, page, cards and
 * buttons after a page moves to Bootstrap 5. None of Metronic's CSS is loaded or copied; only
 * colour values are reused.
 *
 * Contrast (WCAG 2.1 AA, docs/ui-bs5/theme-tokens.md): colours are kept exactly wherever the text
 * on them passes. Where Metronic puts white text on a light fill (its teal "green" 2.1:1, its
 * yellow 2.5:1, the active sidebar item 2.1:1), the fill is kept and the label is dark; where it
 * is close (blue 3.2:1, red 3.7:1), the shade is darkened just enough to pass.
 *
 * No Sass: Bootstrap's precompiled CSS is themed through its CSS variables, in two layers:
 *   1. :root  --bs-<variant>, -rgb, -text-emphasis, -bg-subtle, -border-subtle.
 *   2. .btn-<variant> / .btn-outline-<variant>  --bs-btn-* (the compiled buttons bake colours).
 *
 * Sections: palette, Bootstrap variables, buttons, text/badges, cards, forms, the staff shell
 * (.ou-*), and at the end compatibility rules for shared partials still on Bootstrap 3 / Metronic
 * markup. Those go in Phase 3.
 */

:root {
  /* Staff palette (Metronic darkblue, as the staff app looks today) */
  --ou-header-bg: #2b3643;
  --ou-header-hover: #3f4f62;
  --ou-header-icon: #79869a;           /* 3.3:1 on the header */
  --ou-header-text: #c6cfda;           /* 7.8:1 */
  --ou-side-bg: #364150;
  --ou-side-border: #3d4957;
  --ou-side-hover: #2c3542;
  --ou-side-text: #b4bcc8;             /* 5.4:1 */
  --ou-side-icon: #808c9d;             /* Metronic #606c7d is 1.9:1; nearest at 3:1 */
  --ou-side-heading: #a2acbb;          /* Metronic #708096 is 2.6:1; nearest at 4.5:1 */
  --ou-side-active: #36c6d3;           /* the teal current-page bar */
  --ou-side-active-text: #16212c;      /* Metronic white is 2.1:1 on it; dark is 7.9:1 */
  --ou-side-sub-active: #3e4b5c;
  --ou-page-bg: #eff3f8;
  --ou-footer-bg: #364150;
  --ou-footer-text: #a0adbf;           /* Metronic #98a6ba is 4.2:1; nearest at 4.5:1 */
  --ou-ink: #333333;                   /* Metronic body text, 12.6:1 */
  --ou-muted: #666666;                 /* page titles, 5.2:1 on the page grey */
  --ou-border: #e7ecf1;                /* portlet border */
  --ou-border-soft: #eef1f5;           /* portlet title rule */
  --ou-input-border: #c2cad8;          /* Metronic inputs */
  --ou-check-border: #7b8494;          /* checkboxes and radios: 3.8:1, or they disappear */
  --ou-radius: 4px;                    /* Metronic "rounded" components */
  --ou-shadow: 0 6px 18px rgba(44, 53, 66, 0.18);

  --ou-blue: #207cbb;                  /* Metronic blue #3598dc is 3.2:1 with white; 4.5:1 */
  --ou-blue-dark: #1b6aa0;
  --ou-teal: #32c5d2;                  /* Metronic "green" (a teal): kept, with a dark label */
  --ou-teal-dark: #2bb0bc;
  --ou-teal-text: #1e818a;             /* teal as text on white: 4.6:1 */
  --ou-red: #e22c38;                   /* Metronic red #e7505a is 3.7:1 with white; 4.5:1 */
  --ou-red-dark: #c81f2b;
  --ou-yellow: #c49f47;                /* Metronic yellow: kept, with a dark label */
  --ou-yellow-dark: #b08c37;
  --ou-yellow-text: #8e722e;           /* as text on white: 4.6:1 */
  --ou-purple: #8e44ad;                /* Metronic purple, 5.9:1 with white: kept */
  --ou-purple-dark: #7a3995;
  --ou-dark: #2f353b;
  --ou-info: #5bc0de;                  /* Bootstrap 3 info, with a dark label */
  --ou-label-dark: #16212c;
  --ou-link: #337ab7;                  /* Bootstrap 3 link, 4.6:1 */
  --ou-link-hover: #23527c;

  /* Kept for page styles written against the /admin tokens */
  --oa-ink: var(--ou-ink);

  /* Layer 1: Bootstrap 5.3 root variables */
  --bs-font-sans-serif: "Open Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bs-body-font-size: 0.875rem;       /* 14px, as Metronic */
  --bs-body-color: var(--ou-ink);
  --bs-body-bg: #ffffff;               /* Bootstrap fills cards, tables, inputs, modals with it; the page grey is on body.ou-app */
  --bs-emphasis-color: #222222;
  --bs-secondary-color: #6c757d;
  --bs-border-color: var(--ou-border);
  --bs-border-radius: var(--ou-radius);
  --bs-border-radius-sm: 3px;
  --bs-border-radius-lg: 6px;

  --bs-primary: #207cbb;   --bs-primary-rgb: 32, 124, 187;
  --bs-primary-text-emphasis: #1b5f8f; --bs-primary-bg-subtle: #e1eff9; --bs-primary-border-subtle: #b3d4ee;
  --bs-secondary: #6c757d; --bs-secondary-rgb: 108, 117, 125;
  --bs-secondary-text-emphasis: #41464b; --bs-secondary-bg-subtle: #eef1f5; --bs-secondary-border-subtle: #d5dae1;
  --bs-success: #32c5d2;   --bs-success-rgb: 50, 197, 210;
  --bs-success-text-emphasis: #166a72; --bs-success-bg-subtle: #dff6f8; --bs-success-border-subtle: #abe7ed;
  --bs-info: #5bc0de;      --bs-info-rgb: 91, 192, 222;
  --bs-info-text-emphasis: #1e6a80; --bs-info-bg-subtle: #e4f5fa; --bs-info-border-subtle: #b6e2ef;
  --bs-warning: #c49f47;   --bs-warning-rgb: 196, 159, 71;
  --bs-warning-text-emphasis: #6f5823; --bs-warning-bg-subtle: #f9f1df; --bs-warning-border-subtle: #e8d5a6;
  --bs-danger: #e22c38;    --bs-danger-rgb: 226, 44, 56;
  --bs-danger-text-emphasis: #a31c26; --bs-danger-bg-subtle: #fbe5e7; --bs-danger-border-subtle: #f3b9be;
  --bs-dark: #2f353b;      --bs-dark-rgb: 47, 53, 59;

  --bs-link-color: var(--ou-link); --bs-link-color-rgb: 51, 122, 183;
  --bs-link-hover-color: var(--ou-link-hover); --bs-link-hover-color-rgb: 35, 82, 124;
  --bs-focus-ring-color: rgba(32, 124, 187, 0.25);
}

/* ---- Layer 2: buttons ----------------------------------------------------------------------
   Codemod mapping: Metronic "btn blue" → btn-primary, "btn green" → btn-success, "btn red" →
   btn-danger, "btn yellow" → btn-warning, "btn purple" → btn-violet, "btn dark" → btn-dark,
   btn-default / "btn default" → btn-outline-secondary. */
.btn-primary {
  --bs-btn-color: #fff; --bs-btn-bg: var(--ou-blue); --bs-btn-border-color: var(--ou-blue);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--ou-blue-dark); --bs-btn-hover-border-color: var(--ou-blue-dark);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--ou-blue-dark); --bs-btn-active-border-color: var(--ou-blue-dark);
  --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: var(--ou-blue); --bs-btn-disabled-border-color: var(--ou-blue);
  --bs-btn-focus-shadow-rgb: 32, 124, 187;
}
.btn-success {
  --bs-btn-color: var(--ou-label-dark); --bs-btn-bg: var(--ou-teal); --bs-btn-border-color: var(--ou-teal);
  --bs-btn-hover-color: var(--ou-label-dark); --bs-btn-hover-bg: var(--ou-teal-dark); --bs-btn-hover-border-color: var(--ou-teal-dark);
  --bs-btn-active-color: var(--ou-label-dark); --bs-btn-active-bg: var(--ou-teal-dark); --bs-btn-active-border-color: var(--ou-teal-dark);
  --bs-btn-disabled-color: var(--ou-label-dark); --bs-btn-disabled-bg: var(--ou-teal); --bs-btn-disabled-border-color: var(--ou-teal);
  --bs-btn-focus-shadow-rgb: 50, 197, 210;
}
.btn-danger {
  --bs-btn-color: #fff; --bs-btn-bg: var(--ou-red); --bs-btn-border-color: var(--ou-red);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--ou-red-dark); --bs-btn-hover-border-color: var(--ou-red-dark);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--ou-red-dark); --bs-btn-active-border-color: var(--ou-red-dark);
  --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: var(--ou-red); --bs-btn-disabled-border-color: var(--ou-red);
  --bs-btn-focus-shadow-rgb: 226, 44, 56;
}
.btn-warning {
  --bs-btn-color: var(--ou-label-dark); --bs-btn-bg: var(--ou-yellow); --bs-btn-border-color: var(--ou-yellow);
  --bs-btn-hover-color: var(--ou-label-dark); --bs-btn-hover-bg: var(--ou-yellow-dark); --bs-btn-hover-border-color: var(--ou-yellow-dark);
  --bs-btn-active-color: var(--ou-label-dark); --bs-btn-active-bg: var(--ou-yellow-dark); --bs-btn-active-border-color: var(--ou-yellow-dark);
  --bs-btn-disabled-color: var(--ou-label-dark); --bs-btn-disabled-bg: var(--ou-yellow); --bs-btn-disabled-border-color: var(--ou-yellow);
  --bs-btn-focus-shadow-rgb: 196, 159, 71;
}
.btn-info {
  --bs-btn-color: var(--ou-label-dark); --bs-btn-bg: var(--ou-info); --bs-btn-border-color: var(--ou-info);
  --bs-btn-hover-color: var(--ou-label-dark); --bs-btn-hover-bg: #46b8da; --bs-btn-hover-border-color: #46b8da;
  --bs-btn-active-color: var(--ou-label-dark); --bs-btn-active-bg: #46b8da; --bs-btn-active-border-color: #46b8da;
  --bs-btn-focus-shadow-rgb: 91, 192, 222;
}
.btn-dark {
  --bs-btn-color: #fff; --bs-btn-bg: var(--ou-dark); --bs-btn-border-color: var(--ou-dark);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #1f2327; --bs-btn-hover-border-color: #1f2327;
  --bs-btn-active-color: #fff; --bs-btn-active-bg: #1f2327; --bs-btn-active-border-color: #1f2327;
  --bs-btn-focus-shadow-rgb: 47, 53, 59;
}
/* Metronic "btn default": grey fill, #555 label (5.9:1) */
.btn-secondary {
  --bs-btn-color: #555; --bs-btn-bg: #e1e5ec; --bs-btn-border-color: #e1e5ec;
  --bs-btn-hover-color: #333; --bs-btn-hover-bg: #c2cad8; --bs-btn-hover-border-color: #c2cad8;
  --bs-btn-active-color: #333; --bs-btn-active-bg: #c2cad8; --bs-btn-active-border-color: #c2cad8;
  --bs-btn-disabled-color: #555; --bs-btn-disabled-bg: #e1e5ec; --bs-btn-disabled-border-color: #e1e5ec;
  --bs-btn-focus-shadow-rgb: 194, 202, 216;
}
/* Bootstrap 3 btn-default: white, grey border, #333 label */
.btn-outline-secondary {
  --bs-btn-color: #333; --bs-btn-bg: #fff; --bs-btn-border-color: #ccc;
  --bs-btn-hover-color: #333; --bs-btn-hover-bg: #e6e6e6; --bs-btn-hover-border-color: #adadad;
  --bs-btn-active-color: #333; --bs-btn-active-bg: #e6e6e6; --bs-btn-active-border-color: #adadad;
  --bs-btn-disabled-color: #333; --bs-btn-disabled-bg: #fff; --bs-btn-disabled-border-color: #ccc;
  --bs-btn-focus-shadow-rgb: 108, 117, 125;
}
.btn-outline-primary {
  --bs-btn-color: var(--ou-blue); --bs-btn-border-color: var(--ou-blue);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--ou-blue); --bs-btn-hover-border-color: var(--ou-blue);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--ou-blue-dark); --bs-btn-active-border-color: var(--ou-blue-dark);
  --bs-btn-focus-shadow-rgb: 32, 124, 187;
}
.btn-outline-success {
  --bs-btn-color: var(--ou-teal-text); --bs-btn-border-color: var(--ou-teal);
  --bs-btn-hover-color: var(--ou-label-dark); --bs-btn-hover-bg: var(--ou-teal); --bs-btn-hover-border-color: var(--ou-teal);
  --bs-btn-active-color: var(--ou-label-dark); --bs-btn-active-bg: var(--ou-teal-dark); --bs-btn-active-border-color: var(--ou-teal-dark);
  --bs-btn-focus-shadow-rgb: 50, 197, 210;
}
.btn-outline-danger {
  --bs-btn-color: var(--ou-red); --bs-btn-border-color: var(--ou-red);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--ou-red); --bs-btn-hover-border-color: var(--ou-red);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--ou-red-dark); --bs-btn-active-border-color: var(--ou-red-dark);
  --bs-btn-focus-shadow-rgb: 226, 44, 56;
}
.btn-outline-dark {
  --bs-btn-color: var(--ou-dark); --bs-btn-border-color: var(--ou-dark);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--ou-dark); --bs-btn-hover-border-color: var(--ou-dark);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: #1f2327; --bs-btn-active-border-color: #1f2327;
  --bs-btn-focus-shadow-rgb: 47, 53, 59;
}

/* Violet: the theme's name for Metronic "purple" (Bootstrap has no purple variant) */
.btn-violet {
  --bs-btn-color: #fff; --bs-btn-bg: var(--ou-purple); --bs-btn-border-color: var(--ou-purple);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--ou-purple-dark); --bs-btn-hover-border-color: var(--ou-purple-dark);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--ou-purple-dark); --bs-btn-active-border-color: var(--ou-purple-dark);
  --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: var(--ou-purple); --bs-btn-disabled-border-color: var(--ou-purple);
  --bs-btn-focus-shadow-rgb: 142, 68, 173;
}
.btn-outline-violet {
  --bs-btn-color: var(--ou-purple); --bs-btn-border-color: var(--ou-purple);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--ou-purple); --bs-btn-hover-border-color: var(--ou-purple);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--ou-purple-dark); --bs-btn-active-border-color: var(--ou-purple-dark);
  --bs-btn-focus-shadow-rgb: 142, 68, 173;
}
.text-violet { color: var(--ou-purple) !important; }
.bg-violet { background-color: var(--ou-purple) !important; }
.text-bg-violet { color: #fff !important; background-color: var(--ou-purple) !important; }

/* ---- Text and badges -----------------------------------------------------------------------
   .text-* and .text-bg-* share the --bs-*-rgb fills above. The teal and yellow fills are too
   light for white text and too light to be text themselves, so: text uses a darker shade, and
   badges/toasts on those fills get the dark label. */
.text-success, .link-success { color: var(--ou-teal-text) !important; }
.text-warning, .link-warning { color: var(--ou-yellow-text) !important; }
.text-info, .link-info { color: #1e6a80 !important; }
.text-bg-success, .text-bg-warning, .text-bg-info { color: var(--ou-label-dark) !important; }

/* ---- Cards: Metronic "portlet light bordered" ------------------------------------------- */
.card {
  --bs-card-border-color: var(--ou-border);
  --bs-card-border-radius: var(--ou-radius);
  --bs-card-inner-border-radius: calc(var(--ou-radius) - 1px);
  --bs-card-cap-bg: #fff;
  --bs-card-cap-padding-y: 0.75rem;
  --bs-card-cap-padding-x: 1.25rem;
  --bs-card-spacer-x: 1.25rem;
}
.card-header { min-height: 48px; border-bottom-color: var(--ou-border-soft); color: #222; }
.card-header .card-title { font-size: 16px; }

/* Bootstrap 3 compatibility kept on purpose (docs/ui-bs5/README.md): JS still toggles it */
.hidden { display: none !important; }

/* ---- Form controls ---------------------------------------------------------------------- */
.form-control, .form-select, .input-group-text { border-color: var(--ou-input-border); color: #555; }
.input-group-text { background-color: #e5e5e5; }
/* Checkboxes and radios need a visible edge (WCAG 2.1 1.4.11, 3:1): Metronic's input grey is
   1.7:1, which leaves an unticked box nearly invisible. */
.form-check-input { border-color: var(--ou-check-border); }
.form-check-input:checked { background-color: var(--ou-blue); border-color: var(--ou-blue); }

/* ---- Bootstrap 3 + Metronic metrics -----------------------------------------------------
   Bootstrap 5 sizes buttons, inputs and Select2 at 16px (38px high) with line height 1.5; the old
   layout used 14px (34px high) and 1.42857. Without these, every converted page has bigger
   controls and taller rows than before. (Found by the Phase 2 Survey and Tasks trials.) */
:root { --bs-body-line-height: 1.42857; }
.btn { --bs-btn-font-size: 0.875rem; --bs-btn-line-height: 1.42857; --bs-btn-padding-y: 0.375rem; --bs-btn-padding-x: 0.75rem; }
.btn-sm, .btn-group-sm > .btn { --bs-btn-font-size: 0.75rem; --bs-btn-line-height: 1.5; --bs-btn-padding-y: 0.3125rem; --bs-btn-padding-x: 0.625rem; --bs-btn-border-radius: 3px; }
.btn-lg, .btn-group-lg > .btn { --bs-btn-font-size: 1.125rem; --bs-btn-line-height: 1.3333333; --bs-btn-padding-y: 0.625rem; --bs-btn-padding-x: 1rem; --bs-btn-border-radius: 6px; }
/* btn-xs (Bootstrap 3 only; 251 uses) is kept rather than renamed to btn-sm, so those buttons don't grow */
.btn-xs, .btn-group-xs > .btn { --bs-btn-font-size: 0.75rem; --bs-btn-line-height: 1.5; --bs-btn-padding-y: 1px; --bs-btn-padding-x: 5px; --bs-btn-border-radius: 3px; }
.form-control, .form-select, .input-group-text { font-size: 0.875rem; line-height: 1.42857; }
.form-control-sm, .input-group-sm > .form-control, .input-group-sm > .input-group-text { font-size: 0.75rem; line-height: 1.5; padding: 0.3125rem 0.625rem; }
.form-select-sm, .input-group-sm > .form-select { font-size: 0.75rem; line-height: 1.5; padding-top: 0.3125rem; padding-bottom: 0.3125rem; padding-left: 0.625rem; }
/* input-lg: the rules above would otherwise outrank Bootstrap's own -lg (18px / 46px, 6px radius) */
.form-control-lg, .input-group-lg > .form-control, .input-group-lg > .input-group-text { font-size: 1.125rem; line-height: 1.3333333; padding: 0.625rem 1rem; border-radius: 6px; }
.form-select-lg, .input-group-lg > .form-select { font-size: 1.125rem; line-height: 1.3333333; padding-top: 0.625rem; padding-bottom: 0.625rem; padding-left: 1rem; border-radius: 6px; }
/* Metronic greys a read-only field (#eef1f5), so it doesn't look editable; Bootstrap 5 leaves it white */
.form-control[readonly] { background-color: #eef1f5; }

/* Select2 (select2-bootstrap-5-theme) at the same 14px / 34px as the inputs, small selects included
   (the Bootstrap 3 Select2 theme ignored input-sm). Pages load the vendor theme CSS after this file,
   so these carry .ou-app (on <body>; Select2's dropdown is appended inside it) to outrank it. */
.ou-app .select2-container--bootstrap-5 .select2-selection,
.ou-app .form-select-sm ~ .select2-container--bootstrap-5 .select2-selection { min-height: 34px; font-size: 0.875rem; line-height: 1.42857; }
.ou-app .select2-container--bootstrap-5 .select2-selection { border-color: var(--ou-input-border); } /* same grey as the inputs (focus and open colours come from the vendor theme) */
.ou-app .select2-container--bootstrap-5 .select2-dropdown,
.ou-app .select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option,
.ou-app .select2-container--bootstrap-5 .select2-search__field { font-size: 0.875rem; }
/* A multiple Select2 built inside a hidden modal measures a 0px search box, so its placeholder never
   shows. The Bootstrap 3 theme had a 5em minimum; while the placeholder is on, use the full width. */
.ou-app .select2-container--bootstrap-5 .select2-selection--multiple .select2-search__field { min-width: 5em; }
.ou-app .select2-container--bootstrap-5 .select2-selection--multiple .select2-search__field[placeholder]:not([placeholder=""]) { width: 100% !important; }
/* A multiple Select2 the way the Bootstrap 3 theme drew it: 22px chips (14px text), the search field
   beside them (it wraps under two long chips, which makes the box 61px), and a 34px box when it holds
   zero or one. The Bootstrap 5 theme makes the chips 16px / 36px and puts the field on its own full-width
   row, so two providers made the Daily Schedule bar 122px instead of 61px. (Found by batch B1's review.) */
.ou-app .select2-container--bootstrap-5 .select2-selection--multiple { padding: 0; min-height: 34px; }
.ou-app .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered { padding: 0; align-items: flex-start; }
.ou-app .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice { font-size: 0.875rem; line-height: 1.42857; padding: 0 6px; margin: 5px 0 0 6px; color: #555; background: #fff; border-color: #ccc; }
.ou-app .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice .select2-selection__choice__remove { margin-right: 3px; }
.ou-app .select2-container--bootstrap-5 .select2-selection--multiple .select2-search { width: auto; flex: 1 1 5em; min-width: 5em; height: 32px; }
.ou-app .select2-container--bootstrap-5 .select2-selection--multiple .select2-search .select2-search__field { height: 32px; padding: 0 12px; line-height: 1.42857; }

/* Tables, with the values of Metronic's Bootstrap build (global/plugins/bootstrap/css/bootstrap.min.css)
   and components CSS: #e7ecf1 rules, 2px under the header, #fbfcfd stripes, #f3f4f6 hover, 600-weight
   header cells at 14px, condensed cells 5px. */
.table {
  --bs-table-color: #333; --bs-table-border-color: #e7ecf1;
  --bs-table-striped-color: #333; --bs-table-striped-bg: #fbfcfd;
  --bs-table-hover-color: #333; --bs-table-hover-bg: #f3f4f6;
  --bs-table-active-color: #333; --bs-table-active-bg: #eef1f5;
}
.table > thead > tr > th, .table > thead > tr > td { font-weight: 600; vertical-align: bottom; border-bottom: 2px solid #e7ecf1; }
.table { margin-bottom: 20px; }
.table > :not(caption) > * > * { font-size: 14px; }
.table-sm > :not(caption) > * > * { padding: 5px; }

/* Labels and badges. The codemod turns Bootstrap 3 "label label-X" into "badge text-bg-X" (the large
   majority) and Metronic "badge badge-X" counters into "badge rounded-pill text-bg-X". So .badge carries
   Metronic's label look (14px, light, 3px 6px) and .badge.rounded-pill its counter look (11px). */
.badge { --bs-badge-font-size: 14px; --bs-badge-font-weight: 300; --bs-badge-padding-y: 3px; --bs-badge-padding-x: 6px; --bs-badge-border-radius: 0.25em; }
.badge:not(.rounded-pill) { display: inline; } /* Metronic labels are inline (25px high at 14px), not 20px blocks */
.badge.rounded-pill { --bs-badge-font-size: 11px; }

/* Pagination as Bootstrap 3 drew it (DataTables uses pagination-sm: 12px, 5px 10px, #ddd frame) */
.pagination { --bs-pagination-border-color: #ddd; --bs-pagination-hover-bg: #eee; --bs-pagination-hover-border-color: #ddd; --bs-pagination-active-bg: #337ab7; --bs-pagination-active-border-color: #337ab7; } /* Bootstrap 3's active page, 4.6:1 */
.pagination-sm { --bs-pagination-font-size: 12px; --bs-pagination-padding-x: 10px; --bs-pagination-padding-y: 5px; }

/* Modals: Bootstrap 3's dialog widths (600px default, 900px large); Bootstrap 5 uses 500 / 800.
   .modal-m, used by 27 templates, never had CSS of its own, so it is the default 600px again. */
.modal {
  --bs-modal-width: 600px;
  /* Bootstrap 3's dialog: 15px header and body padding (so a 52px header), a 6px radius, a 20%-black frame and
     a deep 0 5px 15px shadow (Bootstrap 5 draws none, so dialogs looked flat). */
  --bs-modal-padding: 15px; --bs-modal-header-padding: 15px; --bs-modal-header-padding-x: 15px; --bs-modal-header-padding-y: 15px;
  --bs-modal-border-color: rgba(0, 0, 0, 0.2); --bs-modal-border-radius: 6px; --bs-modal-inner-border-radius: 5px;
  --bs-modal-header-border-color: #e5e5e5; --bs-modal-footer-border-color: #e5e5e5;
  --bs-modal-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}
.modal-content { box-shadow: var(--bs-modal-box-shadow); } /* Bootstrap 5.3.8 declares the variable but never applies it */
@media (min-width: 992px) { .modal-lg { --bs-modal-width: 900px; } }
.modal-title { line-height: 1.42857; }

/* Metronic's vertical tabs (.nav-tabs.tabs-left, 5 templates) */
.nav-tabs.tabs-left { display: block; border-bottom: 0; border-right: 1px solid #ddd; }
.nav-tabs.tabs-left > li { float: none; margin-bottom: 0; }
.nav-tabs.tabs-left > li > a, .nav-tabs.tabs-left .nav-link {
  display: block; margin: 0 -1px 3px 0; padding: 10px 15px; border: 1px solid transparent; border-radius: 4px 0 0 4px; color: var(--ou-link);
}
.nav-tabs.tabs-left .nav-link:hover, .nav-tabs.tabs-left > li > a:hover { border-color: #eee #ddd #eee #eee; background: #eee; }
.nav-tabs.tabs-left .nav-link.active, .nav-tabs.tabs-left .nav-link.active:hover { border-color: #ddd transparent #ddd #ddd; background: #fff; color: #555; cursor: default; }

/* Headings at Bootstrap 3's sizes. Bootstrap 5's are 25-40% larger (h4 24px vs 18px, h5 20px vs
   14px), which would inflate every section title the templates draw with h4/h5. :where() keeps these
   (and the heading/paragraph rules below) as weak as Bootstrap 3's element selectors, so a page's own
   one-class rule (.task-activity-title, .psych-section …) still wins, as it did before. */
:where(.ou-app) h1, :where(.ou-app) .h1 { font-size: 2.25rem; }
:where(.ou-app) h2, :where(.ou-app) .h2 { font-size: 1.875rem; }
:where(.ou-app) h3, :where(.ou-app) .h3 { font-size: 1.5rem; }
:where(.ou-app) h4, :where(.ou-app) .h4 { font-size: 1.125rem; }
:where(.ou-app) h5, :where(.ou-app) .h5 { font-size: 0.875rem; }
:where(.ou-app) h6, :where(.ou-app) .h6 { font-size: 0.75rem; }
/* Headings and paragraphs as Bootstrap 3 + Metronic drew them: Metronic's light (300) headings in
   the surrounding text colour at line height 1.1, Bootstrap 3's heading margins, and Metronic's
   20px above and below paragraphs. Bootstrap 5 uses 500 weight, its own heading colour, 1.2, no top
   margin and 1rem below. (Found by the Phase 2 Survey trial.) */
:where(.ou-app) h1, :where(.ou-app) h2, :where(.ou-app) h3, :where(.ou-app) h4, :where(.ou-app) h5, :where(.ou-app) h6,
:where(.ou-app) .h1, :where(.ou-app) .h2, :where(.ou-app) .h3, :where(.ou-app) .h4, :where(.ou-app) .h5, :where(.ou-app) .h6 { font-family: "Open Sans", sans-serif; font-weight: 300; line-height: 1.1; color: inherit; }
:where(.ou-app) h1, :where(.ou-app) h2, :where(.ou-app) h3, :where(.ou-app) .h1, :where(.ou-app) .h2, :where(.ou-app) .h3 { margin-top: 20px; margin-bottom: 10px; }
:where(.ou-app) h4, :where(.ou-app) h5, :where(.ou-app) h6, :where(.ou-app) .h4, :where(.ou-app) .h5, :where(.ou-app) .h6 { margin-top: 10px; margin-bottom: 10px; }
:where(.ou-app) p, :where(.ou-app) hr { margin: 20px 0; }
/* Metronic zeroes the first paragraph's top margin inside a portlet body; the card body does the same. */
:where(.ou-app .card-body) > p:where(:first-child) { margin-top: 0; }

/* ---- More Bootstrap 3 + Metronic details, found by the Phase 2 batch A conversions ---------------
   (PRs #1009 and #1010 each measured their pages master against branch.) Same rule as above: the
   element-level ones go through :where() so a page's own one-class rule still wins, and
   components (.btn, .nav-link, .dropdown-item, .page-link …) that set a property keep it. */

/* Links: no underline until hovered (Bootstrap 3). Bootstrap 5's reboot underlines at rest. */
:where(.ou-app) a { text-decoration: none; }
/* ...and underlined on hover, in the page and its modals; the header and sidebar have their own hover looks */
:where(.ou-app) a:where(:hover, :focus):where(:not(.ou-topbar a, .ou-sidebar a)) { text-decoration: underline; }
:where(.ou-app) a.badge:where(:hover, :focus) { text-decoration: none; }

/* Bare form controls and buttons take the text colour around them (Bootstrap 3's normalize did);
   Bootstrap 5's reboot leaves the browser's black. */
:where(.ou-app) :is(button, input, select, textarea, optgroup) { color: inherit; }
/* Labels and checkboxes the way Bootstrap 3 spaced them. Classed Bootstrap 5 labels keep their own. */
:where(.ou-app) label:where(:not(.form-check-label, .form-label, .col-form-label, .btn, .input-group-text)) { margin-bottom: 5px; }
:where(.ou-app) input:where([type=checkbox], [type=radio]):where(:not(.form-check-input, .btn-check)) { margin: 4px 0 0; line-height: normal; }
.btn { white-space: nowrap; }

/* Small print: Bootstrap 3 is 85%, Bootstrap 5 .875em. Metronic resets it inside the page title. */
:where(.ou-app) small, :where(.ou-app) .small { font-size: 85%; }
.ou-main .page-title small { font-size: 14px; letter-spacing: 0; font-weight: 300; color: #6a6a6a; } /* Metronic #888 (3.0:1) darkened to 4.8:1 */

/* code: Bootstrap 3's pink chip (#c7254e on #f9f2f4) plus Metronic's frame and shadow; not inside <pre>. */
:root { --bs-code-color: #c7254e; }
:where(.ou-app) code { padding: 2px 4px; font-size: 90%; background-color: #f9f2f4; border: 1px solid #e1e1e1; border-radius: 4px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); }
:where(.ou-app) pre code { padding: 0; font-size: inherit; color: inherit; background: transparent; border: 0; border-radius: 0; box-shadow: none; }

/* Icons in page content, as Metronic's components CSS draws them: a 14px line box, and a centred
   1.25em box for an icon inside a list item (menus). Page content and modals only: the shell
   (header, sidebar) has its own icon rules. */
:where(.ou-main, .modal) :is([class*=" fa-"], [class^="fa-"]):not(.fa-stack) { display: inline-block; line-height: 14px; }
:where(.ou-main, .modal) li :is([class*=" fa-"], [class^="fa-"]) { display: inline-block; width: 1.25em; text-align: center; }

/* Pills as Bootstrap 3 drew them: 10px 15px links, 4px radius, the old blue for the active pill. */
.nav-pills { --bs-nav-link-padding-x: 15px; --bs-nav-link-padding-y: 10px; --bs-nav-pills-border-radius: 4px; --bs-nav-pills-link-active-bg: #337ab7; }

/* ---- Batch B details (Report and Pharmacy conversions, PRs #1013-#1015) ----------------------- */
/* Contextual table rows keep Metronic's strong fills (Bootstrap 5's are much paler): success #abe7ed,
   info #e0ebf9, warning #f9e491, danger #fbe1e3, a shade darker on hover, text #333. Pharmacy and the
   Case dashboards colour rows this way. */
.table-success { --bs-table-color: #333; --bs-table-bg: #abe7ed; --bs-table-striped-bg: #abe7ed; --bs-table-striped-color: #333; --bs-table-hover-bg: #96e1e8; --bs-table-hover-color: #333; --bs-table-border-color: #e7ecf1; --bs-table-active-bg: #96e1e8; --bs-table-active-color: #333; }
.table-info { --bs-table-color: #333; --bs-table-bg: #e0ebf9; --bs-table-striped-bg: #e0ebf9; --bs-table-striped-color: #333; --bs-table-hover-bg: #caddf4; --bs-table-hover-color: #333; --bs-table-border-color: #e7ecf1; --bs-table-active-bg: #caddf4; --bs-table-active-color: #333; }
.table-warning { --bs-table-color: #333; --bs-table-bg: #f9e491; --bs-table-striped-bg: #f9e491; --bs-table-striped-color: #333; --bs-table-hover-bg: #f7de79; --bs-table-hover-color: #333; --bs-table-border-color: #e7ecf1; --bs-table-active-bg: #f7de79; --bs-table-active-color: #333; }
.table-danger { --bs-table-color: #333; --bs-table-bg: #fbe1e3; --bs-table-striped-bg: #fbe1e3; --bs-table-striped-color: #333; --bs-table-hover-bg: #f8cace; --bs-table-hover-color: #333; --bs-table-border-color: #e7ecf1; --bs-table-active-bg: #f8cace; --bs-table-active-color: #333; }
/* An alert sits 20px above what follows (Bootstrap 5: 16px) */
.alert { --bs-alert-margin-bottom: 20px; }
/* Definition lists: Bootstrap 3 and Metronic set the line height on dt/dd themselves, so a wrapper's own line height no longer changes them */
:where(.ou-app) dt, :where(.ou-app) dd { line-height: 1.42857; }
/* Metronic's red required-field asterisk (a span.required inside a label) */
:where(.ou-app) :is(label, .form-label, .col-form-label, .control-label, .form-group) .required { color: #e02222; font-size: 12px; padding-left: 2px; }
/* The page-title subtitle's line box is its 14px font size, as Metronic draws it */
.ou-main .page-title small { line-height: 1; }
/* Menus: Bootstrap 3's 14px (Bootstrap 5 draws 16px). Pages that set their own menu sizes (Tasks) keep them. */
.dropdown-menu { --bs-dropdown-font-size: 0.875rem; }

/* Tooltips: same contrast fix as custom.min.css (55cb1d067) for the old layout. */
.tooltip { --bs-tooltip-opacity: 1; --bs-tooltip-font-size: 13px; }
.tooltip-inner { font-weight: 600; padding: 5px 10px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }

/* ---- DataTables (octane-ui.js sets the defaults and the Bootstrap 5 pager) ------------------
   datatables.min.css is written for DataTables' own look; these rules make tables look as they
   do on base.html.twig (Bootstrap 3 add-on): collapsed borders, Bootstrap table padding, sort
   arrows at the right of the header cell. */
table.dataTable { border-collapse: collapse !important; margin-top: 6px !important; margin-bottom: 6px !important; }
table.dataTable thead th, table.dataTable thead td { padding: 8px 26px 8px 8px; border-bottom: 1px solid var(--ou-border); }
table.dataTable tbody th, table.dataTable tbody td { padding: 8px; }
/* Metronic's DataTables cells, measured on a Bootstrap 3 page: header cells 10px 30px 10px 18px (room for the
   arrow on the right) that do not wrap, weight 700; body cells 8px 10px. The 4px of side padding is what
   keeps a button beside a status on one line (Referrals by Day rows were 20px taller without it). */
table.dataTable > thead > tr > th, table.dataTable > thead > tr > td { padding: 10px 30px 10px 18px; white-space: nowrap; font-weight: 700; }
table.dataTable > tbody > tr > th, table.dataTable > tbody > tr > td { padding: 8px 10px; }
table.dataTable.no-footer { border-bottom: 1px solid var(--ou-border); }
table.dataTable thead .sorting, table.dataTable thead .sorting_asc, table.dataTable thead .sorting_desc,
table.dataTable thead .sorting_asc_disabled, table.dataTable thead .sorting_desc_disabled { background-image: none !important; position: relative; }
table.dataTable thead .sorting::after, table.dataTable thead .sorting_asc::after, table.dataTable thead .sorting_desc::after {
  position: absolute; right: 8px; bottom: 9px; font-family: FontAwesome; font-size: 12px; opacity: 0.5;
}
table.dataTable thead .sorting::after { content: "\f0dc"; opacity: 0.2; }
table.dataTable thead .sorting_asc::after { content: "\f0de"; }
table.dataTable thead .sorting_desc::after { content: "\f0dd"; }
div.dataTables_wrapper div.dataTables_length label, div.dataTables_wrapper div.dataTables_filter label { margin: 0; font-weight: 400; white-space: nowrap; }
div.dataTables_wrapper div.dataTables_info { padding-top: 0; color: #666; }
div.dataTables_wrapper div.dataTables_paginate { margin: 0; }
div.dataTables_wrapper div.dataTables_processing { background: #fff; border: 1px solid var(--ou-border); box-shadow: var(--ou-shadow); }
.pagination { --bs-pagination-color: var(--ou-link); } /* active page and frame: see the Bootstrap 3 metrics section */
table.dataTable tbody tr.active > * { background-color: #f5f8fb; }

/* ---------------------------------------------------------------------------------------
   Staff shell (templates/base5.html.twig, base5.header.html.twig)
   --------------------------------------------------------------------------------------- */
:root {
  --ou-topbar-h: 50px;
  --ou-rail-w: 50px;        /* collapsed sidebar: icons, sub-menus fly out on hover */
  --ou-side-w: 235px;       /* expanded sidebar, as Metronic */
  --ou-side-current: var(--ou-rail-w);
}
html.ou-sb-expanded { --ou-side-current: var(--ou-side-w); }

body.ou-app { margin: 0; min-height: 100vh; background: var(--ou-page-bg); }

.ou-skip { position: absolute; left: 12px; top: 8px; z-index: 1100; background: #fff; padding: 6px 10px; border-radius: var(--ou-radius); }

.ou-topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--ou-topbar-h); z-index: 1030;
  display: flex; align-items: center; gap: 4px; padding: 0 12px 0 0;
  background: var(--ou-header-bg); color: var(--ou-header-text);
}
.ou-topbar-btn {
  width: var(--ou-rail-w); height: var(--ou-topbar-h); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; color: #a7b5c6; font-size: 18px; cursor: pointer;
}
.ou-topbar-btn:hover, .ou-topbar-btn:focus-visible { color: #fff; background: var(--ou-header-hover); }
.ou-brand { display: inline-flex; align-items: center; padding: 0 6px; }
.ou-cobrand { display: flex; align-items: center; gap: 9px; margin-left: 12px; padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, 0.18); }
.ou-cobrand span { color: rgba(255, 255, 255, 0.6); font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; }
.ou-cobrand img { max-height: 32px; max-width: 150px; background: #fff; border-radius: 4px; padding: 3px 6px; }
/* Phones (ADR-0067 D2b, approved by Pete 2026-11-25): a firm's logo pushed the user menu (the only Log Out) off the right edge;
   drop the "for" and keep the logo compact so the whole bar fits from 360px up. */
@media (max-width: 575.98px) {
  .ou-cobrand { margin-left: 6px; padding-left: 8px; gap: 4px; }
  .ou-cobrand span { display: none; }
  .ou-cobrand img { max-width: 84px; }
}
@media (max-width: 374.98px) { .ou-cobrand img { max-width: 68px; } } /* 360px phones: a wide logo at 84px still left 12px of the user menu off-screen */
.ou-topbar .header-global-search-trigger { float: none; margin: 0 0 0 18px; }

.ou-topbar-nav { display: flex; align-items: center; gap: 0; margin: 0 0 0 auto; padding: 0; list-style: none; }
.ou-topbar-nav > li { position: relative; }
.ou-topbar-nav > li > a {
  display: flex; align-items: center; gap: 7px; height: var(--ou-topbar-h); padding: 0 12px;
  color: var(--ou-header-text); text-decoration: none; position: relative; font-size: 13px;
}
.ou-topbar-nav > li > a > i { color: var(--ou-header-icon); font-size: 17px; }
.ou-topbar-nav > li > a:hover, .ou-topbar-nav > li > a:focus-visible, .ou-topbar-nav > li > a.show { background: var(--ou-header-hover); color: #fff; }
.ou-topbar-nav > li > a:hover > i, .ou-topbar-nav > li > a.show > i { color: #a4aebb; }
.ou-topbar-nav > li > a > .badge { position: absolute; top: 9px; right: 3px; font-size: 10px; padding: 3px 5px; }
.ou-topbar-nav .dropdown-toggle::after { display: none; } /* the templates draw their own angle icon */
.ou-topbar-nav .dropdown-menu { --bs-dropdown-font-size: 0.8125rem; --bs-dropdown-link-color: #6f6f6f; min-width: 200px; box-shadow: 5px 5px rgba(102, 102, 102, 0.1); }
.ou-topbar-nav .dropdown-menu > li > a:not(.dropdown-item) { display: block; padding: 0.4rem 1rem; color: #6f6f6f; text-decoration: none; }
.ou-topbar-nav .dropdown-menu .dropdown-item > i, .ou-topbar-nav .dropdown-menu > li > a > i { width: 18px; color: #888; }
.ou-topbar-nav .dropdown-menu .badge { float: right; margin-top: 2px; }
.ou-topbar-nav img.rounded-circle { object-fit: cover; }
.ou-avatar { width: 29px; height: 29px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--ou-header-hover); color: var(--ou-header-text); }
.ou-avatar > i { color: inherit; font-size: 14px; }

.ou-body { padding-top: var(--ou-topbar-h); }

.ou-sidebar {
  position: fixed; top: var(--ou-topbar-h); bottom: 0; left: 0; z-index: 1020;
  width: var(--ou-side-current); background: var(--ou-side-bg);
}
html.ou-sb-expanded .ou-sidebar { overflow-y: auto; }

.ou-main {
  margin-left: var(--ou-side-current); padding: 20px 20px 28px;
  min-height: calc(100vh - var(--ou-topbar-h) - 33px);
}
.ou-main:focus { outline: 0; }
.ou-footer { margin-left: var(--ou-side-current); padding: 8px 20px; font-size: 13px; color: var(--ou-footer-text); background: var(--ou-footer-bg); }
.ou-sb-backdrop { display: none; }

.ou-toasts { top: 62px !important; z-index: 1090; }
.ou-toasts .toast { --bs-toast-max-width: 520px; width: auto; min-width: 280px; }
.ou-block-msg { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--ou-radius); background: #fff; color: var(--ou-ink); box-shadow: var(--ou-shadow); font-size: 13px; }

/* The menu itself is base.left.menu.html.twig, shared with base.html.twig, so these rules style
   its existing class names: page-sidebar-menu, nav-item, nav-link, title, arrow, sub-menu,
   heading, open, active. octane-ui.js opens and closes sub-menus. */
.ou-sidebar .page-sidebar-wrapper, .ou-sidebar .page-sidebar { height: 100%; }
.ou-sidebar .page-sidebar-menu { list-style: none; margin: 0; padding: 0 0 24px !important; }
.ou-sidebar .page-sidebar-menu .sidebar-toggler-wrapper { display: none; }
.ou-sidebar .sub-menu { list-style: none; margin: 0; padding: 0 0 6px; display: none; }
.ou-sidebar li.open > .sub-menu { display: block; }
.ou-sidebar .page-sidebar-menu > li > a { border-top: 1px solid var(--ou-side-border); }
.ou-sidebar .page-sidebar-menu > li:first-child > a { border-top-color: transparent; }
.ou-sidebar .page-sidebar-menu li > a {
  display: flex; align-items: center; gap: 10px; padding: 10px 15px;
  color: var(--ou-side-text); font-size: 14px; font-weight: 300; text-decoration: none; white-space: nowrap;
}
.ou-sidebar .page-sidebar-menu li > a > i:first-child { width: 18px; flex-shrink: 0; text-align: center; color: var(--ou-side-icon); font-size: 16px; }
.ou-sidebar .page-sidebar-menu > li.open > a,
.ou-sidebar .page-sidebar-menu > li > a:hover { background: var(--ou-side-hover); color: var(--ou-side-text); }
.ou-sidebar .page-sidebar-menu > li.open > a > i:first-child,
.ou-sidebar .page-sidebar-menu > li > a:hover > i:first-child { color: #a7b5c6; }
.ou-sidebar .page-sidebar-menu li > a:focus-visible { outline: 2px solid var(--ou-side-active); outline-offset: -2px; }
/* Current page: the teal bar. Metronic draws white on it (2.1:1); the label is dark here. */
.ou-sidebar .page-sidebar-menu > li.active > a,
.ou-sidebar .page-sidebar-menu > li.active.open > a { background: var(--ou-side-active); border-top-color: transparent; color: var(--ou-side-active-text); font-weight: 600; }
.ou-sidebar .page-sidebar-menu > li.active > a > i:first-child,
.ou-sidebar .page-sidebar-menu > li.active > a .arrow::before { color: var(--ou-side-active-text) !important; }
.ou-sidebar .page-sidebar-menu > li.active + li > a { border-top-color: transparent; }
.ou-sidebar .page-sidebar-menu .title { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.ou-sidebar .page-sidebar-menu .selected { display: none; }
.ou-sidebar .page-sidebar-menu .arrow { margin-left: auto; }
.ou-sidebar .page-sidebar-menu .arrow::before { content: "\f104"; font-family: FontAwesome; color: var(--ou-side-icon); display: inline-block; transition: transform 0.15s; }
.ou-sidebar .page-sidebar-menu .arrow.open::before { transform: rotate(-90deg); }
.ou-sidebar .sub-menu li > a { padding: 8px 15px 8px 43px; font-size: 14px; }
.ou-sidebar .sub-menu li > a > i:first-child { font-size: 14px; }
.ou-sidebar .sub-menu .sub-menu li > a { padding-left: 58px; }
.ou-sidebar .sub-menu li.active > a, .ou-sidebar .sub-menu li.open > a, .ou-sidebar .sub-menu li > a:hover { background: var(--ou-side-sub-active); color: #fff; }
.ou-sidebar .sub-menu li.active > a > i:first-child, .ou-sidebar .sub-menu li > a:hover > i:first-child { color: #c4ccd6; }
.ou-sidebar .page-sidebar-menu li.heading { padding: 25px 15px 10px; }
.ou-sidebar .page-sidebar-menu li.heading h3, .ou-sidebar .page-sidebar-menu li.heading > * {
  margin: 0; font-size: 13px; font-weight: 400; text-transform: uppercase; color: var(--ou-side-heading);
}
.ou-sidebar .badge { font-size: 10px; }

/* Collapsed (the default, as in base.html.twig): an icon rail; hovering a top-level item shows
   its title and sub-menu beside the rail, as Metronic's closed sidebar does. Desktop only:
   below 992px the menu is off-canvas. */
@media (min-width: 992px) {
  html:not(.ou-sb-expanded) .ou-sidebar .page-sidebar-menu > li { position: relative; }
  html:not(.ou-sb-expanded) .ou-sidebar .page-sidebar-menu > li > a { justify-content: center; padding: 11px 0; }
  html:not(.ou-sb-expanded) .ou-sidebar .page-sidebar-menu > li > a > .title,
  html:not(.ou-sb-expanded) .ou-sidebar .page-sidebar-menu > li > a > .arrow,
  html:not(.ou-sb-expanded) .ou-sidebar .page-sidebar-menu > li > a > .badge,
  html:not(.ou-sb-expanded) .ou-sidebar .page-sidebar-menu > li.heading,
  html:not(.ou-sb-expanded) .ou-sidebar .page-sidebar-menu > li > .sub-menu { display: none !important; }
  html:not(.ou-sb-expanded) .ou-sidebar .page-sidebar-menu > li:hover > a > .title,
  html:not(.ou-sb-expanded) .ou-sidebar .page-sidebar-menu > li:focus-within > a > .title {
    display: block !important; position: absolute; left: var(--ou-rail-w); top: 0; width: 210px; height: 100%;
    padding: 0 15px; line-height: 42px; background: var(--ou-side-hover); color: var(--ou-side-text);
    border-radius: 0 4px 0 0; z-index: 2;
  }
  html:not(.ou-sb-expanded) .ou-sidebar .page-sidebar-menu > li.active:hover > a > .title,
  html:not(.ou-sb-expanded) .ou-sidebar .page-sidebar-menu > li.active:focus-within > a > .title { background: var(--ou-side-active); color: var(--ou-side-active-text); }
  html:not(.ou-sb-expanded) .ou-sidebar .page-sidebar-menu > li:hover > .sub-menu,
  html:not(.ou-sb-expanded) .ou-sidebar .page-sidebar-menu > li:focus-within > .sub-menu {
    display: block !important; position: absolute; left: var(--ou-rail-w); top: 100%; width: 210px;
    max-height: calc(100vh - 120px); overflow-y: auto; padding: 4px 0;
    background: var(--ou-side-bg); border-radius: 0 0 4px 4px; box-shadow: 5px 5px rgba(44, 53, 66, 0.2); z-index: 2;
  }
  html:not(.ou-sb-expanded) .ou-sidebar .page-sidebar-menu > li > .sub-menu li > a { padding-left: 15px; }
  html:not(.ou-sb-expanded) .ou-sidebar .page-sidebar-menu > li > .sub-menu .sub-menu li > a { padding-left: 30px; }
}

/* Below 992px the sidebar is off-canvas, opened by the menu button over the page. */
@media (max-width: 991.98px) {
  :root, html.ou-sb-expanded { --ou-side-current: 0px; }
  .ou-sidebar { width: var(--ou-side-w); transform: translateX(-100%); transition: transform 0.2s; overflow-y: auto; }
  html.ou-sb-open .ou-sidebar { transform: none; }
  html.ou-sb-open .ou-sb-backdrop { display: block; position: fixed; inset: var(--ou-topbar-h) 0 0 0; z-index: 1015; background: rgba(17, 24, 39, 0.35); }
  .ou-main { padding: 16px; }
  .ou-topbar .username-hide-on-mobile { display: none; }
}

/* Page header inside the content area (Metronic .page-title) */
.ou-main .page-title { margin: 25px 0; font-size: 24px; font-weight: 300; letter-spacing: -1px; color: var(--ou-muted); } /* base.html.twig's body.page-content-white: 24px, 25px 0 */

/* ---------------------------------------------------------------------------------------
   Sign-in layout (templates/base5.service.html.twig): the page frame Metronic's
   pages/css/login.min.css draws today, and the Bootstrap 3 / Metronic element defaults the
   sign-in pages were drawn with, so they keep their look. Pages with body_class "octane-auth"
   add web/ui/css/octane-auth.css on top, as they do now.
   --------------------------------------------------------------------------------------- */
/* Each selector is :where(body.ou-auth) + the selector Metronic / Bootstrap 3 used, so it has exactly the weight
   it had there: the pages' own CSS (octane-auth.css, body.octane-auth …) wins or loses exactly as it does on the
   old layout. (Example: Metronic's `.login .content .login-form { padding: 0 }` outweighs the page's
   `body.octane-auth .login-form` padding, so the sign-in fields sit flush with the card; that is the current look.) */
body:where(.ou-auth) { margin: 0; line-height: 1.42857143; } /* no min-height: Metronic's login page has none (octane-auth.css sets its own) */
:where(body.ou-auth).login { background-color: #364150; }
:where(body.ou-auth).login .logo { margin: 60px auto 0; padding: 15px; text-align: center; }
:where(body.ou-auth).login .content {
  display: block; width: 400px; max-width: calc(100% - 32px); margin: 40px auto 10px; padding: 10px 30px 30px;
  overflow: hidden; position: relative; background-color: #fff; border-radius: 7px;
}
:where(body.ou-auth).login .content h3 { color: #4db3a5; text-align: center; font-size: 28px; font-weight: 400 !important; }
:where(body.ou-auth).login .content .login-form, :where(body.ou-auth).login .content .forget-form { padding: 0; margin: 0; }
:where(body.ou-auth).login .content .forget-form { display: none; }
:where(body.ou-auth).login .content .form-title { font-weight: 300; margin-bottom: 25px; }
/* Metronic's grey sign-in inputs; text darkened from #8290a3 (2.5:1) to pass AA */
:where(body.ou-auth).login .content .form-control { background-color: #dde3ec; height: 43px; color: #4d5b6e; border: 1px solid #dde3ec; }
:where(body.ou-auth).login .content .form-control:focus { border: 1px solid #c3ccda; }
:where(body.ou-auth).login .content .form-control::placeholder { color: #8290a3; opacity: 1; }
:where(body.ou-auth).login .copyright { text-align: center; margin: 0 auto 30px; padding: 10px; color: #a0adbf; font-size: 13px; }
@media (max-width: 440px) {
  :where(body.ou-auth).login .content, :where(body.ou-auth).login .logo { margin-top: 10px; }
  :where(body.ou-auth).login .content { width: 280px; }
  :where(body.ou-auth).login .content h3 { font-size: 22px; }
}
/* Bootstrap 3 + Metronic element defaults (bootstrap.min.css, components-rounded.min.css) */
:where(body.ou-auth) a { text-decoration: none; }
:where(body.ou-auth) a:hover, :where(body.ou-auth) a:focus { color: var(--ou-link-hover); text-decoration: underline; }
:where(body.ou-auth) :is(h1, h2, h3, h4, h5, h6) { font-family: "Open Sans", sans-serif; font-weight: 300; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; }
:where(body.ou-auth) :is(h4, h5, h6) { margin-top: 10px; }
:where(body.ou-auth) h1 { font-size: 36px; }
:where(body.ou-auth) h2 { font-size: 30px; }
:where(body.ou-auth) h3 { font-size: 24px; }
:where(body.ou-auth) h4 { font-size: 18px; }
:where(body.ou-auth) h5 { font-size: 14px; }
:where(body.ou-auth) h6 { font-size: 12px; }
:where(body.ou-auth) p { margin: 20px 0; }
:where(body.ou-auth) :is(ul, ol) { margin-top: 0; margin-bottom: 10px; padding-left: 40px; }
:where(body.ou-auth) label { max-width: 100%; margin-bottom: 5px; font-weight: 400; }
:where(body.ou-auth) :is(b, strong) { font-weight: 700; }
:where(body.ou-auth) :is(button, input, optgroup, select, textarea) { color: inherit; font-weight: inherit; }
:where(body.ou-auth) :is(input[type="checkbox"], input[type="radio"]) { line-height: normal; }
:where(body.ou-auth) :is(td, th) { padding: 0; }
:where(body.ou-auth) svg { vertical-align: baseline; }
:where(body.ou-auth) code {
  padding: 2px 4px; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 90%; color: #c7254e; background-color: #f9f2f4;
  border: 1px solid #e1e1e1; border-radius: 4px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}
/* Metronic: no box shadow on buttons and inputs, ever (components-rounded.min.css `.btn,.form-control{box-shadow:none!important}`),
   so no focus ring or pressed shadow; buttons: 1.44 line height, no outline, no underline on a link button */
:where(body.ou-auth) :is(.btn, .form-control) { box-shadow: none !important; }
:where(body.ou-auth) .btn { --bs-btn-line-height: 1.44; --bs-btn-focus-box-shadow: none; outline: 0 !important; }
:where(body.ou-auth) .btn:hover, :where(body.ou-auth) .btn:focus { text-decoration: none; }

/* ---------------------------------------------------------------------------------------
   Compatibility for shared partials still on Bootstrap 3 / Metronic markup (ADR-0067).
   Scoped to the shell, so converted page markup can't come to rely on them. Remove in Phase 3.
   --------------------------------------------------------------------------------------- */
.hide { display: none !important; } /* Bootstrap 3 utility that page scripts still toggle */
.ou-topbar .badge-default, .ou-sidebar .badge-default { background: #bac3d0; color: var(--ou-label-dark); }
.ou-topbar .badge-success, .ou-sidebar .badge-success { background: var(--ou-side-active); color: var(--ou-label-dark); }
.ou-topbar .badge-danger, .ou-sidebar .badge-danger { background: var(--ou-red); color: #fff; }
.ou-topbar .badge-warning, .ou-sidebar .badge-warning { background: var(--ou-yellow); color: var(--ou-label-dark); }
.ou-topbar .badge-info, .ou-sidebar .badge-info { background: var(--ou-info); color: var(--ou-label-dark); }

/* base.pagebar.html.twig (Metronic page-bar / page-breadcrumb) */
.ou-main .page-bar { margin: -4px 0 6px; padding: 0; background: none; }
.ou-main .page-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.ou-main .page-breadcrumb > li { display: inline-flex; align-items: center; gap: 6px; color: #666; }
.ou-main .page-breadcrumb > li > i.fa-circle { font-size: 5px; color: #aaa; }
.ou-main .page-breadcrumb a { color: var(--ou-link); text-decoration: none; }
.ou-main .page-breadcrumb a:hover { text-decoration: underline; }
.ou-main .page-bar .page-toolbar { display: none; }

/* bootstrap-datepicker 1.5 dropdown under Bootstrap 5 (its own CSS still targets 3.x sizes) */
/* jQuery 3 + bootstrap-datepicker 1.5: the picker builds its views while detached, so jQuery's
   .show() leaves the current view without an inline display and the plugin's own
   `.datepicker > div { display: none }` hides it: the calendar opens as an empty strip.
   The other views keep their inline display:none, so this shows only the current one.
   Same fix as layouts/layout/css/custom.min.css for base.html.twig (cecba3773). */
.datepicker.datepicker-dropdown > div { display: block; }
.datepicker.dropdown-menu { padding: 4px; font-size: 13px; z-index: 1060 !important; }
.datepicker table tr td.active, .datepicker table tr td.active:hover,
.datepicker table tr td.active.active, .datepicker table tr td span.active { background: var(--ou-blue) !important; color: #fff !important; text-shadow: none; }
.datepicker table tr td.today { background: #fdf3d8 !important; }

/* ---- A3 detail (Billing Compliance and Client View conversions, PR #1019) --------------------- */
/* Bootstrap 5's reboot makes <summary> display:list-item, which draws the browser's disclosure
   triangle; Bootstrap 3 + Metronic (normalize) made it display:block, so no triangle appeared.
   Pages that style their own markers (list-style:none, ::before arrows, display:flex) are
   unaffected: their class selectors outrank this one. */
summary { display: block; }

/* ---- C1 detail (Inbox/Upload/SMS #1027, PDF intake/doc ingest/Balance/FALS #1026) -------------- */
/* An empty badge is hidden, as Bootstrap 3's .label:empty and Bootstrap 5's .badge:empty do. The
   inline rule above (0,2,0) outranked Bootstrap 5's .badge:empty, so an empty badge waiting for
   text drew as a coloured block (Upload's error badge; Pharmacy rxPatientHistory's thread status). */
.badge:not(.rounded-pill):empty, .badge:empty { display: none; }
/* Bootstrap 3 underlined .btn-link only on hover; Bootstrap 5 underlines it at rest. */
.btn-link { text-decoration: none; }
.btn-link:hover, .btn-link:focus { text-decoration: underline; }
/* Help text and field errors: Bootstrap 3's .help-block sizes (14px, #737373; errors #e73d4a). */
.form-text { font-size: 14px; color: #737373; margin-top: 5px; }
.invalid-feedback { font-size: 14px; color: #e73d4a; }
/* Progress bars: Bootstrap 3's 20px bar on a #f5f5f5 track, 20px below (Metronic drops the inset shadow). */
.progress, .progress-stacked { --bs-progress-height: 20px; --bs-progress-bg: #f5f5f5; margin-bottom: 20px; }
.progress-bar { line-height: 20px; }
/* List groups: Bootstrap 3's item padding, border and action-item text colour. */
.list-group { --bs-list-group-item-padding-x: 15px; --bs-list-group-item-padding-y: 10px; --bs-list-group-border-color: #ddd; --bs-list-group-action-color: #555; }

/* ---- C5-pre theme PR (ADR-0067): what the Case module needs, closed once here --------------------
   Each block below is one item (T2 … T7) and can be dropped on its own. */

/* T2. Metronic's number tiles (.dashboard-stat), the same markup as on base.html.twig, so the Case
   dashboards convert with their tiles unchanged:
     <a class="dashboard-stat dashboard-stat-v2 blue" href="…">
       <div class="visual"><i class="fa fa-comments"></i></div>
       <div class="details"><div class="number"><span data-counter="counterup" data-value="12">12</span></div>
         <div class="desc"> Requested </div></div>
     </a>
   Metronic's variant with a "View more" strip is a <div class="dashboard-stat …"> holding the same
   .visual/.details plus <a class="more" href="…">View more <i class="fa fa-arrow-right"></i></a> (a link
   cannot sit inside the <a> tile).
   Values and selector weights are Metronic's (components-rounded.css), checked against a Bootstrap 3 page
   (120px tile, 25px below, faded 110px icon, 34px/300 number, 16px/300 label). One difference in how, not
   in what: Metronic placed .details against the Bootstrap 3 column, which is position:relative; Bootstrap 5
   columns are not positioned, so the tile is, and .details sits at its right edge (the same place: the
   column's 15px padding was the offset). Colours: the six the templates use, with Metronic's white text. */
.dashboard-stat { display: block; position: relative; margin-bottom: 25px; overflow: hidden; border-radius: 4px; }
.dashboard-stat::before, .dashboard-stat::after { content: " "; display: table; }
.dashboard-stat::after { clear: both; }
.card .dashboard-stat:last-child { margin-bottom: 0; } /* Metronic: .portlet .dashboard-stat:last-child */
.dashboard-stat .visual { display: block; float: left; width: 80px; height: 80px; padding-top: 10px; padding-left: 15px; margin-bottom: 15px; font-size: 35px; line-height: 35px; }
.dashboard-stat.dashboard-stat-v2 .visual { padding-top: 35px; margin-bottom: 40px; }
.dashboard-stat .visual > i { margin-left: -35px; font-size: 110px; line-height: 110px; }
.dashboard-stat .details { position: absolute; top: 0; right: 0; padding-right: 15px; }
.dashboard-stat .details .number { padding-top: 25px; margin-bottom: 0; text-align: right; font-size: 34px; line-height: 36px; letter-spacing: -1px; font-weight: 300; }
.dashboard-stat .details .desc { text-align: right; font-size: 16px; letter-spacing: 0; font-weight: 300; }
.dashboard-stat .more { clear: both; display: block; position: relative; padding: 6px 10px; text-transform: uppercase; font-weight: 300; font-size: 11px; opacity: 0.7; }
.dashboard-stat .more:hover { text-decoration: none; opacity: 0.9; }
.dashboard-stat .more > i { display: inline-block; margin-top: 1px; float: right; }
.dashboard-stat.blue { --ou-stat-bg: #3598dc; --ou-stat-shade: #258fd7; }
.dashboard-stat.green { --ou-stat-bg: #32c5d2; --ou-stat-shade: #2bb8c4; }
.dashboard-stat.red { --ou-stat-bg: #e7505a; --ou-stat-shade: #e53e49; }
.dashboard-stat.yellow { --ou-stat-bg: #c49f47; --ou-stat-shade: #bb953c; }
.dashboard-stat.yellow-lemon { --ou-stat-bg: #f7ca18; --ou-stat-shade: #f2c308; }
.dashboard-stat.purple { --ou-stat-bg: #8e44ad; --ou-stat-shade: #823e9e; }
.dashboard-stat:is(.blue, .green, .red, .yellow, .yellow-lemon, .purple) { background-color: var(--ou-stat-bg); }
.dashboard-stat:is(.blue, .green, .red, .yellow, .yellow-lemon, .purple) .visual > i { color: #fff; opacity: 0.1; }
.dashboard-stat:is(.blue, .green, .red, .yellow, .yellow-lemon, .purple) .details .number { color: #fff; }
.dashboard-stat:is(.blue, .green, .red, .yellow, .yellow-lemon, .purple) .details .desc { color: #fff; opacity: 1; }
.dashboard-stat:is(.blue, .green, .red, .yellow, .yellow-lemon, .purple) .more { color: #fff; background-color: var(--ou-stat-shade); }

/* T4. Full-screen cards, Metronic's portlet "fullscreen" tool: a trigger with data-ou-fullscreen inside a
   .card (octane-ui.js) makes the card fill the window. z-index 1045: above the header (1030) and the
   sidebar (1020), below the modal backdrop (1050) and dialogs (1055), the Select2 (1051) and date-picker
   (1060) drop-downs, popovers, tooltips and toasts (1070-1090), as Metronic kept dialogs above a
   full-screen portlet. The card scrolls inside; the page behind does not. */
.card.ou-card-fullscreen { position: fixed; inset: 0; z-index: 1045; margin: 0 !important; border-radius: 0; overflow: auto; background-color: var(--bs-card-bg, #fff); }
html.ou-fullscreen-open { overflow: hidden; }
/* The trigger as Metronic drew it in a portlet header (.btn-circle.btn-icon-only.btn-default.fullscreen):
   a 27px white circle, #ccc edge, #a0a0a0 icon. Optional: a page may give its trigger its own look. */
.ou-fullscreen-btn { display: inline-flex; align-items: center; justify-content: center; width: 27px; height: 27px; padding: 0; border: 1px solid #ccc; border-radius: 25px; background: #fff; color: #a0a0a0; font-size: 13px; line-height: 1; vertical-align: middle; }
.ou-fullscreen-btn:hover, .ou-fullscreen-btn:focus { background: #e6e6e6; border-color: #adadad; color: #a0a0a0; text-decoration: none; }

/* T5. Required-field labels. Symfony marks a required field's label with "required"; Metronic drew every
   .required inside a .form-group red and 12px (.form-group .required), so form-row labels were red on
   Bootstrap 3 pages. A Bootstrap 5 form row is .mb-3 (form_row, and the codemod's form-group → mb-3), so
   this targets the label the Bootstrap 5 form theme puts directly in it: .form-label (a row), .col-form-label
   (a horizontal row, and the legend of a group of choices). Labels outside a form row (a page's own
   wrapper, as on /psych/request/new) stay as they are, as they did on master. Same weight as Metronic's
   rule, (0,2,0), so a page's own label rule of equal or more weight still wins, as it did on master.
   Metronic's 2px left padding (.form-group .required, also on master) is left out on purpose, a deliberate
   2px difference from master: on pages that style their labels themselves (Appointment edit, User
   edit/new) it would indent only the required ones.
   Checkbox labels still sit in the Bootstrap 3 .form-group wrapper (checkbox_row) and already get the rule
   above (".form-group .required"). */
:where(.ou-app .mb-3) > :is(.form-label, .col-form-label).required { color: #e02222; font-size: 12px; }

/* T6. Help text, card-header helper text and checkbox rows spaced as on Bootstrap 3 + Metronic. All three
   are opt-in classes: the same rules made global would move pages that are already converted and live
   (measured: a 5px bottom margin on .form-text moves 4 of them; 18 pages have form_row() checkbox rows),
   so new conversions add the class and converted pages stay exactly as they are. */
/* A converted .help-block: <div class="form-text ou-help-block">: 5px above (the .form-text rule) and 5px
   below, as Metronic's .help-block (Bootstrap 3 said 10px; Metronic overrides it to 5px). */
.form-text.ou-help-block { margin-bottom: 5px; }
/* Metronic's portlet .caption-helper, kept in the card header: <span class="caption-helper">…</span>.
   13px, regular, 13px line; Metronic's #9eacb4 is 2.3:1 on white, so it is darkened in the same hue to
   #667984 (4.5:1), as the theme does for any text that fails AA (theme-tokens.md). */
.card-header .caption-helper { padding: 0; margin: 0; font-size: 13px; font-weight: 400; line-height: 13px; color: #667984; }
/* Checkbox rows drawn by form_row(): the global Bootstrap 3 form theme still wraps each one in a .form-group,
   which has no margin on Bootstrap 5, so the rows are 26px apart (24px high) where master had 35px. Opt-in on the form
   (form_start(form, {attr: {class: 'ou-check-rows'}})), any container, or one row ({row_attr: {class:
   'ou-check-rows'}}): 10px above the box, 15px below the row and a 20px line, as on master. */
:is(.ou-check-rows .form-group, .form-group.ou-check-rows) { margin-bottom: 15px; }
:is(.ou-check-rows .form-group, .form-group.ou-check-rows) > .form-check { min-height: 20px; margin-top: 10px; margin-bottom: 10px; }

/* T7. Row "Actions" menus: their toggles draw their own down arrow (<i class="fa fa-angle-down">), and
   Bootstrap 3 drew no caret of its own, so Bootstrap 5's caret (.dropdown-toggle::after) is hidden on a
   toggle that holds a down-arrow icon; without this each such button shows two arrows. Every other
   dropdown keeps Bootstrap's caret (split toggles, toggles with text only or another icon). :has() needs
   Chrome/Edge 105, Safari 15.4 or Firefox 121 (2022-2023); an older browser shows both arrows. */
:where(.ou-app) .dropdown-toggle:has(> :is(.fa-angle-down, .fa-caret-down, .fa-chevron-down))::after { display: none; }
